首先我描写叙述一下问题:当我从一个view到另外一个view的时候?

解答:这个问题的解决还须要看setAnimationTransition:forView:cache: 官方Api,官方是这样说的:

1.Begin an animation block.

2.Set the transition on the container view.

3.Remove the subview from the container view.

4.Add the new subview to the container view.

5.Commit the animation block.

1.開始一个动画块。

2.在容器视图中设置转换。 3.在容器视图中移除子视图。 4.在容器视图中加入子视图。 5.结束动画块。

就是他全部的操作都是在父View上进行操作的。我的代码是这样写得:

 AppDelegate * delegate = [UIApplication sharedApplication].delegate;
delegate.nav_Center.view.backgroundColor = [UIColor clearColor];
//[delegate.window setBackgroundColor:[UIColor whiteColor]];
[self.navigationController.view superview].backgroundColor = [UIColor whiteColor];
for (UIViewController * c in delegate.nav_Center.viewControllers) {
if([c isKindOfClass:[TrendViewController class]]) {
if (curve>=0) {
[UIView beginAnimations: @"PopNav" context: nil];
[UIView setAnimationCurve: curve];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
NSLog(@"===%@=%@",[[self.navigationController.view superview] class],[self.navigationController.view class]);
[self.navigationController popViewControllerAnimated:NO];
[UIView commitAnimations];
}
else {
[self.navigationController popViewControllerAnimated:YES];
}
return YES;
}
}

直接设置要切换到view的父view的背景色就ok了。

当然了,有时候他的父view也可能是window。

详细情况详细分析吧。

希望能帮助一些人。

setAnimationTransition:forView:cache: 运行动画时背景色问题的更多相关文章

  1. LR运行场景时出现的error

    LR运行场景时出现的error 1.Action.c(24): Error -27740: Overlapped transmission of request to "home.asiai ...

  2. linux 环境下运行STS时 出现must be available in order to run STS

    linux 环境下运行ECLIPSE时 出现 “ A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be avai ...

  3. VS2010 F5调试时出现:“ 尝试运行项目时出错:未捕获通过反射调用的方法引发的异常”解决

    VS2010 F5调试时出现 尝试运行项目时出错:未捕获通过反射调用的方法引发的异常 两个解决方法:1) 打开项目属性,选择调试选项卡,将“启用非托管代码调试”一项钩上.2) 打开项目属性,选择调试选 ...

  4. 运行WampServer时,提示Exception Exception in module wampmanager.exe at 000F15A0.解决办法

    出现问题:运行WampServer时,提示Exception Exception in module wampmanager.exe at 000F15A0.解决办法 出现问题原因: ①:缺少Visu ...

  5. 在xcode运行编译时,编译成功,但项目中显示缺少该文件,这是只要关闭重启xcode即可。

    在xcode运行编译时,编译成功,但项目中显示缺少该文件,这是只要关闭重启xcode即可.

  6. eclipse中配置tomcat后,运行jsp时出现Server Tomcat v7.0 Server at localhost failed to start.

    最近在进行jsp开发学习,在配置上还是遇到很多问题. 在连接好数据库后,写了第一个jsp测试页面,结果在运行eclipse中运行toamcat时出现了错误提示:Server Tomcat v7.0 S ...

  7. 解决安装vc2005运行库时提示Command line option syntax error.Type Command/?for Help

    安装vc2005运行库时提示 这是因为它要自解压到用户的临时文件夹下,如果用户名中带中文,就会报错. 简单的解决方法是,手动解压之,再安装 当然,你也可以修改用户名或者再新建个用户.

  8. java io流 运行错误时,保存异常到文件里面

    java io流 运行错误时,保存异常到文件里面 下面这个实例,运行后,输入数字,为正确,如果输入字符串,则报错,保存错误信息 //运行错误时,保存异常到文件里面 //下面这个实例,运行后,输入数字, ...

  9. 运行ConnectionDemo时遇到的问题及解决方案

    20175227张雪莹 2018-2019-2 <Java程序设计> 运行ConnectionDemo时遇到的问题及解决方案 老师博客上提供确认数据库连接的代码 import static ...

随机推荐

  1. FOJ2022车站 线段树区间合并

    http://acm.fzu.edu.cn/problem.php?pid=2022 刚开始MLE,用map对应,果断爆内存了,然后改用去重,离散化, lowbound查找元素位置,速度还不错,不过p ...

  2. DataTable行转列

    /// <summary> /// DataTable行转列 /// </summary> /// <param name="dtable">需 ...

  3. iOS开发常用输入校验

    1.数字字符校验 #define NUMBERSPERIOD @"0123456789." - (BOOL)CheckInput:(NSString *)string { NSCh ...

  4. 过度拟合(overfitting)

    我们之前解决过一个理论问题:机器学习能不能起作用?现在来解决另一个理论问题:过度拟合. 正如之前我们看到的,很多时候我们必须进行nonlinear transform.但是我们又无法确定Q的值.Q过小 ...

  5. 在NodeJS中配置aws ec2

    获取access key和secret access key           自己账户下有security credentials的选项                      然后点击Acce ...

  6. HDU-4742 Pinball Game 3D 三维LIS

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4742 题意:求3维的LIS.. 用分治算法搞得,参考了cxlove的题解.. 首先按照x排序,然后每个 ...

  7. 获取iOS设备信息(内存/电量/容量/型号/IP地址/当前WIFI名称)

    1.获取电池电量(一般用百分数表示,大家自行处理就好) 1 2 3 4 -(CGFloat)getBatteryQuantity {         return [[UIDevice current ...

  8. Spark SQL应用

    Spark Shell启动后,就可以用Spark SQL API执行数据分析查询. 在第一个示例中,我们将从文本文件中加载用户数据并从数据集中创建一个DataFrame对象.然后运行DataFrame ...

  9. 宏_CRTIMP分析

    CRTIMP是C run time implement的简写,C运行库的实现的意思. 作为用户代码,不应该使用这个东西. 该参数决定 运行时 到底用 动态链接库 还是静态链接 #ifndef _CRT ...

  10. poj 1466 Girls and Boys(二分图的最大独立集)

    http://poj.org/problem?id=1466 Girls and Boys Time Limit: 5000MS   Memory Limit: 10000K Total Submis ...