开发者

Get direction UIWebView is scrolling

Hey! I need to find a way to keep my page's bounce scrolling looking good. Here's what I need:

When the user scroll past a UIWebViews scrollabl开发者_运维技巧e area (top), the background color of the view should be set to [UIColor colorWithRed:0.839 green:0.871 blue:0.871 alpha:1.000] and when the scrollable area is drug too far on the bottom, the color of the view should be set to [UIColor colorWithWhite:1.000 alpha:1.000]

Don't worry about the view being opaque and all that, becaue I've already done that in my code.


Maybe the following answer will help you or others with this problem:

Detect when I scroll my UIWebView at top of the page

Seems to me your problem can be solved by retrieving the page offset and the page height, then set the background color accordingly when the top or bottom positions are surpassed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜