I am trying to increase the scope of my UIButton. I have a new Xcode project with UIButton in the storyboard center. The button is connected to the view controller with output and action. I can programmatically change the name of the button and just for fun made it change the background of the view when I press the button. Therefore, I know that everything is connected and working.
From what I read on the Internet, this should work, but it is not.
[button setFrame: CGRectMake (button.frame.origin.x, button.frame.origin.y, -64, -64)];
Any thoughts? I tried without negative fields, and this also does not work. By the way, I tried many places that this question was asked for, but it does not work. Thanks for the help. Also, I heard that UIButton subclasses can create a problem, any thoughts on this?
Update: The UIButton I want to make has a background color and has a specific size. I want to keep this size the same, but increase the area of impact around it without distorting the appearance of the button.
source share