Problems with UIPopoverControllers

Discussion in 'iOS Programming' started by isthisonetaken, Mar 16, 2012.

  1. isthisonetaken, Mar 16, 2012
    Last edited: Mar 16, 2012

    isthisonetaken macrumors regular

    Jun 29, 2006
    Hey guys,

    I have an iPad app running on iOS 5.1. I'm using the new iOS 5 containment APIs and have a parent view controller which loads two children view controllers. In one of the children view controllers, I have a view that has some labels for times. What I want is to have the user tap on the view and load a popover with a date picker that lets the user switch the times.

    Currently, I'm running in Xcode 4.3 and setup a view controller in my storyboard. I have a segue going from the child view controller to another view controller setup as a popover. I set it to anchor to my view. I created a custom class and set the popover to that class. All I did was add in a delegate to the custom class and methods for the cancel and done buttons.

    Every time I tap the view, my app crashes. This is what comes up in the console:
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController setDelegate:]: unrecognized selector sent to instance 0x297f00'
    Any ideas what's going on?

    - EDIT:
    Turns out I wasn't importing the custom file, so of course the app didn't know what delegate was... Stupid mistake on my part. I guess we can lock this thread now if that's possible?
  2. jnoxx macrumors 65816


    Dec 29, 2010
    Aartselaar // Antwerp // Belgium
    You can set your own topic as Resolved, so other users can see that the problem was set as Resolved, so they can look into it.

Share This Page