I have made a simple app that contains a view where the user can call a number. It contains a lable, a textview and a button. These are contained vertically inside a stack view. There are total three (3) constraints:
- Center stack view vertically
- Center stack view horizontally
- Make the with of the text view equal to the with of the stack view
When pressing the button, the number in the textview is called using this code:
let phoneNumber = "telprompt:\(numberToDial)"
UIApplication.sharedApplication().openURL(NSURL(string: phoneNumber)!)
As soon as the system phone calling screen appears, I get autolayout errors that I just feel like I don't have anything to do with. The two autolayout constraint below is what is causing the errors:
(
"<NSLayoutConstraint:0x10187a9b0 V:|-(20)-[UIInputSetContainerView:0x101878f10] (Names: '|':UITextEffectsWindow:0x1018765c0 )>",
"<NSLayoutConstraint:0x1007b21a0 'UIInputWindowController-top' V:|-(0)-[UIInputSetContainerView:0x101878f10] (Names:'|':UITextEffectsWindow:0x1018765c0 )>"
)
Why am I getting these errors? The app works exactly like I want it to, I just get these errors that I don't like.
EDIT: It is not the same problem as the status bar one. I found it and added that code to my app delegate but I still get this error. This code is in my app delegate:
func application(application: UIApplication, willChangeStatusBarFrame newStatusBarFrame: CGRect) {
for window in UIApplication.sharedApplication().windows {
if window.dynamicType.self.description().containsString("UITextEffectsWindow") {
window.removeConstraints(window.constraints)
}
}
}
EDIT2: I forgot to write that the view making the call is inside a UITabBarController.