segmentview

组成

  • 两个scrollview,标题栏由button组成

组成

Delegate

//跳转到第几页
- (void)scrollToItemAtIndex:(NSUInteger)index;

Datasource

@protocol HBSegmentViewDataSource <NSObject>

@optional
- (CGSize)sizeOfHeader;
- (CGSize)sizeOfIndicateView;

@required
- (NSUInteger)numberOfItems;
- (UIView *)itemViewAtIndex:(NSUInteger)index;
- (NSString *)titleForItemAtIndex:(NSUInteger)index;


@protocol HBSegmentBinderProtocol <NSObject>

@property (nonatomic, assign) NSUInteger selectedIndex;

- (UIView *)selectedItemView;

- (void)realodData;

- (void)setDelegate:(id<HBSegmentViewDelegate>)delegate;

- (void)setDataSource:(id<HBSegmentViewDataSource>)dataSource;

- (void)setHeaderBackgroundColor:(UIColor *)color;

- (void)setHeaderIsMultiplePage:(BOOL)isMultiplePage;

@end
  1. 总共有多少页
  2. dinging
  3. ding
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1、通过CocoaPods安装项目名称项目信息 AFNetworking网络请求组件 FMDB本地数据库组件 SD...
    阳明AI阅读 16,050评论 3 119
  • 你为何彷徨 你为何忧伤 你为何闷闷不乐 好似天大的坏事临到头上? 在选择的那一天 你便应知重担将临到身上 既已选择...
    酊鳴阅读 1,287评论 0 0
  • 总有一些人,还没来得及说再见,就已经消失于茫茫人海之中,今生今世也许再也无缘相见。 也许,人和人之间真的有冥冥之中...
    林清萓阅读 2,338评论 3 4
  • 有点难过吧,就好像是一个东西。 就算我知道不是这个意思。 但是做法就是这样。 是有点恶心吧,已经不止是难过了。 有...
    素时纪青柠阅读 1,157评论 0 0