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
简单的接口:
@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地址
相关文章推荐
- ABPersonViewController+Delete
- PageViewController和UIPageControl
- iOS使用pageViewController实现多视图滑动切换
- 《iOS Human Interface Guidelines》——Page View Controller
- AddressBookUI.Framwork应用之ABPersonViewController, ABUnknownPersonViewController,ABNewPersonViewContro
- iOS7开发学习之路:No.8 引导页(2) 使用PageViewController
- [iPhone]如何在Tab Bar Controller里面使用ABPersonViewController?
- UIScrollViewAndUIPageController结合使用
- ios UIPageViewController+pageControl实现引导页
- 关于Page翻页效果--Page View Controller
- IOS开发 PageViewController和UIPageControl
- pageViewController实现多视图(控制器)滑动切换
- HomePageViewController
- AddressBookUI.Framwork应用之ABPersonViewController, ABUnknownPersonViewController,ABNewPersonViewContro
- iOS UI代码片段-UIPageViewController的使用
- ABPersonViewController不显示除了名称的属性
- iOS tabbarviewcontroller 快速点击subviewcontroller崩溃(anonymous namespace)::AutoreleasePoolPage::pop(void
- iOS—PageViewController循环切换界面问题
- 82 MPMoviePlayerViewController基本使用
- Android项目Tab类型主界面大总结 Fragment+TabPageIndicator+ViewPager