UIButton
//initialization Position uibutton *btn = [[uibutton alloc] initwithframe:cgrectmake ( SELF.VIEW.FRAME.SIZE.WIDTH-180, 45, 80, 30)]; [btn.layer setcornerradius:5.0]; //Set Rectangle four fillet radius [btn.layer setborderwidth:1.0]; // Border width cgcolorspaceref colorspace = cgcolorspacecreatedevicergb (); cgcolorref colorref = cgcolorcreate (ColorSpace, (CGFloat[]) { 0.9, 0.9, 0.9, 1 }); [btn.layer setbordercolor:colorref];//border color [btn settitle: @ "button" forState: UIControlStateNormal]; btn.titleLabel.font = [UIFont systemFontOfSize: 14.0]; [btn setbackgroundcolor: [uicolor bluecolor]]; [btn settitlecolor:[ Uicolor blackcolor]forstate:uIcontrolstatenormal]; [btn addtarget:self action: @selector (btnActioin:) forcontrolevents:uicontroleventtouchupinside]; btn.tag = 1; [btn setimage:[uiimage imagenamed:@ "Trade_choose_default"] forstate:uicontrolstatenormal] ;
Uicolor
[Uicolor colorwithred:0.95 green:0.93 blue:0.92 alpha:1];
UILabel
[Email protected] "Label"; label.hidden=yes;
UIImage
[UIImage imagenamed:@ "Trade_choose_default"]
UIView
//Set Animation CGContextRef context = Uigraphicsgetcurrentcontext (); [uiview beginanimations:nil context:context]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [uiview setanimationduration:0.6];//animation time length, units per second, floating point //changing view location [self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1]; Self.addresspicker.frame = cgrectmake (0, 380, 320, 180); // Call when binding view events [UIView setAnimationDelegate:self]; // animations complete animationfinished [uiview setanimationdidstopselector: @selector ( animationfinished)]; //Start animation [UIView commitAnimations]; // &nbs The view before it is placedp; [self.view bringsubviewtofront:logisticspicker]; -(void) Animationfinished{ nslog (@ "End of animation!");}
Uitextfield
[TextField Setborderstyle:uitextborderstyleroundedrect]; Outer frame Type Textfield.placeholder = @ "password"; The default display of the word textfield.securetextentry = YES; Password
Use of common IOS controls