Skip to content

tatsuro-ueda/p120809_TableCellToView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

u can wire from TableViewController to other view.

ss

For example, at first, you can set TableViewCell as below:

ss

When tap the cell, the view with the number of tapped cell.

ss

To send the number of tapped cell to next ViewController, you can use performSegueWithIdentifier:sender: and prepareForSegue:sender as below.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"showDetail" 
                              sender:[NSString stringWithFormat:@"%d", indexPath.row + 1]];
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    DetailViewController *c = segue.destinationViewController;
    c.string = (NSString *)sender;
}

About

Sample project about table cell with segue to other view controller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published