2019-05-17 00:45:38 +02:00
|
|
|
//
|
|
|
|
// AddAccountViewController.swift
|
|
|
|
// NetNewsWire-iOS
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 5/16/19.
|
|
|
|
// Copyright © 2019 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
2019-05-19 23:52:21 +02:00
|
|
|
import Account
|
2019-05-17 00:45:38 +02:00
|
|
|
import UIKit
|
|
|
|
|
2019-05-20 01:04:32 +02:00
|
|
|
protocol AddAccountDismissDelegate: UIViewController {
|
|
|
|
func dismiss()
|
|
|
|
}
|
|
|
|
|
|
|
|
class AddAccountViewController: UITableViewController, AddAccountDismissDelegate {
|
2019-05-17 00:45:38 +02:00
|
|
|
|
2019-05-19 23:52:21 +02:00
|
|
|
@IBOutlet private weak var localAccountNameLabel: UILabel!
|
|
|
|
|
|
|
|
override func viewDidLoad() {
|
|
|
|
super.viewDidLoad()
|
|
|
|
|
|
|
|
localAccountNameLabel.text = Account.defaultLocalAccountName
|
|
|
|
}
|
|
|
|
|
2019-05-19 21:18:11 +02:00
|
|
|
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
|
|
|
switch indexPath.row {
|
|
|
|
case 0:
|
2019-05-20 01:04:32 +02:00
|
|
|
let navController = UIStoryboard.settings.instantiateViewController(withIdentifier: "AddLocalAccountNavigationViewController") as! UINavigationController
|
|
|
|
let addViewController = navController.topViewController as! AddLocalAccountViewController
|
|
|
|
addViewController.delegate = self
|
|
|
|
present(navController, animated: true)
|
|
|
|
case 1:
|
|
|
|
let navController = UIStoryboard.settings.instantiateViewController(withIdentifier: "FeedbinAccountNavigationViewController") as! UINavigationController
|
|
|
|
let addViewController = navController.topViewController as! FeedbinAccountViewController
|
|
|
|
addViewController.delegate = self
|
|
|
|
present(navController, animated: true)
|
2019-05-19 21:18:11 +02:00
|
|
|
default:
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-20 01:04:32 +02:00
|
|
|
func dismiss() {
|
|
|
|
navigationController?.popViewController(animated: false)
|
|
|
|
}
|
|
|
|
|
2019-05-17 00:45:38 +02:00
|
|
|
}
|