新人充值优惠转场动画

This commit is contained in:
chenguilong
2022-08-03 15:57:14 +08:00
parent d7afbee4cd
commit 128eb97af3
6 changed files with 96 additions and 1 deletions

View File

@@ -23,6 +23,7 @@
#import "MainProtocol.h"
///VC
#import "XPMineRechargeViewController.h"
#import "XPNewUserRechargePresentTrasition.h"
@interface XPNewUserRechargeViewController ()<MainProtocol, UICollectionViewDelegate, UICollectionViewDataSource>
///View
@@ -53,6 +54,9 @@
@property (nonatomic,strong) NSArray<FirstRechargeModel *> *originArray;
///
@property (nonatomic,weak) UINavigationController * currentNav;
///
@property (nonatomic, strong) XPNewUserRechargePresentTrasition *animatedTransition;
@end
@implementation XPNewUserRechargeViewController
@@ -74,6 +78,9 @@
[self.presenter getNewUserRechargeList];
[self initSubViews];
[self initSubViewConstraints];
if (self.hadAnimate) {
self.transitioningDelegate = self;
}
}
#pragma mark - Private Method
@@ -276,6 +283,10 @@
sender.selected = !sender.selected;
}
- (nullable id <UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed{
return self.animatedTransition;
}
#pragma mark - Getters And Setters
- (UICollectionView *)collectionView{
if (!_collectionView) {
@@ -375,4 +386,11 @@
return _segmentView;
}
- (XPNewUserRechargePresentTrasition *)animatedTransition {
if (!_animatedTransition) {
_animatedTransition = [[XPNewUserRechargePresentTrasition alloc] init];
}
return _animatedTransition;
}
@end