Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Commit 3807019

Browse files
author
ignacio
committed
Makes sure to never set textInputbar hidden twice. No need to different animation duration anymore.
1 parent 63701ce commit 3807019

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Source/Classes/SLKTextViewController.m

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -834,9 +834,9 @@ - (void)setTextInputbarHidden:(BOOL)hidden
834834

835835
- (void)setTextInputbarHidden:(BOOL)hidden animated:(BOOL)animated
836836
{
837-
// if (self.isTextInputbarHidden == hidden) {
838-
// return;
839-
// }
837+
if (self.isTextInputbarHidden == hidden) {
838+
return;
839+
}
840840

841841
__weak typeof(self) weakSelf = self;
842842

@@ -858,9 +858,7 @@ - (void)setTextInputbarHidden:(BOOL)hidden animated:(BOOL)animated
858858
};
859859

860860
if (animated) {
861-
NSTimeInterval duration = animated ? 0.25 : 0.0;
862-
863-
[UIView animateWithDuration:duration animations:animations completion:completion];
861+
[UIView animateWithDuration:0.25 animations:animations completion:completion];
864862
}
865863
else {
866864
animations();

0 commit comments

Comments
 (0)