什么是initWithFrame的替代方法:reuseIdentifier?

Ste*_*eve 2 iphone uitableview ios4 ios

你可以帮我修复这个方法initWithFrame:不再使用reuseIdentifier:

static NSString *CellIdentifier = @”Cell”;

CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {

cell = [[[CustomCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];

}
Run Code Online (Sandbox Code Playgroud)

Thx提前,

斯特凡

D33*_*6h7 5

你必须使用: initWithStyle:reuseIdentifier: