I have a view controller, and I have one tableview inside this view controller. I am managing the table from table view controller. But I need to send data to tableview controller from view controller. How can I do this ?
This is my view controller:
class SettingsViewController: UIViewController {
...
}
And this is my table view controller:
class SettingsTableViewController:UITableViewController {
@IBOutlet var notificationsSwitch: UISwitch!
@IBAction func notificationsClicked(sender: UISwitch) {
if notificationsSwitch.on {
println("notifications on")
}else{
println("notifications off")
}
}
}
Storyboard: