我怎样才能进入objectAtIndex
我的方法。
例如,如果我使用didSelectRowAtIndexPath:(NSIndexPath *)indexPath
我可以得到它
NSLog(@"%@", [currentCourses objectAtIndex:indexPath.row]);
我怎么能在这样的其他方法中做同样的事情?
-(void)longPress : (UILongPressGestureRecognizer *)rec {
if (rec.state == UIGestureRecognizerStateBegan) {
// NSIndexPath *myPath = [NSIndexPath indexPathForRow:0 inSection:0];
/*NSArray *currentCourses = [self currentCourses:myIP0.section];
billContent *bc = [currentCourses objectAtIndex:myIP0.section];
NSLog(@"title - %@", bc.billTitle);*/
// NSLog(@"%@", myPath.row);
//NSLog(@"did selected - %d", indexPath.row);
}
}