ZsIsMe / ios_core_animation_advanced_techniques

648 stars 169 forks source link

Chapter 5.1放射变换 #9

Closed niyaoyao closed 8 years ago

niyaoyao commented 8 years ago

代码的注释错了 - (void)viewDidLoad { [super viewDidLoad]; //create a new transform CGAffineTransform transform = CGAffineTransformIdentity; //scale by 50% transform = CGAffineTransformScale(transform, 0.5, 0.5); //rotate by 30 degrees transform = CGAffineTransformRotate(transform, M_PI / 180.0 * 30.0); //translate by 200 points transform = CGAffineTransformTranslate(transform, 200, 0); //apply transform to layer self.layerView.layer.affineTransform = transform; }

应该为 - (void)viewDidLoad { [super viewDidLoad]; CGAffineTransform transform = CGAffineTransformIdentity;//create a new transform transform = CGAffineTransformScale(transform, 0.5, 0.5); //scale by 50% transform = CGAffineTransformRotate(transform, M_PI / 180.0 * 30.0); //rotate by 30 degrees transform = CGAffineTransformTranslate(transform, 200, 0);//translate by 200 points //apply transform to layer self.layerView.layer.affineTransform = transform; }

ZsIsMe commented 8 years ago

3Q 改了