Code is exectuting but the view is not loading when called form a function?

前端 未结 2 698
眼角桃花
眼角桃花 2020-12-06 23:52

I am doing a book kinda application using a viewBased application. The mainView acts as the backgroundView for loading pages. Each page is a different view and have its own

2条回答
  •  死守一世寂寞
    2020-12-07 00:47

    You need to have refernce of the background view controller in the popover controller.

    In the PopController controller you should have a delagate like:

    @interface PopController: UITablViewController{
    
      //// other varibales;
          id delegate;
    }
    
    @property (nonatomic, retain) id delgate;
    

    Now from the class in which you are showing the popovercontroller

    you should add this line:

    [myPopController setDelegate:self];
    

    Then you can easily acces any method of the main view controller class. By using

    [delegate callTheRequiredMethod];
    

    Hope this helps.

    Thanks,

    Madhup

提交回复
热议问题