This is actually really easy.
You just have to create a @property
and connect the button you want to style by control dragging from the button to the newly created property.
The property should look something like this:
@property (nonatomic, strong) IBOutlet UIButton *registerButton;
Then in the viewDidLoad, you put the above code that targets your button:
- (void)viewDidLoad
{
[super viewDidLoad];
// code for styling button goes here.
}
You can see the code for styling the button in the question.
5
solved Styling a button that was created in interface builder