Just a little question. I have a root view controller (AufnahmeIstTableViewController) and a detail view controller (AufnahmeISTDetailTableViewController)
I also have an int called istAufnahmeInt. When the user selects row 1 on my root view controller, then the value of my int is set to 0. When row 2 is pressed the value is set to 1, ... .
In my prepareForSegue method, I have the following code:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if([segue.identifier isEqualToString:@"DetailView"])
{
AufnahmeISTDetailTableViewController *controller =(AufnahmeISTDetailTableViewController *)segue.destinationViewController;
controller.istAufnahmeInt = //What should I enter here? ;
}
}
So, what do I have to enter where my comment is to get the value of my istAufnahmeInt?
I use Storyboards.
For completion: Here's my didSelectRowAtIndexPath method:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
AufnahmeISTDetailTableViewController *categories = [[AufnahmeISTDetailTableViewController alloc]init];
if ([[self.categoryArray objectAtIndex:indexPath.row] isEqual:@"Gesetze"])
categories.istAufnahmeInt = 0;
if ([[self.categoryArray objectAtIndex:indexPath.row] isEqual:@"Messmittel"])
categories.istAufnahmeInt = 1;
if ([[self.categoryArray objectAtIndex:indexPath.row] isEqual:@"Dritte"])
categories.istAufnahmeInt = 2;
[categories setTitle:[self.categoryArray objectAtIndex:indexPath.row]];
}