I have tried the swift example of JSQMessageViewController inside iOS 11 simulator. Here is the result:screenshot
I have tried using safe area margin an
Check this response:
Which state:
JSQMessagesInputToolbar class, andOverride didMoveToWindow method to add this code:
- (void)didMoveToWindow {
[super didMoveToWindow];
NSLog(@"didMoveToWindow");
if (@available(iOS 11.0, *)) {
UILayoutGuide * _Nonnull safeArea = self.window.safeAreaLayoutGuide;
if (safeArea) {
NSLayoutYAxisAnchor * _Nonnull bottomAnchor = safeArea.bottomAnchor;
[[self bottomAnchor] constraintLessThanOrEqualToSystemSpacingBelowAnchor:bottomAnchor multiplier:1.0].active = YES;
}
}
}
Note: Creating interface is preferred over changing the class. Because if you used cocoa pods then each time you updated pods your changes will be overwritten.
I have checked it with iPhone XR (Simulator) and iPhone 7 (Device) it works fine.