iOS10 无论push还是present多次跳转问题

   override fun LoadView(){
    }

如果有一天,你发现你代码无论push还是present都跳转无数次,导致你写的控件都无法加载,请查看你要去的跳转页面是否有以上代码,有的话,请删除!

Discussion
You should never call this method directly. The view controller calls this method when its view property is requested but is currently nil. This method loads or creates a view and assigns it to the view property.

If the view controller has an associated nib file, this method loads the view from the nib file. A view controller has an associated nib file if the nibName property returns a non-nil value, which occurs if the view controller was instantiated from a storyboard, if you explicitly assigned it a nib file using the init(nibName:bundle:) method, or if iOS finds a nib file in the app bundle with a name based on the view controller'��s class name. If the view controller does not have an associated nib file, this method creates a plain UIView object instead.

If you use Interface Builder to create your views and initialize the view controller, you must not override this method.

You can override this method in order to create your views manually. If you choose to do so, assign the root view of your view hierarchy to the view property. The views you create should be unique instances and should not be shared with any other view controller object. Your custom implementation of this method should not call super.

If you want to perform any additional initialization of your views, do so in the viewDidLoad() method.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 175,815评论 25 709
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 14,276评论 4 61
  • Swift版本点击这里欢迎加入QQ群交流: 594119878最新更新日期:18-09-17 About A cu...
    ylgwhyh阅读 25,688评论 7 249
  • 01 我怕我记不住和你的故事 我怕有一天我突然失忆 我怕我失去生活到现在为止最快乐的时光 想用笔留住你 就算我们可...
    苏山是9号阅读 2,905评论 0 2
  • 离情 落枫 恍惚春秋一轮回,又到离别人心醉。 满池莲荷花正美,古月晨晓陌上随。 多少时光留不住,风云变幻有或没。 ...
    ToyIHere阅读 1,488评论 0 1