-(void)setSelectedGraphic:(AGSGraphic *)selectedGraphicValue { _selectedGraphic = selectedGraphicValue; [self.relatedTableFeatureLayer clearAttachmentManagers]; AGSAttachmentManager *am = [[self.relatedTableFeatureLayer attachmentManagerForFeature:_selectedGraphic] retain]; am.delegate = self; [am downloadAttachmentInfos]; } -(void)attachmentManager:(AGSAttachmentManager *)attachmentManager didDownloadAttachmentInfos:(NSArray *)attachmentInfos { for(InspectionFormViewController *controller in self.viewControllers) { controller.attachments = [NSMutableArray array]; } for(AGSAttachmentInfo *info in attachmentInfos) { AGSAttachmentManager *am = [[self.relatedTableFeatureLayer attachmentManagerForFeature:self.selectedGraphic] retain]; am.delegate = self; [am downloadAttachmentDataForId:info.attachmentId]; } //[attachmentManager release]; } -(void)attachmentManager:(AGSAttachmentManager *)attachmentManager didDownloadDataForAttachment:(AGSAttachment *)attachment { for(InspectionFormViewController *controller in self.viewControllers) { [controller.attachments addObject:attachment]; } //[attachmentManager release]; }
-(void)attachmentManager:(AGSAttachmentManager *)attachmentManager didDownloadAttachmentInfos:(NSArray *)attachmentInfos { for(AGSAttachmentInfo *info in attachmentInfos) { [attachmentManager downloadAttachmentDataForId:info.attachmentId]; } }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.