2017-12-21 12 views
0

私はスクロールビューの内側にビューコントローラのセットを持っています。スクロールビューメニューに接続しています。メニュースクロールからメニューをクリックすると、尊重されたviewcontrollerが表示されます。すべてのView Controllerは最初にロードされます。私は尊敬のメニューをクリックすると、ビューコントローラをリロードする必要があります。私のコードのScrollview内部のViewControllerを更新するにはどうすればよいですか?

btnArray = @[@"Dashboard", @"Daily Log", @"Labour Timesheet", @"Work Safety", @"Soil", @"Equipment", @"Site Photos", @"Quick Links", @"Printable Forms"]; 
[self addButtonsInScrollMenu:btnArray]; 


DashBoardViewController *dashboardVC = [storyBoard instantiateViewControllerWithIdentifier:@"Dashboard"]; 
DailyReportListViewController *dailyLogVC = [storyBoard instantiateViewControllerWithIdentifier:@"DailyReportListVC"]; 
TimeSheetListViewController *labourTimesheetVC = [storyBoard instantiateViewControllerWithIdentifier:@"TimeSheetListVC"]; 
SafetyReportListViewController *workSafetyVC = [storyBoard instantiateViewControllerWithIdentifier:@"SafetyReportListVC"]; 
DashBoardViewController *soilVC = [storyBoard instantiateViewControllerWithIdentifier:@"Dashboard"]; 
DashBoardViewController *equipmentVC = [storyBoard instantiateViewControllerWithIdentifier:@"Dashboard"]; 
DashBoardViewController *sitePhotosVC = [storyBoard instantiateViewControllerWithIdentifier:@"Dashboard"]; 
DashBoardViewController *quickLinksVC = [storyBoard instantiateViewControllerWithIdentifier:@"Dashboard"]; 
DashBoardViewController *printableFormsVC = [storyBoard instantiateViewControllerWithIdentifier:@"Dashboard"]; 

controllerArray = @[dashboardVC, dailyLogVC, labourTimesheetVC, workSafetyVC, soilVC, equipmentVC, sitePhotosVC, quickLinksVC, printableFormsVC]; 
[self addChildViewControllersOntoContainer:controllerArray]; 
+0

のviewDidLoadを呼び出すには、あなたの条件のスクリーンショットを提供します。 – phani

答えて

0

ように見えるcontrollerArrayをループと

関連する問題