Set buttonType to UIButtonTypeCustom so that it doesn't draw a rounded rectangle and then gives the UIButton layer border:
#import <QuartzCore/QuartzCore.h>
[button.layer setBorderColor: [[UIColor blackColor] CGColor]];
[button.layer setBorderWidth: 2.0];
mclin source
share