fix: Bug fix
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
#import "NSDate+DateUtils.h"
|
||||
@interface XPMineGiveDiamondDetailsCell()
|
||||
///礼物/钻石图标
|
||||
@property (nonatomic,strong) NetImageView * pi_iconView;
|
||||
@property (nonatomic,strong) NetImageView * avatarImageView;
|
||||
///礼物标题
|
||||
@property (nonatomic,strong) UILabel *giftTitleView;
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///时间
|
||||
@property (nonatomic,strong) UILabel *timeView;
|
||||
@property (nonatomic,strong) UILabel *timeLabel;
|
||||
///转赠钻石数量
|
||||
@property (nonatomic,strong) UILabel *numView;
|
||||
@property (nonatomic,strong) UILabel *contentLabel;
|
||||
///转赠钻石支出
|
||||
@property (nonatomic,strong) UILabel *spendingView;
|
||||
|
||||
@@ -36,36 +36,40 @@
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor whiteColor];
|
||||
self.selectionStyle = 0;
|
||||
[self.contentView addSubview:self.pi_iconView];
|
||||
[self.contentView addSubview:self.giftTitleView];
|
||||
[self.contentView addSubview:self.timeView];
|
||||
[self.contentView addSubview:self.numView];
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.timeLabel];
|
||||
[self.contentView addSubview:self.contentLabel];
|
||||
[self.contentView addSubview:self.spendingView];
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
[self.pi_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(40));
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(kGetScaleWidth(49));
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(15));
|
||||
}];
|
||||
[self.timeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(65));
|
||||
make.top.mas_equalTo(self.avatarImageView).offset(3);
|
||||
make.trailing.equalTo(self.timeLabel.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
|
||||
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(15));
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.centerY.equalTo(self.contentLabel);
|
||||
}];
|
||||
[self.giftTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(kGetScaleWidth(65));
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.trailing.equalTo(self.timeView.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
[self.numView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.pi_iconView.mas_top).mas_offset(kGetScaleWidth(3));
|
||||
make.leading.mas_equalTo(kGetScaleWidth(65));
|
||||
make.height.mas_equalTo(kGetScaleWidth(17));
|
||||
make.trailing.equalTo(self.timeView.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
|
||||
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.avatarImageView.mas_top).mas_offset(3);
|
||||
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(10);
|
||||
make.height.mas_equalTo(kGetScaleWidth(21));
|
||||
make.trailing.equalTo(self.timeLabel.mas_leading).mas_offset(-kGetScaleWidth(10));
|
||||
}];
|
||||
[self.spendingView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.trailing.equalTo(self.numView);
|
||||
make.top.equalTo(self.numView.mas_bottom).mas_offset(kGetScaleWidth(4));
|
||||
make.leading.equalTo(self.contentLabel);
|
||||
make.trailing.equalTo(self.timeLabel);
|
||||
make.top.equalTo(self.contentLabel.mas_bottom).mas_offset(kGetScaleWidth(4));
|
||||
make.height.mas_equalTo(kGetScaleWidth(14));
|
||||
}];
|
||||
|
||||
@@ -74,8 +78,8 @@
|
||||
[self addSubview: line];
|
||||
[line mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.leading.mas_equalTo(self.pi_iconView);
|
||||
make.trailing.mas_equalTo(self.timeView);
|
||||
make.leading.mas_equalTo(self.avatarImageView);
|
||||
make.trailing.mas_equalTo(self.timeLabel);
|
||||
make.height.mas_equalTo(0.5);
|
||||
}];
|
||||
}
|
||||
@@ -86,77 +90,80 @@
|
||||
}
|
||||
|
||||
-(void)setValue{
|
||||
self.giftTitleView.hidden = YES;
|
||||
self.numView.hidden = YES;
|
||||
self.titleLabel.hidden = YES;
|
||||
self.contentLabel.hidden = YES;
|
||||
self.spendingView.hidden = YES;
|
||||
self.pi_iconView.image = nil;
|
||||
self.avatarImageView.image = nil;
|
||||
|
||||
if(self.model.type.intValue == 0){
|
||||
self.giftTitleView.hidden = YES;
|
||||
self.numView.hidden = NO;
|
||||
// 转赠钻石
|
||||
self.titleLabel.hidden = YES;
|
||||
self.contentLabel.hidden = NO;
|
||||
self.spendingView.hidden = NO;
|
||||
self.pi_iconView.image = [UIImage imageNamed:@"mine_examples_record"];
|
||||
self.numView.text = self.model.diamondNum;
|
||||
self.timeView.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
self.avatarImageView.image = [UIImage imageNamed:@"moli_money_icon"];
|
||||
self.avatarImageView.imageUrl = self.model.targetAvatar;
|
||||
self.contentLabel.text = self.model.targetNick;
|
||||
self.timeLabel.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
NSString *realDiamondNum = [NSString stringWithFormat:@"%.2f",self.model.realDiamondNum];
|
||||
self.spendingView.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineGiveDiamondDetailsCell0"),realDiamondNum];
|
||||
return;
|
||||
} else {
|
||||
// 转赠礼物
|
||||
self.avatarImageView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
self.avatarImageView.imageUrl = self.model.giftUrl;
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"%@ x%@",self.model.giftName,self.model.giftNum];
|
||||
self.timeLabel.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
self.titleLabel.hidden = NO;
|
||||
self.contentLabel.hidden = YES;
|
||||
self.spendingView.hidden = YES;
|
||||
}
|
||||
self.pi_iconView.image = [UIImageConstant defaultAvatarPlaceholder];
|
||||
self.pi_iconView.imageUrl = self.model.giftUrl;
|
||||
self.giftTitleView.text = [NSString stringWithFormat:@"%@ x%@",self.model.giftName,self.model.giftNum];
|
||||
self.timeView.text = [NSDate timestampSwitchTime:self.model.createTime/1000 andFormatter:@"yyyy-MM-dd HH:mm:ss"];
|
||||
self.giftTitleView.hidden = NO;
|
||||
self.numView.hidden = YES;
|
||||
self.spendingView.hidden = YES;
|
||||
}
|
||||
|
||||
#pragma mark - 懒加载
|
||||
|
||||
- (NetImageView *)pi_iconView{
|
||||
if (!_pi_iconView){
|
||||
_pi_iconView = [[NetImageView alloc]init];
|
||||
_pi_iconView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
_pi_iconView.layer.cornerRadius = kGetScaleWidth(40)/2;
|
||||
_pi_iconView.clipsToBounds = YES;
|
||||
_pi_iconView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
- (NetImageView *)avatarImageView{
|
||||
if (!_avatarImageView){
|
||||
_avatarImageView = [[NetImageView alloc]init];
|
||||
_avatarImageView.backgroundColor = UIColorFromRGB(0xF3F5FA);
|
||||
_avatarImageView.layer.cornerRadius = kGetScaleWidth(49)/2;
|
||||
_avatarImageView.clipsToBounds = YES;
|
||||
_avatarImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _pi_iconView;
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)giftTitleView {
|
||||
if (!_giftTitleView) {
|
||||
_giftTitleView = [[UILabel alloc] init];
|
||||
_giftTitleView.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_giftTitleView.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_giftTitleView.hidden = YES;
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = kFontSemibold(15);
|
||||
_titleLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_titleLabel.hidden = YES;
|
||||
}
|
||||
return _giftTitleView;
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)timeView {
|
||||
if (!_timeView) {
|
||||
_timeView = [[UILabel alloc] init];
|
||||
_timeView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_timeView.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_timeView.textAlignment = NSTextAlignmentRight;
|
||||
- (UILabel *)timeLabel {
|
||||
if (!_timeLabel) {
|
||||
_timeLabel = [[UILabel alloc] init];
|
||||
_timeLabel.font = kFontRegular(13);
|
||||
_timeLabel.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_timeLabel.textAlignment = NSTextAlignmentRight;
|
||||
}
|
||||
return _timeView;
|
||||
return _timeLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)numView {
|
||||
if (!_numView) {
|
||||
_numView = [[UILabel alloc] init];
|
||||
_numView.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_numView.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_numView.text = @"0";
|
||||
- (UILabel *)contentLabel {
|
||||
if (!_contentLabel) {
|
||||
_contentLabel = [[UILabel alloc] init];
|
||||
_contentLabel.font = [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
|
||||
_contentLabel.textColor = [DJDKMIMOMColor inputTextColor];
|
||||
_contentLabel.text = @"0";
|
||||
}
|
||||
return _numView;
|
||||
return _contentLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)spendingView {
|
||||
if (!_spendingView) {
|
||||
_spendingView = [[UILabel alloc] init];
|
||||
_spendingView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_spendingView.font = kFontRegular(13);
|
||||
_spendingView.textColor = [DJDKMIMOMColor disableButtonTextColor];
|
||||
_spendingView.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineGiveDiamondDetailsCell0"),@"0"];
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return self.listData.count > 0 ? kGetScaleWidth(55) : self.tableView.frame.size.height;;
|
||||
return self.listData.count > 0 ? kGetScaleWidth(72) : self.tableView.frame.size.height;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if(self.listData.count > 0){
|
||||
|
@@ -7,16 +7,17 @@
|
||||
|
||||
#import "XPNewHomeHeadView.h"
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
#import <SDCycleScrollView/SDCollectionViewCell.h>
|
||||
#import "XPNewHomeItemCell.h"
|
||||
#import "PIPageControl.h"
|
||||
#import <SVGA.h>
|
||||
|
||||
@interface HomeBannerCell : UICollectionViewCell
|
||||
@interface HomeBannerCell : SDCollectionViewCell
|
||||
|
||||
@property(nonatomic, assign) HomeBannerInfoSkipType type;
|
||||
@property(nonatomic, strong) HomeBannerFillVoInfoModel *cellFillVoMode;
|
||||
@property(nonatomic, strong) NSString *imageURLString;
|
||||
@property(nonatomic, strong) NetImageView *imageView;
|
||||
@property(nonatomic, strong) NetImageView *netImageView;
|
||||
@property(nonatomic, strong) SVGAImageView *svgaImageView;
|
||||
//@property(nonatomic, strong) SVGAVideoEntity *videoItem;
|
||||
|
||||
@@ -28,9 +29,9 @@
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
_imageView = [[NetImageView alloc] init];
|
||||
[self.contentView addSubview:self.imageView];
|
||||
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
_netImageView = [[NetImageView alloc] init];
|
||||
[self.contentView addSubview:self.netImageView];
|
||||
[self.netImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
@@ -55,7 +56,7 @@
|
||||
if (self.type == HomeBannerInfoSkipType_Web_CP ||
|
||||
self.type == HomeBannerInfoSkipType_Web_Custom ||
|
||||
self.type == HomeBannerInfoSkipType_Web_WeekStar) {
|
||||
self.imageView.hidden = YES;
|
||||
self.netImageView.hidden = YES;
|
||||
self.svgaImageView.hidden = NO;
|
||||
SVGAParser *p = [[SVGAParser alloc] init];
|
||||
@kWeakify(self);
|
||||
@@ -65,19 +66,19 @@
|
||||
[self playSVGAWith:videoItem];
|
||||
} else {
|
||||
self.svgaImageView.hidden = YES;
|
||||
self.imageView.hidden = NO;
|
||||
self.imageView.imageUrl = imageURLString;
|
||||
self.netImageView.hidden = NO;
|
||||
self.netImageView.imageUrl = imageURLString;
|
||||
}
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
@kStrongify(self);
|
||||
self.svgaImageView.hidden = YES;
|
||||
self.imageView.hidden = NO;
|
||||
self.imageView.imageUrl = imageURLString;
|
||||
self.netImageView.hidden = NO;
|
||||
self.netImageView.imageUrl = imageURLString;
|
||||
}];
|
||||
} else {
|
||||
self.svgaImageView.hidden = YES;
|
||||
self.imageView.hidden = NO;
|
||||
self.imageView.imageUrl = imageURLString;
|
||||
self.netImageView.hidden = NO;
|
||||
self.netImageView.imageUrl = imageURLString;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -8,10 +8,11 @@
|
||||
#import "XPNewHomeItemCell.h"
|
||||
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
#import <SDCycleScrollView/SDCollectionViewCell.h>
|
||||
#import "PIHomeItemModel.h"
|
||||
#import "HomeRankAvatarModel.h"
|
||||
|
||||
@interface XPRankAvatarsCell : UICollectionViewCell
|
||||
@interface XPRankAvatarsCell : SDCollectionViewCell
|
||||
@property (nonatomic, strong) NSArray<HomeRankAvatarModel*> *cellModel;
|
||||
@property (nonatomic, strong) NetImageView *avatar_1;
|
||||
@property (nonatomic, strong) NetImageView *avatar_2;
|
||||
@@ -201,8 +202,7 @@
|
||||
}
|
||||
|
||||
#pragma mark - SDCycleScrollViewDelegate
|
||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
|
||||
{
|
||||
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
|
||||
if (_didTapRankArea) {
|
||||
self.didTapRankArea();
|
||||
}
|
||||
|
@@ -356,6 +356,7 @@ XPHomeRecommendViewControllerDelegate>
|
||||
[self requestCheckIp];
|
||||
[self.presenter getHomeTopData];
|
||||
[self.presenter getHomeTagList];
|
||||
[self.presenter getHomeRanks];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,6 @@ typedef enum : NSUInteger {
|
||||
|
||||
@interface RoomMicInfoModel : PIBaseModel
|
||||
|
||||
// 房间内选择 mode 页面使用
|
||||
//@property(nonatomic, copy) NSString *status;
|
||||
//@property(nonatomic, copy) NSString *dressUrl;
|
||||
//@property(nonatomic, copy) NSString *createTime;
|
||||
//@property(nonatomic, copy) NSString *updateTime;
|
||||
|
||||
// 通用参数
|
||||
@property(nonatomic, copy) NSString *id;
|
||||
@property(nonatomic, assign) NSInteger reachLevel;
|
||||
@@ -56,6 +50,8 @@ typedef enum : NSUInteger {
|
||||
@property(nonatomic, copy) NSArray <RoomMicInfoModel *> *micSkins;
|
||||
@property(nonatomic, copy) NSArray <RoomMicInfoModel *> *micEffects;
|
||||
|
||||
@property(nonatomic, assign) BOOL hasUnique;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -19,7 +19,7 @@
|
||||
if (!attributedText) return;
|
||||
|
||||
NSMutableAttributedString* attributedTextCopy = [attributedText mutableCopy];
|
||||
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth - (self.hasBubble ? kMessageWithBubblePadding : kMessagePadding), MAXFLOAT);
|
||||
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth, MAXFLOAT);
|
||||
|
||||
CGSize size = [attributedText boundingRectWithSize:maxSize
|
||||
options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin
|
||||
@@ -82,7 +82,7 @@
|
||||
}
|
||||
|
||||
- (void)updateLayoutWithAttributedText:(NSAttributedString *)attributedText {
|
||||
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth - kMessagePadding, MAXFLOAT);
|
||||
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth, MAXFLOAT);
|
||||
CGSize finalSize = CGSizeZero;
|
||||
|
||||
if (isMSRTL()) {
|
||||
@@ -109,7 +109,7 @@
|
||||
range:range];
|
||||
[super setAttributedText:updatedAttributes];
|
||||
|
||||
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth - (self.hasBubble ? kMessageWithBubblePadding : kMessagePadding), MAXFLOAT);
|
||||
CGSize maxSize = CGSizeMake(kRoomMessageMaxWidth, MAXFLOAT);
|
||||
YYTextLayout *layout = [YYTextLayout layoutWithContainerSize:maxSize
|
||||
text:updatedAttributes];
|
||||
if (isMSRTL()) {
|
||||
|
@@ -28,7 +28,6 @@
|
||||
///点击空白区域的手势
|
||||
@property (nonatomic,strong) UITapGestureRecognizer *tapEmptyRecognizer;
|
||||
|
||||
//@property(nonatomic, strong) UIVisualEffectView *blurEffectView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomMessageTableViewCell
|
||||
@@ -36,7 +35,6 @@
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
// [self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -49,7 +47,6 @@
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.bubbleImageView];
|
||||
// [self.contentView addSubview:self.blurEffectView];
|
||||
[self.contentView addSubview:self.contentLabel];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTap)];
|
||||
tap.delegate = self;
|
||||
@@ -57,32 +54,6 @@
|
||||
[self.contentView addGestureRecognizer:self.tapEmptyRecognizer];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.bubbleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.leading.mas_equalTo(self.contentLabel).offset(-16);
|
||||
// make.top.mas_equalTo(self.contentLabel).offset(0);
|
||||
// make.bottom.mas_equalTo(self.contentLabel).offset(10);
|
||||
// make.trailing.mas_equalTo(self.contentLabel).offset(20);
|
||||
|
||||
make.centerY.mas_equalTo(self.contentLabel);
|
||||
make.height.mas_equalTo(self.contentLabel).multipliedBy(1.2);
|
||||
make.leading.mas_equalTo(self.contentLabel).offset(-16);
|
||||
make.trailing.mas_equalTo(self.contentLabel).offset(16);
|
||||
// make.size.mas_equalTo(self.contentLabel).multipliedBy(1.2);
|
||||
}];
|
||||
|
||||
[self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(12);
|
||||
make.bottom.mas_equalTo(-20);
|
||||
make.top.mas_equalTo(10);
|
||||
make.width.mas_equalTo(kRoomMessageMaxWidth);
|
||||
}];
|
||||
|
||||
// [self.blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.bubbleImageView);
|
||||
// }];
|
||||
}
|
||||
|
||||
- (void)setIsLeftBigImage:(BOOL)isLeftBigImage {
|
||||
_isLeftBigImage = isLeftBigImage;
|
||||
if (isLeftBigImage) {
|
||||
@@ -105,11 +76,6 @@
|
||||
make.leading.mas_equalTo(self.leftBigImageView.mas_trailing);
|
||||
make.trailing.mas_equalTo(self.bubbleImageView).offset(-8);
|
||||
}];
|
||||
|
||||
// [self.blurEffectView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.bubbleImageView);
|
||||
// }];
|
||||
// self.blurEffectView.hidden = NO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,8 +138,6 @@
|
||||
}
|
||||
|
||||
- (void)updateLayoutWithoutBubble:(BOOL)hasBubble layoutSize:(CGSize)size {
|
||||
// self.blurEffectView.hidden = NO;
|
||||
|
||||
[self.contentLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.messageInfo.contentTopMargin);
|
||||
make.bottom.mas_equalTo(-self.messageInfo.cellBottomMargin);
|
||||
@@ -240,7 +204,7 @@
|
||||
- (XPNetImageYYLabel *)contentLabel {
|
||||
if (!_contentLabel) {
|
||||
_contentLabel = [[XPNetImageYYLabel alloc] init];
|
||||
_contentLabel.preferredMaxLayoutWidth = kRoomMessageMaxWidth ;
|
||||
_contentLabel.preferredMaxLayoutWidth = kRoomMessageMaxWidth;
|
||||
_contentLabel.numberOfLines = 0;
|
||||
_contentLabel.userInteractionEnabled = YES;
|
||||
@kWeakify(self);
|
||||
@@ -261,18 +225,4 @@
|
||||
return _clickBtn;
|
||||
}
|
||||
|
||||
//- (UIVisualEffectView *)blurEffectView {
|
||||
// if (!_blurEffectView) {
|
||||
// UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||
// _blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
|
||||
//
|
||||
// // 设置模糊视图的大小与目标视图一致
|
||||
// _blurEffectView.frame = CGRectMake(0, 0, KScreenWidth*2/3, 200);
|
||||
// _blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
// _blurEffectView.hidden = YES;
|
||||
//
|
||||
// [_blurEffectView setCornerRadius:8];
|
||||
// }
|
||||
// return _blurEffectView;
|
||||
//}
|
||||
@end
|
||||
|
@@ -250,8 +250,6 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)sendCustomMessage:(AttachmentModel *)attachment {
|
||||
|
||||
NSString *sessionID = self.roomUid;
|
||||
@@ -281,6 +279,7 @@
|
||||
_messageTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_messageTableView.delegate = self;
|
||||
_messageTableView.dataSource = self;
|
||||
_messageTableView.clipsToBounds = NO;
|
||||
_messageTableView.tableFooterView = [UIView new];
|
||||
_messageTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_messageTableView.backgroundColor = [UIColor clearColor];
|
||||
@@ -290,10 +289,6 @@
|
||||
_messageTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_messageTableView registerClass:[XPRoomMessageTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPRoomMessageTableViewCell class])];
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
return _messageTableView;
|
||||
}
|
||||
@@ -305,7 +300,6 @@
|
||||
return _headerView;
|
||||
}
|
||||
|
||||
|
||||
- (NSMutableArray<XPMessageInfoModel *> *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
@@ -313,9 +307,6 @@
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (XPRoomMessageParser *)messageParser {
|
||||
if (!_messageParser) {
|
||||
_messageParser = [[XPRoomMessageParser alloc] init];
|
||||
|
@@ -261,6 +261,17 @@
|
||||
self.currentLevelLabel.text = [NSString stringWithFormat:@"%@%@", YMLocalizedString(@"1.0.33_text_9"), @(LevelInfo.currentLevel)];
|
||||
self.expToNextLabel.text = [NSString stringWithFormat:@"%@%@", YMLocalizedString(@"1.0.33_text_8"), @(LevelInfo.nextLevelExp - LevelInfo.roomVal)];
|
||||
self.adminLabel.text = [NSString stringWithFormat:YMLocalizedString(@"1.0.33_text_7"), @(LevelInfo.currentManagerNum), @(LevelInfo.managerLimitNum)];
|
||||
|
||||
if (LevelInfo.nextLevel == 0) {
|
||||
self.nextLevelLabel.text = [NSString stringWithFormat:@"%@%@", YMLocalizedString(@"1.0.33_text_9"), @(LevelInfo.currentLevel)];
|
||||
self.currentLevelLabel.text = [NSString stringWithFormat:@"%@%@", YMLocalizedString(@"1.0.33_text_9"), @(LevelInfo.currentLevel - 1)];
|
||||
self.expProgressView.progress = 1;
|
||||
self.expToNextLabel.hidden = YES;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
self.expProgressView.progress = 0.3;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
@@ -433,8 +444,8 @@
|
||||
@implementation RoomModeTypeCard
|
||||
|
||||
+ (CGFloat)cellHeight:(NSInteger)cellCount {
|
||||
NSInteger line = cellCount/3 + cellCount%3;
|
||||
return MAX(0, line) * (90 + 4 + 18) + MAX(0, line-1) * 10;
|
||||
NSInteger line = (cellCount + 3 - 1)/3;
|
||||
return line * (90 + 4 + 18) + MAX(0, line-1) * 10;
|
||||
}
|
||||
|
||||
+ (void)registerTo:(UITableView *)tableView {
|
||||
@@ -462,13 +473,22 @@
|
||||
row = 2;
|
||||
break;
|
||||
case RoomType_19Mic:
|
||||
row = 4;
|
||||
if (dataSource.count<4) {
|
||||
row = 0;
|
||||
} else {
|
||||
row = 4;
|
||||
}
|
||||
break;
|
||||
case RoomType_20Mic:
|
||||
row = 3;
|
||||
if (dataSource.count<4) {
|
||||
row = 0;
|
||||
} else {
|
||||
row = 3;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
row = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -515,13 +535,6 @@
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
// RoomModeCollectionCell *cell = [RoomModeCollectionCell cellFro:collectionView indexPath:indexPath displayName:YES];
|
||||
// NSDictionary *dic = [self.dataSource xpSafeObjectAtIndex:indexPath.row];
|
||||
// if (dic) {
|
||||
// NSString *imageName = [NSString stringWithFormat:@"room_mode_mic_%@_%@", [dic objectForKey:@"type"], cell.selected ? @"on" : @"off"];
|
||||
// cell.imageView.image = kImage(imageName);
|
||||
// }
|
||||
|
||||
if (_updateSelectedType) {
|
||||
RoomType selectedType = RoomType_Game;
|
||||
switch (indexPath.row) {
|
||||
@@ -588,7 +601,7 @@
|
||||
@implementation RoomModeMicSkinCard
|
||||
|
||||
+ (CGFloat)cellHeight:(NSInteger)cellCount {
|
||||
NSInteger line = cellCount/3 + cellCount%3;
|
||||
NSInteger line = (cellCount + 3 - 1)/3;
|
||||
return MAX(0, line) * (87) + MAX(0, line-1) * 10;
|
||||
}
|
||||
|
||||
@@ -654,9 +667,9 @@
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
RoomMicInfoModel *model = [self.skins xpSafeObjectAtIndex:indexPath.row];
|
||||
if ([model.id isEqualToString:@(self.usedID).stringValue] || (model.id.integerValue == -1 && self.usedID == 0)) {
|
||||
return;
|
||||
}
|
||||
// if ([model.id isEqualToString:@(self.usedID).stringValue] || (model.id.integerValue == -1 && self.usedID == 0)) {
|
||||
// return;
|
||||
// }
|
||||
if (model.reachLevel <= self.roomLevel) {
|
||||
if (self.updateSelectedSkinID) {
|
||||
self.updateSelectedSkinID(model.id);
|
||||
@@ -704,7 +717,7 @@
|
||||
@implementation RoomModeMicEffectCard
|
||||
|
||||
+ (CGFloat)cellHeight:(NSInteger)cellCount {
|
||||
NSInteger line = cellCount/3 + cellCount%3;
|
||||
NSInteger line = (cellCount + 3 - 1)/3;
|
||||
return MAX(0, line) * (87) + MAX(0, line-1) * 10;
|
||||
}
|
||||
|
||||
@@ -769,9 +782,9 @@
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
RoomMicInfoModel *model = [self.effects xpSafeObjectAtIndex:indexPath.row];
|
||||
if ([model.id isEqualToString:@(self.usedID).stringValue] || (model.id.integerValue == -1 && self.usedID == 0)) {
|
||||
return;
|
||||
}
|
||||
// if ([model.id isEqualToString:@(self.usedID).stringValue] || (model.id.integerValue == -1 && self.usedID == 0)) {
|
||||
// return;
|
||||
// }
|
||||
if (model.reachLevel <= self.roomLevel) {
|
||||
if (self.updateSelectedEffectID) {
|
||||
self.updateSelectedEffectID(model.id);
|
||||
@@ -818,8 +831,6 @@
|
||||
|
||||
@end
|
||||
|
||||
// TODO: 补充缓存的使用 / 补充跳转到 web
|
||||
|
||||
@implementation RoomModeViewController
|
||||
|
||||
- (RoomModePresenter *)createPresenter {
|
||||
@@ -1039,8 +1050,13 @@
|
||||
case 0:
|
||||
return [RoomModeOwnerCard cellHeight];
|
||||
break;
|
||||
case 1:
|
||||
return [RoomModeTypeCard cellHeight:4];
|
||||
case 1:{
|
||||
NSArray *arr = [self.typeDataSource subarrayWithRange:NSMakeRange(0, 3)].mutableCopy;
|
||||
if (self.levelInfo && self.levelInfo.hasUnique) {
|
||||
arr = self.typeDataSource.copy;
|
||||
}
|
||||
return [RoomModeTypeCard cellHeight:arr.count];
|
||||
}
|
||||
break;
|
||||
case 2: {
|
||||
if (self.levelInfo) {
|
||||
@@ -1074,9 +1090,13 @@
|
||||
}
|
||||
break;
|
||||
case 1: {
|
||||
NSArray *arr = [self.typeDataSource subarrayWithRange:NSMakeRange(0, 3)].mutableCopy;
|
||||
if (self.levelInfo && self.levelInfo.hasUnique) {
|
||||
arr = self.typeDataSource.copy;
|
||||
}
|
||||
RoomModeTypeCard *cell = [RoomModeTypeCard cellFro:tableView
|
||||
indexPath:indexPath
|
||||
dataSource:self.typeDataSource.copy
|
||||
dataSource:arr
|
||||
currentType:self.roomInfo.type];
|
||||
@kWeakify(self);
|
||||
[cell setUpdateSelectedType:^(RoomType type) {
|
||||
|
@@ -9,6 +9,7 @@
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <SDCycleScrollView.h>
|
||||
#import <SDCycleScrollView/SDCollectionViewCell.h>
|
||||
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
@@ -17,7 +18,7 @@
|
||||
#import "GiftLuckyBroadcastModel.h"
|
||||
|
||||
|
||||
@interface XPGiftLuckyGiftBroadcastCell : UICollectionViewCell
|
||||
@interface XPGiftLuckyGiftBroadcastCell : SDCollectionViewCell
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@property (nonatomic,strong) GiftLuckyBroadcastModel *giftInfo;
|
||||
@end
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "GiftInfoModel.h"
|
||||
#import <SDCycleScrollView/SDCollectionViewCell.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPGiftTwelveStarBroadcastView;
|
||||
|
||||
@@ -30,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
|
||||
@interface XPGiftTwelveStarBroadcastCell : UICollectionViewCell
|
||||
@interface XPGiftTwelveStarBroadcastCell : SDCollectionViewCell
|
||||
@property(nonatomic,strong) XPWeekStarRankUserModel *userModel;
|
||||
@property(nonatomic,strong) UIButton *skipBtn;
|
||||
@end
|
||||
|
@@ -1178,7 +1178,7 @@
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)handleTapItem:(XPUserCardItemModel *)item {
|
||||
- (void)handleTapItem:(XPUserCardItemModel *)item {
|
||||
NSString * roomId = [NSString stringWithFormat:@"%ld", self.cardInfo.roomInfo.roomId];
|
||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.cardInfo.roomInfo.uid];
|
||||
|
||||
@@ -1267,6 +1267,7 @@
|
||||
|
||||
- (UIView *)managerLimitToast {
|
||||
UIView *view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth-80, kGetScaleWidth(410))];
|
||||
view.userInteractionEnabled = YES;
|
||||
[view setBackgroundColor:[UIColor whiteColor]];
|
||||
[view setCornerRadius:16];
|
||||
|
||||
|
@@ -9,6 +9,7 @@
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <SDCycleScrollView.h>
|
||||
#import <SDCycleScrollView/SDCollectionViewCell.h>
|
||||
///Tool
|
||||
#import "DJDKMIMOMColor.h"
|
||||
#import "NetImageView.h"
|
||||
@@ -18,7 +19,7 @@
|
||||
///Model
|
||||
#import "WishGiftInfoModel.h"
|
||||
|
||||
@interface XPWishGiftEnterCell : UICollectionViewCell
|
||||
@interface XPWishGiftEnterCell : SDCollectionViewCell
|
||||
///礼物
|
||||
@property (nonatomic,strong) NetImageView *giftImageView;
|
||||
///礼物名称
|
||||
|
@@ -944,10 +944,6 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
}];
|
||||
|
||||
if (self.roomInfo.type == RoomType_19Mic || self.roomInfo.type == RoomType_20Mic) {
|
||||
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
// [self.sideMenu displayExpandButton:YES];
|
||||
// });
|
||||
|
||||
[self.sideMenu mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.trailing.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(160);
|
||||
@@ -955,14 +951,13 @@ XPCandyTreeInsufficientBalanceViewDelegate>
|
||||
make.width.mas_equalTo(87);
|
||||
}];
|
||||
} else {
|
||||
// [self.sideMenu displayExpandButton:NO];
|
||||
[self.sideMenu mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.messageContainerView);
|
||||
make.trailing.mas_equalTo(self.view);
|
||||
make.bottom.mas_equalTo(self.quickMessageContainerView.mas_top).offset(-5);
|
||||
make.width.mas_equalTo(87);
|
||||
}];
|
||||
}\
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user