Replace deprecated UITableViewCell initWithFrame with initWithStyle

This commit is contained in:
Scott Ludwig 2016-01-03 23:24:15 -08:00
parent 738f47bb22
commit ead8ab936a
2 changed files with 3 additions and 5 deletions

View File

@ -1,14 +1,12 @@
#import "game/iphone/chatcell.h"
@implementation ChatCell
- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier];
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self == nil) {
return nil;
}
self.selectionStyle = UITableViewCellSelectionStyleNone;
chatLabel_ = [[UILabel alloc] initWithFrame:CGRectZero];
chatLabel_.backgroundColor = [UIColor whiteColor];
chatLabel_.opaque = YES;

View File

@ -419,7 +419,7 @@
ChatCell *cell = (ChatCell *)[tableView_
dequeueReusableCellWithIdentifier:@"chatcell"];
if (cell == nil) {
cell = [[[ChatCell alloc] initWithFrame:CGRectZero
cell = [[[ChatCell alloc] initWithStyle:UITableViewCellSelectionStyleNone
reuseIdentifier:@"chatcell"] autorelease];
}
[self initializeChatCell:(int)indexPath.row cell:cell];