IPhone Next day note March 30, 2016 (Wednesday) a.m. Stopwatch Chronograph, login verification + page Jump

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.