MrRog85
MrRog85

Reputation: 121

UIViewController throws 'unrecognized selector' error

I've created a XIB containing only a UITableView. I changed the parameters of the project to load this view at launch. But I get this "unrecognized selector sent to instance" error I don't know what it is. How do I fix this and get my app to show my view ?

I've searched the web and it seems that might come from Objective-C libraries ?

EDIT

I did some testing, it's look like it crashes when I link my TableView with my IBOutlet in the ViewController. Am I doing something wrong with the type TableView ?

The viewcontroller :

class Liste: UIViewController {
    @IBOutlet weak var maListe: UITableView!

    override func viewDidLoad() {
        super.viewDidLoad()
    }
}

The error stack :

2019-06-12 14:06:11.083905+0200 GuildWar[5905:8796162] -[GuildWar.Liste _finishDecodingLayoutGuideConnections:]: unrecognized selector sent to instance 0x104f0ef40 2019-06-12 14:06:17.511280+0200 GuildWar[5905:8796162] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GuildWar.Liste _finishDecodingLayoutGuideConnections:]: unrecognized selector sent to instance 0x104f0ef40' * First throw call stack: (0x21230f518 0x2114ea9f8 0x21222c278 0x23e4c2ef8 0x212314d60 0x2123169fc 0x23e874110 0x21c955f28 0x21c8f5304 0x212cdba4c 0x21c955f28 0x21c95616c 0x21c8f5304 0x23e151dcc 0x23e152958 0x23e4971e4 0x23e4977c0 0x23e495e24 0x23dd5a104 0x23dd6269c 0x23dd59d88 0x23dd5a678 0x23dd589c4 0x23dd5868c 0x23dd5d1cc 0x23dd5dfb0 0x23dd5d084 0x23dd61d84 0x23e494518 0x23e090f0c 0x214c89d44 0x214c93754 0x214c92f5c 0x104cbcc74 0x104cc0840 0x214cc40bc 0x214cc3d58 0x214cc4310 0x2122a12bc 0x2122a123c 0x2122a0b24 0x21229ba60 0x21229b354 0x21449b79c 0x23e497b68 0x1045ea10c 0x211d618e0) libc++abi.dylib: terminating with uncaught exception of type NSException

Upvotes: 0

Views: 1086

Answers (1)

Saurav
Saurav

Reputation: 538

It looks like, you might have created IBOutlet or IBAction and deleted later in the code. Revisit the connections in the storyboard connection inspectors and check if there is any warning symbol like the attached screenshot, then you need to remove that connection.

Or if you can share your code I can look into.

Upvotes: 1

Related Questions