I'm new to IOS 7 and I'm made a test application where I want to use scrollToRowAtIndexPath when a left swipe is detected. The swipe is detected but I'm struggling with the "self" definition. I get the error No visible @interface for 'SimpleTableViewController'
- (void)handleSwipeLeft:(UISwipeGestureRecognizer *)recognizer
{
NSLog(@"%u = %d", recognizer.direction,recognizer.state);
// jump to section 0 row 20 when leftswipe is dectected
NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:20 inSection:0];
[self.tableView scrollToRowAtIndexPath:newIndexPath atScrollPosition:UITableViewScrollPositionTop animated:NO];
}
I can send the complete source code if you want or you can download it here:
www.auditext.com/xintax/SimpleTable.zip
Using self.tableView gives message Property 'tableView' not found on object of type 'SimpleTableViewController' –
It works now I have added this line to my viewcontroller.h: `@property (strong, nonatomic) IBOutlet UITableView *myview;
NSIndexPath *loc = [NSIndexPath indexPathForRow:row inSection:section];
[self.myview scrollToRowAtIndexPath:loc atScrollPosition:UITableViewScrollPositionBottom animated:YES]; `