Files
comaps/iphone/Maps/UI/Storyboard/Storyboard.swift
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

38 lines
1.0 KiB
Swift

@objc(MWMStoryboard)
enum Storyboard: Int {
case authorization
case launchScreen
case main
case settings
case welcome
case sharing
case categorySettings
case drivingOptions
case carPlay
case placePage
}
extension UIStoryboard {
@objc static func instance(_ id: Storyboard) -> UIStoryboard {
let name: String
switch id {
case .authorization: name = "Authorization"
case .launchScreen: name = "LaunchScreen"
case .main: name = "Main"
case .settings: name = "Settings"
case .welcome: name = "Welcome"
case .sharing: name = "BookmarksSharingFlow"
case .categorySettings: name = "CategorySettings"
case .drivingOptions: name = "DrivingOptions"
case .carPlay: name = "CarPlayStoryboard"
case .placePage: name = "PlacePage"
}
return UIStoryboard(name: name, bundle: nil)
}
func instantiateViewController<T: UIViewController>(ofType: T.Type) -> T {
let name = String(describing: ofType);
return self.instantiateViewController(withIdentifier: name) as! T;
}
}