UITextField with Rounded Corner Without using background images

ios, iphone, uitextfield

Solution

You can set the Corner-Radius on any UIView-Subclass.

- Add the QuartzCore framework to your project

- Add `#import <QuartzCore/QuartzCore.h>` in your `UIViewController` Subclass (where you have access to the `UITextfield` instance of your choice

- Within viewDidLoad / viewWillAppear (or any other place where your UITextfield is allready instantiated call `[yourTextField.layer setCornerRadius:14.0f];`

- Play around with the cornerRadius value until it looks good

I think this will help you.

Problem

I Want to round the UITextField Corners, to display it something like this i want to do this programatically, not by using images.

Original source