Posted By

peetj on 04/08/11


Tagged

TextField Objective-c


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

athanhcong
premedios
cnathan


UITextField border and background


 / Published in: Objective C
 

URL: http://stackoverflow.com/questions/1861527/uitextfield-border-color

  1. UITextField *theTextFiels=[[UITextField alloc]initWithFrame:CGRectMake(40, 40, 150, 30)];
  2. theTextFiels.borderStyle=UITextBorderStyleNone;
  3. theTextFiels.layer.cornerRadius=8.0f;
  4. theTextFiels.layer.masksToBounds=YES;
  5. theTextFiels.backgroundColor=[UIColor redColor];
  6. theTextFiels.layer.borderColor=[[UIColor blackColor]CGColor];
  7. theTextFiels.layer.borderWidth= 1.0f;
  8.  
  9. [self.view addSubview:theTextFiels];
  10. [theTextFiels release];

Report this snippet  

You need to login to post a comment.