UIViewController无法pushcontroller问题

来源:互联网 发布:vue.js filter 编辑:程序博客网 时间:2024/05/04 13:05

在UIViewController A中push一个UIViewController B,一直无法推送成功

原来是A中 self.navigationController == nil,所以在 A 使用该方法[self.navigationController pushViewController:B animated:YES];加不进去B

问题出现在A上一级的推送方式,更改进入A的推送方式即可解决该问题:[self.navigationController pushViewController:A animated:YES];

0 0
原创粉丝点击