我試圖從左邊,不正確的做出pushViewController幻燈片中,如下所示:背景中的CATransition白色閃光燈?
Page14Controller * controller = [[Page14Controller alloc] initWithNibName:@"Page14Controller" bundle:nil];
CATransition* transition = [CATransition animation];
transition.duration = 0.3;
transition.type = kCATransitionPush;
// transition.type = kCATransitionMoveIn;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
//kCATransitionMoveIn; //, kCATransitionPush, kCATransitionReveal, kCATransitionFade
transition.subtype = kCATransitionFromLeft;
//kCATransitionFromLeft, kCATransitionFromRight, kCATransitionFromTop, kCATransitionFromBottom
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:controller animated:NO];
當我這樣做時,電流控制器變淡白色,這看起來很可怕。爲什麼會發生?我已經嘗試將當前視圖的背景設置爲0.
TY!我確實有一個鬼鬼祟祟的UIView,在那裏是白色的,最終導致了白色背景「噪音」。 – Kalle
嗨,我有完全相同的問題,我試圖設置我的UIWindow alpha = 0的.backgroundColor,但它不能解決問題。你到底在幹什麼 ?謝謝。 – delannoyk
這是發生在ios 7你如何解決? – Nisha