5

Can some body tell me what is the exact size of tab bar in UITabBarConroller on iPhone programming?

1 Answer 1

12

Interface builder says its size is 320x49, with 49 being the height.

However, you shouldn't be relying on hard coded sizes, that's why views have the frame and bounds properties, so you can find out size and positioning ,etc.

3
  • 2
    In landscape mode (pretty rare for a UITabBarController, but it is supported) it's 480 x 40. Commented Jun 14, 2011 at 7:19
  • Thanks Mark! That precisely illustrates my point of not relying on hard coded sizes. :)
    – Jasarien
    Commented Jun 14, 2011 at 9:01
  • My mistake - I was basing this on a custom UITabBarController that removed the text labels & used less vertical space in landscape mode. A standard Apple UITabBarController in landscape mode is 480 x 49. And yes, Jasarien's point is important - don't assume anything by hard-coding values... Commented Jun 18, 2011 at 7:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.