项目中遇到的问题(一)弹出UIAlertController 时出现 Warning: Attempt to present * on * which is already presenting
来源:互联网 发布:蓝韵网络 编辑:程序博客网 时间:2024/05/30 23:51
UITableView 显示的是城市的信息
在点击Cell 执行
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
1.方法时创建UIAlertController 对象并添加UIAlertAction
}
这时调用
[self presentViewController:controller animated:YES completion:nil];
可以弹出action sheet.
*******出错处!!!!!
给tableview 加上 UISearchController
搜索成功的数据更新以后再点击cell时,执行
[self presentViewController:controller animated:YES completion:nil];出错原因是: Warning: Attempt to present * on * which is already presenting
解决方法:例如infoArray 是搜索结果保存的数组,在
[infoArray objectAtindex: indexPath.row]; 之前加上上面这句 即可解决。
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[selfdismissViewControllerAnimated:YEScompletion:nil]];
[infoArray objectAtindex: indexPath.row]; 之前加上上面这句 即可解决。
}
2 0
- 项目中遇到的问题(一)弹出UIAlertController 时出现 Warning: Attempt to present * on * which is already presenting
- WKwebview弹框报错Attempt to present <UIAlertController> on <XX>which is already presenting (null)
- Warning: Attempt to present <...> on <…> which is already presenting null
- Warning: Attempt to present UINavigationController on NavigationController which is already presenti
- Warning: Attempt to present <UIImagePickerController: 0x292b400> on xxx which is already presenti
- iOS - 解决Warning: Attempt to present <UIImagePickerController: 0x7f9ba106a000>which is already presen
- 使用AlertController出现:Warning: Attempt to present <UIAlertController: 0x7a961600>
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- 对Warning: Attempt to present on whose view is not in the window hierarchy!的解决方案
- iOS: Warning: Attempt to present <ModalViewController> on <ViewController>while a presentation is in
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- Warning: Attempt to present * on * whose view is not in the window hierarchy!
- Warning: Attempt to present xx on yy whose view is not in the window hierarchy!
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- Warning: Attempt to present A on B whose view is not in the window hierarchy!
- 给定两个已排序的表L1和L2 只使用基本的表操作编写计算L1∪L2的过程 并集
- ASP.NET MVC4 身份认证和授权
- 进制的转换
- Linux(centos7)下查看MySQL的安装路径
- hdu4310(贪心)
- 项目中遇到的问题(一)弹出UIAlertController 时出现 Warning: Attempt to present * on * which is already presenting
- 错误票据 蓝桥杯
- 【LatinIME】默认开启键盘按键声
- 八、Window
- 5-35计算N个分式有理数的平均值
- uva620 - Cellular Structure
- 炮弹攻击
- (1)线性查找和二分搜索
- spring异常:FileNotFoundException: Could not open ServletContext resource [/WEB-INF/XX-servlet.xml