Popover controller for iPhone [closed]

天大地大妈咪最大 提交于 2019-12-18 11:42:29

问题


I am working on iPhone application. And I want to create popover controller for my app. It is only available for iPad applications. Please help.


回答1:


You can do it, i have live app with with popover in iPhone. Just You have to create interface for popover

NSObject+UIPopover_Iphone.h

#import <Foundation/Foundation.h>

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

NSObject+UIPopover_Iphone.m

#import "NSObject+UIPopover_Iphone.h"

@implementation UIPopoverController (overrides)

+(BOOL)_popoversDisabled
{
    return NO;
}

@end

and now just import NSObject+UIPopover_Iphone.h in your Viewcontroller.h

for Reference check this Link




回答2:


As stated in Apple's Documentation

Popover controllers are for use exclusively on iPad devices.

So there is no way to use this class in iPhone application unfortunately. But there are a couple of custom third-party implementations of the functionality provided by UIPopoverController which add iPhone support and more.

You can check this Link for example.




回答3:


You can try to use open source framework for it for example https://github.com/werner77/WEPopover



来源:https://stackoverflow.com/questions/18205903/popover-controller-for-iphone

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