Popover controller for iPhone [closed]

﹥>﹥吖頭↗ 提交于 2019-11-30 04:02:56

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

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.

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

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