直播列表loading优化
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data];
|
||||
[[self getView] getAnchorRoomListSuccess:array];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] getAnchorRoomListFail];
|
||||
} errorToast:NO] singleRoomSortId:tabId ? tabId : @""];
|
||||
}
|
||||
|
||||
|
@@ -20,5 +20,7 @@
|
||||
|
||||
///获取个播房成功
|
||||
- (void)getAnchorRoomListSuccess:(NSArray<HomeRecommendRoomModel *> *)array;
|
||||
///获取个播房失败
|
||||
- (void)getAnchorRoomListFail;
|
||||
|
||||
@end
|
||||
|
@@ -12,6 +12,7 @@
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XCHUDTool.h"
|
||||
///View
|
||||
#import "XPHomeHapppyRoomTableViewCell.h"
|
||||
#import "XPHomeBannerTableViewCell.h"
|
||||
@@ -35,6 +36,9 @@
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray *datasource;
|
||||
|
||||
@property (nonatomic, assign) BOOL hadLoad;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPHomeLivePageViewController
|
||||
@@ -61,7 +65,10 @@
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
if (!self.hadLoad) {
|
||||
self.hadLoad = YES;
|
||||
[XCHUDTool showAnchorLoading];
|
||||
}
|
||||
[self headerRefresh];
|
||||
}
|
||||
|
||||
@@ -142,6 +149,12 @@
|
||||
[self.datasource removeAllObjects];
|
||||
[self.datasource addObjectsFromArray:array];
|
||||
[self.collectionView reloadData];
|
||||
[XCHUDTool hideHUD];
|
||||
}
|
||||
|
||||
///获取个播房失败
|
||||
- (void)getAnchorRoomListFail {
|
||||
[XCHUDTool hideHUD];
|
||||
}
|
||||
|
||||
- (void)getHomeMoreAnchorRoomListFail:(NSString *)messag {
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#import "XPHtmlUrl.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
#import "XPWeakTimer.h"
|
||||
#import "XCHUDTool.h"
|
||||
///Model
|
||||
#import "HomeLiveTagModel.h"
|
||||
#import "HomeLiveLookRecordModel.h"
|
||||
@@ -75,7 +74,6 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[XCHUDTool showAnchorLoading];
|
||||
[self initHeaderAndFooterRrfresh];
|
||||
[self initSubViews];
|
||||
[self addTimer];
|
||||
@@ -161,7 +159,6 @@
|
||||
self.titleView.titles = self.titles;
|
||||
[self.titleView reloadData];
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
[XCHUDTool hideHUD];
|
||||
}
|
||||
|
||||
- (void)getHomeLiveTagListFail:(NSArray<HomeLiveTagModel *> *)array {
|
||||
@@ -176,7 +173,6 @@
|
||||
self.titleView.titles = self.titles;
|
||||
[self.titleView reloadData];
|
||||
[self.pagingView.mainTableView.mj_header endRefreshing];
|
||||
[XCHUDTool hideHUD];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
|
Reference in New Issue
Block a user