CircularCollectionView 1.3

CircularCollectionView 1.3

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2015年12月

Jai Chaudhry 维护。



带环形滚动标题视图的Circular Collection View。

该组件用于在滚动栏中创建带有标题的环形collection view,这对于在一个屏幕上美丽地以可滚动方式呈现多个视图控制器非常有用。

Pod

您可以使用以下命令通过cocoapods进行集成:

pod 'CircularCollectionView'

示例

(这是集成控制器2分钟后的样子。)

demo

带箭头

arrow

如何使用?

1> 将JCECircularCollectionViewController.h导入到您的代码中。

#import "JCECircularCollectionViewController.h"

2> 初始化JCECircularCollectionViewController

JCECircularCollectionViewController *circularCollectionViewController = [[JCECircularCollectionViewController alloc] init];

3> 要显示箭头,请设置显示箭头标志并给出箭头颜色。

circularCollectionViewController.showArrow = YES;
circularCollectionViewController.arrowColor = [UIColor whiteColor];

4> 实现数据源方法

- (NSInteger)numberOfItems {
    return <total_number_of_items>;
}

- (NSString *)circularCollectionViewController:(JCECircularCollectionViewController *)circularCollectionViewController titleForItemAtIndex:(NSInteger)index {
    // The title corresponding to the view controller to be presented. These will be shown in a scroll view.
    return <title_to_be_displayed>;
}

- (UIViewController *)circularCollectionViewController:(JCECircularCollectionViewController *)circularCollectionViewController viewControllerForItemAtIndex:(NSInteger)index {
    // The view controllers whose view would be presented in the circular collection view.
    return <data-view-controller>;
}

5> 就这样。现在您可以根据需要进行循环CollectionViewController。

待办事项

1> 让它更易于定制。