iOS 页面消失需要做处理的时候
作者:
一只帅气的猿 | 来源:发表于
2018-06-27 15:54 被阅读34次- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
NSArray *viewControllers = self.navigationController.viewControllers;//获取当前的视图控制其
if ([viewControllers indexOfObject:self] == NSNotFound) {
//当前视图控制器不在栈中,故为pop操作
UIWindow *window = [[UIApplication sharedApplication].windows lastObject];
UIButton *button = [window viewWithTag:180];
[button removeFromSuperview];
}
}
本文标题:iOS 页面消失需要做处理的时候
本文链接:https://www.haomeiwen.com/subject/ugzbyftx.html
网友评论