修复bug
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
///公屏气泡
|
||||
@property (nonatomic, strong) XPDressUpShopListViewController *bubbleView;
|
||||
///轮播图
|
||||
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong) SDCycleScrollView *pi_BannerView;
|
||||
///房间活动的列表
|
||||
@property (nonatomic,copy) NSArray<ActivityInfoModel *> *activityList;
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = YMLocalizedString(@"XPDressUpShopViewController1");
|
||||
[self.view addSubview:self.cycleScrollView];
|
||||
[self.view addSubview:self.pi_BannerView];
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.contentView];
|
||||
[self.view addSubview:self.mainView];
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view);
|
||||
make.left.mas_equalTo(15);
|
||||
make.right.mas_equalTo(-15);
|
||||
@@ -106,7 +106,7 @@
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(50);
|
||||
make.top.mas_equalTo(self.cycleScrollView.mas_bottom);
|
||||
make.top.mas_equalTo(self.pi_BannerView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -162,7 +162,7 @@
|
||||
if (code == 200) {
|
||||
NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
|
||||
if (array.count <= 0) {
|
||||
[self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(0);
|
||||
}];
|
||||
return;
|
||||
@@ -174,15 +174,15 @@
|
||||
[picList addObject:obj.bannerPic];
|
||||
}
|
||||
}];
|
||||
self.cycleScrollView.imageURLStringsGroup = picList;
|
||||
self.pi_BannerView.imageURLStringsGroup = picList;
|
||||
if (array.count > 1) {
|
||||
[self.cycleScrollView setAutoScroll:YES];
|
||||
self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
[self.pi_BannerView setAutoScroll:YES];
|
||||
self.pi_BannerView.autoScrollTimeInterval = 3;
|
||||
} else {
|
||||
[self.cycleScrollView setAutoScroll:NO];
|
||||
[self.pi_BannerView setAutoScroll:NO];
|
||||
}
|
||||
} else {
|
||||
[self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(0);
|
||||
}];
|
||||
}
|
||||
@@ -322,18 +322,18 @@
|
||||
return _bubbleView;
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_cycleScrollView.currentPageDotColor = [UIColor whiteColor];
|
||||
_cycleScrollView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.15];
|
||||
_cycleScrollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_cycleScrollView.layer.masksToBounds = YES;
|
||||
_cycleScrollView.layer.cornerRadius = 12;
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_pi_BannerView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_pi_BannerView.currentPageDotColor = [UIColor whiteColor];
|
||||
_pi_BannerView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.15];
|
||||
_pi_BannerView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_pi_BannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_pi_BannerView.layer.masksToBounds = YES;
|
||||
_pi_BannerView.layer.cornerRadius = 12;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
|
||||
- (UIView *)mainView {
|
||||
|
@@ -41,7 +41,7 @@
|
||||
///公屏气泡
|
||||
@property (nonatomic, strong) XPMineDressUpBubbleViewController *bubbleView;
|
||||
///轮播图
|
||||
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong) SDCycleScrollView *pi_BannerView;
|
||||
///房间活动的列表
|
||||
@property (nonatomic,copy) NSArray<ActivityInfoModel *> *activityList;
|
||||
@end
|
||||
@@ -58,13 +58,13 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = YMLocalizedString(@"XPMineDressUpViewController0");
|
||||
[self.view addSubview:self.cycleScrollView];
|
||||
[self.view addSubview:self.pi_BannerView];
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.contentView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.view);
|
||||
make.left.mas_equalTo(15);
|
||||
make.right.mas_equalTo(-15);
|
||||
@@ -74,7 +74,7 @@
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(50);
|
||||
make.top.mas_equalTo(self.cycleScrollView.mas_bottom);
|
||||
make.top.mas_equalTo(self.pi_BannerView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -88,7 +88,7 @@
|
||||
if (code == 200) {
|
||||
NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
|
||||
if (array.count <= 0) {
|
||||
[self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(0);
|
||||
}];
|
||||
return;
|
||||
@@ -100,15 +100,15 @@
|
||||
[picList addObject:obj.bannerPic];
|
||||
}
|
||||
}];
|
||||
self.cycleScrollView.imageURLStringsGroup = picList;
|
||||
self.pi_BannerView.imageURLStringsGroup = picList;
|
||||
if (array.count > 1) {
|
||||
[self.cycleScrollView setAutoScroll:YES];
|
||||
self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
[self.pi_BannerView setAutoScroll:YES];
|
||||
self.pi_BannerView.autoScrollTimeInterval = 3;
|
||||
} else {
|
||||
[self.cycleScrollView setAutoScroll:NO];
|
||||
[self.pi_BannerView setAutoScroll:NO];
|
||||
}
|
||||
} else {
|
||||
[self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(0);
|
||||
}];
|
||||
}
|
||||
@@ -236,18 +236,18 @@
|
||||
return _bubbleView;
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_cycleScrollView.currentPageDotColor = [UIColor whiteColor];
|
||||
_cycleScrollView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.15];
|
||||
_cycleScrollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_cycleScrollView.layer.masksToBounds = YES;
|
||||
_cycleScrollView.layer.cornerRadius = 12;
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_pi_BannerView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_pi_BannerView.currentPageDotColor = [UIColor whiteColor];
|
||||
_pi_BannerView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.15];
|
||||
_pi_BannerView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_pi_BannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_pi_BannerView.layer.masksToBounds = YES;
|
||||
_pi_BannerView.layer.cornerRadius = 12;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface XPMineUserInfoHeaderView : UIView
|
||||
@property (nonatomic,strong) UserInfoModel *userInfo;
|
||||
///轮播图
|
||||
@property (nonatomic,strong, readonly) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong, readonly) SDCycleScrollView *pi_BannerView;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPMineUserInfoHeaderViewDelegate> delegate;
|
||||
///当前查看用户是否在直播
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
@interface XPMineUserInfoHeaderView ()<SDCycleScrollViewDelegate, SDPhotoBrowserDelegate>
|
||||
///轮播图
|
||||
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong) SDCycleScrollView *pi_BannerView;
|
||||
///覆盖的view
|
||||
@property (nonatomic,strong) UIImageView * coverImageView;
|
||||
///显示当前的页数
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.cycleScrollView];
|
||||
[self addSubview:self.pi_BannerView];
|
||||
[self addSubview:self.coverImageView];
|
||||
[self addSubview:self.reviewIcon];
|
||||
[self addSubview:self.userInfoView];
|
||||
@@ -142,13 +142,13 @@
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self);
|
||||
make.height.mas_equalTo(375);
|
||||
}];
|
||||
|
||||
[self.coverImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.cycleScrollView);
|
||||
make.edges.mas_equalTo(self.pi_BannerView);
|
||||
}];
|
||||
|
||||
[self.reviewIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -294,7 +294,7 @@
|
||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
|
||||
NSInteger count = self.imageUrls.count;
|
||||
SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init];
|
||||
browser.sourceImagesContainerView = self.cycleScrollView;
|
||||
browser.sourceImagesContainerView = self.pi_BannerView;
|
||||
browser.delegate = self;
|
||||
browser.imageCount = count;
|
||||
browser.currentImageIndex = index;
|
||||
@@ -385,7 +385,7 @@
|
||||
|
||||
if (imageUrls.count > 0) {
|
||||
self.imageUrls = imageUrls;
|
||||
self.cycleScrollView.imageURLStringsGroup = imageUrls;
|
||||
self.pi_BannerView.imageURLStringsGroup = imageUrls;
|
||||
[self.pageButton setTitle:[NSString stringWithFormat:@"1/%lu",(unsigned long)imageUrls.count] forState:UIControlStateNormal];;
|
||||
// 要初始化一下当前的审核状态
|
||||
self.reviewIcon.hidden = ![self.userPhtotArray objectAtIndex:0].isReview;
|
||||
@@ -523,15 +523,15 @@
|
||||
return _onlineButton;
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImageConstant defalutBannerPlaceholder]];
|
||||
_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||
_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleNone;
|
||||
_cycleScrollView.autoScroll = NO;
|
||||
- (SDCycleScrollView *)pi_BannerView{
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImageConstant defalutBannerPlaceholder]];
|
||||
_pi_BannerView.backgroundColor = [UIColor clearColor];
|
||||
_pi_BannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_pi_BannerView.pageControlStyle = SDCycleScrollViewPageContolStyleNone;
|
||||
_pi_BannerView.autoScroll = NO;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
|
||||
- (UIButton *)pageButton {
|
||||
|
@@ -27,7 +27,7 @@
|
||||
@interface XPMonentTopicContainerViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate>
|
||||
@property (nonatomic,strong) JXCategoryTitleView *categoryView;
|
||||
@property (nonatomic,strong) JXCategoryIndicatorLineView *lineView;
|
||||
@property (nonatomic,strong) JXPagerListRefreshView *pagerView;
|
||||
@property (nonatomic,strong) JXPagerListRefreshView *pagerContentView;
|
||||
@property (nonatomic,strong) NSArray<NSString *> *titles;
|
||||
@property (nonatomic,strong) XPMonentsTopicRecommondViewController *recommendVC;
|
||||
@property (nonatomic,strong) XPMonentsTopicLatestViewController *latestVC;
|
||||
@@ -51,11 +51,11 @@
|
||||
|
||||
- (void)viewDidLayoutSubviews {
|
||||
[super viewDidLayoutSubviews];
|
||||
self.pagerView.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight - 50);
|
||||
self.pagerContentView.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight - 50);
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.pagerView];
|
||||
[self.view addSubview:self.pagerContentView];
|
||||
[self.view addSubview:self.backButton];
|
||||
[self.view addSubview:self.enterTopicButton];
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
_categoryView.titleColorGradientEnabled = YES;
|
||||
_categoryView.titleLabelZoomEnabled = NO;
|
||||
_categoryView.indicators = @[self.lineView];
|
||||
_categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerView.listContainerView;
|
||||
_categoryView.listContainer = (id<JXCategoryViewListContainer>)self.pagerContentView.listContainerView;
|
||||
_categoryView.averageCellSpacingEnabled = NO;
|
||||
_categoryView.contentEdgeInsetLeft = 20;
|
||||
_categoryView.contentEdgeInsetRight = 20;
|
||||
@@ -171,13 +171,13 @@
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
- (JXPagerListRefreshView *)pagerView {
|
||||
if (!_pagerView) {
|
||||
_pagerView = [[JXPagerListRefreshView alloc] initWithDelegate:self];
|
||||
_pagerView.listContainerView.scrollView.backgroundColor = UIColor.clearColor;
|
||||
_pagerView.pinSectionHeaderVerticalOffset = (NSInteger) kNavigationHeight;
|
||||
- (JXPagerListRefreshView *)pagerContentView {
|
||||
if (!_pagerContentView) {
|
||||
_pagerContentView = [[JXPagerListRefreshView alloc] initWithDelegate:self];
|
||||
_pagerContentView.listContainerView.scrollView.backgroundColor = UIColor.clearColor;
|
||||
_pagerContentView.pinSectionHeaderVerticalOffset = (NSInteger) kNavigationHeight;
|
||||
}
|
||||
return _pagerView;
|
||||
return _pagerContentView;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#import "NSArray+Safe.h"
|
||||
#import "UIImageConstant.h"
|
||||
@interface XPHomeBannerTableViewCell ()<SDCycleScrollViewDelegate>
|
||||
@property (nonatomic, strong) SDCycleScrollView *pi_cycleScrollView;
|
||||
@property (nonatomic, strong) SDCycleScrollView *pi_BannerView;
|
||||
@end
|
||||
|
||||
@implementation XPHomeBannerTableViewCell
|
||||
@@ -31,11 +31,11 @@
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.pi_cycleScrollView];
|
||||
[self.contentView addSubview:self.pi_BannerView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.pi_cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView).mas_offset(16);
|
||||
make.bottom.mas_equalTo(self.contentView);
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
@@ -61,31 +61,31 @@
|
||||
}
|
||||
}];
|
||||
if (array.count > 0) {
|
||||
self.pi_cycleScrollView.imageURLStringsGroup = array;
|
||||
[self.pi_cycleScrollView autoScroll];
|
||||
self.pi_BannerView.imageURLStringsGroup = array;
|
||||
[self.pi_BannerView autoScroll];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setIsMineViewBanner:(BOOL)isMineViewBanner {
|
||||
[self.pi_cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)pi_cycleScrollView {
|
||||
if (!_pi_cycleScrollView) {
|
||||
_pi_cycleScrollView = [[SDCycleScrollView alloc] init];
|
||||
_pi_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||
_pi_cycleScrollView.layer.cornerRadius = 10;
|
||||
_pi_cycleScrollView.layer.masksToBounds = YES;
|
||||
_pi_cycleScrollView.delegate = self;
|
||||
_pi_cycleScrollView.showPageControl = NO;
|
||||
_pi_cycleScrollView.autoScrollTimeInterval = 5.0;
|
||||
_pi_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_pi_cycleScrollView.placeholderImage = [UIImageConstant defalutBannerPlaceholder];
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [[SDCycleScrollView alloc] init];
|
||||
_pi_BannerView.backgroundColor = [UIColor clearColor];
|
||||
_pi_BannerView.layer.cornerRadius = 10;
|
||||
_pi_BannerView.layer.masksToBounds = YES;
|
||||
_pi_BannerView.delegate = self;
|
||||
_pi_BannerView.showPageControl = NO;
|
||||
_pi_BannerView.autoScrollTimeInterval = 5.0;
|
||||
_pi_BannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_pi_BannerView.placeholderImage = [UIImageConstant defalutBannerPlaceholder];
|
||||
}
|
||||
return _pi_cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -37,7 +37,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///轮播图
|
||||
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong) SDCycleScrollView *pi_BannerView;
|
||||
///
|
||||
@property (nonatomic,strong) UIView * placeHolderView;
|
||||
///糖果树
|
||||
@@ -77,7 +77,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.stackView];
|
||||
[self.stackView addArrangedSubview:self.cycleScrollView];
|
||||
[self.stackView addArrangedSubview:self.pi_BannerView];
|
||||
[self.stackView addArrangedSubview:self.placeHolderView];
|
||||
[self.stackView addArrangedSubview:self.firstRechargeImageView];
|
||||
[self.stackView addArrangedSubview:self.lookLoveImageView];
|
||||
@@ -90,7 +90,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}];
|
||||
|
||||
CGFloat itemWidth = KScreenHeight > 667 ? 65 : 55 * kScreenHeightScale;
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(itemWidth , itemWidth));
|
||||
}];
|
||||
|
||||
@@ -131,19 +131,19 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
|
||||
dispatch_group_notify(group,dispatch_get_main_queue(), ^{
|
||||
self.isLoadActivity = YES;
|
||||
self.cycleScrollView.hidden = NO;
|
||||
self.pi_BannerView.hidden = NO;
|
||||
///是否包含首充
|
||||
[self configfirstRecharge];
|
||||
NSMutableArray *picArray = [NSMutableArray array];
|
||||
for (ActivityInfoModel *model in self.activityList) {
|
||||
[picArray addObject:model.bannerPic];
|
||||
}
|
||||
self.cycleScrollView.imageURLStringsGroup = picArray;
|
||||
self.pi_BannerView.imageURLStringsGroup = picArray;
|
||||
if (self.activityList.count > 1) {
|
||||
[self.cycleScrollView setAutoScroll:YES];
|
||||
self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
[self.pi_BannerView setAutoScroll:YES];
|
||||
self.pi_BannerView.autoScrollTimeInterval = 3;
|
||||
} else {
|
||||
[self.cycleScrollView setAutoScroll:NO];
|
||||
[self.pi_BannerView setAutoScroll:NO];
|
||||
}
|
||||
});
|
||||
|
||||
@@ -193,12 +193,12 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
for (ActivityInfoModel *model in self.activityList) {
|
||||
[picArray addObject:model.bannerPic];
|
||||
}
|
||||
self.cycleScrollView.imageURLStringsGroup = picArray;
|
||||
self.pi_BannerView.imageURLStringsGroup = picArray;
|
||||
if (self.activityList.count > 1) {
|
||||
[self.cycleScrollView setAutoScroll:YES];
|
||||
self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
[self.pi_BannerView setAutoScroll:YES];
|
||||
self.pi_BannerView.autoScrollTimeInterval = 3;
|
||||
} else {
|
||||
[self.cycleScrollView setAutoScroll:NO];
|
||||
[self.pi_BannerView setAutoScroll:NO];
|
||||
}
|
||||
if (roomInfo.roomModeType == RoomModeType_Open_Blind || roomInfo.roomModeType == RoomModeType_Open_PK_Mode || roomInfo.roomModeType == RoomModeType_Open_Micro_Mode) {
|
||||
if (roomInfo.roomModeType == RoomModeType_Open_PK_Mode ) {
|
||||
@@ -364,24 +364,24 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_cycleScrollView.currentPageDotColor = [UIColor whiteColor];
|
||||
_cycleScrollView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.2];
|
||||
- (SDCycleScrollView *)pi_BannerView{
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_pi_BannerView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_pi_BannerView.currentPageDotColor = [UIColor whiteColor];
|
||||
_pi_BannerView.pageDotColor = [UIColor colorWithWhite:1 alpha:0.2];
|
||||
|
||||
_cycleScrollView.pageControlDotSize = CGSizeMake(5, 2);
|
||||
_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleClassic;
|
||||
_cycleScrollView.currentPageDotImage = [UIImage imageNamed:@"room_activity_banner_select"];
|
||||
_cycleScrollView.pageDotImage = [UIImage imageNamed:@"room_activity_banner_normal"];
|
||||
_cycleScrollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
|
||||
_cycleScrollView.pageControlBottomOffset = -10;
|
||||
_cycleScrollView.hidden = YES;
|
||||
_pi_BannerView.pageControlDotSize = CGSizeMake(5, 2);
|
||||
_pi_BannerView.pageControlStyle = SDCycleScrollViewPageContolStyleClassic;
|
||||
_pi_BannerView.currentPageDotImage = [UIImage imageNamed:@"room_activity_banner_select"];
|
||||
_pi_BannerView.pageDotImage = [UIImage imageNamed:@"room_activity_banner_normal"];
|
||||
_pi_BannerView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_pi_BannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
|
||||
_pi_BannerView.pageControlBottomOffset = -10;
|
||||
_pi_BannerView.hidden = YES;
|
||||
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
|
||||
- (UIView *)placeHolderView {
|
||||
|
@@ -28,7 +28,7 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否
|
||||
///红点
|
||||
@property (nonatomic, strong) UIView *redDotView;
|
||||
///轮播图
|
||||
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong) SDCycleScrollView *pi_BannerView;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *titleArray;
|
||||
|
||||
@@ -48,13 +48,13 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.titleArray = [[NSMutableArray alloc]initWithArray:@[YMLocalizedString(@"XPGiftHeadTypeView4")]];
|
||||
self.cycleScrollView.imageURLStringsGroup = @[@"room_gift_noble_entrance"];
|
||||
self.pi_BannerView.imageURLStringsGroup = @[@"room_gift_noble_entrance"];
|
||||
[self addSubview:self.giftButton];
|
||||
// [self addSubview:self.devideView];
|
||||
// [self addSubview:self.interactButton];
|
||||
[self addSubview:self.redDotView];
|
||||
[self addSubview:self.arrowImageView];
|
||||
[self addSubview:self.cycleScrollView];
|
||||
[self addSubview:self.pi_BannerView];
|
||||
[self addSubview:self.bottomDevideView];
|
||||
self.redDotView.hidden = [[NSUserDefaults standardUserDefaults] boolForKey:kHideGiftViewInteractDot];
|
||||
}
|
||||
@@ -98,7 +98,7 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-16);
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.width.mas_equalTo(70);
|
||||
@@ -166,9 +166,9 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否
|
||||
- (void)setIsShowFirstRecharge:(BOOL)isShowFirstRecharge {
|
||||
if (isShowFirstRecharge) {
|
||||
[self.titleArray addObject:YMLocalizedString(@"XPGiftHeadTypeView1")];
|
||||
NSMutableArray *imageList = [[NSMutableArray alloc]initWithArray:self.cycleScrollView.imageURLStringsGroup];
|
||||
NSMutableArray *imageList = [[NSMutableArray alloc]initWithArray:self.pi_BannerView.imageURLStringsGroup];
|
||||
[imageList addObject:@"gift_first_recharge_bg"];
|
||||
self.cycleScrollView.imageURLStringsGroup = imageList;
|
||||
self.pi_BannerView.imageURLStringsGroup = imageList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,17 +211,17 @@ static NSString *kHideGiftViewInteractDot = @"kHideGiftViewInteractDot";//是否
|
||||
return _bottomDevideView;
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_cycleScrollView.showPageControl = NO;
|
||||
_cycleScrollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
|
||||
_cycleScrollView.pageControlBottomOffset = -10;
|
||||
_cycleScrollView.autoScrollTimeInterval = 5;
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_pi_BannerView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_pi_BannerView.showPageControl = NO;
|
||||
_pi_BannerView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_pi_BannerView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
|
||||
_pi_BannerView.pageControlBottomOffset = -10;
|
||||
_pi_BannerView.autoScrollTimeInterval = 5;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)titleArray {
|
||||
|
@@ -90,7 +90,7 @@
|
||||
@property (nonatomic, strong) UIButton *playBtn;
|
||||
|
||||
///文字轮播
|
||||
@property (nonatomic, strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic, strong) SDCycleScrollView *pi_BannerView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.bgImageView];
|
||||
[self addSubview:self.playBtn];
|
||||
[self addSubview:self.cycleScrollView];
|
||||
[self addSubview:self.pi_BannerView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -123,7 +123,7 @@
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(18));
|
||||
make.centerY.equalTo(self.bgImageView);
|
||||
}];
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kGetScaleWidth(60));
|
||||
make.right.mas_equalTo(-kGetScaleWidth(70));
|
||||
make.top.bottom.mas_equalTo(self.bgImageView);
|
||||
@@ -160,8 +160,8 @@
|
||||
}
|
||||
}
|
||||
if (array.count > 0) {
|
||||
self.cycleScrollView.imageURLStringsGroup = array;
|
||||
[self.cycleScrollView autoScroll];
|
||||
self.pi_BannerView.imageURLStringsGroup = array;
|
||||
[self.pi_BannerView autoScroll];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,17 +186,17 @@
|
||||
return _playBtn;
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [[SDCycleScrollView alloc] init];
|
||||
_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||
_cycleScrollView.layer.masksToBounds = YES;
|
||||
_cycleScrollView.delegate = self;
|
||||
_cycleScrollView.showPageControl = NO;
|
||||
_cycleScrollView.autoScrollTimeInterval = 3.0;
|
||||
[_cycleScrollView disableScrollGesture];
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [[SDCycleScrollView alloc] init];
|
||||
_pi_BannerView.backgroundColor = [UIColor clearColor];
|
||||
_pi_BannerView.layer.masksToBounds = YES;
|
||||
_pi_BannerView.delegate = self;
|
||||
_pi_BannerView.showPageControl = NO;
|
||||
_pi_BannerView.autoScrollTimeInterval = 3.0;
|
||||
[_pi_BannerView disableScrollGesture];
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -22,7 +22,7 @@
|
||||
@interface XPGiftTwelveStarBroadcastView()<SDCycleScrollViewDelegate>
|
||||
|
||||
///轮播
|
||||
@property (nonatomic, strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic, strong) SDCycleScrollView *pi_BannerView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.cycleScrollView];
|
||||
[self addSubview:self.pi_BannerView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(kGetScaleWidth(10));
|
||||
make.right.mas_equalTo(-kGetScaleWidth(10));
|
||||
make.top.bottom.mas_equalTo(self);
|
||||
@@ -78,8 +78,8 @@
|
||||
[array addObject:item.avatar];
|
||||
}
|
||||
if (array.count > 0) {
|
||||
self.cycleScrollView.imageURLStringsGroup = array;
|
||||
[self.cycleScrollView autoScroll];
|
||||
self.pi_BannerView.imageURLStringsGroup = array;
|
||||
[self.pi_BannerView autoScroll];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,17 +102,17 @@
|
||||
myCell.userModel = info;
|
||||
|
||||
}
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [[SDCycleScrollView alloc] init];
|
||||
_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||
_cycleScrollView.layer.masksToBounds = YES;
|
||||
_cycleScrollView.delegate = self;
|
||||
_cycleScrollView.showPageControl = NO;
|
||||
_cycleScrollView.autoScrollTimeInterval = 5;
|
||||
[_cycleScrollView disableScrollGesture];
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [[SDCycleScrollView alloc] init];
|
||||
_pi_BannerView.backgroundColor = [UIColor clearColor];
|
||||
_pi_BannerView.layer.masksToBounds = YES;
|
||||
_pi_BannerView.delegate = self;
|
||||
_pi_BannerView.showPageControl = NO;
|
||||
_pi_BannerView.autoScrollTimeInterval = 5;
|
||||
[_pi_BannerView disableScrollGesture];
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
- (NSMutableArray *)records{
|
||||
if(!_records){
|
||||
|
@@ -155,7 +155,7 @@
|
||||
|
||||
@interface XPWishGiftEnterView()<SDCycleScrollViewDelegate>
|
||||
///文字轮播
|
||||
@property (nonatomic, strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic, strong) SDCycleScrollView *pi_BannerView;
|
||||
|
||||
@end
|
||||
|
||||
@@ -175,12 +175,12 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor colorWithWhite:1 alpha:0.2];
|
||||
[self addSubview:self.cycleScrollView];
|
||||
[self addSubview:self.pi_BannerView];
|
||||
self.layer.masksToBounds = YES;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_BannerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
@@ -220,21 +220,21 @@
|
||||
[array addObject:item.giftName];
|
||||
}
|
||||
if (array.count > 0) {
|
||||
self.cycleScrollView.imageURLStringsGroup = array;
|
||||
[self.cycleScrollView autoScroll];
|
||||
self.pi_BannerView.imageURLStringsGroup = array;
|
||||
[self.pi_BannerView autoScroll];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (SDCycleScrollView *)cycleScrollView {
|
||||
if (!_cycleScrollView) {
|
||||
_cycleScrollView = [[SDCycleScrollView alloc] init];
|
||||
_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||
_cycleScrollView.layer.masksToBounds = YES;
|
||||
_cycleScrollView.delegate = self;
|
||||
_cycleScrollView.showPageControl = NO;
|
||||
_cycleScrollView.autoScrollTimeInterval = 10.0;
|
||||
- (SDCycleScrollView *)pi_BannerView {
|
||||
if (!_pi_BannerView) {
|
||||
_pi_BannerView = [[SDCycleScrollView alloc] init];
|
||||
_pi_BannerView.backgroundColor = [UIColor clearColor];
|
||||
_pi_BannerView.layer.masksToBounds = YES;
|
||||
_pi_BannerView.delegate = self;
|
||||
_pi_BannerView.showPageControl = NO;
|
||||
_pi_BannerView.autoScrollTimeInterval = 10.0;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_BannerView;
|
||||
}
|
||||
@end
|
||||
|
Reference in New Issue
Block a user