I know there are four types of UIModalTransitionStyle
s, but I would like not to use any of them.
However, this code doesn't work:
@IBAction func button(sender: AnyObject) {
let modalView = ViewController()
let storyboard = UIStoryboard(name: "Universal", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("ViewController") as UIViewController
modalView.modalTransitionStyle = nil // Error: type 'UIModalTransitionStyle' does not conform to protocol 'NilLiteralConvertible'
self.presentViewController(vc, animated: true, completion: nil)
}
Whenever I don't specify the modalTransitionStyle
, the compiler will get the modalTransitionStyle
from the Storyboard document of UIViewController
.
How can I set no modalTransitionStyle
?