在自定义UITabBarController中点击视图跳转的时候,有可能就出现这个问题, 解决方法就是在自定义的UITabBarController中的视图显示消失通知方法中添加如下方法:

- (void)viewWillAppear:(BOOL)animated

{

[self.selectedViewController beginAppearanceTransition:YES animated:animated];

}

-(void)viewDidAppear:(BOOL)animated

{

[self.selectedViewController endAppearanceTransition];

}

-(void)viewWillDisappear:(BOOL)animated

{

[self.selectedViewController beginAppearanceTransition:NO animated:animated];

}

-(void)viewDidDisappear:(BOOL)animated

{

[self.selectedViewController endAppearanceTransition];

}

文档解释:

// If a custom container controller manually forwards its appearance callbacks, then rather than calling

// viewWillAppear:, viewDidAppear: viewWillDisappear:, or viewDidDisappear: on the children these methods

// should be used instead. This will ensure that descendent child controllers appearance methods will be

// invoked. It also enables more complex custom transitions to be implemented since the appearance callbacks are

// now tied to the final matching invocation of endAppearanceTransition.

- (void)beginAppearanceTransition:(BOOL)isAppearing animated:(BOOL)animated __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0);

- (void)endAppearanceTransition __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0);

最新文章

  1. javac编译不同目录的源码提示找不到符号
  2. Effective C++ 33 避免遮掩继承而来的名称
  3. 【微信Java开发 --番外篇】错误解析
  4. R语言书籍的学习路线图
  5. 307. Range Sum Query - Mutable
  6. UnitTest
  7. 在ubuntu16.04 下安装haproxy 1.5.11 做tcp负载均衡
  8. React表单组件自定义-可控及不可控组件
  9. 【转】Android:Touch事件分发机制
  10. 《Programming WPF》翻译 第3章 4.我们进行到哪里了?
  11. UESTC_棋盘游戏 CDOJ 578
  12. Android SDK 国内源-好用。
  13. ios字符串计算高度总结
  14. 解决php下多人同时操作数据表
  15. hdu 1392(凸包)
  16. 自己的包poi操作Excel工具
  17. css实现文本缩略显示
  18. 关于在windows上远行的虚拟机为ubuntu16.04中不能复制和粘贴的问题解决方案
  19. Web_Toy
  20. 可视化接口管理工具RAP,模拟数据,校验接口

热门文章

  1. App的启动过程
  2. JAVA 1.7 流程控制语句 续
  3. iOS - Safe iOS 加密安全
  4. DBUTIL 调用存储过程例子
  5. mybatis入门_配置文件的配置
  6. 老王讲自制RPC框架.(二.动态代理)
  7. vCenter Server Appliance
  8. MySQL 数据库的导入 导出
  9. ID3、C4.5、CART、RandomForest的原理
  10. JS与树本(复杂)