iPhone软件开发之UINavigationController 装载/卸载 ViewController 的注意事项
2009-07-17 21:21
525 查看
前一篇中说了用多线程搞定进度显示,后面问题就来了。
我这个 上传方式是,先显示 ProgressViewController 之后遍历数据结构,找到需要传的,然后进行上传
结束后,将 ProgressViewController 弹出,这样 有数据的时候,网络连接正常的情况下,没有问题,
但是,在没有网络的情况下,或者是没哟数据的情况下,那么
就会出现在很短的时间内进行 pushViewController, popViewController 的操作。
同时 这两个方法都指定了使用动画效果。
结果就乱掉了。 出现 明明push 结果导航栏没有任何显示,但是进度还存在在街面上,这下完了。
之后看了一下 官方文档,其中有说明
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
Parameters
viewController
The view controller that is pushed onto the stack. This object cannot be an instance of tab bar controller and it must not already be on the navigation stack.
animated
Specify
那么这个 animated 当为NO 的时候,证明需要设置导航栏的,或者是快速的 push pop 实际上也是设置导航
栏。
如果 将 push 处 的 animated 修改为 NO 问题就解决了,不过用户体验不好。
by vhly[FR]
date: 2009/07/17 21:30
HavE a GooD day.
&
nbsp;
我这个 上传方式是,先显示 ProgressViewController 之后遍历数据结构,找到需要传的,然后进行上传
结束后,将 ProgressViewController 弹出,这样 有数据的时候,网络连接正常的情况下,没有问题,
但是,在没有网络的情况下,或者是没哟数据的情况下,那么
就会出现在很短的时间内进行 pushViewController, popViewController 的操作。
同时 这两个方法都指定了使用动画效果。
结果就乱掉了。 出现 明明push 结果导航栏没有任何显示,但是进度还存在在街面上,这下完了。
之后看了一下 官方文档,其中有说明
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
Parameters
viewController
The view controller that is pushed onto the stack. This object cannot be an instance of tab bar controller and it must not already be on the navigation stack.
animated
Specify
YESto animate the transition or
NOif you do not want the transition to be animated. You might specify
NOif you are setting up the navigation controller at launch time.
那么这个 animated 当为NO 的时候,证明需要设置导航栏的,或者是快速的 push pop 实际上也是设置导航
栏。
如果 将 push 处 的 animated 修改为 NO 问题就解决了,不过用户体验不好。
by vhly[FR]
date: 2009/07/17 21:30
HavE a GooD day.
&
nbsp;
相关文章推荐
- iPhone开发笔记(20)EGOImageView的使用方法及注意事项
- iPhone开发笔记(20)EGOImageView的使用方法及注意事项
- Android开发之CardView使用的相关注意事项
- iphone使用loadNibNamed载入view在内存中得注意事项
- 【开发管理类软件必备知识视频教程之一】登录窗体前台注意事项
- 实施软件平台与框架开发的注意事项
- iPhone开发进阶(7)--- 利用ModalViewController切换View
- 【开发管理类软件必备知识视频教程之一】登录窗体前台注意事项
- 【开发管理类软件必备知识视频教程之一】登录窗体前台注意事项
- 【VS开发】关于在CFormView中实现CListCtrl控件的注意事项
- 软件开发注意事项分析
- (iOS开发)UIScrollView的使用以及注意事项
- IOS addChildViewController方法使用及注意事项
- 【开发管理类软件必备知识视频教程之一】登录窗体前台注意事项
- 软件开发注意事项
- 【开发管理类软件必备知识视频教程之二】登录窗体后台注意事项
- 软件开发SVN的使用方法和注意事项
- iPhone开发之音视频的播放——MPMoviePlayerViewController和AVAutoPlayer的使用
- 开发软件的命名注意事项
- 手机开发实战187——手机软件开发注意事项1