I would like to have a detail view come in to focus when the user double clicks on a table view row. How would I change a window's view in code?
The basic idea would be as follows:
- (IBAction)tableViewDoubleClicked
{
...
[window setContentView:myDetailView];
}
Note that this may release the view that was previously used as the contentView for the window, so if you are planning to swap around a couple of different content views, you will need to properly retain them elsewhere.
See Apple's documentation for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With