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

标签 iphone ios ios4 uitableview

你能帮我解决这个问题吗,因为方法 initWithFrame:reuseIdentifier 已被弃用:

static NSString *CellIdentifier = @”Cell”;

CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) {

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

}

提前致谢,

史蒂芬

最佳答案

您必须使用:initWithStyle:reuseIdentifier:

关于iphone - initWithFrame :reuseIdentifier? 的替代方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7327403/

相关文章:

ios - 动画 UIView 形状及其内容

cocoa-touch - 在 iOS 3.0 中,NSDateFormatter 对于 @"dd-MM-yy"返回 nil

ios - 本地化 : Which is a better approach of the following?

swift - AVAudioEngine没有声音

ios - 如何删除 UITableView 上方的多余空格?

iPhone : Device Token Inactive in Urban Airship

ios - TabBarController 只加载黑屏?

iphone - 如何在 UIWebView 的 html 页面中使用自定义字体?

ios - alamofire 在模拟器中给出了准确的响应,但在设备中给出了错误

ios - 处理 Podfile 的安装后 Hook 时出错