How to change size of UIButton

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2010-03-27T22:17:01Z Indexed on 2010/03/27 22:23 UTC
Read the original article Hit count: 152

Filed under:
|

I'm trying to resize a UIButton in my iPhone app. I have a UIButton synthesized and when I call the following code, it moves on the screen, but the width & height of the button never change.

button.frame.size = CGRectMake(104, 68, 158, 70);

For example, when I change the height (70) to 40, the height of the button does not change. If I change the x or y, however, it will move on the screen.

Any ideas?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone