SWIFT iOS --- UIApplication.sharedApplication() functions reseting all labels/alphas/hidden properties etc

157 Views Asked by At

I have an application that has 3 buttons to represent various types of "contact me" options. One to open a URL from safari, one to open the mail application, and one to call a number from the phone. I have multiple elements (labels, textfields, buttons) that are moved on and off the screen at various times while navigating through the app. Some of these elements have fade in effects, and are highly animated.

Strangely, when I am navigating through the app and tap the website button and the mail button, all of my elements that were either faded out or are off the screen are now back into the same view (alpha = 1.0 when it should be 0) once I have either cancelled the phone call or cancelled the email composition leading me back to the app. Some of the elements are on top of each other. Even more odd is that opening the web page does not have the same affect and everything is placed correctly on screen and has the desired effect.

I have no idea what is going on.

UIApplication.sharedApplication().openURL(NSURL(string: "tel://xxxxxxxxxx")!)

UIApplication.sharedApplication().openURL(url)

var mailMessage:MFMailComposeViewController = MFMailComposeViewController()
self.presentViewController(mailMessage, animated: true, completion: nil)
0

There are 0 best solutions below