0

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:

  1. Center stack view vertically
  2. Center stack view horizontally
  3. 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.

Alex
  • 731
  • 1
  • 11
  • 24
  • 1
    Possible duplicate of [In Call Status Bar (Unable to Satisfy Constraints)](http://stackoverflow.com/questions/33112762/in-call-status-bar-unable-to-satisfy-constraints) – NRitH Jul 02 '16 at 14:23
  • It is not, fount that one and toggling the status bar on and off in the simulator does NOT give me these errors. It is the call screen that triggers them. – Alex Jul 02 '16 at 15:04
  • It is also not possible to replicate this error using the simulator since you cannot place calls with it. – Alex Jul 02 '16 at 15:13
  • Yes, but you can simulate an incoming call. It's not about toggling the status bar on and off. – NRitH Jul 02 '16 at 20:34

0 Answers0