修复属性字段,防止混沌时接口出错
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#import "UserInfoModel.h"
|
||||
@interface XPMineUserInfoHeaderView ()<SDCycleScrollViewDelegate, SDPhotoBrowserDelegate,XPMineUserInfoHeaderTagViewDelegate>
|
||||
///轮播图
|
||||
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong) SDCycleScrollView *pi_cycleScrollView;
|
||||
///背景图
|
||||
@property (nonatomic,strong) UIImageView *bgView;
|
||||
///覆盖的view
|
||||
@@ -130,7 +130,7 @@
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
|
||||
[self addSubview:self.cycleScrollView];
|
||||
[self addSubview:self.pi_cycleScrollView];
|
||||
|
||||
[self addSubview:self.coverImageView];
|
||||
[self addSubview:self.bgView];
|
||||
@@ -214,16 +214,16 @@
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self);
|
||||
make.height.mas_equalTo(245);
|
||||
}];
|
||||
|
||||
[self.coverImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.cycleScrollView);
|
||||
make.edges.mas_equalTo(self.pi_cycleScrollView);
|
||||
}];
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.left.right.equalTo(self.cycleScrollView);
|
||||
make.bottom.left.right.equalTo(self.pi_cycleScrollView);
|
||||
make.height.mas_equalTo(25);
|
||||
}];
|
||||
[self.reviewIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -444,7 +444,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_cycleScrollView;
|
||||
browser.delegate = self;
|
||||
browser.imageCount = count;
|
||||
browser.currentImageIndex = index;
|
||||
@@ -627,7 +627,7 @@
|
||||
|
||||
if (imageUrls.count > 0) {
|
||||
self.imageUrls = imageUrls;
|
||||
self.cycleScrollView.imageURLStringsGroup = imageUrls;
|
||||
self.pi_cycleScrollView.imageURLStringsGroup = imageUrls;
|
||||
[self.pageButton setTitle:[NSString stringWithFormat:@"1/%lu",(unsigned long)imageUrls.count] forState:UIControlStateNormal];;
|
||||
// 要初始化一下当前的审核状态
|
||||
if(self.userPhtotArray.count > 0){
|
||||
@@ -816,15 +816,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_cycleScrollView {
|
||||
if (!_pi_cycleScrollView) {
|
||||
_pi_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:[UIImageConstant defalutBannerPlaceholder]];
|
||||
_pi_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||
_pi_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
_pi_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleNone;
|
||||
_pi_cycleScrollView.autoScroll = NO;
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_cycleScrollView;
|
||||
}
|
||||
|
||||
- (UIButton *)pageButton {
|
||||
|
@@ -39,7 +39,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///轮播图
|
||||
@property (nonatomic,strong) SDCycleScrollView *cycleScrollView;
|
||||
@property (nonatomic,strong) SDCycleScrollView *pi_cycleScrollView;
|
||||
///
|
||||
@property (nonatomic,strong) UIView * placeHolderView;
|
||||
///糖果树
|
||||
@@ -86,7 +86,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_cycleScrollView];
|
||||
[self.stackView addArrangedSubview:self.placeHolderView];
|
||||
[self.stackView addArrangedSubview:self.firstRechargeImageView];
|
||||
[self.stackView addArrangedSubview:self.lookLoveImageView];
|
||||
@@ -99,7 +99,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}];
|
||||
|
||||
CGFloat itemWidth = KScreenHeight > 667 ? 65 : 55 * kScreenHeightScale;
|
||||
[self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
[self.pi_cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(itemWidth , itemWidth));
|
||||
}];
|
||||
|
||||
@@ -153,7 +153,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
|
||||
dispatch_group_notify(group,dispatch_get_main_queue(), ^{
|
||||
self.isLoadActivity = YES;
|
||||
self.cycleScrollView.hidden = NO;
|
||||
self.pi_cycleScrollView.hidden = NO;
|
||||
if (self.hostDelegate.getRoomInfo.type == RoomType_MiniGame) {
|
||||
[self configLittleGameActivity];
|
||||
} else {
|
||||
@@ -164,12 +164,12 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
for (ActivityInfoModel *model in self.activityList) {
|
||||
[picArray addObject:model.bannerPic];
|
||||
}
|
||||
self.cycleScrollView.imageURLStringsGroup = picArray;
|
||||
self.pi_cycleScrollView.imageURLStringsGroup = picArray;
|
||||
if (self.activityList.count > 1) {
|
||||
[self.cycleScrollView setAutoScroll:YES];
|
||||
self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
[self.pi_cycleScrollView setAutoScroll:YES];
|
||||
self.pi_cycleScrollView.autoScrollTimeInterval = 3;
|
||||
} else {
|
||||
[self.cycleScrollView setAutoScroll:NO];
|
||||
[self.pi_cycleScrollView setAutoScroll:NO];
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -229,12 +229,12 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
for (ActivityInfoModel *model in self.activityList) {
|
||||
[picArray addObject:model.bannerPic];
|
||||
}
|
||||
self.cycleScrollView.imageURLStringsGroup = picArray;
|
||||
self.pi_cycleScrollView.imageURLStringsGroup = picArray;
|
||||
if (self.activityList.count > 1) {
|
||||
[self.cycleScrollView setAutoScroll:YES];
|
||||
self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
[self.pi_cycleScrollView setAutoScroll:YES];
|
||||
self.pi_cycleScrollView.autoScrollTimeInterval = 3;
|
||||
}else{
|
||||
[self.cycleScrollView setAutoScroll:NO];
|
||||
[self.pi_cycleScrollView setAutoScroll:NO];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,12 +263,12 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
for (ActivityInfoModel *model in self.activityList) {
|
||||
[picArray addObject:model.bannerPic];
|
||||
}
|
||||
self.cycleScrollView.imageURLStringsGroup = picArray;
|
||||
self.pi_cycleScrollView.imageURLStringsGroup = picArray;
|
||||
if (self.activityList.count > 1) {
|
||||
[self.cycleScrollView setAutoScroll:YES];
|
||||
self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
[self.pi_cycleScrollView setAutoScroll:YES];
|
||||
self.pi_cycleScrollView.autoScrollTimeInterval = 3;
|
||||
} else {
|
||||
[self.cycleScrollView setAutoScroll:NO];
|
||||
[self.pi_cycleScrollView 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 ) {
|
||||
@@ -444,24 +444,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_cycleScrollView {
|
||||
if (!_pi_cycleScrollView) {
|
||||
_pi_cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectZero delegate:self placeholderImage:nil];
|
||||
_pi_cycleScrollView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
|
||||
_pi_cycleScrollView.currentPageDotColor = [UIColor whiteColor];
|
||||
_pi_cycleScrollView.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_cycleScrollView.pageControlDotSize = CGSizeMake(5, 2);
|
||||
_pi_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleClassic;
|
||||
_pi_cycleScrollView.currentPageDotImage = [UIImage imageNamed:@"room_activity_banner_select"];
|
||||
_pi_cycleScrollView.pageDotImage = [UIImage imageNamed:@"room_activity_banner_normal"];
|
||||
_pi_cycleScrollView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.00];
|
||||
_pi_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFit;
|
||||
_pi_cycleScrollView.pageControlBottomOffset = -10;
|
||||
_pi_cycleScrollView.hidden = YES;
|
||||
|
||||
}
|
||||
return _cycleScrollView;
|
||||
return _pi_cycleScrollView;
|
||||
}
|
||||
|
||||
- (UIView *)placeHolderView {
|
||||
|
Reference in New Issue
Block a user