Skip to content

Commit

Permalink
Modernize property syntax and don't use viewDidUnload (deprecated in …
Browse files Browse the repository at this point in the history
…iOS 6)
  • Loading branch information
KentuckyCompass committed Jan 1, 2018
1 parent 5b857f0 commit c563166
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions ios/ViewController.mm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ @interface ViewController ()
std::map<uint16_t, uint16_t> iCadeToKeyMap; std::map<uint16_t, uint16_t> iCadeToKeyMap;
} }


@property (nonatomic) EAGLContext* context; @property (nonatomic, strong) EAGLContext* context;
@property (nonatomic) NSString* documentsPath; @property (nonatomic, strong) NSString* documentsPath;
@property (nonatomic) NSString* bundlePath; @property (nonatomic, strong) NSString* bundlePath;
@property (nonatomic) NSMutableArray* touches; @property (nonatomic, strong) NSMutableArray<NSDictionary *>* touches;
@property (nonatomic) AudioEngine* audioEngine; @property (nonatomic) AudioEngine* audioEngine;
//@property (nonatomic) iCadeReaderView* iCadeView; //@property (nonatomic) iCadeReaderView* iCadeView;
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1 #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
Expand Down Expand Up @@ -214,24 +214,17 @@ - (void)viewDidLoad {
#endif #endif
} }


- (void)viewDidUnload
{
[super viewDidUnload];

if ([EAGLContext currentContext] == self.context) {
[EAGLContext setCurrentContext:nil];
}
self.context = nil;
}

- (void)didReceiveMemoryWarning - (void)didReceiveMemoryWarning
{ {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
} }


- (void)dealloc - (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 __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
if ([GCController class]) { if ([GCController class]) {
Expand Down

0 comments on commit c563166

Please sign in to comment.