摘要:
0CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文1 CGContextMoveToPoint 开始画线2 CGContextAddLineToPoint 画直线4 CGContextAddEllipseInRect 画一椭圆4 CGContextSetLineCap 设置线条终点形状4 CGContextSetLineDash 画虚线4 CGContextAddRect 画一方框4 CGContextStrokeRect 指定矩形4 CGContextStrokeRectWithWidth 指定矩形线宽度4 CGConte 阅读全文
摘要:
-(void)viewDidLoad{array = [[NSMutableArray alloc] init];int i = 1;for(i;i<=30;i++){ [array addObject:[UIImageimageNamed:[NSString stringWithFormat:@"%d.jpg",i]]];}pictures.animationImages = array;pictures.animationDuration = 300;//时间间隔pictures.animationRepeatCount = 0;//循环播放[pictures s 阅读全文
摘要:
CALayer的CATransition就可以. CATransition *animation = [CATransition animation]; [animation setDelegate:self]; // [animation setType:@"oglFlip"]; [animation setType:@"cube"]; //[animation setType:kCATransitionPush]; [animation setSubtype:direction]; [animation setDuration:1.0f]; [ani 阅读全文
摘要:
const CGFloat kReflectPercent = -0.25f;const CGFloat kReflectOpacity = 0.3f;const CGFloat kReflectDistance = 10.0f;+ (void) addSimpleReflectionToView: (UIView *) theView{CALayer *reflectionLayer = [CALayer layer];reflectionLayer.contents = [theView layer].contents;reflectionLayer.opacity = kReflectO 阅读全文