我正在为openGL中的iPhone制作一个小游戏。在我的应用程序中删除状态栏
首先我通过书面方式
[[UIApplication sharedApplication] setStatusBarHidden:YES];
哪些工作去掉了“状态栏”,只是去掉了状态栏时,我的应用程序开始运行。然后我修改了我的项目.plist
<key>UIStatusBarHidden</key>
<true/>
现在状态栏从不显示,只是我想要的。问题是我在屏幕的任何部分读取触摸没有问题,除了状态栏以前的区域。
// This method deals with events when one or more fingers touch the screen
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[myProject newTouch:touches withEvent:event];
[self.nextResponder touchesEnded: touches withEvent:event];
}
// This method deals with events when one or more fingers moves while touching the screen
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
[myProject movingTouch:touches withEvent:event ];
}
// This method deals with events when one or more fingers stops touching the screen
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[myProject oldTouchEnded:touches withEvent:event ];
}
// This method deals with events when the system is interrupted (for example an incomming call)
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
//
}
我想,躲在酒吧是不够的,它必须被删除,但我该怎么办呢?或者还有另一种解决方案?
我遇到同样的问题。它发生在模拟器和设备 - iPhone 3GS,OS 3.1.3上。 – Axeva 2010-05-29 14:15:45