File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -336,12 +336,9 @@ - (void)layoutPlaceholderLabelAnimated:(BOOL)animated
336336{
337337 if (self.shouldShowPlaceholder ) {
338338 [self updatePlaceholderColor ];
339-
340- if (self.placeholderIsHidden ) {
341- [self showPlaceholderLabelAnimated: animated];
342- }
339+ [self showPlaceholderLabelAnimated: animated];
343340 }
344- else if (!self. placeholderIsHidden ) {
341+ else {
345342 [self hidePlaceholderLabelAnimated: animated];
346343 }
347344}
@@ -423,6 +420,10 @@ - (void)showPlaceholderLabelAnimated:(BOOL)animated
423420 // Call setPlaceholder on super so placeholderAttributedString is not set to nil
424421 [super setPlaceholder: nil ];
425422 }
423+
424+ if (!self.placeholderIsHidden ) {
425+ return ;
426+ }
426427
427428 if (animated && !self.placeholderIsAnimating ) {
428429 [self .superview layoutIfNeeded ];
@@ -452,6 +453,10 @@ - (void)showPlaceholderLabelAnimated:(BOOL)animated
452453
453454- (void )hidePlaceholderLabelAnimated : (BOOL )animated
454455{
456+ if (self.placeholderIsHidden ) {
457+ return ;
458+ }
459+
455460 CGFloat finalDistanceFromTop = CGRectGetMinY (self.textRect ) / 2 .0f ;
456461
457462 if (self.placeholderAnimatesOnFocus ) {
You can’t perform that action at this time.
0 commit comments