从底部弹起来,及消失到底部
POPBasicAnimation
#import <pop/pop.h>
- (void)viewDidLoad {
self.talkBar = [[UIView alloc] init];
[self.view addSubview:_talkBar];
[_talkBar mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(wbSelf.view);
make.bottom.mas_equalTo(wbSelf.view).offset(50);
make.size.mas_equalTo(CGSizeMake(WIDTH,50));
}];
- (void) popTalkBar{
POPBasicAnimation *anBasic = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerPositionY];
anBasic.toValue = @(self.talkBar.center.y-100);
anBasic.beginTime = CACurrentMediaTime() + 0.2f;
[self.talkBar pop_addAnimation:anBasic forKey:@"position"];
}
- (void) disTalkBar{
POPBasicAnimation *anBasic = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerPositionY];
anBasic.toValue = @(self.view.height+50);
anBasic.beginTime = CACurrentMediaTime() + 0.2f;
[self.talkBar pop_addAnimation:anBasic forKey:@"position"];
}