Last active
November 17, 2018 01:08
-
-
Save muizidn/dd048a11acca7192f3bd76c7c7566305 to your computer and use it in GitHub Desktop.
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
| /// MuslimApp | |
| // AppLaucherViewController.swift | |
| import SubApplication | |
| class AppLaucherViewController: UITableViewController { | |
| private var items: [SubApplication] = [] | |
| convenience init(items: [SubApplication]) { | |
| self.init() | |
| self.items = items | |
| } | |
| } | |
| // Application.swift | |
| import SubApplication | |
| class Application { | |
| let subApplications: [SubApplication] = [ | |
| // … | |
| ] | |
| func start(window: UIWindow) { | |
| let vc = AppLauncherViewController(items: subApplications) | |
| window.rootViewController = vc | |
| window.makeKeyAndVisible() | |
| } | |
| } | |
| // AppDelegate.swift | |
| // DidFinishLaunchingWithOptions | |
| let window = UIWindow( … ) | |
| let app = Application() | |
| app.start(window: window) | |
| self.window = window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment