开发者

Losing flicking functionality in picker view when iAd is up

I have a app that has this structure:

1) A scroll view that fills the whole screen and is 4 screens wide

2) four different UIViews that fill the scroll view as pages, controlled by a page view controller.

3) the main (first) scroll view has a UIPickerView that exists at its bottom

4) in views 2-4 there is an iAd window that moves up from the bottom when it is active, and moves down out of sight whene there is no ad to display. The content above the ad is a UITableView, which shrinks automatically to vacate the space where the iAd moves into. The iAd does not move up if the scroll view is on page 1 (as this would damage app functionality)

Everything works, but there is a strange bug:

When the iAd functionality is enabled, the 'flicking' functionality of the UIPickerView on page 1 doesn't work. It still scrolls and selects just fine, but there is no momentum to the wheels. They move to touch, but as soon as the touch ends the wheels stop turning, without the momentum typical of a UIPickerView wheel. if the iAd window开发者_JAVA百科 is not present (even if the window is off screen), the flicking functionality works fine.

I have no freaking idea why this is happening.

And ideas?


Screwed around and sort of fixed my problem. I have no idea why this problem exists, but I worked around it by creating functions in the top level view controller that contains the scroll view that enable and disable the scrolling function of the scrollview. Whenever the first page displays the picker, it now disables the scrolling functionality, and re-enables it when the picker goes away. This creates the functionality I was looking for and fixes my original problem.

Still not sure why the problem existed in the first place though!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜