Last active
          October 7, 2023 17:39 
        
      - 
      
- 
        Save paulocoutinhox/c40ca4a162a66d0e03d485e465a8b8aa to your computer and use it in GitHub Desktop. 
    iOS - Código para rodar sem Main.Storyboard
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | @UIApplicationMain //or @main | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
| window = UIWindow() | |
| window?.rootViewController = RootViewController() | |
| window?.makeKeyAndVisible() | |
| return true | |
| } | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
| var window: UIWindow? | |
| func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
| guard let windowScene = (scene as? UIWindowScene) else { return } | |
| let window = UIWindow(windowScene: windowScene) | |
| window.rootViewController = RootViewController() | |
| self.window = window | |
| window.makeKeyAndVisible() | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment