NSRangeException

2014年2月15日 Posted by PURGE

どうやら配列絡みのエラーっぽい。

Terminating app due to uncaught exception 'NSRangeException', 
reason: '*** -[__NSArrayI objectAtIndex:]: index 3 beyond bounds [0 .. 2]'

下記のメソッドで返されたカウントより範囲を超えてしまっているようだ。

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return items.count;
}

よくよく見ると、storybordでのtableViewのcontent設定が、Static Cells に設定されていたことに気づく。
ここは、Dynamic Prototypes 設定でしょ。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です