In this part we are going to examine various examples of how we can define methods that accepts blocks. Instead of using them simple as parameters in Cocoa Framework methods, we can design our own methods that accepts blocks. Block as parameters is more flexible than the standard data types. It could be assumed as
Tag: blocks
Blocks in objective C – part 2
In part 1 of my blocks’ adventures I wrote about the basics, block declaration, block definition and general usage. The first thing that you are going to need in iOS development is to use blocks as arguments in Cocoa framework methods, and this is also the easier one. Blocks as methods’ arguments come either to
Blocks in objective C – part 1
With the release of iOS4 blocks became available in objective C. It is not something new, they are exist in other languages like Java’s anonymous classes and C# lamdas. I have to admit that because of the syntax and the way they operate, they have become a frightening tool for the beginner developers. There are