Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fix for future UIWebView implementation and UIViewAutoresizingFlexibleHeight to _progressBarView autoresizingMask #20

Merged
merged 2 commits into from Apr 30, 2014

Conversation

larryryu
Copy link

Added fix for future UIWebView implementation. This has no effect at the moment because the NJKWebViewProgress does implement all UIWebView delegate methods. say there was a new method which NJKWebViewProgress did not implement. The UIWebView first checks to see if the NJKWebViewProgress implements this method and fails (it has no idea that the a _webViewProxyDelegate object exists!). So it won't forward the method to its _webViewProxyDelegate because we never check to see if the _webViewProxyDelegate responds to the selector. Fix is to override - (BOOL)respondsToSelector:(SEL)aSelector in NJKWebViewProgress and check if _webViewProxyDelegate respondsToSelector:aSelector .

Added UIViewAutoresizingFlexibleHeight to _progressBarView autoresizingMask. This ensures that it resizes with its NJKWebViewProgressView containerView. (When using constraints based layout the frame for NJKWebViewProgressView may initially be CGRectZero and the correct frame may be set afterwards, but the height of the of the _progressBarView would still be zero therefore invisible.)

@ninjinkun
Copy link
Owner

@larryryu Thanks to your contribution. Looks good. I'll merge it.
However you should divide this to 2 pull request because it contains 2 different feature. It is hard to review and to decide merge or not. Please take care next time.

ninjinkun added a commit that referenced this pull request Apr 30, 2014
Added fix for future UIWebView implementation and UIViewAutoresizingFlexibleHeight to _progressBarView autoresizingMask
@ninjinkun ninjinkun merged commit 8baaaaf into ninjinkun:master Apr 30, 2014
@larryryu
Copy link
Author

Ah i understand, i will do that next time :D Thanks for merging and sharing!

@ninjinkun
Copy link
Owner

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants