ソースを参照

typeof → __typeof

Also, obtain strong reference to weakSelf once inside block
Tanner Bennett 7 年 前
コミット
9c4ff2ddd8
共有1 個のファイルを変更した3 個の追加2 個の削除を含む
  1. 3 2
      Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogTableViewController.m

+ 3 - 2
Classes/GlobalStateExplorers/SystemLog/FLEXSystemLogTableViewController.m

@@ -28,9 +28,10 @@
 {
     [super viewDidLoad];
 
-    __weak typeof(self) weakSelf = self;
+    __weak __typeof(self) weakSelf = self;
     id logHandler = ^(NSArray<FLEXSystemLogMessage *> *newMessages) {
-        [weakSelf handleUpdateWithNewMessages:newMessages];
+        __strong __typeof(weakSelf) self = weakSelf;
+        [self handleUpdateWithNewMessages:newMessages];
     };
 
     _logMessages = [NSMutableArray array];