title: Can blocks be used as replacement for delegates?
body: <p>I want to write a custom delegate method to receive an event in one of my view controllers from another view controller. Should I use blocks here instead of delegates. Which is the preferred one ?</p>
  
  <pre><code>@protocol MyClassDelegate
  -(void)doSomethingInDelegate;
   @end
  
  @interface MyClass : NSObject
  @property id&lt;MyClassDelegate&gt; delegate;
  -(void)doSomething
  @end
  
  
  
  @implementation MyClass
   -(void)doSomething
  {
  [self.delegate doSomethingInDelegate];
  }
  @end
  
    @interface MyOtherClass&lt;MyClassDelegate&gt; : NSObject
    ...
   @end
  @implementation MyOtherClass
   -(void)doSomethingInDelegate
      {
  NSLog(@"Doing something in delegate");
  }
   @end
  </code></pre>