alvises / FPPopover

FPPopover provides an alternative to the native iOS UIPopoverController, adding support for iPhone and additional opportunities to customize the look and feel of the popovers.
http://www.poeticoding.com/fppopover-a-customizable-uipopovercontroller-for-iphone-and-ipad/
Other
902 stars 250 forks source link

Fails if window has many subviews... #87

Open zedrdave opened 11 years ago

zedrdave commented 11 years ago

My window has a background subview and the popOver gets added to this subview instead of the RootViewController's view (which means it doesn't get displayed in most cases).

I found that replacing the following line:

_parentView = [_window.subviews objectAtIndex:0];

By

_parentView = _window.rootViewController.view;

in presentPopoverFromPoint() fixed the problem for me.

mhennemeyer commented 10 years ago

+1

tposch commented 10 years ago

_parentView = [_window.subviews lastObject]; will ensure that the parent view is the top most subview in the window.

jtoronto commented 10 years ago

+1

tposch's solution worked for me.

ruchirV commented 10 years ago

+1

Thanks for the bug fix! But somehow I saw the issue only after upgrading to iOS8. Anyway, problem solved. :+1: