I have a scaling/scrolling UIScrollview that I can place views on (think Drawing objets, Circles, squares, etc) I place a square on there and tap and Hold, menu comes up and I select Properties. I pass in the square.frame for the Rect and the popover looks great where it can fit in the UIScrollView.
Now I scale the UIScrollView so that the Square is bigger than the visible area on the screen. Tap and Hold, select properties, and the Popover is Presented somewhere, though not anywhere I can see.
I’m not sure how to detect from the Square’s perspective if its bigger than the visible area of the super.view’s zoomed in area and present the Popover from a different Rect.
Zoomed Out, square is completely visible and has room for popover on canvas
self.frame: {{0, 659.959}, {1846.72, 1388.04}}
self.superview.frame: {{0, 0}, {1024, 1024}}
self.superview.superview.frame: {{0, 44}, {1024, 704}}
self.superview.superview.superview.frame:{{0, 0}, {1024, 748}}
Zoomed In, square is covering all of screen
self.frame: {{0, 659.959}, {1846.72, 1388.04}}
self.superview.frame: {{0, 0}, {3180.31, 3180.31}}
self.superview.superview.frame: {{0, 44}, {1024, 704}}
self.superview.superview.superview.frame:{{0, 0}, {1024, 748}}
Max Zoom, though scrolled so there is room for popover on canvas
self.frame: {{0, 659.96}, {1822.62, 1369.96}}
self.superview.frame: {{0, 0}, {4096, 4096}}
self.superview.superview.frame: {{0, 44}, {1024, 704}}
self.superview.superview.superview.frame:{{0, 0}, {1024, 748}}
There does not seem to be a difference in the last toe to really tell that the square is coving the screen vs only a smidgin of it visible.
Any Suggestions welcome!
it depends on which view the popover controller is being displayed, but you could try converting the Squares frame from the scrollview to the view displaying the popover using