Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.59 KB

README.md

File metadata and controls

39 lines (24 loc) · 1.59 KB

GLKAnimateWebViewFrame

[![CI Status](http://img.shields.io/travis/Vladimir Lyukov/GLKAnimateWebViewFrame.svg?style=flat)](https://travis-ci.org/Vladimir Lyukov/GLKAnimateWebViewFrame) Version License Platform

Workaround to enable animating UIWebView height. If you try to animate UIWebView.frame via standart [UIView animateWithDuration:animations], no animation will occur, webView's content will immediately jump to it's final frame. This library tries to fix this issue by animating webView content size via JavaScript, then changing webView.frame after JS animation finished.

example video

Usage

#import "UIWebView+GLKAnimateFrame.h"
...
- (void)myAction {
    [self.webView glk_animateToHeight:200 duration:0.4];
}

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

GLKAnimateWebViewFrame is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "GLKAnimateWebViewFrame"

Author

Vladimir Lyukov, [email protected]

License

GLKAnimateWebViewFrame is available under the MIT license. See the LICENSE file for more info.