Re: Updating viewcontroller when displaying a modal view

17 views
Skip to first unread message

Rajkumar Parameswaran

unread,
Oct 5, 2012, 9:50:22 PM10/5/12
to adwhir...@googlegroups.com
Could you perhaps dismiss that modal view before the ad is presented (I know this is probably not an ideal solution).

How come it won't work if you update it's rootViewController (you can get a reference to the AppDelegate and from there a reference to your AdWhirlView I presume) and then request the ad again?

On Thu, Sep 27, 2012 at 11:14 PM, Kreeture <iain.sim...@gmail.com> wrote:
Hi all,

I have been using adwhirl sdk and implement the delegate method viewControllerForPresentingModalView in my app delegate returning self.window.rootViewController.
However in my application I do have one modal view that is displayed, this seems to cause the a problem when clicking on ads with web links as they will not be launched over the modal view. It works fine when in other view controllers that have been pushed on the navigation stack.
I think this is due to the fact that the rootviewcontroller for the modal view is actually the vc that presented it and not the modal view itself.

Is there anyway of forcing an update to the adwhirl sdk to ensure that the shown modal view is now the vc used to present any view?

Or how has everyone else implemented this?

I would rather not have a copy of the adwhirlview in every view controller (currently its in my app delegate).

Any help appreciated.

Rajkumar Parameswaran

unread,
Oct 9, 2012, 12:23:44 PM10/9/12
to adwhir...@googlegroups.com
Yup, I think that requestFreshAd: calls getAd: on the adapter that it's hitting. Most adapters then ask the AdWhirlDelegate for it's viewControllerForPresentingModalView in there.

Why couldn't you have a property variable on your app delegate that you just change with a setter when you need to change the root view controller?

On Tue, Oct 9, 2012 at 5:25 AM, Kreeture <iain.sim...@gmail.com> wrote:
Hi,

Yes the modal view could be dismissed but why not show the ad there also :)

If I request the ad again (via requestFreshAd I presume), will the SDK request the rootViewController?

If so I can do a workaround.
But it would be nice if there was a API to allow apps to specifically set the view controller when needed.
Reply all
Reply to author
Forward
0 new messages