Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>i'm not sure if this link about creating navigation-based project may help you.. (http://iosmadesimple.blogspot.com/2012/08/navigation-based-project-doing-it.html)</p> <p>From that tutorial, there's a class called SampleViewController, subclass of UIViewController. You might want to put a tableView in SampleViewController.xib file. Then in your SampleViewController.h file, add an IBOutlet UITableView* yourTable property and synthesize it. Connect it to your tableView in your .xib file. //Or you may do it programmatically</p> <p>in your SampleViewController.h, make your interface header look like this.. I think you already know this...</p> <p>@interface SampleViewController:UIViewController &lt; UITableviewDelegate, UITableViewDatasource ></p> <p>in your SampleViewcontroller.m, under viewDidLoad method, set the table delegate and datasource to self:</p> <pre><code>yourTableView.delegate = self; yourTableView.datasource = self; </code></pre> <p>Afterwhich, you implement tableView delegate and datasource methods... //you already know those since you were already able to show a tableview ;)</p> <p><strong>one of these methods is the "tableview:didSelectAtIndexpath:" --> this is the part wherein you can put your code when you click one of the cells.</strong></p> <p>Let's assume you have the DetailsViewController Class, this is the class you would like to show after clicking a cell and show its details.</p> <p>DetailsViewController Class must have a variable that will accept the data you would like to show. Let's say, an NSString *detailsMessage; //do the @property and @synthesize thing...</p> <p>Let's go back to SampleViewController.m file, under tableview:didSelectAtIndexpath: Method: inside that Method.. put these codes.</p> <pre><code>DetailsViewController *detailsVC = [[DetailsViewController alloc] init]; detailsVC.detailsMessage = @"The Data you want to pass."; [self.navigationController pushViewController:detailsVC animated:YES]; </code></pre> <p>I hope this helps. :(</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload