Rafael Enterplay Rafael Enterplay - 10 months ago 56
Swift Question

SWIFT - Storyboard instantiating from Objective-C

I'm translating an old app made in Objective-C to the new SWIFT 2.0 language, but I'm having some hard time in this particular line of code:

UIStoryboard *sdkStoryboard = [UIStoryboard storyboardWithName:@"MyStoryboard" bundle:[NSBundle bundleWithIdentifier:@"thirdParty.MySDK"]];

The problem lies in the "bundle" part, I made many researches but none of them could do the trick, as most of the examples found were to "bundle: nil"

This is what I could do by now:

let sdkStoryboard: UIStoryboard = UIStoryboard(name: "MyStoryboard", bundle: ???)



How about:

UIStoryboard(name: "MyStoryboard", bundle: NSBundle(identifier: "thirdParty.MySDK"))