Add Border To UITextView

1244 Views

This tutorial I will show you how to add a border to a textView in swift.

Step 1
Create an outlet for your textview and give it a name, in this example I named it myTextView.

Step 2
Add the following snippet in your viewDidAppear function

myTextView.layer.borderColor = UIColor(red: 0.9, green: 0.9, blue: 0.9, alpha: 1.0).CGColor
myTextView.layer.borderWidth = 1.0

You can add any UIColor and also change the width from 1.0

That’s it. Simple tutorial, leave a comment and also follow us on Twitter @westernstudios


  1. Cameron says:

    I was just looking at your site and see that your site has the potential to become very popular.

Please Post Your Comments & Reviews

Welcome to Western Studios

We provide professional website and mobile softwares including Joomla, Wordpress and more.