i want to use a data between views but i have a tab bar view control. Actually my initial view login view i get "access_token" as a sting and if i can successfully login pass tab bar control's first view but i want to use access token string in second tab bar view for get another data from webservice. how can i get acces token string in tab bar controller's second view?
self.strSuccessful = json["acces_token"] as? String
my second view in tab bar view controller
class SalesVC: UIViewController {
var strAccesToken: String!
}
my initial (first view controller not inculude tabbar because login screen)
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let salesViewController = segue.destination as! SalesVC
salesViewController.strAccessToken = strSuccessfulAccesToken
}