Unbalanced calls to begin/end appearance transitions for **
在自定义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 **的更多相关文章
- iOS BUG: Unbalanced calls to begin/end appearance transitions for <XXXViewController: 0x7fcea3730650>.
自定义TabBarController Push下一级Controller时 会报这样的错误:Unbalanced calls to begin/end appearance transitions ...
- Xcode打印如下错误:Unbalanced calls to begin/end appearance transitions 解决办法
今天在做自己的项目时遇到如下错误,项目运行以后,打印台打印如下: Unbalanced calls to begin/end appearance transitions for <HomeVi ...
- 有关RootViewController设置的问题和Unbalanced calls to begin/end appearance transitions for <CYLTabbarController>
问题 今天做项目时遇到了一个问题,我想做一个登陆页面,在用户输入了登录名和密码后跳转到app主界面,最开始用的是在方法中新建一个appdelegate对象,再将其中的window属性设置Tabbar为 ...
- 自定义TabBarController报错 - Unbalanced calls to begin/end appearance transitions for <>
自定义了TabBarController 之后必须实现以下方法才能避免报错 -(void)viewWillAppear:(BOOL)animated { [self.selectedViewContr ...
- childViewController 小计
设置childViewcontroller Unbalanced calls to begin/end appearance transitions for 以上报错 需要添加 transitionF ...
- ios 各种技术
1.NSlog 发布后不打印 #ifdef DEBUG// 如果有DEBUG这个宏就编译下面一句代码 #define DDLog(...) NSLog(__VA_ARGS__) #else // 如 ...
- 关于 presentViewController 时机
类似微信.QQ这些应用如果用户没有登录,会弹出登录界面,如果 presentViewController 是写在 viewDidAppear 之前,会有警告 Presenting view cont ...
- iOS 开发知识小集(1)
iOS 开发知识小集(1) 2015-05-15 iOS大全 (点击上方蓝字,快速关注我们) 一直想做这样一个小册子,来记录自己平时开发.阅读博客.看书.代码分析和与人交流中遇到的各种问题.之前有过 ...
- iOS:翻页效果
// // main.m // Hello // // Created by lishujun on 14-8-28. // Copyright (c) 2014年 lishujun. All rig ...
随机推荐
- Javascript 字符串常用操作方法
1.字符串转换 /* 你可以将一个数字,布尔值,或一个字符串对象转换为字符串 */ var num= 18; var str1 = num.toString(); //'18' var str2 = ...
- VS学习
7.9 今天打开老师给的俄罗斯方块的程序,硬是跑不出来.已经遇到了这几个问题 [1]在项目属性里面C++目录中修改头文件和库函数的绝对路径(基础知识刚学会) [2]errorC1083 SDKDDKe ...
- mysql操作查询结果case when then else end用法举例
Case具有两种格式.简单Case函数和Case搜索函数. --简单Case函数 CASE sex WHEN '1' THEN '男' WHEN '2' THEN ...
- centos6.7 mutlipath install script
#!/bin/bash if [ `id -g` != 0 ] ;then echo -e "\033[31m Please use root user\033[0m" exit ...
- 微信微信JS-SDK 6.0.2 填坑笔记
0.为什么以前不需要配置这么麻烦就可以修改分享description 等信息,但是现在不行了. 因为6.0.2版本之前没有做权限验证,所以config都是ok,但这并不意味着你config中的签名是O ...
- iOS TextField用法大全
//初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 130, ...
- PHP Fatal error: Class 'DOMDocument' not found
PHP Fatal error: Class 'DOMDocument' not found 给PHP添加 xml模块: yum install php-xml 如果是PHP5,则用 yum in ...
- Load Runner录制C/S客户端
1. 打开应用程序 2. 点击如下菜单 弹出窗口如下 3. 点击New,弹出窗口如下,选择Web(HTTP/HTML) 4. 点击Create,弹出窗口 5. 点击OK, ...
- JavaScript中如何获取某年某月有多少天的问题
function getDaysInOneMonth(year, month){ month = parseInt(month,10); var d= new Date(year,month,0); ...
- 使用tomcat部署jsp程序
安装java1.6.0到默认目录 下载apache-tomcat-6.0.32-windows-x86.zip,解压到D:\soft目录下 配置环境变量 JAVA_HOME C:\Program Fi ...