Popover Controller for iPhone

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

+7
ios iphone uipopovercontroller
source share
3 answers

You can do this, I have a popover app on iPhone. You just need to create an 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 into your Viewcontroller.h

for reference check the Link

+17
source share

As stated in the Apple documentation

Popover controllers are for use exclusively on iPad devices .

Thus, unfortunately, there is no way to use this class in an application for the iPhone. But there are several custom third-party implementations of the functions provided by UIPopoverController that add iPhone support and more.

You can check this link , for example.

0
source share

You can try using an open source framework like https://github.com/werner77/WEPopover

0
source share

All Articles