您的位置:首页 > 其它

DKTabPageViewController

2014-12-12 14:47 155 查看
DKTabPageViewController是一个UIViewController的子类,其基于Child ViewController管理多个页面,支持手动滚动,以及是否显示顶部的Tab等。每一个Tab对应一个UIViewController实例,与其他的Tab相互独立,View支持懒加载及viewWillAppear、viewWillDisappear等方法。





简单的接口:
@property (nonatomic, assign) NSInteger selectedIndex; @property (nonatomic, readonly) UIViewController *selectedViewController;
/** * Whether show the Tab Bar. Defaults to YES. */ @property (nonatomic, assign) BOOL showTabPageBar;
/** * Whether allow scroll gestures. Defaults to YES. */ @property (nonatomic, assign) BOOL gestureScrollEnabled;
/** * The block to be executed on the page changed. */ @property (nonatomic, copy) void (^pageChangedBlock)(NSInteger selectedIndex); 可定制的DKTabPageBar:
@interface DKTabPageBar : UIView
/** * Height of the tab bar. Defautls to 40. */ @property (nonatomic, assign) CGFloat tabBarHeight UI_APPEARANCE_SELECTOR;
/** * Font of the tab bar. Defautls to [UIFont systemFontOfSize:14]. */ @property (nonatomic, strong) UIFont *titleFont UI_APPEARANCE_SELECTOR;
/** * The selection indicator is draw on bottom of the tab bar. */ @property (nonatomic, strong) UIView *selectionIndicatorView;
@property(nonatomic, copy) UIColor *backgroundColor UI_APPEARANCE_SELECTOR;
@end

GitHub地址

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: