How To Dynamically change the contentSize of UIPopoverController?

后端 未结 8 545
执念已碎
执念已碎 2020-12-14 16:35

I have a UIViewController that contains a UITableView. This UIViewController is being displayed in a UIPopoverController.

8条回答
  •  無奈伤痛
    2020-12-14 17:13

    I might be very late to answer but for new user from iOS 7 please use the following line in your UIViewController i,e contentViewController of your UIPopOverViewConotroller

    -(void) viewDidAppear:(BOOL)animated{
        [super viewDidAppear:animated];
        self.preferredContentSize=myTableView.contentSize;
    }
    

    Hope this will help for iOS 7 user.

提交回复
热议问题