Преглед изворни кода

typeof → __typeof

Also, obtain strong reference to weakSelf once inside block
Tanner Bennett пре 7 година
родитељ
комит
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];