block_retain.m

Objective-CMestre

Explorer

C40
C++40
C#40
Dart40
Go40
Java40
JavaScript40
Kotlin40
Objective-C
Iniciante10
Intermediário10
Avançado10
Especialista5
Mestre5
block_retain.m
runtime_swap.m
kvo_observe.m
gcd_barrier.m
associated_obj.m
Perl40
PHP40
Python40
R40
Ruby40
Rust40
Shell40
Swift40
TypeScript40
block_retain.m
Click to focus
1
2
3
4
5
6
7
8
9
__weak typeof(self) weakSelf = self;
self.handler = ^(NSData *data) {
   __strong typeof(weakSelf) strongSelf = weakSelf;
   if (!strongSelf) return;
   dispatch_async(dispatch_get_main_queue(), ^{
       [strongSelf updateUI:data];
   });
};
[self.task setCompletionHandler:self.handler];
0WPM0%0:000/289(0%)|Ln 1, Col 1
UTF-8Objective-C

Exercícios Relacionados