I got this problem when I click back button inside my SecondViewController.
2014-12-24 12:08:58.838 UPASS[5158:71438] Warning: Attempt to present <APPNAME.ThirdViewController: 0x7ae6bcc0> on <APPNAME.SecondViewController: 0x7af72060> whose view is not in the window hierarchy!
code
import UIKit
class SecondViewController: UIViewController {
@IBAction func btnSubmit(sender: AnyObject) {
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let thirdViewController = storyBoard.instantiateViewControllerWithIdentifier("successView") as ThirdViewController
self.presentViewController(thirdViewController, animated:true, completion:nil)
}
@IBAction func btnBack(sender: AnyObject) {
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let firstViewController = storyBoard.instantiateViewControllerWithIdentifier("methodView") as FirstViewController
self.presentViewController(firstViewController, animated:true, completion:nil)
}
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = UIColor(patternImage: UIImage(named: "bgCreateUser.jpg")!)
// Do any additional setup after loading the view.
}
}
SecondViewController? - Lyndsey Scott