Skip to content

Commit

Permalink
[Dialogs] Set dialog message accessibilityFrame based on visible mess…
Browse files Browse the repository at this point in the history
…age text (#8786)
  • Loading branch information
bryanoltman committed Nov 12, 2019
1 parent f791b57 commit c83333f
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -673,6 +673,12 @@ - (void)layoutSubviews {
CGRectGetHeight(self.bounds) - actionsScrollViewRect.size.height;
self.contentScrollView.frame = contentScrollViewRect;
}

CGRect messageFrameInWindow = [self convertRect:self.messageLabel.frame toView:self.window];
CGRect contentScrollFrameInWindow = [self convertRect:self.contentScrollView.frame
toView:self.window];
CGRect visibleMessageRect = CGRectIntersection(messageFrameInWindow, contentScrollFrameInWindow);
self.messageLabel.accessibilityFrame = visibleMessageRect;
}

#pragma mark - Dynamic Type
Expand Down

0 comments on commit c83333f

Please sign in to comment.