Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincent-pradeilles/23e99018074dd281c81a10319ec4ef0a to your computer and use it in GitHub Desktop.
Save vincent-pradeilles/23e99018074dd281c81a10319ec4ef0a to your computer and use it in GitHub Desktop.
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