xcode - iOS UINavagationBar 隐藏显示应该写在哪里?
PHP中文网
PHP中文网 2017-04-18 09:31:21
0
2
269

我出现的问题是:
rootViewController的navigationBar hide = yes,然后push到下一个页面时显示 navigationbar,都写在willApear 和 willDisAppear里,但是有一定的概率会变成rootViewController的naviagationBar加载push出的那个页面里.
一般来说,对于这种不断显示隐藏navigationBar的操作,写在哪里比较好

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
黄舟

You may have done some time-consuming operation on the navigationBar. It stands to reason that they all use the same naviBar, just set it as hidden or not

黄舟

Generally, it depends on whether there is more hidden or more displayed content in the application. I usually write the one with more content in rootViewController, and the other one is also in viewwillappear and disAppear. I have never encountered the kind of problem you mentioned. Please check carefully. Is the code stuck on the main thread due to some time-consuming operation during the loading process? According to the execution order, there is no problem.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!