Merge pull request #179 from jndrm/develop

Fix Runtime Issues:
This commit is contained in:
chrisgarrity 2018-09-26 09:28:27 -04:00 committed by GitHub
commit 85a68eb017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -284,7 +284,9 @@ NSMutableDictionary *soundtimers;
if (sounds[soundName] == nil) return; if (sounds[soundName] == nil) return;
NSString *callback = [NSString stringWithFormat:@"iOS.soundDone('%@');", soundName]; NSString *callback = [NSString stringWithFormat:@"iOS.soundDone('%@');", soundName];
UIWebView *webview = [ViewController webview]; UIWebView *webview = [ViewController webview];
dispatch_async(dispatch_get_main_queue(), ^{
[webview stringByEvaluatingJavaScriptFromString:callback]; [webview stringByEvaluatingJavaScriptFromString:callback];
});
} }
+ (NSString *)stopSound :(NSString*)name { + (NSString *)stopSound :(NSString*)name {

View file

@ -19,7 +19,9 @@ NSString *oncomplete;
+ (NSString *) hideSplash :(NSString *)body{ + (NSString *) hideSplash :(NSString *)body{
UIImageView* splashScreen = [ViewController splashScreen]; UIImageView* splashScreen = [ViewController splashScreen];
dispatch_async(dispatch_get_main_queue(), ^{
[splashScreen removeFromSuperview]; [splashScreen removeFromSuperview];
});
return @"1"; return @"1";
} }