UIPopViewController not working

后端 未结 3 2077
一整个雨季
一整个雨季 2021-02-11 02:38

I have an xib file with a .h and .m linked. In the xib there is a UIView with a textView. What I would like to do with that view is open it as a UIPopViewController when you cli

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-11 03:08

    This must just work for you guys

    -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
        if ([segue.identifier isEqualToString:@"popoverSegue"])
    
        {
            UIViewController *popUpControl=segue.destinationViewController;
            popUpControl.modalPresentationStyle=UIModalPresentationPopover;
            popUpControl.popoverPresentationController.delegate=self;
        }
    }
    -(UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller
    {
        return UIModalPresentationNone;
    }
    

提交回复
热议问题