2

I have an app that is largely finished. It uses a toolBar on the top of the view with a few buttons. Under this is a WebView, which only opens one URL and there is no way to get away from this site (that is the point of it).

However, the status bar overlaps the toolbar. My initial temporary solution is to hide the status bar, but I really need it to be there in this app. How can I stop this overlap from happening

Chris
  • 44,602
  • 16
  • 137
  • 156
Aakburns
  • 307
  • 1
  • 5
  • 19

1 Answers1

1

Try to put the toolbar's origin as (0, 20) instead of (0, 0).

kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
  • Where do I set that? I made the toolbar using the builder interface so I'm not sure where the code that controls that ended up. – Aakburns May 18 '10 at 12:37
  • @Aakburns: IB? Then you should see the status bar already, which you could avoid. – kennytm May 18 '10 at 14:13
  • Well I was able to adjust it so it leaves room for the status bar. Now when I run it in the simulator it looks fine, but when you rotate it, you get a small black area between the status bar and toolbar in any direction, even going back to portrait till you restart the app. – Aakburns May 18 '10 at 14:48
  • @Aakburns: Please check your "autosizing" settings (in the "size" tab). – kennytm May 18 '10 at 14:58
  • The Autosizing does not seem to make a difference as to keeping it stuck up to the top. – Aakburns May 18 '10 at 15:11
  • I want to add in here, I was attempting to make my app work with ipad. It was originally for iphone. What is the best way to go about this. I notice in the interface builder it does not show the status bar. If I add the status bar using interface builder it goes back to being iphone size in the builder window rather than ipad. – Aakburns May 19 '10 at 02:06
  • If I run in the simulator from interface builder it shows up correctly now, but if I run to simulator from xcode, it shows up with the overlap. – Aakburns May 19 '10 at 02:39
  • @Aakburns: File -> Create iPad version using autoresizing masks. BTW, are you using a view controller or not? – kennytm May 19 '10 at 06:00
  • No I wasn't actually. Can you give me the upshot of setting that up once I add the controller in? Thanks for all your help. Really. – Aakburns May 20 '10 at 12:17
  • I've actually got another issue thats come up here as well. This application is used to let you use our company basecamp site and only that site. When logged in, if you go to post a new message, you can insert text in the title text field, but if you try to tap in the message body section, it does not bring up the keyboard. I have to assume it's something with my coding, because safari works just fine with it. You can pick textile/html mode or easy. The keyboard does come up in textile/html mode but not in easy formatting mode. Any ideas? – Aakburns May 20 '10 at 12:18
  • @Aakburns: You should use a view controller, which will take care of the status bar and rotation issue automatically. For the other issue, ask a new question. – kennytm May 20 '10 at 17:54