(Pure Code) QQ Login Interface:

Source: Internet
Author: User

#import "ViewController.h"@interfaceViewcontroller () @property (nonatomic, weak) Uitextfield*_textname, @property (nonatomic, weak) Uitextfield*_textpassword;@endHttp://www.cnblogs.com/pocket-mood/p/4331303.html@implementationViewcontroller- (void) viewdidload {[Super viewdidload]; /** QQ*/UILabel*labname =[[UILabel alloc] init]; Labname.frame= CGRectMake ( the, in, +, the); Labname.text=@"QQ:"; Labname.textcolor=[Uicolor Bluecolor];        [Self.view Addsubview:labname]; /** Password*/UILabel*labpassword =[[UILabel alloc] init]; Labpassword.frame= CGRectMake ( the, the, +, the); Labpassword.text=@"Password:"; Labpassword.textcolor=[Uicolor Redcolor];        [Self.view Addsubview:labpassword]; /** QQ Text*/Uitextfield*textname =[[Uitextfield alloc] init]; Textname.frame= CGRectMake ( -, -,260, +); //Set text box style (rounded rectangle)Textname.borderstyle =Uitextborderstyleroundedrect; //set the placeholder content that the text box displays when there is no contentTextname.placeholder =@"Please enter QQ number"; Textname.textcolor=[Uicolor Blackcolor]; //set keyboard as numeric keypad inputTextname.keyboardtype =Uikeyboardtypenumberpad; //all delete icons appear to the right when setting editTextname.clearbuttonmode =uitextfieldviewmodewhileediting;    [Self.view Addsubview:textname]; //to enable _textname to invoke control properties laterSelf._textname =Textname; /** Password Text*/Uitextfield*textpassword =[[Uitextfield alloc] init]; Textpassword.frame= CGRectMake ( -, -,260, +); Textpassword.borderstyle=Uitextborderstyleroundedrect; Textpassword.placeholder=@"Please enter your password"; Textpassword.textcolor=[Uicolor Redcolor]; //set text to password status, text all to point displayTextpassword.securetextentry =YES; Textpassword.clearbuttonmode=uitextfieldviewmodewhileediting;    [Self.view Addsubview:textpassword]; Self._textpassword=Textpassword; /** Login Button*/UIButton*btnregiste =[[UIButton alloc] init]; Btnregiste.frame= CGRectMake ( the,290, -, -); [Btnregiste settitle:@"Login"Forstate:uicontrolstatenormal];    [Btnregiste Settitlecolor:[uicolor Whitecolor] forstate:uicontrolstatenormal];    [Btnregiste Settitlecolor:[uicolor Redcolor] forstate:uicontrolstatehighlighted];     [Btnregiste Setbackgroundcolor:[uicolor Bluecolor]; //Set button buttons text font style and sizeBtnRegiste.titleLabel.font = [Uifont fontwithname:@"Arial"Size28.0]; //triggering of listener events[Btnregiste addtarget:self Action: @selector (Btnclick:) forcontrolevents:uicontroleventtouchupinside];    [Self.view Addsubview:btnregiste]; }//Monitor- (void) Btnclick: (UIButton *) button{NSLog (@"---- login----\nqq:%@\n password:%@", Self._textname.text,self._textpassword.text); //Exit keyboard State[Self.view Endediting:yes];}@end

(Pure Code) QQ Login Interface:

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.