How do you define a block?
Answer / Shambhu Nath Chaudhary
To define a block in Objective-C, use the `^{ ... }` syntax. Here's an example:n```objcnvoid (^myBlock)(NSString *param) = ^(NSString *param) {n NSLog(@"Parameter passed: %@", param);n};n``
| Is This Answer Correct ? | 0 Yes | 0 No |
What is nsarray objective c?
What is .h and .m file in xcode?
How dispatch_once runs only once?
What is responder chain?
what is gcd? What are advantages over nsthread?
What is better objective c or swift?
What does nonatomic mean?
How to call function?
What is the difference between method and type?
What is the difference between nsstring and string?
What is abi stability?
Explain types of protocol?