如何从此 IBAction 调用以下方法?我想调用 prepareForSegue: 方法而不是 NSLog(@"clicked");
这是IBAction:
- (IBAction) annotationViewClick:(id) sender {
NSLog(@"clicked");
}
这是方法:
// Do some customisation of our new view when a table item has been selected
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
// Make sure we're referring to the correct segue
if ([[segue identifier] isEqualToString:@"ShowMoreInfo"]) {
// Get reference to the destination view controller
MoreDetailViewController *mdvc = [segue destinationViewController];
[mdvc setSelectedItemName:[NSString stringWithFormat:@"%@", placeName.text]];
[mdvc setSelectedItemAddress:[NSString stringWithFormat:@"%@", placeFormattedAddress.text]];
[mdvc setSelectedItemWeb:[NSString stringWithFormat:@"%@", placeWebsite.text]];
[mdvc setSelectedItemRating:[NSString stringWithFormat:@"%@", placeRating.text]];
// [mdvc setSelectedItemDistance:[NSString stringWithFormat:@"%@", placeDistance.text]];
}
}
谢谢您的帮助!