|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|
All times are GMT -5. The time now is 03:03 PM.