0

当我通过子类化创建新类时,例如 UITableviewController,我以前的 Xcode 版本会将这些代码片段注释掉。

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    UITableViewCell *cell = nil;
    cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];

    if(!cell){
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"Cell"];
    }

    cell.textLabel.text = @"Cell";

    return cell;
}

使用 Xcode 5,我的实现文件是完全空白的。这是我可以改变偏好的东西吗?谢谢你。

4

0 回答 0