mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2024-12-02 20:06:54 -05:00
commit
85a68eb017
2 changed files with 10 additions and 6 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue