Yes, it is possible to programmatically modify the row in the DetailView of a Swift UISplitView. To do this, you will need to access the DetailView controller and modify its view or data source. Here's an example of how to modify the DetailView controller's label text with a button click from the MasterView controller:
@IBAction func buttonClicked(_ sender: Any) {
// Get the DetailView controller
guard let detailVC = splitViewController?.viewControllers.last as? DetailViewController else {
return
}
// Modify the label text
detailVC.label.text = "New Text"
}
@IBOutlet weak var label: UILabel!
Asked: 2023-03-03 11:00:00 +0000
Seen: 10 times
Last updated: Jul 14 '22