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