Skip to content

Instantly share code, notes, and snippets.

@muizidn
Last active November 17, 2018 01:08
Show Gist options
  • Select an option

  • Save muizidn/dd048a11acca7192f3bd76c7c7566305 to your computer and use it in GitHub Desktop.

Select an option

Save muizidn/dd048a11acca7192f3bd76c7c7566305 to your computer and use it in GitHub Desktop.
/// 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