Glass button for iPhone

Since iOS does not provide a default glossy button implementation I wrote my own, based mostly on looking at a screenshot of Apple's own.

Some folks have been using the UIGlassButton generator, but I have wanted for a while to have this functionality avaialble at runtime, and not depend on pre-generated images, these are created at runtime, and behave just like a regular button:

You can find my implementation as part of MonoTouch.Dialog on github.

This is how you would use it, and how you can customize some of its elements:

	var b = new GlassButton (bounds) {
		Font = UIFont.BoldSystemFontOfSize (22),
		NormalColor = UIColor.Green,
		HighlightedColor = UIColor.Red
	};
	b.SetTitle ("Dismiss", UIControlState.Normal);

	container.AddSubview (b);
	
Posted on 08 Apr 2011 by Miguel de Icaza
This is a personal web page. Things said here do not represent the position of my employer.