美文网首页
self presentViewController self

self presentViewController self

作者: 哈么么茶 | 来源:发表于2016-04-14 14:48 被阅读574次

标题1

做pad项目时,调用popviewVC的

[self presentViewController:cityVc animated:YES completion:nil];```


![屏幕快照 2016-04-14 下午2.41.21.png](https://img.haomeiwen.com/i1433768/c20e03acfdd2fb68.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
调用之后要把POPVIewController dismiss:

![屏幕快照 2016-04-14 下午2.41.05.png](https://img.haomeiwen.com/i1433768/f471e050e233bb9e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

发现每次popVC消除,其present的新控制器也没了。IOS7好像不会、

解决方案是在popVC的View中提供block接口,别人创建POPVc时,给block赋值,内容包括创建新的控制器并present,消除POPViewVc。
![屏幕快照 2016-04-14 下午2.47.21.png](https://img.haomeiwen.com/i1433768/d48e4063c26fcd47.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

不清楚有没有内存问题。

相关文章

网友评论

      本文标题:self presentViewController self

      本文链接:https://www.haomeiwen.com/subject/thkilttx.html