http://hi.baidu.com/sonnywh/blog/item/1254c600cff7950b728b659d.html
CATransition *transition = [CATransition animation];
transition.duration = 1.0f;/* 间隔时间*/
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];/* 动画的开始与结束的快慢*/
transition.type = @"reveal";/* 各种动画效果*/
//@"cube" @"moveIn" @"reveal" @"fade"(default) @"pageCurl" @"pageUnCurl" @"suckEffect" @"rippleEffect" @"oglFlip" @“twist”
transition.subtype = kCATransitionFromTop;/* 动画方向*/
//各种动画效果
/*
kCATransitionFade;
kCATransitionMoveIn;
kCATransitionPush;z
kCATransitionReveal;
*/
/*
kCATransitionFromRight;
kCATransitionFromLeft;
kCATransitionFromTop;
kCATransitionFromBottom;
*/
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
TestViewController *next = [[TestViewController alloc] init];
[self.navigationController pushViewController: next animated:NO];
http://hi.baidu.com/sonnywh/blog/item/3bcbba4b4f7a2bea83025c68.html
加入QuartzCore.framework
在.h中加入#import <QuartzCore/QuartzCore.h>
CALayer *navLayer = self.navigationController.navigationBar.layer;
navLayer.masksToBounds = NO;
navLayer.shadowColor = [UIColor blackColor].CGColor;
navLayer.shadowOffset = CGSizeMake(0.0, 4.0);
navLayer.shadowOpacity = 0.25f;
navLayer.shouldRasterize = YES
程序推送,或者AppStore软件有更新都会有提示,那代码怎么实现呢?
- (void)applicationDidFinishLaunching:(UIApplication *)application {
//...
[application setApplicationIconBadgeNumber:1];
}