实例化一个UITableView对象

2025-03-24 11:48:06
推荐回答(1个)
回答1:

UITableView *my = [[UITableView alloc]initWithFrame:<(CGRect)frame> style:<(UITableViewStyle)style>];
my.delegate = self;
my.dataSource = self;
首先需要分配空间设置表格类型
然后需要设置两个必须的委托对象。