in many iPhone apps I could see UITextView with rounded corners. Is there a simple way to achieve this? or do I need to create a custom UITextView? any links to examples showing how to achieve this?
Thanks!
A squircle is a shape intermediate between a square and a circle. There are at least two definitions of "squircle" in use, the most common of which is based on the superellipse. The word "squircle" is a portmanteau of the words "square" and "circle". Squircles have been applied in design and optics.
In the upper left corner, select “Draw Filled Shape“. Draw the rounded rectangle over the area you would like to keep for your rounded corners image. Use the Magic Wand to select the area of the rounded rectangle. Select “Edit” > “Invert Selection“.
You can choose between multiple corner styles (Smooth, Rounded, Angled, Inside Square and Inside Arc), changing how the layer's corners look. Head to the Corners section in the Inspector while editing any shape and pick the one you want from the dropdown menu.
If you are using iOS 3+, you can do the following:
myTextView.clipsToBounds = YES; myTextView.layer.cornerRadius = 10.0f;
Add QuartzCore framework to the app and then
#import <QuartzCore/QuartzCore.h> UITextView* txtView = [[UITextView alloc] initWithFrame:CGRectMake(50, 50, 300, 100)]; txtView.layer.cornerRadius = 5.0; txtView.clipsToBounds = YES;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With