删除我的应用中的状态栏

Jos*_*el. 5 iphone

我在openGL中为iPhone做了一个小游戏.

首先,我通过写入删除了"状态栏"

[[UIApplication sharedApplication] setStatusBarHidden:YES];
Run Code Online (Sandbox Code Playgroud)

哪个有效,但只在我的应用程序开始运行时删除了状态栏.然后我修改了我的project.plist

<key>UIStatusBarHidden</key>
<true/>
Run Code Online (Sandbox Code Playgroud)

现在状态栏永远不会显示,只是我想要的.问题是我在屏幕的任何部分都没有问题地阅读触摸,除了状态栏曾经是的区域.

// 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 {
    // 
}
Run Code Online (Sandbox Code Playgroud)

我想隐藏条形图是不够的,必须将其删除,但我该怎么做呢?还是有另一种解决方案?

Tim*_*Tim 1

您正在阅读的视图有多大?有时人们隐藏状态栏,但忘记调整视图大小以覆盖适当的区域。完整屏幕为 320x480 - 确保您的高度为完整的 480 像素,而不是 460 或更小。