|
@ -13,6 +13,24 @@ import MBProgressHUD |
|
|
|
|
|
|
|
|
// MARK: Alerts |
|
|
// MARK: Alerts |
|
|
|
|
|
|
|
|
|
|
|
extension UIViewController { |
|
|
|
|
|
func setupPicturedNavBar(sideMenuAction: Selector? = nil) { |
|
|
|
|
|
self.navigationController?.navigationBar.isTranslucent = false |
|
|
|
|
|
if let selector = sideMenuAction { |
|
|
|
|
|
let leftButton = UIBarButtonItem(image: UIImage(named: "ic_hamburger"), style: .plain, target: self, action: selector) |
|
|
|
|
|
self.navigationItem.leftBarButtonItem = leftButton |
|
|
|
|
|
self.navigationItem.leftBarButtonItem?.tintColor = UIColor.white |
|
|
|
|
|
} |
|
|
|
|
|
self.navigationController?.navigationBar.tintColor = .white |
|
|
|
|
|
self.navigationController?.navigationBar.barTintColor = UIColor(hex:0xec1c24) |
|
|
|
|
|
let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 125, height: 30)) |
|
|
|
|
|
imageView.contentMode = .scaleAspectFit |
|
|
|
|
|
let image = UIImage(named: "ic_gme_new") |
|
|
|
|
|
imageView.image = image |
|
|
|
|
|
self.navigationItem.titleView = imageView |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
extension UIViewController { |
|
|
extension UIViewController { |
|
|
|
|
|
|
|
|
func confirmationAlert(title: String, message: String, confirmTitle: String, style: UIAlertActionStyle = .destructive, confirmAction: @escaping () -> Void) { |
|
|
func confirmationAlert(title: String, message: String, confirmTitle: String, style: UIAlertActionStyle = .destructive, confirmAction: @escaping () -> Void) { |
|
@ -663,20 +681,7 @@ extension UIViewController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func setUpAnotherLoginListener(genericviewmodel: ModelExtension) { |
|
|
func setUpAnotherLoginListener(genericviewmodel: ModelExtension) { |
|
|
// genericviewmodel.anotherLogin.bind { [weak self] in |
|
|
|
|
|
|
|
|
|
|
|
// guard let context = self else { |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
// guard $0 != nil else { |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
// if $0! { |
|
|
|
|
|
// context.view.endEditing(true) |
|
|
|
|
|
// context.enableUserInteractions() |
|
|
|
|
|
// context.logOutUser() |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|