title: how to compare image with button image
body: <p>I am trying to comparing image with button images but my code is not working for this requirement. What did I do here wrong? Please help me.</p>
  
  <pre><code>NSString *btnImage;
  UIButton *  sharebutton;
  
  btnImage = @"arrow.png";
      [sharebutton setImage:[UIImage imageNamed: btnImage] forState:UIControlStateNormal];
  
  if ([sharebutton.imageView.image isEqual:[UIImage imageNamed:@"arrow.png"]])
      {
          NSLog(@"ok");
      }
      else
      {
          NSLog(@"else");
      }
  </code></pre>