tags:

views:

2326

answers:

8

I have an iPhone app that hides the status bar. However, my main view doesn't get any touch events when I tap in the status bar area. Is there something I can do to fix this?

Here are a few details of my app's setup (in case it matters):

  • It's an OpenGL-based application.
  • The app launches in landscape mode. However, the touch events are missing when I tap in the area near the "top" of the portrait-mode area. (In other words, I don't get touch events on the left edge when I have the device held in landscape orientation.)
  • My info.plist has UIStatusBarHidden set true, and in my application delegate's applicationDidFinishLaunching method I have "application.statusBarHidden = YES;"
  • The main view has exclusiveTouch set to YES.
  • The view's touchesBegan:withEvent method is called when I tap anywhere else on the screen.
  • My view draws fine within the status-bar area.

(Please refrain from whining about the NDA. Thank you.)


Update: It turns out that this problem only manifests itself on the iPhone Simulator. When the app is run on an actual iPhone, touches are detected everywhere.

I'm still interested to know if there is a way to make it work on the Simulator, but it's no big deal.

+1  A: 

I haven't had this problem, but then again, I'm not using OpenGL views. When you launch in Landscape mode, are you setting the StatusBarHidden property of the appropriate ViewController?

Mark Bessey
My info.plist has UIStatusBarHidden set true, and in my application delegate's applicationDidFinishLaunching method I have "application.statusBarHidden = YES;"
Kristopher Johnson
+5  A: 

Found my own answer (of sorts):

This behavior only happens in the iPhone Simulator. When I run the application on an actual iPhone, it works fine.

I'd still be interested to know if there is a way to make it work on the simulator.

Kristopher Johnson
A: 

I'm in the exact same situation. Thanks for the info.

Steph Thirion
+1  A: 

I have this problem both in the simulator and in the phone. Has this not happened to anyone ?

A: 

I have this problem in the simulator but haven't tried it in the device yet.

A: 

I'm having the same problem on a portrait OpenGL app. Both on the sim and device.

+1  A: 

It's a bug in the Simulator. It's working fine on iPhone. Check http://gtekna.com/?p=140

cmpak
A: 

I have the same problem. I tried all kinds of suggestions found in forums, but I still can't get touch events on the device when y<20.

My app is a full screen openGl app.

Can anyone please explain?

OMH