title: How do I get the tap coordinates on a custom UIButton?
body: <p>I'm using XCode 4.4 developing for iOS 5 on an iPad and am using the Storyboard layout when creating my custom button.</p>
  
  <p>I have the touch event correctly working and logging but now I want to get the x/y coordinates of the tap on my custom button.</p>
  
  <p>If possible, I'd like the coordinates to be relative to the custom button instead of relative to the entire iPad screen. </p>
  
  <p>Here's my code in the .h file:</p>
  
  <pre><code>- (IBAction)getButtonClick:(id)sender;
  </code></pre>
  
  <p>and my code in the .m file:</p>
  
  <pre><code>    - (IBAction)getButtonClick:(id)sender {
  
          NSLog(@"Image Clicked.");
      }
  </code></pre>
  
  <p>Like I said, that correctly logs when I tap the image. </p>
  
  <p>How can I get the coordinates of the tap?</p>
  
  <p>I've tried a few different examples from the internet but they always freeze when it displays a bunch of numbers (maybe the coordinates) in the log box. I'm VERY new to iOS developing so please make it as simple as possible. Thanks!</p>