UIPopOverController for iPhone (currently only available for iPad)

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:50:34

See my implementation here: https://github.com/werner77/WEPopover

It has the same interface as the UIPopoverController but is generalized for iPhone and with support for custom background views.

I have provided another alternative SGPopoverController at http://github.com/KJoyner/SeaGlass. Like the WEPopover, this has a similar interface to UIPovoerController but works on the iPhone. This version handles more corner cases, works both modally and non-modally, supports passthrough views, and more.

Duny

Create UIPopover+iPhone.h

#import <Foundation/Foundation.h>

@interface UIPopoverController (overrides)
+ (BOOL)_popoversDisabled;
@end

There's a reason UIPopoverController isn't a standard UI element on the iPhone, is that screen space is rather restricted. Having a popover, that's easily readable, implies that a fair amount of the iPhone screen will be taken up by the popover. Perhaps you should rethink your UI decision.

Maybe a coverVertical modal view?

Found another git. Looks more updated and actively maintained. it uses QuantzCore to draw the popover, which looks as elegant as iOS's SDK native. Just for your reference: https://github.com/50pixels/FPPopover

Basically the best way to do this is to implement custom UIAlertView subclasses that look/behave how you want, via custom animations and being able to click behind and disappear (if you want that functionality, as UIPopoverController has it)

Edit: you can also try using a view and presenting it modally, though the animations might not be what you are looking for.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!