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

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -