iOS Getter 和Setter 注册xibcell

// 初始化cell的xib的方式

    [tableView registerNib:[UINib nibWithNibName:@"LXmiddleCell" bundle:nil] forCellReuseIdentifier:@"LXmiddleCell"];

    LXmiddleCell *cell = [[LXmiddleCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"LXmiddleCell"];

    cell = [tableView dequeueReusableCellWithIdentifier:@"LXmiddleCell"];

    cell.selectionStyle = UITableViewCellSelectionStyleNone;

    cell.contentLabel.textAlignment = NSTextAlignmentRight;

    cell.itemNameLabel.text = _itemArray[indexPath.row-1];

    cell.contentLabel.text = self.titleArray[indexPath.row-1];

原文地址:https://www.cnblogs.com/soulDn/p/5336582.html