我正在爲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