Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9027111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:40:49+00:00 2026-06-16T06:40:49+00:00

I have an iPad app with a main ViewController, and inside of it I

  • 0

I have an iPad app with a main ViewController, and inside of it I have a UIButton. This is tied to a segue with style Popover with a target that is a UIPopoverController class (empty, from Xcode’s ‘create new’ with UIPopoverController subclass).

When I click the button, the segue executes, and it crashes:

2012-12-22 16:58:57.275 iAmFrustratedApp[11521:c07] -[MyGreatPopoverController initWithCoder:]: unrecognized selector sent to instance 0x1caabe70
2012-12-22 16:58:57.277 iAmFrustratedApp[11521:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyGreatPopoverController initWithCoder:]: unrecognized selector sent to instance 0x1caabe70'
*** First throw call stack:
(0x22fe012 0x148fe7e 0x23894bd 0x22edbbc 0x22ed94e 0x5f3ae9 0x702a02 0x7020e5 0x5f367b 0x702a02 0x702418 0x7020e5 0x5f2aa3 0x81e48a 0x81ea83 0x81eb54 0x14a3705 0x3da920 0x3da8b8 0x49b671 0x49bbcf 0x49ad38 0x40a33f 0x40a552 0x3e83aa 0x3d9cf8 0x1bacdf9 0x2281f3f 0x228196f 0x22a4734 0x22a3f44 0x22a3e1b 0x1bab7e3 0x1bab668 0x3d765c 0x1cbd 0x1be5)
libc++abi.dylib: terminate called throwing an exception

Interestingly, I used to have this target be a normal UIViewController. When it was that class, this worked properly, except that I couldn’t dismiss the popover programmatically in any way. That’s the only reason I switched the target class to be UIPopoverController.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:40:50+00:00Added an answer on June 16, 2026 at 6:40 am

    From NSCoding Protocol Ref:

    The NSCoding protocol declares the two methods that a class must implement so that instances of that class can be encoded and decoded. This capability provides the basis for archiving (where objects and other structures are stored on disk) and distribution (where objects are copied to different address spaces).

    A coder instructs the object to do so by invoking encodeWithCoder: or initWithCoder:. encodeWithCoder: instructs the object to encode its instance variables to the coder provided; an object can receive this method any number of times. initWithCoder: instructs the object to initialize itself from data in the coder provided; as such, it replaces any other initialization method and is sent only once per object. Any object class that should be codable must adopt the NSCoding protocol and implement its methods.

    A xib file is just an archive made of encoded objects. When you load a xib, the framework decodes them back (through initWithCoder) into objects that populate your app.

    Now, it happens that UIPopoverController does not conform to the NSCoding protocol (see the reference document, just at the beginning, where it says: "Conforms to": no NSCoding is listed there.)

    But:

    Any object class that should be codable must adopt the NSCoding protocol and implement its methods.

    Hence, when the framework finds you UIPopoverController derived class instance and tries to decode it, it fails.

    Hope this clarifies it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this iPad app using Storyboard. There are some file that are marked
Building an iPad app. I have a button on my main view that I
For my iPad App, I have a main ViewController which contains two UIScrollviews and
For my iPad App, I have a main ViewController which contains two UIScrollview s
I am working on an iPad app that has a main view (In this
I have an iPad app that uses custom fonts though the UIAppFonts elements in
I have an iPad app which has a funky Path-style menu which is present
I have an iPad app that has a UITableViewController that implements the NSFetchedResultsControllerDelegate .
I'm using storyboard to create an iPad app. On the main view I have
I have an app that runs on iPad and iPhone running iOS 3.2, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.