mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-04-10 21:11:29 -06:00
Replace deprecated UITableViewCell initWithFrame with initWithStyle
This commit is contained in:
parent
738f47bb22
commit
ead8ab936a
@ -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;
|
||||
|
||||
@ -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];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user