0

I know that Popover controllers are for use exclusively on iPad devices, but on below question there is a comment in which user has mentioned about category, code is as below, UIPopoverController for iphone not working?

  // UIPopoverController+iPhone.h file
  @interface UIPopoverController (iPhone)
 + (BOOL)_popoversDisabled;
 @end

  // UIPopoverController+iPhone.m file
  @implementation UIPopoverController (iPhone)
 + (BOOL)_popoversDisabled {
     return NO; 
 } 
 @end 

Is this right way? Will Apple approve this?,

My iPad application is already done, now I am making it universal application, so instead of using any custom popover I want to add this category so that it will solve my issue and will reduce development efforts.

1

2 Answers 2

1

This is very hacky way, and you'll be taking a big risk putting it on the AppStore. Sure someone may have put a version in the store where they overlooked this, but it can break any moment and Apple may decide to remove his app.

Have you tested popovers on iPhone? Will you test in iOS7.1? Will it work exactly the same on iOS7.2 or iOS 7.3?

A far better solution would be to take an open source implementation of popovers and use that for iPhone (or both).

0

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

Edit

For iOS 8 you can use WYPopoverController.

5
  • That's great help, can you post link of application? Dec 16, 2013 at 12:03
  • academic-diary in memo section there is popover. Dec 16, 2013 at 12:06
  • 1
    Apple seems to have disabled this for iOS8. I had two apps that relied on it, now will have to find another solution. Aug 28, 2014 at 21:32
  • @Virussmca: i have the same problems with iOS 8 as Jason
    – Nam Vu
    Dec 7, 2014 at 12:25
  • @Virussmca Thanks it's working fine in iOS7 but not in iOS8... any work around for iOS8 ?
    – Maddy
    Jan 20, 2015 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.