0
如何在我的方法中獲得objectAtIndex
。如何在我的方法中獲取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);
}
}