How to dismiss UIPopover from a button in the Popover

前端 未结 3 1998
花落未央
花落未央 2020-12-08 11:59

I am trying to dismiss a UIPopoverViewControler from a button in the Popover. In addition I want it to transfer the data back to the main view. I have it working for a modal

3条回答
  •  醉酒成梦
    2020-12-08 12:36

    In the original dialogue above "im getting an error on the line @class YourViewController : UIViewController { id delegate; } it says i need a ; – BDGapps"

    The answer is very simple. It's a type. Change @class to @interface and all is well.

    @protocol DismissPopoverDelegate
    - (void) dismissPopover:(NSObject *)yourDataToTransfer;
    @end
    
    
    @interface YourViewController : UIViewController {
        id delegate;
    }
    

提交回复
热议问题