如何在iOS7上按下/弹出时禁用视图生成的阴影?

时间:2013-10-24 18:18:25

标签: ios iphone objective-c ios7

在我的应用程序中,我有一个清晰的背景颜色集,因为我有一个视图,我作为背景动画。

因此,在推送视图时(在iOS 7上),Apple会在最靠近右侧的视图上生成投影(参见图像)

我试图在2-3个视图之间导航,因为我有一个清晰的背景颜色,它会产生一个不必要的阴影

是否有任何干净的解决方案来禁用此生成的投影?

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以使用animation = NO调用push / pop viewcontroller并将此代码放在您正在推送的viewController的viewDidAppear上:

[UIView animateWithDuration:1.2 
                 animations:^{
                     self.view.frame = CGRectMake(320, 0, 320, 480);
                 }];

这样,当你弹出viewController时:

[UIView animateWithDuration:1.2 
                 animations:^{
                     self.view.frame = CGRectMake(0, 0, 320, 480);
                 }];