Skip to content

Commit

Permalink
Merge branch 'placeholder-align' of https://github.com/fannt/SZTextView
Browse files Browse the repository at this point in the history
… into fannt-placeholder-align
  • Loading branch information
glaszig committed Apr 22, 2024
2 parents 0e33617 + be98581 commit 56e9b6f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions SZTextView/Sources/SZTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ FOUNDATION_EXPORT const unsigned char SZTextViewVersionString[];
@property (nonatomic) IBInspectable double fadeTime;
@property (copy, nonatomic) NSAttributedString *attributedPlaceholder;
@property (retain, nonatomic) UIColor *placeholderTextColor UI_APPEARANCE_SELECTOR;
@property (assign, nonatomic) NSTextAlignment placeholderTextAlignment;

@end
10 changes: 10 additions & 0 deletions SZTextView/Sources/SZTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,16 @@ - (UIColor *)placeholderTextColor
return self._placeholderTextView.textColor;
}

- (void)setPlaceholderTextAlignment:(NSTextAlignment)placeholderTextAlignment
{
self._placeholderTextView.textAlignment = self.placeholderTextAlignment;
}

- (NSTextAlignment)placeholderTextAlignment
{
return self._placeholderTextView.textAlignment;
}

- (void)textDidChange:(NSNotification *)aNotification
{
[self setPlaceholderVisibleForText:self.text];
Expand Down

0 comments on commit 56e9b6f

Please sign in to comment.