Skip to content

Commit

Permalink
Extend code to support UIWebView nstudio#15
Browse files Browse the repository at this point in the history
  • Loading branch information
ahalls committed Dec 12, 2016
1 parent 4756af4 commit f262dc4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pulltorefresh.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export class PullToRefresh extends common.PullToRefresh {

this.content.ios.addSubview(this._refreshControl);
}
else if (this.content.ios instanceof UIWebView) {
// Ensure that we can trigger the refresh, even if the content is not large enough
this.content.ios.scrollView.alwaysBounceVertical = true;

this.content.ios.scrollView.addSubview(this._refreshControl);
}
else {
throw new Error("Content must inherit from UIScrollView!");
}
Expand Down

0 comments on commit f262dc4

Please sign in to comment.