现在的位置: 首页 > 综合 > 正文

DKTabPageViewController

2017年02月10日 ⁄ 综合 ⁄ 共 1014字 ⁄ 字号 评论关闭

DKTabPageViewController是一个UIViewController的子类,其基于Child ViewController管理多个页面,支持手动滚动,以及是否显示顶部的Tab等。


简单的接口:

@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地址

抱歉!评论已关闭.