Skip to content

Commit

Permalink
Fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Friend-LGA committed Nov 13, 2015
1 parent b6978b1 commit 1461769
Show file tree
Hide file tree
Showing 2 changed files with 7 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 = '2.0.6'
s.version = '2.0.7'
s.platform = :ios, '6.0'
s.license = 'MIT'
s.homepage = 'https://github.com/Friend-LGA/LGAlertView'
Expand Down
12 changes: 6 additions & 6 deletions LGAlertView/LGAlertView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ - (void)setButtonAtIndex:(NSUInteger)index enabled:(BOOL)enabled
LGAlertViewCell *cell = (LGAlertViewCell *)[_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];
cell.enabled = enabled;
}
else
else if (_scrollView)
{
switch (index)
{
Expand All @@ -1339,7 +1339,7 @@ - (void)setButtonAtIndex:(NSUInteger)index enabled:(BOOL)enabled

- (BOOL)isButtonEnabledAtIndex:(NSUInteger)index
{
return (BOOL)_buttonsEnabledArray[index];
return [_buttonsEnabledArray[index] boolValue];
}

- (void)setButtonPropertiesAtIndex:(NSUInteger)index
Expand Down Expand Up @@ -1457,7 +1457,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.lineBreakMode = (properties.isUserLineBreakMode ? properties.lineBreakMode : _buttonsLineBreakMode);
cell.adjustsFontSizeToFitWidth = (properties.isUserAdjustsFontSizeTofitWidth ? properties.adjustsFontSizeToFitWidth : _buttonsAdjustsFontSizeToFitWidth);
cell.minimumScaleFactor = (properties.isUserMinimimScaleFactor ? properties.minimumScaleFactor : _buttonsMinimumScaleFactor);
cell.enabled = (BOOL)_buttonsEnabledArray[indexPath.row - (_destructiveButtonTitle.length ? 1 : 0)];
cell.enabled = [_buttonsEnabledArray[indexPath.row - (_destructiveButtonTitle.length ? 1 : 0)] boolValue];
}

return cell;
Expand Down Expand Up @@ -2245,7 +2245,7 @@ - (void)subviewsInvalidateWithSize:(CGSize)size
_firstButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
else if (textAlignment == NSTextAlignmentRight)
_firstButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
_firstButton.enabled = (BOOL)_buttonsEnabledArray[0];
_firstButton.enabled = [_buttonsEnabledArray[0] boolValue];
[_firstButton addTarget:self action:@selector(firstButtonAction:) forControlEvents:UIControlEventTouchUpInside];

CGSize size = [_firstButton sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
Expand Down Expand Up @@ -2284,7 +2284,7 @@ - (void)subviewsInvalidateWithSize:(CGSize)size
_secondButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
else if (textAlignment == NSTextAlignmentRight)
_secondButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
_secondButton.enabled = (BOOL)_buttonsEnabledArray[1];
_secondButton.enabled = [_buttonsEnabledArray[1] boolValue];
[_secondButton addTarget:self action:@selector(secondButtonAction:) forControlEvents:UIControlEventTouchUpInside];

CGSize size = [_secondButton sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
Expand Down Expand Up @@ -2323,7 +2323,7 @@ - (void)subviewsInvalidateWithSize:(CGSize)size
_thirdButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
else if (textAlignment == NSTextAlignmentRight)
_thirdButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
_thirdButton.enabled = (BOOL)_buttonsEnabledArray[2];
_thirdButton.enabled = [_buttonsEnabledArray[2] boolValue];
[_thirdButton addTarget:self action:@selector(thirdButtonAction:) forControlEvents:UIControlEventTouchUpInside];

CGSize size = [_thirdButton sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
Expand Down

0 comments on commit 1461769

Please sign in to comment.