Skip to content

Commit

Permalink
Merge pull request #72 from e-sung/master
Browse files Browse the repository at this point in the history
feat: use placeholder as accessibility value when placeholder is visible
  • Loading branch information
devxoul committed Jan 30, 2020
2 parents 90c8609 + e781c62 commit b6e6b13
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 b6e6b13

Please sign in to comment.