diff --git a/LGAlertView.podspec b/LGAlertView.podspec index 6dec8b6..5dbccf0 100644 --- a/LGAlertView.podspec +++ b/LGAlertView.podspec @@ -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' diff --git a/LGAlertView/LGAlertView.m b/LGAlertView/LGAlertView.m index d01e6a3..15f71fb 100644 --- a/LGAlertView/LGAlertView.m +++ b/LGAlertView/LGAlertView.m @@ -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)