Skip to content

Commit

Permalink
Fix bug with <InputAccessoryView> safe area conformance
Browse files Browse the repository at this point in the history
Reviewed By: wwalser

Differential Revision: D7507732

fbshipit-source-id: 10bf8d58c65f1353a3e62a27fc74c2dfd73ac2c4
  • Loading branch information
Peter Argany authored and facebook-github-bot committed Apr 4, 2018
1 parent e574b85 commit 490f22a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Libraries/Text/TextInput/RCTInputAccessoryViewContent.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,13 @@ - (void)didMoveToSuperview
{

#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
// Avoid the home pill (in portrait mode) and notch (in landscape mode) on iPhoneX.
// Avoid the home pill (in portrait mode)
// TODO: Support rotation, anchor to left and right without breaking frame x coordinate (T27974328).
if (@available(iOS 11.0, *)) {
if (self.window) {
[_safeAreaContainer.bottomAnchor
constraintLessThanOrEqualToSystemSpacingBelowAnchor:self.window.safeAreaLayoutGuide.bottomAnchor
multiplier:1.0f].active = YES;
[_safeAreaContainer.leftAnchor
constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:self.window.safeAreaLayoutGuide.leftAnchor
multiplier:1.0f].active = YES;
[_safeAreaContainer.rightAnchor
constraintLessThanOrEqualToSystemSpacingAfterAnchor:self.window.safeAreaLayoutGuide.rightAnchor
multiplier:1.0f].active = YES;
}
}
#endif
Expand Down

0 comments on commit 490f22a

Please sign in to comment.