Skip to content

Commit

Permalink
Update UAModalPanel/Panel/Panels/UAModalPanel.m
Browse files Browse the repository at this point in the history
Formatting
  • Loading branch information
coneybeare committed Aug 24, 2012
1 parent 486a264 commit 407bb20
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions UAModalPanel/Panel/Panels/UAModalPanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,13 @@ - (UIButton*)closeButton {
- (UIButton*)actionButton {
if (!actionButton) {
UIImage *image = [UIImage imageNamed:@"modalButton.png"];
UIImage *stretch = ([UIImage respondsToSelector:@selector(resizableImageWithCapInsets:)]) ? [image resizableImageWithCapInsets:UIEdgeInsetsMake(0, image.size.width/2.0, 0, image.size.width/2.0)] : [image stretchableImageWithLeftCapWidth:image.size.width/2.0 topCapHeight:image.size.width/2.0];
UIImage *stretch = (([UIImage respondsToSelector:@selector(resizableImageWithCapInsets:)]) ?
[image resizableImageWithCapInsets:UIEdgeInsetsMake(0, image.size.width/2.0, 0, image.size.width/2.0)] :
[image stretchableImageWithLeftCapWidth:image.size.width/2.0 topCapHeight:image.size.width/2.0]);
UIImage *image2 = [UIImage imageNamed:@"modalButton-selected.png"];
UIImage *stretch2 = ([UIImage respondsToSelector:@selector(resizableImageWithCapInsets:)]) ? [image2 resizableImageWithCapInsets:UIEdgeInsetsMake(0, image2.size.width/2.0, 0, image2.size.width/2.0)] : [image stretchableImageWithLeftCapWidth:image2.size.width/2.0 topCapHeight:image2.size.width/2.0];
UIImage *stretch2 = (([UIImage respondsToSelector:@selector(resizableImageWithCapInsets:)]) ?
[image2 resizableImageWithCapInsets:UIEdgeInsetsMake(0, image2.size.width/2.0, 0, image2.size.width/2.0)] :
[image stretchableImageWithLeftCapWidth:image2.size.width/2.0 topCapHeight:image2.size.width/2.0]);
self.actionButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.actionButton setBackgroundImage:stretch forState:UIControlStateNormal];
[self.actionButton setBackgroundImage:stretch2 forState:UIControlStateHighlighted];
Expand Down

0 comments on commit 407bb20

Please sign in to comment.