I already checked out a few answers, but I have a different code that I have not seen here with this problem:
Warning: Attempt to present on whose view is not in the window hierarchy!
The problem encounters when I switched from VC1 to VC2. This is my code I used:
func ToVC2() {
dispatch_async(dispatch_get_main_queue()) {
[unowned self] in
self.performSegueWithIdentifier("GoToVC2", sender: self)
}
}
Then I have some logic in the prepareforsegue, but I don't think thats the problem here, or is it? If so I will post the code swell. Any help here is welcome!