Skip to content

Commit 35168d2

Browse files
committed
Hide status bar in iPad
1 parent cac5ee3 commit 35168d2

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lib/irrlicht/source/Irrlicht/CIrrDeviceiOS.mm

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@
3030
class CIrrDeviceiOS;
3131
}
3232

33+
@interface HideStatusBarView : UIViewController
34+
-(BOOL)prefersStatusBarHidden;
35+
@end
36+
37+
@implementation HideStatusBarView {}
38+
39+
-(BOOL)prefersStatusBarHidden
40+
{
41+
return YES;
42+
}
43+
@end
44+
3345
/* CIrrDelegateiOS */
3446

3547
@interface CIrrDelegateiOS : NSObject<UIApplicationDelegate>
@@ -208,7 +220,6 @@ - (id)initWithFrame:(CGRect)frame forDevice:(irr::CIrrDeviceiOS*)device forConte
208220
@implementation CIrrViewiOS
209221
{
210222
irr::CIrrDeviceiOS* Device;
211-
std::map<void*, size_t> m_touch_id_map;
212223
}
213224

214225
- (id)initWithFrame:(CGRect)frame forDevice:(irr::CIrrDeviceiOS*)device forContext:(EAGLContext*)eagl_context
@@ -772,7 +783,7 @@ - (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event
772783
{
773784
SIrrDeviceiOSDataStorage* dataStorage = static_cast<SIrrDeviceiOSDataStorage*>(DataStorage);
774785
dataStorage->Window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
775-
dataStorage->ViewController = [[UIViewController alloc] init];
786+
dataStorage->ViewController = [[HideStatusBarView alloc] init];
776787
dataStorage->Window.rootViewController = dataStorage->ViewController;
777788
[dataStorage->Window makeKeyAndVisible];
778789
}

0 commit comments

Comments
 (0)