@@ -421,8 +421,11 @@
|
||||
model.image = image;
|
||||
CGFloat width = image.size.width <= 0 ? kGetScaleWidth(60) : image.size.width;
|
||||
CGFloat height = image.size.height ;
|
||||
CGFloat getHeigth = KScreenWidth * height / width;
|
||||
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, getHeigth) ];
|
||||
CGFloat getHeight = KScreenWidth * height / width;
|
||||
if (getHeight > 100) {
|
||||
getHeight = 100;
|
||||
}
|
||||
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, getHeight) ];
|
||||
[self showGeneralFloatingScreenView:bannerView model:model];
|
||||
|
||||
}fail:^(NSError * _Nonnull error) {
|
||||
@@ -448,6 +451,7 @@
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:bannerView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(bannerView.frame.size.width / 2, bannerView.center.y)];
|
||||
@kWeakify(self);
|
||||
[springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
if (finished) {
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
@@ -457,7 +461,7 @@
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
// @kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
|
Reference in New Issue
Block a user