diff --git a/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.h b/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.h index 4282c505d..503441a52 100644 --- a/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.h +++ b/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.h @@ -205,7 +205,7 @@ typedef enum : NSUInteger UIView *messageComposerContainer; @protected - UIView *inputAccessoryView; + UIView *inputAccessoryViewForKeyboard; } /** @@ -333,7 +333,7 @@ typedef enum : NSUInteger actually used to retrieve the keyboard view. Indeed the keyboard view is the superview of the accessory view when the message composer become the first responder. */ -@property (readonly) UIView *inputAccessoryView; +@property (readonly) UIView *inputAccessoryViewForKeyboard; /** Display the keyboard. diff --git a/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.m b/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.m index 40d0d5356..61933d8d9 100644 --- a/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.m +++ b/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarView.m @@ -61,7 +61,7 @@ @end @implementation MXKRoomInputToolbarView -@synthesize messageComposerContainer, inputAccessoryView; +@synthesize messageComposerContainer, inputAccessoryViewForKeyboard; + (UINib *)nib { @@ -103,7 +103,7 @@ - (void)dealloc { - inputAccessoryView = nil; + inputAccessoryViewForKeyboard = nil; [self destroy]; } diff --git a/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarViewWithSimpleTextView.m b/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarViewWithSimpleTextView.m index 3cdb38eda..c48bfda5a 100644 --- a/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarViewWithSimpleTextView.m +++ b/Riot/Modules/MatrixKit/Views/RoomInputToolbar/MXKRoomInputToolbarViewWithSimpleTextView.m @@ -30,8 +30,8 @@ [super awakeFromNib]; // Add an accessory view to the text view in order to retrieve keyboard view. - inputAccessoryView = [[UIView alloc] initWithFrame:CGRectZero]; - self.messageComposerTextView.inputAccessoryView = self.inputAccessoryView; + inputAccessoryViewForKeyboard = [[UIView alloc] initWithFrame:CGRectZero]; + self.messageComposerTextView.inputAccessoryView = inputAccessoryViewForKeyboard; } -(void)customizeViewRendering diff --git a/Riot/Modules/Room/MXKRoomViewController.m b/Riot/Modules/Room/MXKRoomViewController.m index ffb91024b..2002d7344 100644 --- a/Riot/Modules/Room/MXKRoomViewController.m +++ b/Riot/Modules/Room/MXKRoomViewController.m @@ -495,7 +495,7 @@ if (!keyboardView) { // Check whether the first responder is the input tool bar text composer - keyboardView = inputToolbarView.inputAccessoryView.superview; + keyboardView = inputToolbarView.inputAccessoryViewForKeyboard.superview; } // Report the keyboard view in order to track keyboard frame changes diff --git a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m index 40f177fe2..cd57bd0ed 100644 --- a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m +++ b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m @@ -80,6 +80,9 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3; [self updateUIWithAttributedTextMessage:nil animated:NO]; self.textView.toolbarDelegate = self; + + inputAccessoryViewForKeyboard = [[UIView alloc] initWithFrame:CGRectZero]; + self.textView.inputAccessoryView = inputAccessoryViewForKeyboard; } - (void)setVoiceMessageToolbarView:(UIView *)voiceMessageToolbarView