Reputation: 1901
I just converted the code from objective-c to swift and now there are some unknown crashes occurring in my app.
The app crashes on every outlet property whose visibility I change using selectedView.isHidden = false
. The error is [Controller _mutableLayoutArrangements]: unrecognized selector sent to instance
When I commented out isHidden
then viewDidLoa
d method a crash occur by saying [Controller _hostsLayoutEngine]: unrecognized selector sent to instance
I did some research but didn't find an exact reason for this behaviour. But I have some idea that these crashes are due to autolayout constraint crashes. But I'm not sure of this.
I found a line related to crash but I'm not able to solve the issue layoutSublayersOfLayer:
Upvotes: 1
Views: 669
Reputation: 1901
The solution to this problem i find is not usual, I checked that these issues I was facing "mutableLayoutArrangements and hostsLayoutEngine" are part of AGSLayer.
Then i checked and found i was importing the AGSLayer delegate. Removing the delegate solved my issue. Actually previously I was using this for arcGis library.
Upvotes: 1
Reputation: 605
check your storyboard views they have outlets which are not there in your UIViewController. You need to delete such outlets and retry running the project.
Upvotes: 1