Skip to content

Commit

Permalink
Use SBTableAlert's rowHeight instead of the UITableView's.
Browse files Browse the repository at this point in the history
  • Loading branch information
blommegard committed Jul 17, 2011
1 parent a3f639c commit 0a82175
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion SBTableAlert.h
Expand Up @@ -101,7 +101,7 @@ typedef enum {
SBTableAlertStyle _style;

NSInteger _maximumVisibleRows;
CGFloat _rowHeigh;
CGFloat _rowHeight;

SBTableViewTopShadowView *_shadow;

Expand Down
8 changes: 4 additions & 4 deletions SBTableAlert.m
Expand Up @@ -228,7 +228,7 @@ @implementation SBTableAlert
@synthesize type=_type;
@synthesize style=_style;
@synthesize maximumVisibleRows=_maximumVisibleRows;
@synthesize rowHeight=_rowHeigh;
@synthesize rowHeight=_rowHeight;

@synthesize delegate=_delegate;
@synthesize dataSource=_dataSource;
Expand All @@ -246,15 +246,15 @@ - (id)initWithTitle:(NSString *)title cancelButtonTitle:(NSString *)cancelTitle
_alertView = [[UIAlertView alloc] initWithTitle:title message:message delegate:_alertViewDelegate cancelButtonTitle:cancelTitle otherButtonTitles:nil];

_maximumVisibleRows = 4;
_rowHeigh = 40.;
_rowHeight = 40.;
_tableViewDelegate = self;
_tableViewDataSource = self;
_tableView = [[SBTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];

[_tableView setDelegate:_tableViewDelegate];
[_tableView setDataSource:_tableViewDataSource];
[_tableView setBackgroundColor:[UIColor whiteColor]];
[_tableView setRowHeight:_rowHeigh];
[_tableView setRowHeight:_rowHeight];
[_tableView setSeparatorColor:[UIColor lightGrayColor]];
[_tableView.layer setCornerRadius:kTableCornerRadius];

Expand Down Expand Up @@ -383,7 +383,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
if ([_delegate respondsToSelector:@selector(tableAlert:heightForRowAtIndexPath:)])
return [_delegate tableAlert:self heightForRowAtIndexPath:indexPath];

return _tableView.rowHeight;
return _rowHeight;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Expand Down

0 comments on commit 0a82175

Please sign in to comment.