Browse Source

Magic trick to prevent your ui thread to hang in some cases (modal windows while in background, ...)

Sebastián Katzer 12 năm trước cách đây
mục cha
commit
68381d4132
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/ios/APPLocalNotification.m

+ 1 - 1
src/ios/APPLocalNotification.m

@@ -148,7 +148,7 @@
 
     if (callbackFn.length > 0)
     {
-        NSString* jsCallBack = [NSString stringWithFormat:@"%@(%@)", callbackFn, id];
+        NSString* jsCallBack = [NSString stringWithFormat:@"setTimeout('%@(%@)',0)", callbackFn, id];
 
         [self writeJavascript:jsCallBack];
     }