次のコードがiOS6で正常に機能するのはなぜですか。しかし、iOS 5では、デバイスがクラッシュする原因となる無限ループに巻き込まれます。「self.footerView=...」という行が実行されると、viewForFooterInSectionが再度呼び出されます。したがって、それを無限ループに閉じ込めます。
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
if (!self.footerView)
self.footerView = [[UIView alloc] initWithFrame:[tableView rectForFooterInSection:section]];
return self.footerView;
}
これを行うためのより良い方法はありますか?これがiOS6で機能するのに、5では機能しないのはなぜですか?
よろしく、
ピーター