Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update UAModalPanel/Panel/Panels/UAModalPanel.m

Formatting
  • Loading branch information...
commit 407bb200a7ff4240377c95c563c9ec5f80aa6793 1 parent 486a264
@coneybeare coneybeare authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 UAModalPanel/Panel/Panels/UAModalPanel.m
View
8 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];
Please sign in to comment.
Something went wrong with that request. Please try again.