I don't mean to start a code formatting holy war here, but I'm wondering if anyone has any advice on how to best format nested blocks in Objective-C.
Here's some code I wrote today:
[UIView animateWithDuration:1.0
animations:^{
self.alpha = 0.5;
}
completion:^(BOOL finished){
[UIView animateWithDuration:1.0
animations:^{
winView.alpha = 1.0;
}
completion:^(BOOL finished){
winView.alpha = 0.0;
}];
}];
I pretty much let XCode format it, and it's not terrible. But I'm kinda afraid in six months I'll stumble across this to fix some bug, and want to punch myself in the face.
Anyone have any pointers on how to make nested blocks as readable as possible?