翻墙
Resizing Techniques and Image Quality That Every iOS Developer Should Know
简书
{
大神:
mikeash.com
mikeash.com: just this guy, you know?
Key-Value Observing Done Right
}
【iOS】KVO方式监听数组的变化动态刷新tableView
Objective-C页面消失或出现时,判断是pop还是push操作
页面出现时会先后执行:
-(void)viewWillAppear:(BOOL)animated
-(void)viewDidAppear:(BOOL)animated
这两个方法;如果是push出来的页面则还会执行:
- (void)viewDidLoad
所以可在viewdidload里加个 isPush = YES布尔值,然后在Appear中根据isPush判断是push还是pop:
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (_isPush) {
//push
}else{
//pop
}
}
别忘了页面消失时置isPush为NO:
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
_isPush = NO;
}