developer

Set UIButton title UILabel font size programmatically

Question: ❓❓❓ I need to set the font size of the title UILabel of a UIButton programmatically. Good Answer: 👌👌👌 button.titleLabel.font = [UIFont systemFontOfSize:size]; should help Read More: 👉 https://stackoverflow.com/questions/1465305/set-uibutton-title-uilabel-font-size-programmatically

By admin, ago
developer

How do I create a basic UIButton programmatically?

Question: ❓❓❓ How can I create a basic UIButton programmatically? For example in my view controller, when executing the viewDidLoad method, three UIButtons will be created dynamically and its layout or properties are set. Good Answer: 👌👌👌 Here’s one: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button addTarget:self action:@selector(aMethod:) forControlEvents:UIControlEventTouchUpInside]; [button setTitle:@"Show Read more…

By admin, ago