In UIKit, UIBarButtonItem has a property called possibleTitles. How is that being used?
In UIKit, UIBarButtonItem has a property called possibleTitles. How is that being used?
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.
I looked at the documentation and it said that it was referenced in the AccelerometerGraph demo. So I took a look at the demo.
It looks like before you add it to the bar, you can set the
possibleTitlesproperty to a set of strings that the button may display. I assume that this is so that the button takes the width of the widest string, so when you change the title the width of the button doesn’t change.