|Feb 5, 2013, 12:34 AM||#1|
How to dismiss popover view on button click in iPad
I have a ViewController1 which has one button named "show".
When I click on "show" it displays ViewController2 as popover.
ViewController2 has a button "Close".
What I want, when I click on "Close" button from ViewController2 it should be dismissed/disappear.
Note: When I click on any other place on the screen ViewController2 disappears, and this is ok.
Finite Disappointment Vs Infinite Hope
|Feb 5, 2013, 07:20 AM||#3|
You need to keep an instance variable of that popover controller in your main view controller. You should then set the main view controller as a delegate of your popover, and in your popover have the button push send a delegate method that tells the mainviewcontroller to use the method of the popover instance dismissPopoverAnimated:
2012 Mac Mini, 2.6 GHz, 16GB RAM, 1TB HDD
2.4Ghz 15" Macbook Pro
16 GB iPhone 5 : 32 GB iPhone 4S : 16 GB iPad 3
16 GB Nexus 7 (2012)
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Resolved: Backing out of many view with 1 click?||larswik||iPhone/iPad Programming||6||Oct 5, 2012 05:27 AM|
|Delegate Not Called On iPad When Using Popover||ahan.tm||iPhone/iPad Programming||16||Sep 22, 2012 02:48 PM|
|How to create a Modal View Programmatically (and dismiss it)||roeik||iPhone/iPad Programming||10||Aug 15, 2012 02:36 PM|
|AppleScript To Click One Button Only If Another Button Is Unavailable||JonHimself||Mac Programming||2||Jul 4, 2012 12:16 PM|
All times are GMT -5. The time now is 08:14 PM.