Translating a UIButton
问题 I would like to ask is it possible to translate the UIButton position? How? Anyone? 回答1: You can get the frame of the button using "frame" property. This returns a CGRect object which basically has your buttons x-coord, y-coord, width and height. Based on where you want to translate your button, calculate the new x-coord and y-coord. Then do the following: btnMyButton.frame = CGRectMake(oldx,oldy,width,height); [UIView beginAnimations:nil context:NULL]; [UIView setAnimationTransition