在自定义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);

Unbalanced calls to begin/end appearance transitions for **的更多相关文章

  1. iOS BUG: Unbalanced calls to begin/end appearance transitions for <XXXViewController: 0x7fcea3730650>.

    自定义TabBarController Push下一级Controller时 会报这样的错误:Unbalanced calls to begin/end appearance transitions ...

  2. Xcode打印如下错误:Unbalanced calls to begin/end appearance transitions 解决办法

    今天在做自己的项目时遇到如下错误,项目运行以后,打印台打印如下: Unbalanced calls to begin/end appearance transitions for <HomeVi ...

  3. 有关RootViewController设置的问题和Unbalanced calls to begin/end appearance transitions for <CYLTabbarController>

    问题 今天做项目时遇到了一个问题,我想做一个登陆页面,在用户输入了登录名和密码后跳转到app主界面,最开始用的是在方法中新建一个appdelegate对象,再将其中的window属性设置Tabbar为 ...

  4. 自定义TabBarController报错 - Unbalanced calls to begin/end appearance transitions for <>

    自定义了TabBarController 之后必须实现以下方法才能避免报错 -(void)viewWillAppear:(BOOL)animated { [self.selectedViewContr ...

  5. childViewController 小计

    设置childViewcontroller Unbalanced calls to begin/end appearance transitions for 以上报错 需要添加 transitionF ...

  6. ios 各种技术

    1.NSlog  发布后不打印 #ifdef DEBUG// 如果有DEBUG这个宏就编译下面一句代码 #define DDLog(...) NSLog(__VA_ARGS__) #else // 如 ...

  7. 关于 presentViewController 时机

    类似微信.QQ这些应用如果用户没有登录,会弹出登录界面,如果 presentViewController 是写在  viewDidAppear 之前,会有警告 Presenting view cont ...

  8. iOS 开发知识小集(1)

    iOS 开发知识小集(1) 2015-05-15  iOS大全 (点击上方蓝字,快速关注我们) 一直想做这样一个小册子,来记录自己平时开发.阅读博客.看书.代码分析和与人交流中遇到的各种问题.之前有过 ...

  9. iOS:翻页效果

    // // main.m // Hello // // Created by lishujun on 14-8-28. // Copyright (c) 2014年 lishujun. All rig ...

随机推荐

  1. RESTFUL API 安全设计指南

    RESTFUL API 安全设计指南 xxlegend · 2015/10/18 15:08 0x01 REST API 简介 REST的全称是REpresentational State Trans ...

  2. freemarker数字格式化

    1.在模板中直接加.toString()转化数字为字符串,如:${languageList.id.toString()}: 2.在freemarker配置文件freemarker.properties ...

  3. property内存管理策略

    1普通数据,用weak 2delegate,用weak 3一般对象,用strong 4NSString,用copy 5block,用copy

  4. C# 基础知识总结

    要学好C#,基础知识的重要性不言而喻,现将常用到的一些基础进行总结,总结如下: 1. 数据类型转换: 强制类型转换(Chart--> int):  char cr='A';   int i = ...

  5. maven引入本地jar

    mvn install:install-file -Dfile=***.jar -DgroupId=**.***.** -DartifactId=* -Dversion=0.8.11 -Dpackag ...

  6. cfDNA(circulating cell free DNA)全基因组测序

    参考资料: [cfDNA专题]cell-free DNA在非肿瘤疾病中的临床价值(好) ctDNA, cfDNA和CTCs有什么区别吗? cfDNA你懂多少? 新发现 | 基因是否表达,做个cfDNA ...

  7. 解决在CAPSLOCK开启情况下sendkeys大小写异常的问题

    http://files.cnblogs.com/files/liuzhaoyzz/sendkeys%E5%A4%A7%E5%B0%8F%E5%86%99.rar 首先利用GetKeyState(vb ...

  8. virtualbox虚拟机中的centos与macos共享文件夹

    开发中需要用到linux环境,所以使用共享模式开发.通过samba服务器来实现. 环境: 虚拟机 virtualbox 虚拟系统 centos 6.6 本机 macos  192.168.1.102 ...

  9. this

    JavaScript 中的 this ! 2016-12-28 vvv阿城 JavaScript 转自  https://qiutc.me/post/this-this-this-in-javascr ...

  10. RedHat下Bugzilla的安装和配置

    Bugzilla 是一个开源的缺陷跟踪系统(Bug-Tracking System). OS:RedHat Linux 软件类型:开源 架构:B/S server端模块开发语言:perl(c/c++) ...