NYSBaseViewController Class Reference
| Inherits from | UIViewController |
|---|---|
| Declared in | NYSBaseViewController.h NYSBaseViewController.m |
Other Methods
– bindViewModel
// 关闭拓展全屏布局,等效于automaticallyAdjustsScrollViewInsets = NO;
self.edgesForExtendedLayout = UIRectEdgeNone;
if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
self.navigationController.navigationBar.translucent = YES;
self.automaticallyAdjustsScrollViewInsets = YES;
}
- (void)bindViewModelDiscussion
// 关闭拓展全屏布局,等效于automaticallyAdjustsScrollViewInsets = NO;
self.edgesForExtendedLayout = UIRectEdgeNone;
if ([self respondsToSelector:@selector(edgesForExtendedLayout)]) {
self.navigationController.navigationBar.translucent = YES;
self.automaticallyAdjustsScrollViewInsets = YES;
}
Declared In
NYSBaseViewController.m
– configTheme
Theme UI VM, allow overridden
- (void)configThemeDiscussion
Theme UI VM, allow overridden
Declared In
NYSBaseViewController.h
– dataSourceArr
Lazy load主数据源
- (NSMutableArray *)dataSourceArrDiscussion
Lazy load主数据源
Declared In
NYSBaseViewController.m
– tableView
Lazy load UITableView
- (UITableView *)tableViewReturn Value
UITableView
Discussion
Lazy load UITableView
Declared In
NYSBaseViewController.m
– collectionView
Lazy load collectionView
- (UICollectionView *)collectionViewReturn Value
collectionView
Discussion
Lazy load collectionView
Declared In
NYSBaseViewController.m
– headerRereshing
Pull down refresh handler
- (void)headerRereshingDiscussion
Pull down refresh handler
Declared In
NYSBaseViewController.h
– footerRereshing
Pull up refresh handler
- (void)footerRereshingDiscussion
Pull up refresh handler
Declared In
NYSBaseViewController.h
– backBtnOnclicked:
Default pop back, allow overridden
- (void)backBtnOnclicked:(UIButton *)senderDiscussion
Default pop back, allow overridden
Declared In
NYSBaseViewController.h
– addNavigationItemWithTitles:alignment:completion:
导航栏添加文字按钮 - Parameters: - titles: 文字数组 - alignment: 靠左\靠右 - completion: 点击回调
- (void)addNavigationItemWithTitles:(NSArray<NSString*> *)titles alignment:(NYSNavItemAlignment)alignment completion:(NYSNavItemCompletion)completionDiscussion
导航栏添加文字按钮 - Parameters: - titles: 文字数组 - alignment: 靠左\靠右 - completion: 点击回调
Declared In
NYSBaseViewController.m
– addNavigationItemWithImages:alignment:completion:
导航栏添加图标按钮 - Parameters: - images: 图标数组 - alignment: 靠左\靠右 - completion: 点击回调
- (void)addNavigationItemWithImages:(NSArray<UIImage*> *)images alignment:(NYSNavItemAlignment)alignment completion:(NYSNavItemCompletion)completionDiscussion
导航栏添加图标按钮 - Parameters: - images: 图标数组 - alignment: 靠左\靠右 - completion: 点击回调
Declared In
NYSBaseViewController.m
– addNavigationItems:alignment:completion:
导航栏添加按钮(指定tag值) - Parameters: - buttonArray: 按钮数组 - alignment: 靠左\靠右 - completion: 点击回调
- (void)addNavigationItems:(NSArray<UIButton*> *)buttonArray alignment:(NYSNavItemAlignment)alignment completion:(NYSNavItemCompletion)completionDiscussion
导航栏添加按钮(指定tag值) - Parameters: - buttonArray: 按钮数组 - alignment: 靠左\靠右 - completion: 点击回调
Declared In
NYSBaseViewController.m
Other Methods
customStatusBarStyle
状态栏主题样式
@property (nonatomic, assign) UIStatusBarStyle customStatusBarStyleDiscussion
状态栏主题样式
Declared In
NYSBaseViewController.h
isHidenNaviBar
是否隐藏导航栏 default :NO *
@property (nonatomic, assign) BOOL isHidenNaviBarDiscussion
是否隐藏导航栏 default :NO *
Declared In
NYSBaseViewController.h
isShowLiftBack
是否显示返回按钮 default :YES
@property (nonatomic, assign) BOOL isShowLiftBackDiscussion
是否显示返回按钮 default :YES
Declared In
NYSBaseViewController.h
isUseUIRefreshControl
是否使用系统样式(UIRefreshControl) default :YES
@property (nonatomic, assign) BOOL isUseUIRefreshControlDiscussion
是否使用系统样式(UIRefreshControl) default :YES
Declared In
NYSBaseViewController.h
emptyError
Empty \ Error info
@property (nonatomic, strong) NSError *emptyErrorDiscussion
Empty \ Error info
Declared In
NYSBaseViewController.h