Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove default border of UITextView

Hi I want to remove Default gray border of tHe View. so by doing this we can not find the textview on view. How we can do this?

like image 363
Kanwar Singh Avatar asked Oct 19 '13 11:10

Kanwar Singh


People also ask

How do I remove border from TextField?

Remove the border Select the text box or shape. If you want to change multiple text boxes or shapes, click the first text box or shape, and then press and hold Ctrl while you click the other text boxes or shapes. On the Format tab, click Shape Outline, and then click No Outline.

How do I get rid of the border on my search bar?

Use the :focus pseudo-class with the "no-outline" class to style the form fields that are focused by the user. To have clear fields in your forms, set the outline property to its "none" value, which is used to display no outline.

How to remove borders of TextField in swift?

How does one remove the focus border for a TextField in SwiftUI? In Cocoa, setting the border to "None" in interface builder would remove the border.


2 Answers

If you use this it will change the border style to the way your describe. You say TextView, though do you mean the textField? The text field can have a default grey rounded border. To remove do this.

textField.borderStyle = UITextBorderStyleNone;

where the 'textField' is the name of your textfield.

If you visit this link to Apple's documentation on the textField's properties I'm sure it will help with any other things you want to change. If it is the TextView field you meant, then the apple documentation will give you properties to use here too.

Hope this help, cheers, Jim.

like image 96
Jim Tierney Avatar answered Oct 05 '22 23:10

Jim Tierney


[textView.layer setBorderWidth:0.0f];

like image 30
Surendra Avatar answered Oct 06 '22 01:10

Surendra