Skip to content

Commit

Permalink
feat: use placeholder as accessibility value when placeholder is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
e-sung committed Jan 5, 2020
1 parent 90c8609 commit e781c62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/UITextView+Placeholder.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
- (void)updatePlaceholderTextView {
if (self.text.length) {
[self.placeholderTextView removeFromSuperview];
self.accessibilityValue = self.text;
} else {
[self insertSubview:self.placeholderTextView atIndex:0];
self.accessibilityValue = self.placeholder;
}

if (self.needsUpdateFont) {
Expand Down

0 comments on commit e781c62

Please sign in to comment.