I have the following code having capability such that, once I tap on the table cell it will go to another view controller where it has its description. I am trying to do it programmatically.
This is my code that controls the segue part, which is not getting called:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
DetailViewController *detailVC = (DetailViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"detailViewController"];
detailVC.navigationItem.title = self.ourNumberOfQuotes[indexPath];
detailVC.indexRow = [NSString stringWithFormat:@"%@",indexPath];
[self.navigationController pushViewController:detailVC animated:YES];
}
Why is this not getting called?
This is my .h file code
@interface QuoteTableViewController : UITableViewController <UIGestureRecognizerDelegate,UITableViewDataSource,UITableViewDelegate> {
int i;
}
@property (strong, nonatomic) IBOutlet UIView *mainMenu;
@property (strong, nonatomic) IBOutlet UIButton *homeworkButton;
@property (strong, nonatomic) IBOutlet UIButton *uploadButton;
@property (strong, nonatomic) NSArray *arrayOfOurQuotes;
@property (strong, nonatomic) NSMutableArray *ourNumberOfQuotes;