I’d like to know how to set up an UIButton. I figured the buttonType method, still, I don’t know the method for using CGRectMake() on it.
Also here is a separate doubt: Can I assign a different method @selector for the same button on different methods?
Thanks.
The easiest way is to set it up in a xib file.
If you want to create it manually, use
+buttonWithType:as you suggest, set its frame likeSet its title with
To set the selector, use
Finally, add it from your view controller with
The selector’s method might look like