@@ -39,7 +39,7 @@ @interface SLKTextInputbar ()
3939@property (nonatomic , strong ) NSArray *charCountLabelVCs;
4040
4141@property (nonatomic , strong ) UILabel *charCountLabel;
42- @property (nonatomic , strong ) UIView *keyboardMockView ;
42+ @property (nonatomic , strong ) UIView *keyboardPlaceholderView ;
4343
4444@property (nonatomic ) CGPoint previousOrigin;
4545
@@ -539,41 +539,41 @@ - (void)slk_updateCounter
539539}
540540
541541
542- #pragma mark - Keyboard Snapshot
542+ #pragma mark - Keyboard Snapshot Placeholder
543543
544- - (void )showKeyboardSnapshot : (BOOL )show
544+ - (void )showKeyboardPlaceholder : (BOOL )show
545545{
546546 UIWindow *keyboardWindow = [self keyboardWindow ];
547547
548- if (!_keyboardMockView && show) {
548+ if (!_keyboardPlaceholderView && show) {
549549
550550 // Takes a snapshot of the keyboard's window
551- UIView *keyboardSnapshot = [keyboardWindow snapshotViewAfterScreenUpdates: NO ];
551+ UIView *snapshotView = [keyboardWindow snapshotViewAfterScreenUpdates: NO ];
552552
553553 // Shifts the snapshot up to fit to the bottom
554- CGRect snapshowFrame = keyboardSnapshot .frame ;
554+ CGRect snapshowFrame = snapshotView .frame ;
555555 snapshowFrame.origin .y = CGRectGetHeight (self.inputAccessoryView .keyboardViewProxy .frame ) - CGRectGetHeight (self.superview .frame );
556- keyboardSnapshot .frame = snapshowFrame;
556+ snapshotView .frame = snapshowFrame;
557557
558558 CGRect mockframe = self.inputAccessoryView .keyboardViewProxy .frame ;
559559 mockframe.origin .y = CGRectGetHeight (self.frame );
560560
561- _keyboardMockView = [[UIView alloc ] initWithFrame: mockframe];
562- _keyboardMockView .backgroundColor = [UIColor clearColor ];
563- [_keyboardMockView addSubview: keyboardSnapshot ];
561+ self. keyboardPlaceholderView = [[UIView alloc ] initWithFrame: mockframe];
562+ self. keyboardPlaceholderView .backgroundColor = [UIColor clearColor ];
563+ [self .keyboardPlaceholderView addSubview: snapshotView ];
564564
565- // Adds the mock view to the input bar, so when it moves they are glued together
566- [self addSubview: _keyboardMockView ];
565+ // Adds the placeholder view to the input bar, so when it looks they are sticked together.
566+ [self addSubview: self .keyboardPlaceholderView ];
567567
568568 // Let's delay hiding the keyboard's window to avoid noticeable glitches
569569 dispatch_after (dispatch_time (DISPATCH_TIME_NOW, (int64_t )(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue (), ^{
570570 keyboardWindow.hidden = YES ;
571571 });
572572 }
573- else if (_keyboardMockView && !show) {
573+ else if (_keyboardPlaceholderView && !show) {
574574
575- [_keyboardMockView removeFromSuperview ];
576- _keyboardMockView = nil ;
575+ [_keyboardPlaceholderView removeFromSuperview ];
576+ _keyboardPlaceholderView = nil ;
577577
578578 keyboardWindow.hidden = NO ;
579579 }
0 commit comments