标签:style blog io ar color os 使用 sp for
1 // 向上移动 2 - (IBAction)top:(UIButton *)sender { 3 // 1.transform是相对于初始状态的一种状态,但是其实self.head.frame.origin的值已经被改变了 4 // self.head.transform = CGAffineTransformMakeTranslation(0, self.head.transform.ty - 20); 5 6 // 2.使用原有的transform生成新的transform 7 self.head.transform = CGAffineTransformTranslate(self.head.transform, 0, -20); 8 }
1 // 缩小 2 - (IBAction)narrow:(UIButton *)sender { 3 // 缩小20% 4 self.head.transform = CGAffineTransformScale(self.head.transform, 0.8, 0.8); 5 }
1 // 顺时针旋转 2 - (IBAction)wiseRotate:(UIButton *)sender { 3 // 旋转45° 4 self.head.transform = CGAffineTransformRotate(self.head.transform, M_PI_4); 5 }
标签:style blog io ar color os 使用 sp for
原文地址:http://www.cnblogs.com/hellovoidworld/p/4119711.html