1
所以我嘗試使用此代碼視圖之間切換:問題使用CATransitions切換視圖
CATransition *applicationLoadViewIn = [CATransition animation];
[applicationLoadViewIn setDuration:1];
[applicationLoadViewIn setType:kCATransitionReveal];
[applicationLoadViewIn setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
MyViewControllerClass *theControllerIAmSwitchingTo = [[MyViewControllerClass alloc] init];
[[theControllerIAmSwitchingTo.view layer] addAnimation:applicationLoadViewIn forKey:kCATransitionReveal];
但是,該代碼不起作用。沒有錯誤,並且代碼執行得很好,但它沒有做任何事情。我在這裏有什麼錯誤?
你在模擬器上測試它嗎? – 2010-12-22 07:20:33