I have a couple of questions. How to transfer data (which I received after Alamofire request) to one of the TabBarController child elements?
The first problem I have is that I cannot override Func prepareForSegue inside the input in action (when the button taps), it says that I can only override a member of the class. But if I put func outside of IBAction, then I will not send the data I need.
And the second problem is that when I put the overridden function outside of IBAction, and the code looks like this:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
let homeVC = segue.destinationViewController as HomeViewController
homeVC.templateForCell = templates
}
when i run it i got an error:
Failed to set value of type 'UITabBarController' for HomeViewController
(HomeViewController is my target view, where I should transfer data from Alamofire).