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 |
What are static attributes?
What are the rules for identifiers?
What is an objective statement?
What is umbrella header?
What is a category extension?
What is posing in objective c?
What is nonatomic in objective c?
Explain immutable types in objective c programming language?
Can I write some c++ function in same .m file? Will it compile? If no, what changes should I do to compile it?
What is a class property?
Is python static or dynamic?
How to create uibutton programmatically in objective c?