title: iOS UIPageControl not show correct pages number when I using subview call parent view
body: <p>I have Main<code>UIViewController</code>(named with<code>FlightSettingsContentViewController</code>), that contain a container view, the container view is the<code>UIPageViewController</code>(named with<code>FlightSettingContainer</code>);</p>
  
  <p>But the layout have to set a pageControl element on the Main<code>UIViewController</code>(<code>FlightSettingsContentViewController</code>), So I drag a page control on the Main<code>UIViewController</code>. </p>
  
  <p>But when the container view(subview -<code>FlightSettingContainer</code>) load, I want to set the main viewcontroller's pageControl<code>numberOfPages</code>.</p>
  
  <p>I write below code on the subview-FlightSettingContainer.m to call parent viewcontroller pagecontrol page number .</p>
  
  <pre><code> @interface FlightSettingContainer()
   {
       FlightSettingMainViewController *parentFlightSetngVC;
   }
  
   @implementation FlightSettingContainer
  
   - (void)viewDidLoad {
       [super viewDidLoad];
  
   parentFlightSetngVC = (FlightSettingMainViewController*) self.parentViewController;
  
   [parentFlightSetngVC.pageControl setNumberOfPages:4];
  
   }
  </code></pre>
  
  <p>But the pagecontrol dots not change to 4 dots on the main viewcontroller.</p>
  
  <p>have anyone know where the problem? thank you very much.</p>