Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nixonjan

macrumors newbie
Original poster
Sep 8, 2011
5
0
The problem is following :

when i click on phone number on webview - appears popoverController (see attachement). after minimizing and restoring app I need to dismiss this popover to prevent appears over login screen (popup2)

I need to dismiss it on applicationDidBecomeActive. Please explain how to find appropriate popover to dismiss

Thanks in advance
 

Attachments

  • popup.png
    popup.png
    18 KB · Views: 697
  • popup2.png
    popup2.png
    25.1 KB · Views: 623
Well, google knew within 10 seconds.
From your UIPopoverController ->

Code:
[popoverController dismissPopoverAnimated:YES];

That's it..

I'm not sure that's going to work if I understand this correctly. The poster does not "own" the popover. I think it's created/owned by the data detectors running in the web view?
 
Well, google knew within 10 seconds.
From your UIPopoverController ->

Code:
[popoverController dismissPopoverAnimated:YES];

That's it..

no it is not so easy :) at the moment of return back we haven't popoverController to call its method (dismissPopoverAnimated:YES), also I don't know to which viewcontroller it belongs

----------

I'm not sure that's going to work if I understand this correctly. The poster does not "own" the popover. I think it's created/owned by the data detectors running in the web view?

yes !

one possible solution to catch event of appearing mentioned popover and getting its pointer - but where and how - I don't know
 
Doesn't dismissing the popover as the application becomes inactive work just as well?
 
Ooooh, now I see it, this is one of those automated created ones.
Can't you make a for in loop?

Code:
for (UIPopoverController *pop in self.view)
{
 [pop dismissPopoverAnimated:YES];
}

Not sure if that would work, just saying something.
 
Ooooh, now I see it, this is one of those automated created ones.
Can't you make a for in loop?

Code:
for (UIPopoverController *pop in self.view)
{
 [pop dismissPopoverAnimated:YES];
}

Not sure if that would work, just saying something.

Why would the controller be in the view? The view the controller controls will be. But I don't know if you can link a view back to a view controller back to the popover controller easily (or at all)
 
Interesting problem. Having you tried disabling data detectors when the view disappears then re-enable them when view will appear? Shot in the dark.
 
Why would the controller be in the view? The view the controller controls will be. But I don't know if you can link a view back to a view controller back to the popover controller easily (or at all)

I have made some investigation and found that this looks like ABUnknownPersonViewController http://developer.apple.com/library/...lerDelegate_Protocol/Reference/Reference.html

so I will try to set delegate ABUnknownPersonViewControllerDelegate and catch appropriate event ...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.