2
iphoneアプリケーションでIndexPathを取得する方法
私はプログラムで作成されたテーブルビューで選択された行に基づいて何かを行うindexPath.row値を取得しようとしています。
誰かが、なぜ、indexPath.rowの値が正しくないのか教えてください。 21487 ... 3のようなものですか?
NSUInteger nSections = [myTableView numberOfSections];
NSUInteger nRows = [myTableView numberOfRowsInSection:nSections];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow: nRows inSection:nSections];
NSLog(@"No of sections in my table view %d",nSections);
NSLog(@"No of rows in my table view %d",nRows);
NSLog(@"Value of selected indexPath Row %d", indexPath.row);
おかげで、
Aaryan