Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Chirone

macrumors 6502
Original poster
Mar 2, 2009
279
0
NZ
sorry, this is probably a really easy question

but in iphone 3.0 you could use this

Code:
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
inside the
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
method

but when switching to 2.2.1 the method is not found and the UITableViewCellStyleDefault is not declared
and a nil cell gets sent back causing a crash
what's the equivalent way to create the cell in 2.2.1?
 
nevermind

Code:
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.