UITextField border and background


/ Published in: Objective C



Copy this code and paste it in your HTML
  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];

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.