【发布时间】:2012-09-19 02:26:19
【问题描述】:
我看到这个应用程序似乎正在自定义 EKEventViewController。看起来它正在修改 EKEventViewController 中的 tableview 并向其附加行。它绝对不仅仅是它前面的一个视图 - 它实际上是在 tableview 内部
任何想法如何做到这一点?这可以通过继承 EKEventViewController 来完成吗? 我尝试了子类化 - 但不知道如何将 numberofRowsInSection 推送到超类。
看来我应该能够继承 EKEventViewController 并像这样覆盖 UITableView 委托函数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [super tableView:tableView numberOfRowsInSection:section];
}
但由于 EKEventViewController 不继承自 UITableViewContoller(它是一个 UIViewController) - 此代码将无法编译。
【问题讨论】:
标签: ios subclassing