1. Fast texture
Ii. knowledge points
1. Text
2. keyboard
1> automatic hiding. Method 1: did end on exit event. Add the hidekeyboard method and call resignfirstresponder to give up the input object's right to obtain the input;
Method 2: Touch the background to hide the keyboard.
2> keyboard attribute, default, Number pad, email address, etc.
3. Button
1> Add a background image to the button and set it when loading the view,
-(Void) viewdidload {
// Set the button template when loading the view
Uiimage * normalimage = [[uiimage imagenamed: @ "whitebutton.png"] stretchableimagewithleftcapwidth: 12.0 topcapheight: 0.0];
Uiimage * pressedimage = [[uiimage imagenamed: @ "bluebutton.png"] stretchableimagewithleftcapwidth: 12.0 topcapheight: 0.0];
[Self. thebutton setbackgroundimage: normalimage forstate: uicontrolstatenormal];
[Super viewdidload];
[Self. thebutton setbackgroundimage: pressedimage forstate: uicontrolstatehighlighted];
}
2> createstory Method
Self. thestory. Text = [self. thetemplate. Text stringbyreplacingoccurrencesofstring: @ "<place>" withstring: Self. theplace. Text];
Self. thestory. Text = [self. thestory. Text stringbyreplacingoccurrencesofstring: @ "<verb>" withstring: Self. theverb. Text];
Self. thestory. Text = [self. thestory. Text stringbyreplacingoccurrencesofstring: @ "<number>" withstring: Self. thenumber. Text];