增加防抓包hook,登录mqtt,退出登录时不传token
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#import "QXHomeRoomCell.h"
|
||||
#import <SDCycleScrollView.h>
|
||||
#import "QXBanner.h"
|
||||
#import "QXTimer.h"
|
||||
#import "QXHomePageNetwork.h"
|
||||
|
||||
|
||||
@@ -24,6 +25,7 @@
|
||||
@property (nonatomic,assign)NSInteger currentIndex;
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
@property (nonatomic,strong)NSMutableArray *topArray;
|
||||
@property (nonatomic,strong)QXTimer *timer;
|
||||
@end
|
||||
|
||||
@implementation QXAppstoreHomeView
|
||||
@@ -71,9 +73,9 @@
|
||||
[self getTopRoomList];
|
||||
[self getAllRoomList];
|
||||
}
|
||||
-(void)startAnimate{
|
||||
[self performSelector:@selector(startOptimizedInfiniteFlip) afterDelay:3];
|
||||
}
|
||||
//-(void)startAnimate{
|
||||
// [self performSelector:@selector(startOptimizedInfiniteFlip) afterDelay:3];
|
||||
//}
|
||||
|
||||
//-(void)setDataArray:(NSArray *)dataArray{
|
||||
// _dataArray = dataArray;
|
||||
@@ -104,7 +106,7 @@
|
||||
weakSelf.roomModel = list.firstObject;
|
||||
weakSelf.rommView.roomModel = weakSelf.roomModel;
|
||||
[weakSelf.topArray addObjectsFromArray:list];
|
||||
[weakSelf startAnimate];
|
||||
[weakSelf startTimer];
|
||||
}
|
||||
[self.scrollView.mj_header endRefreshing];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
@@ -126,6 +128,20 @@
|
||||
[self.scrollView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
-(void)startTimer{
|
||||
MJWeakSelf
|
||||
[self stopTimer];
|
||||
_timer = [QXTimer scheduledTimerWithTimeInterval:5 repeats:YES queue:dispatch_get_main_queue() block:^{
|
||||
QXLOG(@"动画3s执行");
|
||||
[weakSelf startOptimizedInfiniteFlip];
|
||||
}];
|
||||
// CABasicAnimation *scaleAnim = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
|
||||
// scaleAnim.duration = 1.5/2;
|
||||
// scaleAnim.autoreverses = YES;
|
||||
// scaleAnim.fromValue = @1.0;
|
||||
// scaleAnim.toValue = @1.1;
|
||||
// [self.rommView.layer addAnimation:scaleAnim forKey:@"scaleAnimation"];
|
||||
}
|
||||
- (void)startOptimizedInfiniteFlip {
|
||||
self.currentIndex++;
|
||||
if (self.currentIndex > self.topArray.count-1) {
|
||||
@@ -149,18 +165,19 @@
|
||||
// self.isFront = !self.isFront;
|
||||
|
||||
// 添加延迟后继续动画
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self startOptimizedInfiniteFlip];
|
||||
});
|
||||
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
// [self startOptimizedInfiniteFlip];
|
||||
// });
|
||||
}];
|
||||
|
||||
// 添加辅助动画(轻微弹跳效果)
|
||||
CABasicAnimation *scaleAnim = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
|
||||
scaleAnim.duration = flipDuration/2;
|
||||
scaleAnim.autoreverses = YES;
|
||||
scaleAnim.fromValue = @1.0;
|
||||
scaleAnim.toValue = @1.1;
|
||||
[self.rommView.layer addAnimation:scaleAnim forKey:@"scaleAnimation"];
|
||||
|
||||
}
|
||||
-(void)stopTimer{
|
||||
if (_timer) {
|
||||
[_timer invalidate];
|
||||
_timer = nil;
|
||||
}
|
||||
}
|
||||
#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout
|
||||
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
|
||||
|
||||
Reference in New Issue
Block a user