Friday, July 30, 2010

Blocks in Objective C (Update)

Soo as it turns out! The blocks, only work with the arm compiler! Which means you can't even compile the code for your simulator unless you get a 3rd party non-apple GCC compiler. So I think everyone would agree only two words come to mind when updating to a third party compiler.. "F**K THAT!"

On the bright side, I found that there is a foreach loop! Go figure its a mix of C# and Java.

So in java its:
for ( Object obj : objectList) {
doStuff(obj);
}

in C# its:
foreach ( Object obj in objectList) {
doStuff(obj);
}

in Objective-C its:
for( Object obj in objectList ) {
[obj doStuff];
}

Way to fail apple.. way to fail.

1 comment:

Unknown said...

Hello, I am interested in acquiring your domain name. Would you like to discuss further?