UITextView with rounded border- iPhone:
The following lines of code to add rounded corners and a border color to a UITextView. Fist, you import the QuartzCore like,
#import <QuartzCore/QuartzCore.h>
Then add the following code snippets into your viewdidload method for UITextview rounded/colored border.
Demo:
Code :
Please share this, if you think this is useful to others. Thanks!.
The following lines of code to add rounded corners and a border color to a UITextView. Fist, you import the QuartzCore like,
#import <QuartzCore/QuartzCore.h>
Then add the following code snippets into your viewdidload method for UITextview rounded/colored border.
Demo:
Code :
yourTextView.layer.borderWidth = 1; [yourTextView.layer setBackgroundColor: [[UIColor whiteColor] CGColor]]; [yourTextView.layer setBorderColor: [[UIColor brownColor] CGColor]]; [yourTextView.layer setBorderWidth: 1.0]; [yourTextView.layer setCornerRadius:8.0f]; [yourTextView.layer setMasksToBounds:YES];
0 comments:
Post a Comment
Share your thoughts here...