In my app, I would like to create a custom UIElement, in my case a UITextView with rounded corners and border color and everything. however I can only do it if I create the UITextView from code and add it to a view with the addSubView method.
That’s not too elegant, plus it fails during the unit tests as well.
Is there a way how I can create my UITextView with using Interface Bulder and still being able to modify its layer property?
Any help is very much appreciated.
If you create an
IBOutletby ctrl-dragging from the nib or storyboard to your .h file, you can access your graphical element as usual with something likemyTextView.layer.cornerRadius = 5.0;.