I have created a NIB which has a name of SomeViewController
and all the corresponding code are correct and all the views are bound correctly, but somehow the code self.presentViewController(SomeViewController(), animated: true, completion: nil)
causes a crash:
fatal error: unexpectedly found nil while unwrapping an Optional value
What is the problem?
To fix this we need to version check by doing this
or just
for some reason iOS 8's not automated on including the nibName on initialization with it's corresponding class.
Update:
Can also be fixed by doing this