Some useful methods in for storyboard.
get object of a class that is push in storyboard.
ProviderLookupViewController* vc = [self.storyboard instantiateViewControllerWithIdentifier:@"ProviderLookupViewController"];
[self presentModalViewController:vc animated:YES];
//--------------------------------------------
[self performSegueWithIdentifier:@"SomeSegueName" sender:someObject];
//--------------------------------
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"TargetSegue"]) {
TargetViewController *vc = segue.destinationViewController;
//vc.items = nil;
}
}
//----------------------------------------------
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"articleView"])
{
WebViewController *controller = (WebViewController *)segue.destinationViewController;
RSSEntry *entry = [_allEntries objectAtIndex:[self.tableView indexPathForSelectedRow].row];
controller.entry = entry;
}
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
[self performSegueWithIdentifier:@"articleView" sender:[self.tableView cellForRowAtIndexPath:indexPath]];
}
//****************************************************************
Links to learn storyboard
//****************************************************************
No comments:
Post a Comment