Hi guys,
After almost a month of evenings of hard work, I have almost completed my first app. However I’m stuck trying to get the dimensions right for my navigation bar, which I’m trying to mimic from IOS 7. I’m keeping the status bar and also adding a newRect behind it and below it for the nav bar. And after that I’m adding a button for the chevron on the left and optional button on the right.
According to the what I read online, the status bar itself is supposed to be 40 pixels (20 points), while the nav bar extends below it by 88 pixels (44 points), for a total of 128 pixels (64 points) from the top of the screen.
However, on the Corona simulator for the various devices, the value for ‘display.topStatusBarContentHeight’ is not 40, it seems like a scaled value. For example on the iPads it’s 23.4375, and on the iPhone 4 & 5 it’s 50. I’m not sure how to specify the height for a nav bar newRect… I did try a formula of ‘height = (status_bar_height / 40) * 128’ but it looked a bit too big on the iPhones and a bit too small on the iPads!
How would I go about solving this?
I’m using the config.lua settings from Rob’s September tutorial.