UINib xib加载

1.加载RowView.xib文件,创建Objects下面的所有控件:

    NSArray *views = [[NSBundle mainBundle] loadNibNamed:@"RowView" owner:nil options:nil];    

2.取出xib中的第一个子控件:

    UIView *rowView = views[0];    

3.tableview中cell

    NSString *identify = @"goodslistcell";

    cell = [tableView dequeueReusableCellWithIdentifier:identify];

    if (!cell) {

        UINib *nib = [UINib nibWithNibName:@"SMTGoodInfoCell" bundle:nil];

        [tableView registerNib:nib forCellReuseIdentifier:identify];

        cell = [tableView dequeueReusableCellWithIdentifier:identify];

    }

posted @ 2014-07-25 13:52  bluefi  阅读(395)  评论(0编辑  收藏  举报