Skip to content

Commit

Permalink
Merge pull request #8523 from hansemannn/TIMOB-10488
Browse files Browse the repository at this point in the history
[TIMOB-10488] iOS: Fix webview loading default value
  • Loading branch information
vijaysingh-axway committed Oct 24, 2016
2 parents 0377d18 + 55766e6 commit 779b3c6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion iphone/Classes/TiUIWebView.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
-(void)stopLoading;
-(void)goBack;
-(void)goForward;
-(BOOL)isLoading;
-(BOOL)loading;
-(BOOL)canGoBack;
-(BOOL)canGoForward;
-(void)reload;
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/TiUIWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ - (void)goForward
[webview goForward];
}

-(BOOL)isLoading
-(BOOL)loading
{
return [webview isLoading];
}
Expand Down
12 changes: 11 additions & 1 deletion iphone/Classes/TiUIWebViewProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ - (NSString*)html
return html;
}

-(id)loading
{
__block BOOL loading;
TiThreadPerformOnMainThread(^{
loading = [(TiUIWebView*)[self view] loading];
}, YES);

return NUMBOOL(loading);
}

-(void)goBack:(id)args
{
TiThreadPerformOnMainThread(^{[(TiUIWebView*)[self view] goBack];}, NO);
Expand Down Expand Up @@ -299,4 +309,4 @@ -(void)webviewDidFinishLoad
}
@end

#endif
#endif

0 comments on commit 779b3c6

Please sign in to comment.