1

I am using the technique explained here to make the popover view size refresh properly when switching between view controllers:

Popover with embedded navigation controller doesn't respect size on back nav

It works fine... except for this: the button that I use to invoke the popover is in the right corner of the window. Like expected the popover window is shown to the left of it.

So, let's assume that the button is in frame ( 900, 700, 40, 40 ), and the first view controller is 200 x 200.

The popover view is located approximately at (700, 500, 200, 200).

If from that view controller I push another bigger view (let's say 400x 400), the popover view resizes appropiatelly, moving more to the left.

However, when I go "back" (to the 200x200 view controller) the popover view resizes, but it stays on the left, so it is approximately located at ( 500, 500, 200, 200).

In other words, if when navigating through the hierachy of views there is a wider view, it will expand to the left, and when going back it will shrink from the right (effectively moving the content to the left).

Note: sorry about the confusing explanation. Didn't know really well how to explain this issue.

BTW: the exact same program works perfectly if I put the button on the left side of the view, so the popover is forced to grow to the right from the beginning - however, marketing wants the button on the right.

Community
  • 1
  • 1
rufo
  • 5,158
  • 2
  • 36
  • 47

0 Answers0