テーブルビューで動的セルを追加するために使用しているコードを見てください。ランタイムを追加してください。私のテーブルビューを選択したとき、私はこのメソッドを呼び出しました。キャッチされない例外により 'NSInvalidArgumentException'、理由に *アプリを終了:テーブルビューでダイナミックセルを追加する際に問題がありますか?
- (void) allServersFound
{
// called from delegate when bonjourservices has listings of machines:
NSArray *newPosts = [[NSArray alloc]initWithObjects:@"A", nil]; // NSArray of machine names;
NSMutableArray *tempArray = [[NSMutableArray alloc] initWithObjects: @"A",@"B",@"C",@"D", nil];
int i = 0;
for (NSArray *count in newPosts)
{
[tempArray addObject:[NSIndexPath indexPathForRow:i++ inSection:0]];
}
[[self tblHome] beginUpdates];
[[self tblHome] insertRowsAtIndexPaths:tempArray withRowAnimation:UITableViewRowAnimationNone];
[[self tblHome] endUpdates];
[tempArray release];
}
しかし、これは実行時例外次のように私を与える「 - [NSIndexPath _fastCStringContents:]:認識されていないセレクタはインスタンスに送信0x4e0e130