Objective c 不在绘图时更新UITableViewDelegate
我有一个类定义如下:Objective c 不在绘图时更新UITableViewDelegate,objective-c,ios,uitableview,Objective C,Ios,Uitableview,我有一个类定义如下: @interface ClassViewController : ContentViewController <UITableViewDelegate, UITableViewDataSource> { IBOutlet UITableView* mTableView; NSMutableArray *feeds; NSMutableData *responseData; } @property (nonatomic, retain) U
@interface ClassViewController : ContentViewController <UITableViewDelegate,
UITableViewDataSource> {
IBOutlet UITableView* mTableView;
NSMutableArray *feeds;
NSMutableData *responseData;
}
@property (nonatomic, retain) UITableView* mTableView;
@property (nonatomic, strong) NSMutableArray* feeds;
@property (nonatomic, strong) NSMutableData* responseData;
我正在设置:
self.mTableView = tableView;
否则,结果根本不会传播到表中
是否有我遗漏的内容,或者应该将self.mTableView
定义放在其他位置
我是Objective-C和iOS开发的新手,因此如果我遗漏了什么,请告诉我。您应该:
(1) 将mTableView
连接到Interface Builder中的表视图对象
(2) 请注意,您可以只使用属性表示法self.mTableView
,而不是self->mTableView
(1) 会解决你的问题。(2) 这只是一个风格问题(主要是)
您可以在IB中定义self.mTableView。将其声明为IBOutlet可以让您控制从视图控制器到表视图的拖动来完成此操作。数据源更新后调用reloadData应该是显示数据所需的全部。不过,我不知道连接你的销售点是否能解决你的问题。像这样吗<代码>IBUITableView*mTableView代码>
mTableView
未列为出口。我将其定义为:IBOutlet UITableView*mTableView代码>。这不对吗?顺便说一下,谢谢
self.mTableView = tableView;