Skip to content

Commit 311a36b

Browse files
author
Jeff Arena
committed
Bail out of manipulating the frame in response to keyboard notifications if the view is not currently being displayed.
1 parent 45ab566 commit 311a36b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Code/RKKeyboardScroller.m

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ - (void)dealloc
7373

7474
- (void)handleKeyboardNotification:(NSNotification *)notification
7575
{
76+
if (!self.viewController.isViewLoaded || self.viewController.view.window == nil) return;
77+
7678
NSDictionary *userInfo = [notification userInfo];
7779

7880
CGRect keyboardEndFrame = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];

0 commit comments

Comments
 (0)