Xcode Tutorial - UIPopover on iPhone!

Maximilian Litteral · 36K views · 2011 · 6:39

Open on YouTube

Software (other)Testing, debugging & developer toolstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when someone asks how to get an iPad-style popover or dropdown on an iPhone, and askers also cite it when they try to reproduce or port the _popoversDisabled override.

Recommended by 4 people across 4 different months, 2012 to 2014.

What it is

A short 2011 Xcode tutorial showing how to display a UIPopover on the iPhone, a control normally limited to the iPad, by overriding a private UIPopoverController method that disables popovers. The presenter, Maximilian Litteral, credits the snippet to @hamzasood and warns that Apple may reject apps that use it.

What people said

Recommends MasterRazer · 2012-11 · Stack Overflow · on “Which component is used by lookbook.nu app?”

Maybe this could help you... [this video] you can simply create a UIPopover on Iphone, but I think on ipad its much easier...Well take a look.

Recommends chandru · 2013-12 · Stack Overflow · on “iOS button click event show popup”

As stated in the above answer U can create a popover, But when U are using it in iPhone, U have to create a category file to use a popover View, Refer this video [this video]

Recommends baliman · 2014-05 · Stack Overflow · on “Drop down menu for IOS App”

There are a lot of tutorials that use popover for iphone, you do not have to use third party libraries. Follow this tutorial on youtube [this video]

Recommends ppalancica · 2014-08 · Stack Overflow · on “iOS: What is this box/menu with a pointer/arrow called?”

It is called a Popover control on iPad, on iPhone I think it does not come by default, but you can implement it using some 3-rd libraries, like: [LINK] Check out this video: [this video] and see the description that Apple may reject the app if you are using the standard one because it is made to use for the iPad by the iOS SDK. But if you create your custom one for iPhone, I think it should be fine.

Cites Chris Kooken · 2012-05 · Stack Overflow · on “Monotouch UIPopover iPhone override _popoversDisabled”

I saw this video on youtube where, in objective-c he was able to override the _popoversDisabled method and allow them to be displayed on iPhones. My Question is, how would I do the same thing in monotouch as shown as below: This code was written by @hamzasood =============================== =====popover code=========== ============================= @interface UIPopoverController (overrides) + (BOOL)_popoversDisabled; @end @implementation UIPopoverController (overrides) + (BOOL)_popoversDisabled { return NO; } @end Objective-C video tutorial here: [this video]

Cites Manish Ranjan · 2012-06 · Stack Overflow · on “Using popover control in iPhone”

pop = [[UIPopoverController alloc] initWithContentViewController:popoverView]; pop.delegate = self; //optional CGSize size = CGSizeMake(300, 100); // size of view in popover…V2 pop.popoverContentSize = size; [pop presentPopoverFromRect:control.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; Youtube link: [this video] It works fine in simulator, but crashes when running on iPhone. I can easily get so many articles to implement on iPad, but on iPhone couldn't find a fruitful one. Plz help

Cites liv a · 2013-04 · Stack Overflow · on “what is (overrides) in objective c”

I'm following a tutorial on how to create a popover in Iphone here [this video] what is (overrides) this code: @interface UIPopoverController (overrides) + (BOOL)_popoversDisabled; @end @implementation UIPopoverController (overrides) + (BOOL)_popoversDisabled { return NO; } @end

Cites Toseef Khilji · 2013-08 · Stack Overflow · on “Popover controller for iPhone”

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 [this video]

Cites Sèb · 2013-10 · Stack Overflow · on “Popover view for iPhone using XCode 5”

I wanted to reuse the popover for iPhone described in this video [this video] which is exactly what I need. The problem is that I couldn't bind a UIViewController property to the popover's UIViewController like in the video. One difference with the video is that it has been made using XCode 4.2 and I'm using XCode 5. So the question is: How to make a popover for iPhone like in the video [this video] on XCode 5? Here is the XCode 5 project I am struggling with. [LINK]