Tuesday, 17 September 2013

iOS - Sending Touche Events To A DFPBannerView from a Custom ScrollView

iOS - Sending Touche Events To A DFPBannerView from a Custom ScrollView

I am trying to implement DFP ads into my iOS application within a custom
scroll view.
I have a number of view controllers within a horizontal custom
UIScrollView, and after a few pages I have a DFPBannerView the size of the
full UIScrollView frame. My custom scroll view overrides the
touchesBegan:, touchesMoved:, etc methods of the UIScrollView because of
some unique behavior I want to get out of it. My problem arises when the
user tries to click on the DFPBannerView. Instead of the banner view
receiving the touch, the scroll view does instead. Since apparently you
can't send touch events directly to a DFPBannerView I end up stuck with
nothing to do with that touch event.
Is there any way around this? Perhaps some way to disable touches (but not
swipes) on the custom UIScrollView when the view controller with the
DFPBannerView is showing?
Thank you for any help.

No comments:

Post a Comment