IOS---自定义单元格

1、修改根试图

点击view controller scene下边,选中scene,按del键即可删除;

从控件库中拖拽一个Tab View Controller到设计界面;

然后右边的属性检查器中,选中View Controller---> is  Initial View Controller复选框;

如下图:

IOS---自定义单元格

IOS---自定义单元格

IOS---自定义单元格

IOS---自定义单元格

2、设置单元格

IOS---自定义单元格

设置类

IOS---自定义单元格

3、设置自定义单元格类CustomCell

IOS---自定义单元格

IOS---自定义单元格

创建之后,如下:

IOS---自定义单元格

设置单元格的类(绑定)

IOS---自定义单元格

单元格中的label   image  输出关联到 CustomCell.h中:

IOS---自定义单元格

ViewController.m中,引入头文件:

#import "ViewController.h"

#import "CustomCell.h"

#define cellIdentifier  @"CellIdentifier"