Skip to content

Commit 48cd1d8

Browse files
authored
Merge pull request #5 from AzimoLabs/added_support_for_attributedPlaceholder_issue_#4
added support for attributedPlaceholder - issue #4
2 parents 1163ff6 + 1ad3d4d commit 48cd1d8

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

SMFloatingLabelTextField.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'SMFloatingLabelTextField'
11-
s.version = '0.2.0'
11+
s.version = '0.3.0'
1212
s.summary = 'A subclass of UITextField that displays floating placeholder'
1313

1414
# This description is used to generate tags and improve search results.

SMFloatingLabelTextField/Classes/SMFloatingLabelTextField.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ - (void)setPlaceholder:(NSString *)placeholder {
172172
self.floatingLabel.text = placeholder;
173173
}
174174

175+
- (void)setAttributedPlaceholder:(NSAttributedString *)attributedPlaceholder {
176+
[super setAttributedPlaceholder:attributedPlaceholder];
177+
self.floatingLabel.attributedText = attributedPlaceholder;
178+
}
179+
175180
#pragma mark - dealloc
176181

177182
- (void)dealloc {

0 commit comments

Comments
 (0)