-
-
Save gliubc/44c15729d1c13954c7d8f5cb6cbe9ee0 to your computer and use it in GitHub Desktop.
animateWithDuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[UIView animateWithDuration:0.3f animations:^{ | |
self.tabMenuIndicator.frame = CGRectMake(200, 0, 50, 5); | |
}]; | |
- (void)showFilter { | |
self.mainVC.viewFilterMask.hidden = NO; | |
self.mainVC.viewFilterMask.alpha = 0; | |
self.mainVC.constraintFilterLeadingInvisible.active = NO; | |
self.mainVC.constraintFilterLeadingVisible.active = YES; | |
[UIView animateWithDuration:0.4 animations:^{ | |
[self.mainVC.view layoutIfNeeded]; | |
self.mainVC.viewFilterMask.alpha = 1; | |
}]; | |
} | |
- (void)hideFilter { | |
self.mainVC.constraintFilterLeadingVisible.active = NO; | |
self.mainVC.constraintFilterLeadingInvisible.active = YES; | |
[UIView animateWithDuration:0.4 animations:^{ | |
[self.mainVC.view layoutIfNeeded]; | |
self.mainVC.viewFilterMask.alpha = 0; | |
} completion:^(BOOL finished) { | |
self.mainVC.viewFilterMask.hidden = YES; | |
}]; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment