摘要: 0CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文1 CGContextMoveToPoint 开始画线2 CGContextAddLineToPoint 画直线4 CGContextAddEllipseInRect 画一椭圆4 CGContextSetLineCap 设置线条终点形状4 CGContextSetLineDash 画虚线4 CGContextAddRect 画一方框4 CGContextStrokeRect 指定矩形4 CGContextStrokeRectWithWidth 指定矩形线宽度4 CGConte 阅读全文
posted @ 2011-09-20 11:26 Gang.Wang 阅读(676) 评论(0) 推荐(0) 编辑
摘要: -(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 阅读全文
posted @ 2011-09-20 11:19 Gang.Wang 阅读(849) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2011-09-20 11:04 Gang.Wang 阅读(1794) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2011-09-20 11:01 Gang.Wang 阅读(746) 评论(1) 推荐(0) 编辑