I created the single view application using storyboard.
I have viewcontoller.h file
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController<UITableViewDelegate, UITableViewDataSource>
@end
I have viewcontoller.m file
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
{
NSArray *recipes;
}
- (void)viewDidLoad {
[super viewDidLoad];
recipes = [NSArray arrayWithObjects:@"Egg Benedict", @"Mushroom Risotto", @"Full Breakfast", @"Hamburger", @"Ham and Egg Sandwich", @"Creme Brelee", @"White Chocolate Donut", @"Starbucks Coffee", @"Vegetable Curry", @"Instant Noodle with Egg", @"Noodle with BBQ Pork", @"Japanese Noodle with Pork", @"Green Tea", @"Thai Shrimp Cake", @"Angry Birds Cake", @"Ham and Cheese Panini", nil];
}
-(NSInteger)tableView :(UITableView *)tableView numberOfRowsInSection :(NSInteger)section
{
return [recipes count];
}
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier=@"RecpieCell";
UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if(cell ==nil)
{
cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
}
cell.textLabel.text=[recipes objectAtIndex:indexPath.row];
return cell;
}
@end
In storyboard file, i have three view controller
> 1-navigation controller 2-Recipe Book View Controller 3-View
> Controller
Prototype cell of the table view of Recipe Book View Controller is connected through push segue to View Controller.Is the problem Recipe Book View Controller does not navigate to View Controller?
What I have tried:
www.google.com .I have seen tutorial on
[
^] .
From this link you can download the sample for correction dropbox.com/s/kpybdmtov7i0wne/RecipeBook.zip?dl=0