|
@ -20,7 +20,7 @@ class AutoDebitViewController: UIViewController { |
|
|
var kftcDetail: KFTCModel? { |
|
|
var kftcDetail: KFTCModel? { |
|
|
didSet { |
|
|
didSet { |
|
|
self.accounts = kftcDetail?.model ?? [] |
|
|
self.accounts = kftcDetail?.model ?? [] |
|
|
self.languages = kftcDetail?.language |
|
|
|
|
|
|
|
|
self.languages = kftcDetail?.languages |
|
|
self.header = kftcDetail?.header |
|
|
self.header = kftcDetail?.header |
|
|
self.url = kftcDetail?.url |
|
|
self.url = kftcDetail?.url |
|
|
self.tableView.reloadData() |
|
|
self.tableView.reloadData() |
|
@ -58,7 +58,7 @@ class AutoDebitViewController: UIViewController { |
|
|
super.viewWillAppear(animated) |
|
|
super.viewWillAppear(animated) |
|
|
self.setupNormalNavigation() |
|
|
self.setupNormalNavigation() |
|
|
self.navigationItem.title = "My Accounts" |
|
|
self.navigationItem.title = "My Accounts" |
|
|
// fetchReceipients() |
|
|
|
|
|
|
|
|
fetchReceipients() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
override func viewDidLoad() { |
|
|
override func viewDidLoad() { |
|
@ -76,6 +76,7 @@ class AutoDebitViewController: UIViewController { |
|
|
|
|
|
|
|
|
private func openWkWebViewWith(url: String) { |
|
|
private func openWkWebViewWith(url: String) { |
|
|
let viewcontroller = UIStoryboard.init(name: "WKWebView", bundle: nil).instantiateViewController(withIdentifier: "WkWebViewController") as! WkWebViewController |
|
|
let viewcontroller = UIStoryboard.init(name: "WKWebView", bundle: nil).instantiateViewController(withIdentifier: "WkWebViewController") as! WkWebViewController |
|
|
|
|
|
viewcontroller.url = url |
|
|
let nvc = UINavigationController.init(rootViewController: viewcontroller) |
|
|
let nvc = UINavigationController.init(rootViewController: viewcontroller) |
|
|
self.present(nvc, animated: true, completion: nil) |
|
|
self.present(nvc, animated: true, completion: nil) |
|
|
} |
|
|
} |
|
@ -89,7 +90,7 @@ class AutoDebitViewController: UIViewController { |
|
|
@IBAction func addNewAccount(_ sender: UITapGestureRecognizer) { |
|
|
@IBAction func addNewAccount(_ sender: UITapGestureRecognizer) { |
|
|
print("add new account") |
|
|
print("add new account") |
|
|
|
|
|
|
|
|
self.languages = createDummyLangugage() |
|
|
|
|
|
|
|
|
|
|
|
if (self.languages ?? []).isEmpty { |
|
|
if (self.languages ?? []).isEmpty { |
|
|
self.alert(message: "No Lanugages Available") |
|
|
self.alert(message: "No Lanugages Available") |
|
|
} |
|
|
} |
|
@ -113,6 +114,8 @@ class AutoDebitViewController: UIViewController { |
|
|
picker.addAction(action) |
|
|
picker.addAction(action) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
let cancelAction = UIAlertAction.init(title: "Cancel", style: UIAlertActionStyle.cancel, handler: nil) |
|
|
|
|
|
picker.addAction(cancelAction) |
|
|
self.present(picker, animated: true, completion: nil) |
|
|
self.present(picker, animated: true, completion: nil) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|