equal
deleted
inserted
replaced
177 [[NSNotificationCenter defaultCenter] addObserver:self |
177 [[NSNotificationCenter defaultCenter] addObserver:self |
178 selector:@selector(cleanup) |
178 selector:@selector(cleanup) |
179 name:@"remove overlay" |
179 name:@"remove overlay" |
180 object:nil]; |
180 object:nil]; |
181 |
181 |
182 // for iOS > 3.2 |
182 // for iOS >= 3.2 |
183 if ([UIScreen respondsToSelector:@selector(screens)]) { |
183 if ([UIScreen respondsToSelector:@selector(screens)]) { |
184 [[NSNotificationCenter defaultCenter] addObserver:self |
184 [[NSNotificationCenter defaultCenter] addObserver:self |
185 selector:@selector(numberOfScreensIncreased) |
185 selector:@selector(numberOfScreensIncreased) |
186 name:UIScreenDidConnectNotification |
186 name:UIScreenDidConnectNotification |
187 object:nil]; |
187 object:nil]; |
192 object:nil]; |
192 object:nil]; |
193 } |
193 } |
194 |
194 |
195 // present the overlay |
195 // present the overlay |
196 [UIView beginAnimations:@"showing overlay" context:NULL]; |
196 [UIView beginAnimations:@"showing overlay" context:NULL]; |
197 [UIView setAnimationDuration:1]; |
197 [UIView setAnimationDuration:2]; |
198 self.view.alpha = 1; |
198 self.view.alpha = 1; |
199 [UIView commitAnimations]; |
199 [UIView commitAnimations]; |
200 } |
200 } |
201 |
201 |
202 -(void) numberOfScreensIncreased { |
202 -(void) numberOfScreensIncreased { |
260 [super didReceiveMemoryWarning]; |
260 [super didReceiveMemoryWarning]; |
261 } |
261 } |
262 |
262 |
263 -(void) viewDidUnload { |
263 -(void) viewDidUnload { |
264 // only objects initialized in viewDidLoad should be here |
264 // only objects initialized in viewDidLoad should be here |
|
265 if (IS_DUALHEAD()) |
|
266 [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; |
265 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
267 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
266 [NSObject cancelPreviousPerformRequestsWithTarget:self |
268 [NSObject cancelPreviousPerformRequestsWithTarget:self |
267 selector:@selector(unsetPreciseStatus) |
269 selector:@selector(unsetPreciseStatus) |
268 object:nil]; |
270 object:nil]; |
269 dimTimer = nil; |
271 dimTimer = nil; |