1. Text box
Set Password properties: Secure Text Entry tick;
Set text box with clear properties: Clear Button =is always visible; The default is without the Purge attribute: never appears
Set text box by default with the Text property: placeholder= user-defined input;
Set the text box keyboard user input to complete the hidden code:
[Self.text resignfirstresponder];//applies to a single text box when input is complete hidden
[Self.view endediting:yes];//applies to all text boxes when input is complete and hidden;
2. Button
Set highlight status: State Config =highlighted (highlight) default (default state);
Set the default state and highlight the button background picture properties: background= user-defined image name, such as img_01;
3. Properties
Highlighed adjusts Image highlight state click No reflection
User Interaction Enabled whether to interact with users 4, set status bar//Change status bar text color to White
-(Uistatusbarstyle) Preferredstatusbarstyle
{
return uistatusbarstylelightcontent;
}
Hide the status bar
-(BOOL) Prefersstatusbarhidden
{
return YES;
} Uialertview * Alerview = [[Uialertview alloc] initwithtitle:@ "Operation Tips" message:@ "Congratulations on customs clearance! "Delegate:nil cancelbuttontitle:@" OK "otherbuttontitles:@" OK ", nil];
Show dialog box
[Alerview show];
Setting Userview to interact with users
Self.userview.userInteractionEnabled =yes;
Clear all controls
[Self.userview.subviews makeobjectsperformselector: @selector (Removefromsuperview)];//Add a click event @selector to USERBTN ( Optiondataclick:) to upload the currently clicked button to the event [Userbtnaddtarget:self action: @selector (Optiondataclick:) forControlEvents: UIControlEventTouchUpInside]; Declare empty string variables when stitching using nsmutablestring* userinput =[nsmutablestring string]; Stitching [Userinput Appendstring:data]; Delay 0.5 seconds Call method
[Self Performselector: @selector () Withobject:nil afterdelay:0.5];
Displays a child control in the view to the top
[Self.view BringSubviewToFront:self.btnIcon];
Control properties for iOS learning notes