pop&dismiss
2024-09-05 09:12:09
//dismiss到根视图
- (void)dismissToRootViewController{
UIViewController *vc = self;
while (vc.presentingViewController) {
vc = vc.presentingViewController;
}
[vc dismissViewControllerAnimated:YES completion:nil];
}
//这种更有效
UIViewController *vc =self.presentingViewController;
while (![vc isKindOfClass:[[UIApplication sharedApplication].keyWindow.rootViewController class]]) {
vc = vc.presentingViewController;
}
[vc dismissViewControllerAnimated:YES completion:nil];
//dismiss到指定界面
UIViewController *vc =self.presentingViewController;
while (![vc isKindOfClass:[[UIApplication sharedApplication].keyWindow.rootViewController class]]) {
vc = vc.presentingViewController;
}
[vc dismissViewControllerAnimated:YES completion:nil];
[self.navigationController popToRootViewControllerAnimated:YES];//pop到根视图
for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[WekeWordLockViewController class]]) {
WekeWordLockViewController *vc = (WekeWordLockViewController *)controller;
[self.navigationController popToViewController:vc animated:YES];
}
}
最新文章
- 浅谈利用SQLite存储离散瓦片的思路和实现方法
- gnu coreutils-8.25 for win32 static - Beta
- oracle undo回滚段详解
- 瀑布流布局——jquery
- [翻译]Primer on Cognitive Computing(认知计算入门)
- weedfs getsockopt: connection timed out
- android坐标
- java事务的处理
- ansible命令执行模块使用
- easyui源码翻译1.32--TreeGrid(树形表格)
- 杭州电 1372 Knight Moves(全站搜索模板称号)
- Rule Or WorkFlow
- hive Beeline plus HiveServer2简单使用
- Configuring Apache Kafka for Performance and Resource Management
- (一)java异常处理的几个问题
- open-falcon监控nginx
- python基础——函数
- Redis中的哈希(Hash)
- 拓展Scene视图——场景编辑Vector2/3
- c#发送短信
热门文章
- 21. Jmeter对数据库进行压力测试
- PAT_A1081#Rational Sum
- Codeforces 1191A Tokitsukaze and Enhancement
- jQuery 对象与 Dom 对象转化
- 剑指offer——51丑数
- li中下的a元素的字超出了li的宽度
- Redis数据结构之整数集合-intset
- ArcGis 字段计算器表达式(Field calculator expression).cal文件与标注表达式(label expression).lxp的实质及其编码方式、解析方法
- Ubuntu桌面突然卡住,图形界面无反应
- XOR linked list--- 异或链表