Solved! Go to Solution.
-(void)mapView:(AGSMapView *)mapView didClickCalloutAccessoryButtonForGraphic:(AGSGraphic *)graphic{ self.activeFeatureLayer = (AGSFeatureLayer*) graphic.layer; AGSPopupInfo *info = [AGSPopupInfo popupInfoForGraphic:graphic]; //Show popup for the graphic because the user tapped on the callout accessory button //ADDED THIS LINE FROM THE "Related Record Editing Sample" self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithPopupInfo:info graphic:graphic usingNavigationControllerStack:NO] autorelease]; //COMMENTED MY CODE //self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithWebMap:self.webmap forFeature:graphic usingNavigationControllerStack:NO] autorelease]; self.popupVC.delegate = self; self.popupVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; //If iPad, use a modal presentation style if([[UIDevice currentDevice] isIPad]) self.popupVC.modalPresentationStyle = UIModalPresentationFormSheet; [self presentModalViewController:self.popupVC animated:YES]; }
-(void)mapView:(AGSMapView *)mapView didClickCalloutAccessoryButtonForGraphic:(AGSGraphic *)graphic{ self.activeFeatureLayer = (AGSFeatureLayer*) graphic.layer; AGSPopupInfo *info = [AGSPopupInfo popupInfoForGraphic:graphic]; //Show popup for the graphic because the user tapped on the callout accessory button //ADDED THIS LINE FROM THE "Related Record Editing Sample" self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithPopupInfo:info graphic:graphic usingNavigationControllerStack:NO] autorelease]; //COMMENTED MY CODE //self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithWebMap:self.webmap forFeature:graphic usingNavigationControllerStack:NO] autorelease]; self.popupVC.delegate = self; self.popupVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; //If iPad, use a modal presentation style if([[UIDevice currentDevice] isIPad]) self.popupVC.modalPresentationStyle = UIModalPresentationFormSheet; [self presentModalViewController:self.popupVC animated:YES]; }