Skip to content

Commit

Permalink
Change order of cancel button (always left side). Fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Friend-LGA committed Sep 7, 2015
1 parent b9ab5a8 commit c6568fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LGAlertView.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'LGAlertView'
s.version = '1.0.1'
s.version = '1.0.2'
s.platform = :ios, '6.0'
s.license = 'MIT'
s.homepage = 'https://github.com/Friend-LGA/LGAlertView'
Expand Down
13 changes: 7 additions & 6 deletions LGAlertView/LGAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1786,18 +1786,19 @@ - (void)subviewsInvalidateWithSize:(CGSize)size
UIButton *firstButton = nil;
UIButton *secondButton = nil;

if (_destructiveButton)
if (_cancelButton)
{
[_scrollView addSubview:_destructiveButton];
[_scrollView addSubview:_cancelButton];

firstButton = _destructiveButton;
firstButton = _cancelButton;
}

if (_cancelButton)
if (_destructiveButton)
{
[_scrollView addSubview:_cancelButton];
[_scrollView addSubview:_destructiveButton];

secondButton = _cancelButton;
if (!firstButton) firstButton = _destructiveButton;
else secondButton = _destructiveButton;
}

if (_firstButton)
Expand Down

0 comments on commit c6568fc

Please sign in to comment.