Created
April 12, 2015 11:12
-
-
Save ayushgoel/efb597e821271bf346ba to your computer and use it in GitHub Desktop.
Perform segue only on main queue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIViewController { | |
func performSegueOnMainQueue(identifier: String, sender: AnyObject?) { | |
NSOperationQueue.mainQueue().addOperationWithBlock() { | |
self.performSegueWithIdentifier(identifier, sender: sender) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment