Warning: Attempt to present * on * which is already presenting *


Warning: Attempt to present (要被presented的控制器)  on (哪個控制器來presenting) which is already presenting (已經被presenting的控制器)

self: 是被presented出來的控制器,

self.presentingViewController: 看看是誰把self給presenting出來

RPLog(@"%@ - %@", self.presentingViewController, [UIApplication sharedApplication].keyWindow.rootViewController);

打印結果: <RPNavigationController: 0x789d0330> - <RPNavigationController: 0x789d0330>

結論: popover中的控制器, 其實是通過窗口的根控制器presenting出來的, 所以要想窗口的根控制器再presenting其他控制器,需要先dismiss掉原來presenting的控制器,

        否則會出現如下錯誤:

        Warning: Attempt to present <RPNavigationController: 0x790dad10>  on <RPNavigationController: 0x78e76c70> which is already presenting <RPRegionViewController: 0x78f76700>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM