Skip to content

Commit

Permalink
Moved viewDidUnload calls to didReceiveMemoryWarning to get around iO…
Browse files Browse the repository at this point in the history
…S 6 deprecation error.
  • Loading branch information
Justin Williams committed May 30, 2013
1 parent affd8a8 commit 28c96d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DDExpandableButtonSample/SampleViewController.m
Expand Up @@ -16,6 +16,12 @@ - (void)dealloc
[super dealloc];
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
self.torchSession = nil;
}

#pragma mark View lifecycle

- (void)viewDidLoad
Expand Down Expand Up @@ -104,12 +110,6 @@ - (void)viewDidLoad
[toggleButton updateDisplay];
}

- (void)viewDidUnload
{
[super viewDidUnload];
self.torchSession = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
Expand Down

0 comments on commit 28c96d2

Please sign in to comment.