ios - Add custom Text to uibutton in iPhone sdk -
I want to use Ubuntan, which contains custom text shows displayed on the screen. In the screen shot I added 2 to the label "Module 1" and "Fungi and Fungal Infection" to read but the orange background is ubaton but when I press down it shows that it will only press the orange button and the text will not be what I I want to set it to label it on Uubutan text so that it can be shown that when the button is pressed, the text button should be the same as the headline . How is it possible to guide me on this, it would be great for me to thank you in advance
Easy, create labels with only the attributes text, which you want and it is in the ui button Add as a subview, this way the button is set to the custom type in the storyboard.
UILabel * label = [UILabel new]; Label.backgroundColor = [UIColor redColor]; Label.text = @ "Custom Text"; [Label size tofitt]; Label.frame = _button.bounds; [_button addSubview: label];
Comments
Post a Comment