Created
August 9, 2017 19:11
-
-
Save vincent-pradeilles/23e99018074dd281c81a10319ec4ef0a to your computer and use it in GitHub Desktop.
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
public func OverridableStoryboard(named name: String) -> UIStoryboard { | |
// "storyboardc" is the extension of compiled storyboards | |
if let _ = Bundle.main.path(forResource: name, ofType: "storyboardc") { | |
return UIStoryboard(name: name, bundle: nil) | |
} else { | |
return UIStoryboard(name: name, bundle: Bundle.whiteLabelBundle()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment