0
在將數據傳遞到STPopUp下部片STPopUpController傳點擊我面臨的一個問題數據下表樣式的iOS
所以現在有地圖在我的應用程序,包含引腳。一旦用戶點擊了引腳,它應該將單擊引腳的信息顯示給STPopupController。我可以檢索點擊引腳的數據,但我一直在弄清楚如何將點擊引腳的數據傳遞到底部表格很長一段時間。
這裏是我的一些代碼在我的第一個控制器
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view {
NSString *outletName = store.displayName;
NSString *address = [NSString stringWithFormat:@"%@\n%@\n%@\n%@\n%@\n%@\n%@", store.addressLine1, store.addressLine2, store.addressLine3, store.addressLine4, store.postcode, store.city, store.country];
NSString *contactNumber = store.contactNumber;
STPopupController *popupController = [[STPopupController alloc] initWithRootViewController:[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"OutletInformationViewController"]];
popupController.style = STPopupStyleBottomSheet;
[popupController presentInViewController:self];
}
的OutletInformationViewController是另一個視圖控制器。
基本上底部表已經存在,但我無法顯示點擊的引腳數據。
請不要介意我如何獲取數據。點擊引腳的所有數據已經存在。我正在努力的是如何將這些數據傳遞到底部控制器。
有人可以指導我嗎?謝謝:)
艾瑪·沃特森,你搖滾!謝謝!救了我一天 – Alvin
不用擔心。很高興它有幫助。 –