Skip to content

Commit c3099f1

Browse files
committed
Rename keyboard notification methods. Some overlap with UITextView internal methods.
1 parent b39ce28 commit c3099f1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

DAKeyboardControl/DAKeyboardControl.m

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,30 +55,30 @@ - (void)addKeyboardControl:(BOOL)panning actionHandler:(DAKeyboardDidMoveBlock)a
5555

5656
// Register for keyboard notifications
5757
[[NSNotificationCenter defaultCenter] addObserver:self
58-
selector:@selector(keyboardWillShow:)
58+
selector:@selector(inputKeyboardWillShow:)
5959
name:UIKeyboardWillShowNotification
6060
object:nil];
6161
[[NSNotificationCenter defaultCenter] addObserver:self
62-
selector:@selector(keyboardDidShow:)
62+
selector:@selector(inputKeyboardDidShow:)
6363
name:UIKeyboardDidShowNotification
6464
object:nil];
6565

6666
// For the sake of 4.X compatibility
6767
[[NSNotificationCenter defaultCenter] addObserver:self
68-
selector:@selector(keyboardWillChangeFrame:)
68+
selector:@selector(inputKeyboardWillChangeFrame:)
6969
name:@"UIKeyboardWillChangeFrameNotification"
7070
object:nil];
7171
[[NSNotificationCenter defaultCenter] addObserver:self
72-
selector:@selector(keyboardDidChangeFrame:)
72+
selector:@selector(inputKeyboardDidChangeFrame:)
7373
name:@"UIKeyboardDidChangeFrameNotification"
7474
object:nil];
7575

7676
[[NSNotificationCenter defaultCenter] addObserver:self
77-
selector:@selector(keyboardWillHide:)
77+
selector:@selector(inputKeyboardWillHide:)
7878
name:UIKeyboardWillHideNotification
7979
object:nil];
8080
[[NSNotificationCenter defaultCenter] addObserver:self
81-
selector:@selector(keyboardDidHide:)
81+
selector:@selector(inputKeyboardDidHide:)
8282
name:UIKeyboardDidHideNotification
8383
object:nil];
8484

@@ -172,7 +172,7 @@ - (void)responderDidBecomeActive:(NSNotification *)notification
172172

173173
#pragma mark - Keyboard Notifications
174174

175-
- (void)keyboardWillShow:(NSNotification *)notification
175+
- (void)inputKeyboardWillShow:(NSNotification *)notification
176176
{
177177
CGRect keyboardEndFrameWindow;
178178
[[notification.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] getValue: &keyboardEndFrameWindow];
@@ -198,7 +198,7 @@ - (void)keyboardWillShow:(NSNotification *)notification
198198
}];
199199
}
200200

201-
- (void)keyboardDidShow:(NSNotification *)notification
201+
- (void)inputKeyboardDidShow:(NSNotification *)notification
202202
{
203203
// Grab the keyboard view
204204
self.keyboardActiveView = self.keyboardActiveInput.inputAccessoryView.superview;
@@ -212,7 +212,7 @@ - (void)keyboardDidShow:(NSNotification *)notification
212212
}
213213
}
214214

215-
- (void)keyboardWillChangeFrame:(NSNotification *)notification
215+
- (void)inputKeyboardWillChangeFrame:(NSNotification *)notification
216216
{
217217
CGRect keyboardEndFrameWindow;
218218
[[notification.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] getValue: &keyboardEndFrameWindow];
@@ -236,12 +236,12 @@ - (void)keyboardWillChangeFrame:(NSNotification *)notification
236236
}];
237237
}
238238

239-
- (void)keyboardDidChangeFrame:(NSNotification *)notification
239+
- (void)inputKeyboardDidChangeFrame:(NSNotification *)notification
240240
{
241241
// Nothing to see here
242242
}
243243

244-
- (void)keyboardWillHide:(NSNotification *)notification
244+
- (void)inputKeyboardWillHide:(NSNotification *)notification
245245
{
246246
CGRect keyboardEndFrameWindow;
247247
[[notification.userInfo valueForKey:UIKeyboardFrameEndUserInfoKey] getValue: &keyboardEndFrameWindow];
@@ -265,7 +265,7 @@ - (void)keyboardWillHide:(NSNotification *)notification
265265
}];
266266
}
267267

268-
- (void)keyboardDidHide:(NSNotification *)notification
268+
- (void)inputKeyboardDidHide:(NSNotification *)notification
269269
{
270270
self.keyboardActiveView.hidden = NO;
271271
self.keyboardActiveView.userInteractionEnabled = YES;

0 commit comments

Comments
 (0)