ios-tableviewcell初始化为什么要用static NSString *str = @"mycell"中得static

很多人在

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

{

//不用static关键字修饰    

NSString *identifile = @"myfrindecell";

    WWMyFriendCell *cell = [tableView dequeueReusableCellWithIdentifier:identifile];

    if (cell == nil)

    {

        cell = [[WWMyFriendCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifile];

    }

    return cell;

}

posted on 2015-07-15 23:54  rankilau  阅读(1059)  评论(0编辑  收藏  举报

导航