1.frame(修改位置和尺寸):以父控件左上角为坐标原点,在其父控件中的位置和尺寸。
CGRect tempFrame = self.v.frame;
tempFrame.origin.y+=10;
self.v.frame=tempFrame;
2.bounds(修改尺寸):以自己左上角为坐标原点(x=0,y=0),控件的位置和尺寸。
//因为其始终以自身左上角为坐标原点,所以只能修改尺寸,修改位置不会改变
CGRect tempBounds = self.v.bounds
tempBounds.size.height-=10
tempBounds.size.width-=10
self.v.bounds=tempBounds
3.center(修改位置):以父控件的左上角为坐标原点,其控件中点的位置。
CGPoint tempCenter = self.v.center
tempCenter.y -= 10
self.v.center = tempCenter
UIButton *v = (UIButton *)[self.view viewWithTag:1];
v.transform=CGAffineTransformTranslate(v.transform, 0, -10);
v.transform=CGAffineTransformScale(v.transform, 2, 2);
v.transform=CGAffineTransformRotate(v.transform, -M_PI_4);