Solved! Go to Solution.
-(void) mapView:(AGSMapView *)mapView didClickAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint graphics:(NSDictionary *)graphics { PopupGraphics = [[NSMutableArray alloc] init]; for (NSString* key in graphics) { id value = [graphics objectForKey:key]; for (AGSGraphic *featureGraphic in value) { AGSPopupInfo *popupinfo = [AGSPopupInfo popupInfoForGraphic:featureGraphic]; NSArray *CellBustedValues = [featureGraphic.layer.name componentsSeparatedByString:@" - "]; if (CellBustedValues.count >1) { popupinfo.title = [CellBustedValues objectAtIndex:1]; } else { popupinfo.title = featureGraphic.layer.name; } AGSPopup *popup = [AGSPopup popupWithGraphic:featureGraphic popupInfo:popupinfo]; [PopupGraphics addObject:popup]; } } if (PopupGraphics.count > 0) { self.popupVC = [[ AGSPopupsContainerViewControlleralloc] initWithPopups:PopupGraphicsusingNavigationControllerStack:NO]; self.popupVC.delegate = self; self.popupVC.style = AGSPopupsContainerPagingStylePageControl; self.popupVC.styleColor = [UIColor blackColor]; self.popupVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; // so it doesn't take up the entire screen self.popupVC.modalPresentationStyle = UIModalPresentationFormSheet; [selfpresentModalViewController:self.popupVCanimated:YES]; } }
-(void) mapView:(AGSMapView *)mapView didClickAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint graphics:(NSDictionary *)graphics { PopupGraphics = [[NSMutableArray alloc] init]; for (NSString* key in graphics) { id value = [graphics objectForKey:key]; for (AGSGraphic *featureGraphic in value) { AGSPopupInfo *popupinfo = [AGSPopupInfo popupInfoForGraphic:featureGraphic]; NSArray *CellBustedValues = [featureGraphic.layer.name componentsSeparatedByString:@" - "]; if (CellBustedValues.count >1) { popupinfo.title = [CellBustedValues objectAtIndex:1]; } else { popupinfo.title = featureGraphic.layer.name; } AGSPopup *popup = [AGSPopup popupWithGraphic:featureGraphic popupInfo:popupinfo]; [PopupGraphics addObject:popup]; } } if (PopupGraphics.count > 0) { self.popupVC = [[ AGSPopupsContainerViewControlleralloc] initWithPopups:PopupGraphicsusingNavigationControllerStack:NO]; self.popupVC.delegate = self; self.popupVC.style = AGSPopupsContainerPagingStylePageControl; self.popupVC.styleColor = [UIColor blackColor]; self.popupVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; // so it doesn't take up the entire screen self.popupVC.modalPresentationStyle = UIModalPresentationFormSheet; [selfpresentModalViewController:self.popupVCanimated:YES]; } }