UITextField with a rounded corner No background images

I want to combine UITextField Corners to display it something like this.

rounded textfield

I want to do this programmatically, not using images.

+4
source share
1 answer

You can set Angle-Radius on any subclass of UIView.

  • Add a QuartzCore Structure to Your Project
  • Add #import <QuartzCore/QuartzCore.h> to a subclass of UIViewController (where you have access to the UITextfield instance of your choice
  • Inside viewDidLoad / viewWillAppear (or anywhere else where your UITextfield is an allready instance of the call [yourTextField.layer setCornerRadius:14.0f];
  • Play with the cornerRadius value until it looks good.

I think this will help you.

+5
source

All Articles