title: Setting a delegate using blocks in iPhone
body: <p>On a view controller I have multiple textfields, which all use the same delegate. Now in the delegate the code gets really ugly since I have to differentiate between all the textfields (bunch of if/else-if or a switch statement). I came a cross this article:</p>
  
  <p><a href="http://pivotallabs.com/users/amilligan/blog/articles/1353-iphone-on-blocks-uitextfields" rel="nofollow">Blocks in textfield delegates</a></p>
  
  <p>But from this I still don't understand how this solves the problem? Doesn't this basically call one method and pass it the text and the method has no idea what textfield gave the string? You would still need to differentiate between the textfields, but this time inside the block (with the usual if(textfield == bazTextField)...).</p>