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...


What are blocks and how are they used?



What are blocks and how are they used?..

Answer / Vikrant Upadhyay

Blocks in Objective-C are anonymous functions that can be defined inline and passed around like any other object. They consist of a sequence of statements enclosed within curly braces `{}`. Blocks are commonly used for: 1. Event handling (e.g., tap gestures, button clicks). 2. Asynchronous processing with GCD (Grand Central Dispatch). 3. Customizing UI animations.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

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

1 Answers  


Is objective c and c the same?

1 Answers  


What is .m file in objective c?

1 Answers  


Is a fact objective?

1 Answers  


What is gcd objective c?

1 Answers  


Does objective c have multiple inheritance? Why not? How to imitate various inheritance?

1 Answers  


What happens with the objects if the array is released?

1 Answers  


What is difference between null and nil?

1 Answers  


Mention what is the primary use of the category in the objective-c?

1 Answers  


Can we create dynamic classes in objective c? If yes, explain how to create with a valid use case?

1 Answers  


Can we implement dealloc in arc? If yes, what is the need to do that?

1 Answers  


What is ivar objective c?

1 Answers  


Categories