Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do you insert a block?



How do you insert a block?..

Answer / Sachin Tyagi

To insert a block in Objective-C, you use the `^{ ... }` syntax. Here is an example of how to define and insert a block:n```objcnvoid (^myBlock)(NSString *param) = ^(NSString *param) {n NSLog(@"Parameter passed: %@", param);n};nmyBlock(@"Hello, World!");n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

Can delegates be retained?

1 Answers  


What is the difference between nsstring and string?

1 Answers  


What are the two types of m files?

1 Answers  


What is a function file?

1 Answers  


Does objective c have pointers?

1 Answers  


What is block in objective c?

1 Answers  


Is objective c hard to learn?

1 Answers  


What are objective c properties?

1 Answers  


What is nsarray objective c?

1 Answers  


What is extern objective c?

1 Answers  


What are the delegate?

1 Answers  


Explain when to use nsarray and nsmutablearray. Which one is faster and threadsafe?

1 Answers  


Categories