Skip to content

Commit

Permalink
Fix Comments reply section constraints to respect safe area
Browse files Browse the repository at this point in the history
  • Loading branch information
justtwago committed Feb 20, 2024
1 parent fa40a37 commit ffa6e33
Showing 1 changed file with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,20 +401,11 @@ - (void)configureViewConstraints
metrics:nil
views:views]];

// ReplyTextView Constraints
[[self.replyTextView.leftAnchor constraintEqualToAnchor:self.tableView.leftAnchor] setActive:YES];
[[self.replyTextView.rightAnchor constraintEqualToAnchor:self.tableView.rightAnchor] setActive:YES];

self.replyTextViewBottomConstraint = [NSLayoutConstraint constraintWithItem:self.view
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:self.replyTextView
attribute:NSLayoutAttributeBottom
multiplier:1.0
constant:0.0];
self.replyTextViewBottomConstraint.priority = UILayoutPriorityDefaultHigh;

[self.view addConstraint:self.replyTextViewBottomConstraint];
[NSLayoutConstraint activateConstraints:@[
[self.replyTextView.leadingAnchor constraintEqualToAnchor:self.replyTextView.leadingAnchor],
[self.replyTextView.trailingAnchor constraintEqualToAnchor:self.replyTextView.trailingAnchor],
[self.view.keyboardLayoutGuide.topAnchor constraintEqualToAnchor:self.replyTextView.bottomAnchor]
]];

// Suggestions Constraints
// Pin the suggestions view left and right edges to the reply view edges
Expand Down

0 comments on commit ffa6e33

Please sign in to comment.