I was running an app on iPhone XR with iOS Version 13.2 using XCode 11.2 and the app crashes with reason.
reason: 'The return values of -viewForFirstBaselineLayout and -viewForLastBaselineLayout must be in the receiver's subtree
I tried searching but couldn't find the solution here: https://forums.xamarin.com/discussion/17633/nsinternalconsistencyexception-any-ideas-on-what-is-causing-this
I don't know what files I need to post here for this issue. So please mention in the comment if any file is required to understand this.
func removeSubviews() {
for subview in self.subviews {
subview.removeSubviews()
subview.removeFromSuperview()//this line is causing crash.
}
self.removeConstraints(self.constraints)
}