Parv Bhasker
Parv Bhasker

Reputation: 1901

app crashes on isHidden property

I just converted the code from objective-c to swift and now there are some unknown crashes occurring in my app.

  1. 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

  2. When I commented out isHidden then viewDidLoad 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

Answers (2)

Parv Bhasker
Parv Bhasker

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

sanjaykmwt
sanjaykmwt

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

Related Questions