2012-05-30 51 views

回答

17

我知道這是一個古老的線程,但這個工作對我來說:

CATransition *transition = [CATransition animation]; 
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 
transition.type = kCATransitionFade; 
transition.duration = 0.5; 

[self.navigationController.navigationBar.layer addAnimation:transition forKey:nil]; 
[self.navigationController.navigationBar setBackgroundImage:[[UIImage imageNamed:@"navigationbar.png"]resizableImageWithCapInsets:UIEdgeInsetsMake(44, 20, 44, 20)] forBarMetrics:UIBarMetricsDefault];   

將在這裏面你viewDidLoad方法。您需要鏈接/導入QuartzCore框架的

+0

我早就放棄了這一點,不過謝謝發帖。這可能有一天會派上用場。 – bpercevic

相關問題