[英]add table cells to class that inhiret UITableViewController
我有以下头文件
@interface Menu : UITableViewController;
和以下 m 文件
#import "Menu.h"
@implementation Menu
+ (void)initialize {
// TODO here I want to add cells to my table view
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath{
[tableView deselectRowAtIndexPath:newIndexPath animated:YES];
//my logic goes here
}
@end
我希望能够在 initialize 方法中将单元格添加到我的 tableview 中,我该怎么做?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.