From c563166f9aefdd9e908dde5b40342b660bd5ec7f Mon Sep 17 00:00:00 2001 From: Kentucky Compass Date: Sat, 30 Dec 2017 18:26:47 -0800 Subject: [PATCH] Modernize property syntax and don't use viewDidUnload (deprecated in iOS 6) --- ios/ViewController.mm | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/ios/ViewController.mm b/ios/ViewController.mm index 528287094c..4fd1c60739 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -74,10 +74,10 @@ static GraphicsContext *graphicsContext; std::map iCadeToKeyMap; } -@property (nonatomic) EAGLContext* context; -@property (nonatomic) NSString* documentsPath; -@property (nonatomic) NSString* bundlePath; -@property (nonatomic) NSMutableArray* touches; +@property (nonatomic, strong) EAGLContext* context; +@property (nonatomic, strong) NSString* documentsPath; +@property (nonatomic, strong) NSString* bundlePath; +@property (nonatomic, strong) NSMutableArray* touches; @property (nonatomic) AudioEngine* audioEngine; //@property (nonatomic) iCadeReaderView* iCadeView; #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1 @@ -214,16 +214,6 @@ static GraphicsContext *graphicsContext; #endif } -- (void)viewDidUnload -{ - [super viewDidUnload]; - - if ([EAGLContext currentContext] == self.context) { - [EAGLContext setCurrentContext:nil]; - } - self.context = nil; -} - - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; @@ -231,7 +221,10 @@ static GraphicsContext *graphicsContext; - (void)dealloc { - [self viewDidUnload]; + if ([EAGLContext currentContext] == self.context) { + [EAGLContext setCurrentContext:nil]; + } + self.context = nil; #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1 if ([GCController class]) {