search

Home  >  Q&A  >  body text

ios - 为何新建的View在navigationBar.subViews中位于栈底?

如题

环境: Xcode-beta (8.0)
手机: iPhone 5S
系统: iOS 10.0

我在baseController中的willAppeardidAppearponavigationBar.subviews

数组结构如图. 为何didAppear中创建的视图会在数组的前面而非后面? 这导致了我视图层次结构有一些显示的问题. 我虽可在didAppearinsert时调整, 但因已didAppear了,所以之前的视图和insert之后调整的视图会有明显的效果. 这个效果并不是我想要的.

怎么图片不显示..........

高洛峰高洛峰2889 days ago383

reply all(2)I'll reply

  • 阿神

    阿神2017-04-18 09:26:27

    Solved.
    Under the guidance of an expert, main queue asynchronous was added to viewDidLoad. The problem was solved, but when the secondary interface returns, the problem still exists. I don’t know the reason, but it needs to be solved.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:26:27

    The bottom of the stack should be rootViewController, try setting this up

    reply
    0
  • Cancelreply