I am making many buttons and labels for my app, and it is very frustrating to have to change the font, size, colour etc. for each and every one. I know I could draw them in code, but can you change the defaults in Interface Builder?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could also create a custom subclass of UIButton and write code in it’s init method that sets the custom properties you want. Let’s call your custom button MyFontsButton.
Then, in IB, create a button, then go to the identity inspector and change the button’s class from UIButton to MyFontsButton.
The button will automatically use the attributes you set up in your init method.