- 当用一个UILabel或者其他作为提示输入错误信息的时候,为了使错误信息引起用户注意,可以采取增加一个动画效果,例如:
- [UIView animateWithDuration:.1 animations:^{
- self.errorLabel.alpha = 0.0;
- } completion:^(BOOL finished) {
- [UIView animateWithDuration:.1 animations:^{
- self.errorLabel.alpha = 1.0;
- self.errorLabel.text = @"密码或用户名错误,请重试!";
- } completion:^(BOOL finished) {
- }];
- }];