2009-09-15 6 views
5

私はiPhone用の小さなゲームをOpenGLで作っています。私のアプリケーションでステータスバーを削除する

まず私が働いていたが、唯一の私のアプリを実行し始めたときにステータスバーを削除

[[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 { 
    // 
} 

私はバーを非表示にすることは十分ではありません、それは削除されなければならないことを推測するが、私はそれをどのように行うことができますか?、または別の解決策はありますか?

+0

私は同じ問題を抱えています。これはシミュレータとデバイス(iPhone 3GS、OS 3.1.3)で発生します。 – Axeva

答えて

1

あなたが読んでいるビューのサイズはどれくらいですか?時にはステータスバーを隠すが、適切な領域をカバーするためにビューのサイズを変更することを忘れることがあります。完全な画面は320x480です - あなたの身長が460以下ではなくフル480pxであることを確認してください。

+0

うん、320x480ですが、問題は解決しません。 –

1

シミュレータにバグがあります。ステータスバーがどこにあるかは、触れられていません。それは、しかし、デバイス上で正常に動作します。

シミュレータまたはデバイスでテストしていますか?

+0

デバイスとシミュレータの両方で問題が発生します。 –

関連する問題