Created
September 25, 2016 18:18
-
-
Save alvises/b4250d16c3cbb6557e38b0d784de9dba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)presentPopoverFromView:(UIView *)fromView | |
onModalViewController:(UIViewController*)modalViewController { | |
[self presentPopoverFromView:fromView]; | |
//converting the origin of the popover from the old parent view to the new modal view | |
self.origin = [modalViewController.view convertPoint:self.origin fromView:_parentView]; | |
//the new parent view is the modal view | |
[self.view removeFromSuperview]; | |
_parentView = modalViewController.view; | |
[_parentView addSubview:self.view]; | |
[self setupView]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment