title: position view relative to tab indicator
body: <p>I've been given a UI that uses a <code>UITabBarController</code>, and in one of the tabbed <code>ViewControllers</code>, a <code>View</code> (an arrow as a <code>UIImageView</code>) needs to be positioned relative to the tab indicator (the arrow needs to point down at the indicator, centered along the x-axis).  I used basic math to emulate the position based on known variables, and it works properly for iPhone/Pod in both landscape and portrait orientations, but fails on iPad (it's a little too far right in both orientations - seems worse in landscape but that might just be my perception).</p>
  
  <p>Here's what I used:</p>
  
  <pre><code>int visibleWidth = self.view.frame.size.width;
  int tabBarSize = self.tabBarController.tabBar.frame.size.width;
  int tabSize = tabBarSize / [self.tabBarController.viewControllers count];
  int tabPosition = 2; // hint should point at the 3rd tab
  int arrowIconWidth = hintIcon.image.size.width;
  int arrowIconHeight = hintIcon.image.size.height;
  
  int tabEmulationPosition = visibleWidth / 2 - tabBarSize / 2;
  int tabOffsetPosition = tabEmulationPosition + ( tabSize * tabPosition );
  int iconPosition = tabOffsetPosition + ( tabSize / 2 - arrowIconWidth / 2 );
  </code></pre>
  
  <p>Is there a better way than trying to "fake" the math (maybe a <code>getBoundingClientRect</code> type method?)  Or is the math approach the best bet, assuming there's a correct-able flaw in what I've got?</p>
  
  <p>TYIA</p>