Reputation: 335
I am working on a master-detail iPad application in xcode.
I have a button and textbox in my detail view. When the user clicks on the button
, it calls a method from the MasterDetailViewController
- (IBAction)refreshButtonClicked:(id)sender {
[self.parent searchRSSWithURL:self.textBoxOutlet.text];
}
(self.parent
is the MasterDetailViewController
.) This method creates an array that is used to populate the table view in the MasterDetailViewController
, and it is doing so successfully.
What I would like to do is also automatically open the Master View when the button is clicked so that the tableview
can be seen, and I'm not sure how to approach that.
Upvotes: 0
Views: 165
Reputation: 47049
If you are using UINavigationController
then
- (IBAction)refreshButtonClicked:(id)sender
{
[self.parent searchRSSWithURL:self.textBoxOutlet.text];
[self.navigationController popViewControllerAnimated:YES];
}
Other wise
- (IBAction)refreshButtonClicked:(id)sender
{
[self.parent searchRSSWithURL:self.textBoxOutlet.text];
[self dismissModalViewControllerAnimated:YES]; // OR [self dismissViewControllerAnimated:YES completion:nil];
}
Upvotes: 1