This may be a silly question but I couldn't find an answer anywhere. If I want to create a UIButton
in code and need to set a runtime attribute how would I do so without the interface builder and strictly in code?
Actually figured this out, like I said silly question.
[UIButton *loginbtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[loginbtn setValue:@"blah" forKey:@"myAttr"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With