【发布时间】:2012-03-11 15:58:33
【问题描述】:
我沉迷于在 Storyboard 中使用 TableViewController,它的类直接继承自 UITableViewController,功能如下:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
默认情况下,您只需要实现它们。但现在我在情节提要中使用 ViewController(从 UIViewController 继承)并通过拖放将对象库中的 UITableView 控件使用到视图控制器中。显然,我将附加到我的故事板 ViewController 的类将从 UIViewController 继承。现在如何在我的视图控制器中与 UITableView 控件中的表格单元格进行交互。想实现上面相同的行函数。
【问题讨论】:
标签: ios ios5 uiviewcontroller uitableview