mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-22 19:28:54 +10:00
Use baseview controller
This commit is contained in:
@@ -15,11 +15,6 @@ class BaseViewController: UIViewController {
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
override func viewWillAppear(animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
@@ -40,6 +35,8 @@ class BaseViewController: UIViewController {
|
||||
navigationController.navigationBar.titleTextAttributes = textAttributes
|
||||
navigationController.navigationBar.tintColor = nil
|
||||
}
|
||||
|
||||
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import UIKit
|
||||
import RealmSwift
|
||||
|
||||
class ContactsViewController: UIViewController {
|
||||
class ContactsViewController: BaseViewController {
|
||||
|
||||
@IBOutlet weak var contactsTableView: UITableView!
|
||||
|
||||
@@ -21,10 +21,6 @@ class ContactsViewController: UIViewController {
|
||||
NSNotificationCenter.defaultCenter().removeObserver(self)
|
||||
}
|
||||
|
||||
override func viewWillAppear(animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@@ -161,12 +161,6 @@ class ConversationViewController: BaseViewController {
|
||||
NSNotificationCenter.defaultCenter().removeObserver(self)
|
||||
}
|
||||
|
||||
|
||||
override func viewWillAppear(animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
}
|
||||
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
class DiscoverViewController: UIViewController {
|
||||
class DiscoverViewController: BaseViewController {
|
||||
|
||||
@IBOutlet weak var discoverTableView: UITableView!
|
||||
|
||||
@@ -37,10 +37,6 @@ class DiscoverViewController: UIViewController {
|
||||
}
|
||||
}
|
||||
|
||||
override func viewWillAppear(animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import UIKit
|
||||
import WebViewJavascriptBridge
|
||||
|
||||
class OAuthViewController: UIViewController, UIWebViewDelegate, NSURLConnectionDelegate, NSURLConnectionDataDelegate {
|
||||
class OAuthViewController: BaseViewController, UIWebViewDelegate, NSURLConnectionDelegate, NSURLConnectionDataDelegate {
|
||||
|
||||
var socialAccount: SocialAccount!
|
||||
var afterOAuthAction: ((socialAccount: SocialAccount) -> Void)?
|
||||
@@ -17,6 +17,7 @@ class OAuthViewController: UIViewController, UIWebViewDelegate, NSURLConnectionD
|
||||
@IBOutlet weak var webView: UIWebView!
|
||||
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
|
||||
|
||||
|
||||
var bridge: WebViewJavascriptBridge!
|
||||
|
||||
var authenticated = false
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
class SettingsViewController: UIViewController {
|
||||
class SettingsViewController: BaseViewController {
|
||||
|
||||
@IBOutlet weak var settingsTableView: UITableView!
|
||||
|
||||
@@ -39,12 +39,6 @@ class SettingsViewController: UIViewController {
|
||||
settingsTableView.registerNib(UINib(nibName: settingsMoreCellIdentifier, bundle: nil), forCellReuseIdentifier: settingsMoreCellIdentifier)
|
||||
|
||||
}
|
||||
|
||||
|
||||
override func viewWillAppear(animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
self.navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import UIKit
|
||||
import Kingfisher
|
||||
|
||||
class SocialWorkDribbbleViewController: UIViewController {
|
||||
class SocialWorkDribbbleViewController: BaseViewController {
|
||||
|
||||
var socialAccount: SocialAccount?
|
||||
var profileUser: ProfileUser?
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
class SocialWorkGithubViewController: UIViewController {
|
||||
class SocialWorkGithubViewController: BaseViewController {
|
||||
|
||||
var socialAccount: SocialAccount?
|
||||
var profileUser: ProfileUser?
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
class SocialWorkInstagramViewController: UIViewController {
|
||||
class SocialWorkInstagramViewController: BaseViewController {
|
||||
|
||||
var socialAccount: SocialAccount?
|
||||
var profileUser: ProfileUser?
|
||||
|
||||
Reference in New Issue
Block a user