popoverController

Discussion in 'iOS Programming' started by chhoda, Jan 11, 2012.

  1. chhoda macrumors 6502

    Joined:
    Oct 25, 2008
    #1
    UIPopOverController works in iPhone ? I got it to work in ipad, but does not work in iPhone !

    Documentation is silent !

    similarly presentModalViewController works only in iPad not in iPhone !
     
  2. naphatkrit macrumors member

    Joined:
    Jul 18, 2011
    #2
    I'm no expert, but I believe popover is iPad only. For modal view controller, it should work on iPhone. What happens when you try to present the modal view? Nothing at all?
     
  3. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
  4. naphatkrit macrumors member

    Joined:
    Jul 18, 2011
    #4
    If you're developing for iOS 5, try PresentViewController instead. Also, try adding an nslog right above the present modal view line to see if the code is being run.
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    The documentation states:

    "Popover controllers are for use exclusively on iPad devices. Attempting to create one on other devices results in an exception."
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    presentModalViewController:animated: has been working since the SDK was released back in 2008. Perhaps you're not calling it correctly.
     
  7. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #7
    As far as I know it doesn't work on iPhone, since he wants to show it on an iPhone, he will have to result into something else, i'm sorry for that.
     
  8. ppilone macrumors 6502

    Joined:
    Jan 20, 2008
    #8
    You could "roll your own" for iPhone. Apple uses a popover in some iWork apps for iPhone. However, I don't think it's actually a UIPopoverController.
     
  9. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #9
    presentModalViewController works on all devices. Realize we are no longer talking about UIPopoverController here.
     
  10. naphatkrit macrumors member

    Joined:
    Jul 18, 2011
    #10
    Maybe the problem is the view he is trying to present modally is the uipopovercontroller? In that case he should try to present whatever is the view controller in the popover controller instead.
     
  11. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #11
    Why do I keep missing the obvious blind spots (was quite late at my place, mijn excuses).
    I should read the topics more thorough.
    What I can suggest, when a ModalViewController is not being called in iPhone, but does in iPad, is the pointer you are calling it on, will be probably be void.
    that means, you should try calling it on another pointer.
     

Share This Page