Pārlūkot izejas kodu

typeof → __typeof

Also, obtain strong reference to weakSelf once inside block
Tanner Bennett 7 gadi atpakaļ
vecāks
revīzija
9c4ff2ddd8

+ 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];