I'm trying to make an extension for Game Maker : Studio that disables Notification bar when dragging from the top of the screen.
The extension is a combination of .mm and .h files.
I'd like to use the solution described in this post, but I'm unfamiliar with Objective C++ and unsure about the scope/usage of the methods referenced there.
NotificationBar.h
:
@interface NotificationBar : NSObject
{
}
@end
NotificationBar.mm
:
#include <UIKit/UIKit.h>
@implementation NotificationBar
- (void)viewDidLoad {
[super viewDidLoad];
if (@available(iOS 11.0, *)) {
[self setNeedsUpdateOfScreenEdgesDeferringSystemGestures];
}
}
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures
{
return UIRectEdgeAll;
}
@end
This code gives an error 'NotificationBar' cannot use 'super' because it is a root class
. Is there a way to override these methods from an .mm extension?