LuxChat  2.0
Instant messenger for iOS
Instance Methods | Properties | List of all members
JSQMessagesKeyboardController Class Reference

#import <JSQMessagesKeyboardController.h>

Inheritance diagram for JSQMessagesKeyboardController:

Instance Methods

(instancetype) - initWithTextView:contextView:panGestureRecognizer:delegate:
 
(void) - beginListeningForKeyboard
 
(void) - endListeningForKeyboard
 

Properties

id< JSQMessagesKeyboardControllerDelegatedelegate
 
UITextView * textView
 
UIView * contextView
 
UIPanGestureRecognizer * panGestureRecognizer
 
CGPoint keyboardTriggerPoint
 
BOOL keyboardIsVisible
 
CGRect currentKeyboardFrame
 

Detailed Description

An instance of JSQMessagesKeyboardController manages responding to the hiding and showing of the system keyboard for editing its textView within its specified contextView. It also controls user interaction with the system keyboard via its panGestureRecognizer, allow the user to interactively pan the keyboard up and down in the contextView.

When the system keyboard frame changes, it posts the JSQMessagesKeyboardControllerNotificationKeyboardDidChangeFrame.

Method Documentation

- (void) beginListeningForKeyboard

Tells the keyboard controller that it should begin listening for system keyboard notifications.

- (void) endListeningForKeyboard

Tells the keyboard controller that it should end listening for system keyboard notifications.

- (instancetype) initWithTextView: (UITextView *)  textView
contextView: (UIView *)  contextView
panGestureRecognizer: (UIPanGestureRecognizer *)  panGestureRecognizer
delegate: (id<JSQMessagesKeyboardControllerDelegate>)  delegate 

Creates a new keyboard controller object with the specified textView, contextView, panGestureRecognizer, and delegate.

Parameters
textViewThe text view in which the user is editing with the system keyboard. This value must not be nil.
contextViewThe view in which the keyboard will be shown. This should be the parent or a sibling of textView. This value must not be nil.
panGestureRecognizerThe pan gesture recognizer responsible for handling user interaction with the system keyboard. This value must not be nil.
delegateThe object that acts as the delegate of the keyboard controller.
Returns
An initialized JSQMessagesKeyboardController if created successfully, nil otherwise.

Property Documentation

- (UIView*) contextView
readnonatomicweak

The view in which the keyboard will be shown. This should be the parent or a sibling of textView.

- (CGRect) currentKeyboardFrame
readnonatomicassign

Returns the current frame of the keyboard if it is visible, otherwise CGRectNull.

- (id<JSQMessagesKeyboardControllerDelegate>) delegate
readwritenonatomicweak

The object that acts as the delegate of the keyboard controller.

- (BOOL) keyboardIsVisible
readnonatomicassign

Returns YES if the keyboard is currently visible, NO otherwise.

- (CGPoint) keyboardTriggerPoint
readwritenonatomicassign

Specifies the distance from the keyboard at which the panGestureRecognizer should trigger user interaction with the keyboard by panning.

The x value of the point is not used.

- (UIPanGestureRecognizer*) panGestureRecognizer
readnonatomicweak

The pan gesture recognizer responsible for handling user interaction with the system keyboard.

- (UITextView*) textView
readnonatomicweak

The text view in which the user is editing with the system keyboard.


The documentation for this class was generated from the following files: