Permalink
Browse files

Update UAModalPanel/Panel/Panels/UAModalPanel.m

Formatting
  • Loading branch information...
1 parent 486a264 commit 407bb200a7ff4240377c95c563c9ec5f80aa6793 @coneybeare coneybeare committed Aug 24, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 UAModalPanel/Panel/Panels/UAModalPanel.m
@@ -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];

0 comments on commit 407bb20

Please sign in to comment.