Multiple Popups using AGSPopupsContainerViewController

803
0
01-31-2014 12:29 AM
NicoleDe_La_Feld
New Contributor II
Hi, I am using AGSPopupsContainerViewController to display multiple popups when touching on mapView we fetch more than one AGSGraphics.
Here is my code:

NSMutableArray *popups =[[NSMutableArray alloc]init];
            AGSPopupInfo *popupinfo;
            
            for (AGSGraphic *g in Graphics ) {
               popupinfo =[AGSPopupInfo popupInfoForGraphic:g] ;
                AGSPopup* popup = [AGSPopup popupWithGraphic:g popupInfo:popupinfo];
                popup.allowEditGeometry = false;
                [popups addObject:popup];
                
            }
            
            if (!popupVC) {
                self.popupVC = [[AGSPopupsContainerViewController alloc] initWithPopups:popups usingNavigationControllerStack:false];
                
                

            }else{
                [self.popupVC showAdditionalPopups:popups];
                
            }

        self.popupVC.delegate = self;

        self.popupVC.doneButton = self.customActionButton;
        self.popupVC.style = AGSPopupsContainerStyleCustomColor;
        self.popupVC.barItemTintColor = [UIColor redColor];
        self.popupVC.pagingStyle = AGSPopupsContainerPagingStyleToolbar;

        // Animate by flipping horizontally
        self.popupVC.modalTransitionStyle =  UIModalTransitionStyleFlipHorizontal;
        
        // If iPad, use a modal presentation style
        if([[AGSDevice currentDevice] isIPad])
            self.popupVC.modalPresentationStyle = UIModalPresentationFormSheet;
        
        [self presentViewController:self.popupVC animated:YES completion:nil];


All works fine, I have the right number of pupups, the problem is that using the arrows in the toolbar I can only see the first and the last ones. Why? I am missing something?
0 Kudos
0 Replies