ios - Update super view size on setting of UIButton image? -
My buttons are obstacles for example: (4, 4, 4, 12)
.
I want to set my image (image and button size are the same) and want to change its size to a certain extent, Rect. For example: CGRectMake (0, 0, 100, 200)
. Therefore the image must be rejected proportionally, but should be less than this reset. And of course I should resize the size of the button and the scene in which this button is.
How to solve this problem? I know how to do it without any interruption and it is quite easy, but my project is needed.
Try to set the image property of the button.
UIImage * btnImage = [UIImage imageNamed: @ "image.png"]; [BTNTO set image: BTnImage for state: UIContolstadt normal];
Then you only worry about the button.
Comments
Post a Comment