How can I create UIButton in iphone app programatically to have square corners. I don't want to have rounded corners.
don't use that image though :)
willcodejavaforfood
2010-08-24 07:21:36
:) :) yeah that is for sure
org.life.java
2010-08-24 10:45:48
A:
take a custom button and change its background color.
The button will be having squared corners or the other alternate is set image as background to the button. You can choose whatever you like as per your requirement.
Happy Coding...
Suriya
2010-08-24 09:50:01
A:
Set it's buttonType to UIButtonTypeCustom so it doesn't draw the rounded rect, then give the UIButton's layer a border:
//you need this import
#import <QuartzCore/QuartzCore.h>
[button.layer setBorderColor: [[UIColor blackColor] CGColor]];
[button.layer setBorderWidth: 2.0];
mclin
2010-08-24 19:42:34