日常记录
修改过需要执行此方法,刷新状态栏
- (void)setNeedsStatusBarAppearanceUpdate NS_AVAILABLE_IOS(7_0) __TVOS_PROHIBITED;
是否显示状态栏
@property(nonatomic, readonly) UIStatusBarStyle preferredStatusBarStyle NS_AVAILABLE_IOS(7_0) __TVOS_PROHIBITED; // Defaults to UIStatusBarStyleDefault
状态栏样式
@property(nonatomic, readonly) UIStatusBarStyle preferredStatusBarStyle NS_AVAILABLE_IOS(7_0) __TVOS_PROHIBITED; // Defaults to UIStatusBarStyleDefault
隐藏tabbar图标
@property(nonatomic) BOOL hidesBottomBarWhenPushed __TVOS_PROHIBITED; // If YES, then when this view controller is pushed into a controller hierarchy with a bottom bar (like a tab bar), the bottom bar will slide out. Default is NO.
重写UINavigation方法
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
-(void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
if (self.viewControllers.count) {
viewController.hidesBottomBarWhenPushed = YES;
}
[super pushViewController:viewController animated:animated];
}
参考:
获取信号直到signalTrigger
信号执行完成
- (RACSignal *)takeUntil:(RACSignal *)signalTrigger;
即将dealloc的时候会发出此信号
- (RACSignal *)rac_willDeallocSignal;
takeUntil:self.rac_willDeallocSignal:意思为self即将dealloc时释放此信号订阅
[[self.viewModel.cellClickSubject takeUntil:self.rac_willDeallocSignal] subscribeNext:^(id x) {
NSLog(@"cellClick");
}];
关于RAC什么时候使用@weakify(self)、@strongify(self) : viewcontroller需要,viewModel与view不需要
在使用 'mas_updateConstraints' 方法更新约束是需要注意,保持与初始化时所使用的语句一致。如: 初始化使用了 'make.width.mas_equalTo' 设置width,在更新约束时也应使用此语句。