I run into a problem with prepareforsegue-style. I am, as you can tell of my question quite new to Xcode, and I just don't get this right:
I have a LAFirstView reading data from parse that I save in an array called 'kundUppgifter'.
Now I need to send a text from the objectatindex:index to the next view that is called LASecondView. In the LASecondView I have declared a label that is called myLabel where I want the text to show up.
I have been reading about it here at Stackoverflow, but the problem is that when I read others answers I don't understand what to replace things with. My code in the LAFirstView :looks like this and of course it is not working but I do get the right things out from NSLog. Hoping for help:
//IMPLEMENT THIS ONE (WHEN DISCLOSURE BUTTON IS PRESSED):
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control{
[self performSegueWithIdentifier: @"openingHours" sender: self];
NSUInteger index = [mapView.annotations indexOfObject:view.annotation];
PFObject *tempObject = [kundUppgifter objectAtIndex:index];
NSLog(@"%lu", (unsigned long)index);
NSLog(@"%@", [tempObject objectForKey:@"CNAME"]);
}