Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class RealmTodoManager: TodoProvider { ... }
- class FirebaseTodoManager: TodoProvider { ... }
- extension AppDelegate: UIApplicationDelegate {
- func application(
- _ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
- )
- -> Bool {
- ....
- // Use the database as the provider.
- todoListViewController.todoProvider = RealmTodoManager()
- // Use the cahce as the provider.
- todoListViewController.todoProvider = FirebaseTodoManager()
- ...
- }
- }
Add Comment
Please, Sign In to add comment