What does __ block do?
Answer / Neeraj Nikhra
__block is a keyword in Objective-C that allows a variable to be modified within a block. Here's an example:n```objcn__block int myVariable = 0;n-(void)myMethod {n NSBlockOperation *operation = [[NSBlockOperation alloc] init] {n myVariable++;n NSLog(@"Current value of myVariable: %d", myVariable);n };n [operation start];n}n``
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain what is dot notation?
What is the class of a constant string?
What is the use of objective c?
What objective-c program consists of?
What are the important data types found in objective-c?
What is category in objective c?
What is toll-free bridging?
Is swift based on objective c?
How to implement in app purchase in ios objective c?
What happens if you add your just created object to a mutable array, and you release your object?
What is struct in objective c?
What is gcd objective c?