I made a .xib with a button and referenced it with an exit to "btnActies"
when I do the following (at any point in time) in C # source code
btnActies.TitleLabel.Text = "This is a new shortcut!";
When I create and run the application, the label on the button changes to “This is a new label,” but then if I touch the button, the label will revert to the default text set in the .xib file.
How to change shortcut on UIButton Monotouch and not do it?
UIButton, , TextLabel. , SetTitle, , . , #/MonoTouch:
btnActies.SetTitle ("title", UIControlState.Normal);
, , , , , Interface Builder ( ), , .
//
Hello
iPhone.
[btnActies.setTitle:@"Title value1" forState:UIButtonStateNormal]; [btnActies.setTitle:@"Title value2" forState:UIButtonStateSelected]; [btnActies.setTitle:@"Title value3" forState:UIButtonStateHighlighted];