1. Button Code implementation:
1<font size="3">-(void) Initbuttonregister2 {3uibutton* BTN =[UIButton Buttonwithtype:uibuttontypecustom];4 //Set Frame5[Btn Setframe:cgrectmake ( $, the, the, -)];6 //Set Title7[BTN Settitle:@"Register"Forstate:uicontrolstatenormal];8 //parameter one: Title parameter two: state. 9 [btn Settitlecolor:[uicolor Bluecolor] forstate:uicontrolstatenormal];Ten //Association method: When clicked, [Self click] One [btn addtarget:self Action: @selector (Clickregister) forcontrolevents:uicontroleventtouchupinside]; A //parameter one: Target parameter two: Action parameter three: event - //use BTN as a child view of Self.view - [Self.view addsubview:btn]; the } -</font>
2. Tag Code implementation:
1<font size="3">-(void) initlabelnotice{2 3uilabel* label =[[UILabel alloc] init];4[Label Setframe:cgrectmake ( the, -, $, -)];5Label.textalignment =Nstextalignmentleft;6Label.text =@"User Login";7Label.textcolor =[Uicolor Bluecolor];8Label.font = [Uifont systemfontofsize: -];9 Ten [Self.view Addsubview:label]; One}</font>
3. Text Box Code implementation:
1<font size="3">-(void) Initfieldname//text Box2 {3Self.fieldname = [[Uitextfield alloc] Initwithframe:cgrectmake ( the, the, the, at)];4Self.fieldname.placeholder =@"Please enter user name";//Set Placeholder5Self.fieldname.borderStyle = Uitextborderstyleline;//set the border of a text box6Self.fieldname.textColor =[Uicolor Bluecolor];7Self.fieldname.font = [Uifont systemfontofsize: -];8 [Self.view addSubview:self.fieldname];9 TenSelf.fieldname.Delegate=Self ; One } A</font>
4. View Controller Switching
1 <font size="3">detailviewcontroller* detailviewctr = [[ Detailviewcontroller alloc] init]; 2 [Self presentviewcontroller:detailviewctr animated:yes completion:nil];</font>
1 <font size="3">[self Dismissviewcontrolleranimated:yes Completion:nil];</font>
5. Source code Download: stopwatch Login
IPhone Next day note March 30, 2016 (Wednesday) a.m. Stopwatch Chronograph, login verification + page Jump