Register Login

Talwrn Technology Blog

Mar 15

Written by: S White
Mon, 15 Mar 2010 19:55:00 GMT 

Very simple way of creating rounded borders on a UITextView in MonoTouch.

Before the rounded corners are applied the UITextView looks out of place on the UI:

uitextfield_before_200 

After rounded corners are applied it makes all the difference:

uitextfield_after_200

This can easily be applied by using CornerRadius:

UITextView addTipText = new UITextView(new System.Drawing.RectangleF(30, 70, 260, 80));
addTipText.BackgroundColor = UIColor.White;
addTipText.Hidden = true;
addTipText.Layer.CornerRadius = 8;
addTipText.Font = UIFont.FromName("Helvetica", 14);
addTipText.ScrollEnabled = true;
addView.AddSubview(addTipText);

Tags:

Search

Blog

You must be logged in and have permission to create or edit a blog.

Blog Archive

Home · iPhone and Android Apps · Blog · Contact
Terms Of Use  ·  Privacy Statement  ·  Copyright 2013 by Talwrn Technology