Skip to content

Commit fa71128

Browse files
author
ignacio
committed
Makes sure not to register the same notifications twice
1 parent bd086f8 commit fa71128

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/Classes/SLKTextViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,6 +1924,8 @@ - (NSArray *)keyCommands
19241924

19251925
- (void)slk_registerNotifications
19261926
{
1927+
[self slk_unregisterNotifications];
1928+
19271929
// Keyboard notifications
19281930
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(slk_willShowOrHideKeyboard:) name:UIKeyboardWillShowNotification object:nil];
19291931
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(slk_willShowOrHideKeyboard:) name:UIKeyboardWillHideNotification object:nil];

0 commit comments

Comments
 (0)