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];

posted @ 2016-03-30 11:52  SoulDu  阅读(233)  评论(0编辑  收藏  举报