In IB I have a view with a UIButton of Type Custom, it has no image and the Title is set as "#placeholder"
The view is attached to a class that provides an IBOutlet
and an IBAction
for the button.
I set the button title with this: ViewClass.ButtonOutlet.titleLabel.text = @"%@",stringifiedVariable;
whenever i need to.
This works ok. However, when i click the button, the titleLabel.text reverts back to "#placeholder".
I tried unchecking 'Highlighted Adjust Image' in the Drawing section (attributes tab) in the Inspector but the behaviour was still the same.
Can this change be prevented? or is there a better pattern that i should be using?