fix: 修正验收问题

This commit is contained in:
edwinQQQ
2025-01-07 20:07:54 +08:00
parent 893c1ab647
commit d9e8d6639b
51 changed files with 760 additions and 412 deletions

View File

@@ -171,15 +171,15 @@ UIKIT_EXTERN NSString * adImageName;
NSString *filePath = [XPAdImageTool.shareImageTool getFilePathWithImageName:adName];
BOOL isExist = [XPAdImageTool.shareImageTool isFileExistWithFilePath:filePath];
if ([kUserDefaults integerForKey:@"adShow"]) {
[kUserDefaults setInteger:[kUserDefaults integerForKey:@"adShow"]+1
forKey:@"adShow"];
} else {
[kUserDefaults setInteger:1 forKey:@"adShow"];
}
// if ([kUserDefaults integerForKey:@"adShow"]) {
// [kUserDefaults setInteger:[kUserDefaults integerForKey:@"adShow"]+1
// forKey:@"adShow"];
// } else {
// [kUserDefaults setInteger:1 forKey:@"adShow"];
// }
if (isExist) {//
if ([kUserDefaults integerForKey:@"adShow"] > 4 || [kUserDefaults integerForKey:@"adShow"] == 0) {
// if ([kUserDefaults integerForKey:@"adShow"] > 4) {
@kWeakify(self);
AdvertiseModel *info = [XPAdImageTool.shareImageTool getAdInfoFromCacheInMainWith:adName];
XPAdvertiseView *advertiseView = [[XPAdvertiseView alloc] initWithFrame:self.window.bounds];
@@ -196,7 +196,7 @@ UIKIT_EXTERN NSString * adImageName;
});
};
[advertiseView show];
}
// }
}
}

View File

@@ -105,6 +105,8 @@ void qg_VAP_Logger_handler(VAPLogLevel level, const char* file, int line, const
}else{
[self toHomeTabbarPage];
}
[[ClientConfig shareConfig] clientInit];
}
- (void)toLoginPage {

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 30@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "组 8319@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "from@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 63@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@@ -35,9 +35,6 @@ static int const showtime = 3;
@end
// TODO: svga SVGA
@implementation XPAdvertiseView
#pragma mark - Initialize Methods
@@ -227,7 +224,7 @@ static int const showtime = 3;
if (self.svgaView && ![NSString isEmpty:content] && ![NSString isEmpty:key]) {
NSAttributedString *string = [[NSAttributedString alloc] initWithString:content
attributes:@{
NSFontAttributeName: kFontMedium(36),
NSFontAttributeName: kFontMedium(kGetScaleWidth(24)),
NSForegroundColorAttributeName: UIColorFromRGB(0xF9F8CF)
}];
[self.svgaView setAttributedText:string

View File

@@ -105,6 +105,8 @@ typedef NS_ENUM(NSUInteger, URLType) {
kCPRule,
/// 火箭规则
KBoomRule,
/// 房间等级说明
KRoomLevelRule,
};
NSString * const URLWithType(URLType type);

View File

@@ -24,7 +24,8 @@ NSString * const URLWithType(URLType type) {
@(kChannelUrl) : @"modules/%@/index.html?channelType=%@&deviceId=%@",
@(kLUDOUrl) : @"modules/gameRank/index.html",///LUDO
@(kCPRule) : @"modules/rule/cpRule.html",
@(KBoomRule) : @"modules/rule/boom.html?partitionId=",///
@(KBoomRule) : @"modules/rule/boom.html?partitionId=",///,
@(KRoomLevelRule) : @"modules/roomLevel/index.html",///,
};
NSString * newUrl = [newDic objectForKey:@(type)];
if(newUrl != nil){

View File

@@ -16,10 +16,9 @@
///
@property (nonatomic,strong) MSBaseTextField *textField;
///label
@property (nonatomic,strong) NSMutableArray<UILabel *> *lableArray;
@property (nonatomic,strong) NSMutableArray<UILabel *> *labelArray;
@end
@implementation LoginVerifCodeView
- (instancetype)initWithFrame:(CGRect)frame
@@ -53,8 +52,8 @@
}
- (void)updateLablesWithText:(UITextField *)textField {
if (textField.text.length > self.lableArray.count) {
textField.text = [textField.text substringToIndex:self.lableArray.count];
if (textField.text.length > self.labelArray.count) {
textField.text = [textField.text substringToIndex:self.labelArray.count];
}
if (textField.text.length >= self.number) {
[textField resignFirstResponder];
@@ -63,10 +62,19 @@
}
}
for (UILabel *pwLab in self.lableArray) {
if (self.type == 1) {
@kWeakify(self);
[self.labelArray enumerateObjectsUsingBlock:^(UILabel *obj, NSUInteger idx, BOOL *stop) {
@kStrongify(self);
[self normalStyle:obj];
}];
}
NSInteger index = -1;
for (UILabel *pwLab in self.labelArray) {
if (pwLab.tag < (100 + textField.text.length)) {
if (self.shouldBeSecurity) {
pwLab.text = @"●";
index += 1;
} else {
NSRange range = NSMakeRange(pwLab.tag-100, 1);
pwLab.text = [textField.text substringWithRange:range];
@@ -75,6 +83,13 @@
pwLab.text = @"";
}
}
if (self.type == 1) {
UILabel *label = [self.labelArray xpSafeObjectAtIndex:index];
if (label) {
[self lastInputStyle:label];
}
}
}
- (void)configLabelArray {
@@ -86,9 +101,8 @@
label.textColor = [DJDKMIMOMColor mainTextColor];
label.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18];
label.textAlignment = NSTextAlignmentCenter;
label.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor];
label.layer.masksToBounds = YES;
label.layer.cornerRadius = 10;
label.backgroundColor = UIColorFromRGB(0xf4f4f4);
[label setCornerRadius:10];
label.tag = 100 + i;
[self addSubview:label];
[label mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -96,10 +110,10 @@
make.centerY.mas_equalTo(self);
make.leading.mas_equalTo(self).offset((itemWidth + itemSpace)* i);
}];
[self.lableArray addObject:label];
[self.labelArray addObject:label];
}
UILabel * label = [self.lableArray lastObject];
UILabel * label = [self.labelArray lastObject];
if (label) {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(label.mas_trailing);
@@ -127,10 +141,26 @@
make.centerY.mas_equalTo(self);
make.leading.mas_equalTo(self).offset((itemWidth + itemSpace)* i);
}];
[self.lableArray addObject:label];
[self.labelArray addObject:label];
}
}
- (void)normalStyle:(UILabel *)label {
label.backgroundColor = UIColorFromRGB(0xF0F5F6);
[label setCornerRadius:10
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
borderWidth:1
borderColor:UIColorFromRGB(0xF0F5F6)];
}
- (void)lastInputStyle:(UILabel *)label {
label.backgroundColor = UIColorFromRGB(0xFFF6EB);
[label setCornerRadius:10
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
borderWidth:1
borderColor:UIColorFromRGB(0xFF8C03)];
}
#pragma mark - Getters And Setters
- (void)setNumber:(int)number {
_number = number;
@@ -155,11 +185,11 @@
return _textField;
}
- (NSMutableArray<UILabel *> *)lableArray {
if (!_lableArray) {
_lableArray = [NSMutableArray array];
- (NSMutableArray<UILabel *> *)labelArray {
if (!_labelArray) {
_labelArray = [NSMutableArray array];
}
return _lableArray;
return _labelArray;
}
@end

View File

@@ -116,7 +116,7 @@
[self.contentView addSubview:self.stackView];
[self.stackView addArrangedSubview:self.userView];
[self.stackView addArrangedSubview:self.collectionView];
// [self.stackView addArrangedSubview:self.collectionView];
[self.userView addSubview:self.avatarImageView];
[self.userView addSubview:self.headWearImageView];
@@ -125,7 +125,6 @@
[self.userView addSubview:self.tagStackView];
[self.userView addSubview:self.signLabel];
[self.tagStackView addArrangedSubview:self.nickLabel];
[self.tagStackView addArrangedSubview:self.sexButton];
[self.tagStackView addArrangedSubview:self.nobleImageView];
@@ -184,9 +183,9 @@
make.height.mas_equalTo(76);
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(72);
}];
// [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.height.mas_equalTo(72);
// }];
}
-(NSInteger) getMonth:(long )time

View File

@@ -454,7 +454,7 @@
///
- (void)onGetSessionUserInfoSuccess:(UserInfoModel *)userInfo {
_userInfo = userInfo;
// _userInfo = userInfo;
self.sessionNavView.userInfo = userInfo;
if (userInfo.roomUid && self.openType == SessionListOpenTypeDefault) {
if ([self showChatRiskView:userInfo]) {
@@ -676,7 +676,7 @@
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return self.userInfo.privatePhoto.count > 0 ? 182 : 100;
return 100;//self.userInfo.privatePhoto.count > 0 ? 182 : 100;
}
MessageBaseModel *msg = [self.messages xpSafeObjectAtIndex:indexPath.row];
return msg.height;

View File

@@ -6,7 +6,6 @@
//
#import "SessionListCell.h"
#import "NIMBadgeView.h"
#import "NetImageView.h"
#import "NIMMessageUtils.h"
#import "NIMTimeUtils.h"
@@ -26,7 +25,7 @@
@property (nonatomic,strong) UILabel *timeLabel;
@property (nonatomic,strong) NIMBadgeView *badgeView;
@property(nonatomic, strong) UILabel *badgeView;
@property (nonatomic,strong) UIView *divider;
@@ -80,7 +79,6 @@
[messageAtt addAttributes:@{NSForegroundColorAttributeName: UIColorFromRGB(0x7b7b7d)} range:NSMakeRange(0, messageAtt.length)];
self.messageLabel.attributedText = messageAtt;
if (recent.lastMessage) {
self.timeLabel.text = [NIMTimeUtils formattedTimeFromInterval:recent.lastMessage.timestamp];
} else {
@@ -90,11 +88,15 @@
[self.timeLabel sizeToFit];
if (recent.unreadCount) {
self.badgeView.hidden = NO;
self.badgeView.badgeValue = @(recent.unreadCount).stringValue;
if (recent.unreadCount > 100) {
self.badgeView.text = @" 99+ ";
} else {
self.badgeView.text = [NSString stringWithFormat:@" %@ ", @(recent.unreadCount)];
}
} else {
self.badgeView.hidden = YES;
}
NIMStickTopSessionInfo * topInfo = [self.stickTopMessages objectForKey:recent.session];
if (topInfo && topInfo.session.sessionId.integerValue == recent.session.sessionId.integerValue) {
self.backgroundColor = [DJDKMIMOMColor colorWithHexString:@"#E5EFFC"];
@@ -136,7 +138,7 @@
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.container);
make.leading.mas_equalTo(15);
make.height.width.mas_equalTo(45);
make.height.width.mas_equalTo(47);
}];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -147,7 +149,7 @@
[self.messageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(self.nameLabel);
make.top.mas_equalTo(self.avatarImageView.mas_centerY).offset(2);
make.trailing.mas_equalTo(self.container).offset(-15);
make.trailing.mas_equalTo(self.badgeView.mas_leading).offset(-15);
}];
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -161,12 +163,17 @@
make.bottom.mas_equalTo(self.container);
make.height.mas_equalTo(0.5f);
}];
[self.badgeView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.messageLabel);
make.trailing.mas_equalTo(self.timeLabel);
make.height.mas_equalTo(16);
make.width.mas_lessThanOrEqualTo(30);
}];
}
- (void)layoutSubviews {
[super layoutSubviews];
self.badgeView.nim_right = isMSRTL() ? 35 + self.badgeView.mj_w : self.nim_width - 35;
self.badgeView.nim_top = 4;
}
- (NetImageView *)avatarImageView {
@@ -177,7 +184,7 @@
config.imageType = ImageTypeUserIcon;
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 45.f / 2;
_avatarImageView.layer.cornerRadius = 47.f / 2;
}
return _avatarImageView;
}
@@ -212,9 +219,12 @@
return _timeLabel;
}
- (NIMBadgeView *)badgeView {
- (UILabel *)badgeView {
if (!_badgeView) {
_badgeView = [NIMBadgeView viewWithBadgeTip:@""];
_badgeView = [UILabel labelInitWithText:@"" font:kFontMedium(10) textColor:[UIColor whiteColor]];
_badgeView.backgroundColor = UIColorFromRGB(0xFF4E5C) ;
_badgeView.textAlignment = NSTextAlignmentCenter;
[_badgeView setCornerRadius:8];
}
return _badgeView;
}

View File

@@ -150,7 +150,6 @@
self.nobleImageView.hidden = YES;
}
self.attentionButton.hidden = NO;
self.experImageView.imageUrl = _fansInfo.experUrl;
self.charmImageView.imageUrl = _fansInfo.charmUrl;
self.nobleImageView.imageUrl = _fansInfo.userVipInfoVO.nameplateUrl;
@@ -159,6 +158,17 @@
self.attentionButton.enabled = !isMyFriend;
self.attentionButton.hidden = NO;
if (isMyFriend) {
[self.attentionButton setCornerRadius:15
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
borderWidth:0
borderColor:[UIColor clearColor]];
} else {
[self.attentionButton setCornerRadius:15
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
borderWidth:1
borderColor:UIColorFromRGB(0xFF8C03)];
}
UIImage *nobleImage = self.nobleImageView.image;
if (nobleImage) {
@@ -171,7 +181,6 @@
make.size.mas_equalTo(CGSizeMake(0, 20));
}];
}
if (fansInfo.userVipInfoVO && fansInfo.userVipInfoVO.friendNickColour) {
self.nickLabel.textColor = [self colorWithHexString:fansInfo.userVipInfoVO.friendNickColour];
@@ -275,17 +284,21 @@
- (UIButton *)attentionButton {
if (!_attentionButton) {
_attentionButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell1") forState:UIControlStateNormal];
[_attentionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_attentionButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightMedium];
[_attentionButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake((68), (30))] forState:UIControlStateNormal];
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell2") forState:UIControlStateDisabled];
_attentionButton.titleLabel.font = kFontMedium(14);
_attentionButton.titleLabel.numberOfLines = 2;
_attentionButton.titleLabel.textAlignment = NSTextAlignmentCenter;
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell1") forState:UIControlStateNormal];
[_attentionButton setTitleColor:UIColorFromRGB(0xFF8C03) forState:UIControlStateNormal];
[_attentionButton setBackgroundImage:[UIImage imageWithColor:[UIColor whiteColor]] forState:UIControlStateNormal];
[_attentionButton setTitle:YMLocalizedString(@"XPMineFansTableViewCell2") forState:UIControlStateDisabled];
[_attentionButton setTitleColor:UIColorFromRGB(0xffffff) forState:UIControlStateDisabled];
[_attentionButton setBackgroundImage:[UIImage imageWithColor:[DJDKMIMOMColor disableButtonColor]] forState:UIControlStateDisabled];
_attentionButton.layer.masksToBounds = YES;
_attentionButton.layer.cornerRadius = 15;
[_attentionButton addTarget:self action:@selector(attentionButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[_attentionButton setCornerRadius:15];
}
return _attentionButton;
}

View File

@@ -56,7 +56,9 @@
-(void)searchGivePeopleWith:(NSString *)erbanNo{
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
@kWeakify(self);
[Api searchGivePeople:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
@kStrongify(self);
XPMineGiveDiamondSearchModel *model = [XPMineGiveDiamondSearchModel modelWithDictionary:data.data];
[[self getView] searchGivePeopleWihtModel:model];
}] ticket:ticket uid:uid erbanNo:erbanNo];
@@ -91,7 +93,9 @@
}
- (void)rechargeUserInfo {
@kWeakify(self);
[Api rechargeUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
@kStrongify(self);
[[self getView] loadRechargeUserSuccess:[RechargeUserModel modelWithJSON:data.data]];
} fail:^(NSInteger code, NSString * _Nullable msg) {

View File

@@ -27,6 +27,9 @@
@property (nonatomic,strong) UIButton *diamondBtn;
///
@property (nonatomic,strong) UIButton *giftBtn;
@property(nonatomic, strong) UIView *indexImageView;
///
@property (nonatomic,strong) UIImageView *numIcon;
///
@@ -37,8 +40,6 @@
@property (nonatomic,strong) UIImageView *myDiamondIcon;
///
@property (nonatomic,strong) UIButton *confirmBtn;
///线
@property (nonatomic,strong) UIView *lineView;
///view
@property (nonatomic,strong) XPMineChooseGiveGiftView *giveGiftView;
@@ -78,7 +79,7 @@
[self addSubview:self.numIcon];
[self addSubview:self.diamondNumView];
[self addSubview:self.lineView];
[self addSubview:self.indexImageView];
[self addSubview:self.myDiamondIcon];
[self addSubview:self.myDiamondNumView];
[self addSubview:self.confirmBtn];
@@ -86,10 +87,20 @@
}
- (void)initSubViewConstraints {
UIView *bgView = [[UIView alloc] init];
[bgView setCornerRadius:10];
bgView.backgroundColor = UIColorFromRGB(0xf7f7f7);
[self insertSubview:bgView belowSubview:self.headView];
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self).offset(6);
make.leading.trailing.mas_equalTo(self).inset(15);
make.height.mas_equalTo(82);
}];
[self.headView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(kGetScaleWidth(50));
make.top.mas_equalTo(kGetScaleWidth(16));
make.leading.mas_equalTo(kGetScaleWidth(15));
make.width.height.mas_equalTo(kGetScaleWidth(59));
make.centerY.mas_equalTo(bgView);
make.leading.mas_equalTo(27);
}];
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(self.headView.mas_trailing).mas_offset(kGetScaleWidth(10));
@@ -102,8 +113,7 @@
make.height.mas_equalTo(kGetScaleWidth(14));
make.top.equalTo(self.titleView.mas_bottom).mas_offset(kGetScaleWidth(4));
}];
if(self.isHaveGiveGift == YES && self.isHaveGiveDiamond == YES){
[self.typeStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(15));
@@ -137,65 +147,74 @@
self.giftBtn.hidden = NO;
self.diamondBtn.hidden = YES;
self.typeStackView.spacing = kGetScaleWidth(0);
}
UIView *bgView_2 = [[UIView alloc] init];
[bgView_2 setCornerRadius:10];
bgView_2.backgroundColor = UIColorFromRGB(0xFFF7D6);
[self insertSubview:bgView_2 belowSubview:self.numIcon];
[bgView_2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.indexImageView.mas_bottom).offset(10);
make.leading.trailing.mas_equalTo(self).inset(16);
make.height.mas_equalTo(kGetScaleWidth(52));
}];
[self.numIcon mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(self.headView);
make.width.height.mas_equalTo(kGetScaleWidth(20));
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(35));
make.leading.mas_equalTo(self.headView).offset(2);
make.width.height.mas_equalTo(kGetScaleWidth(32));
make.centerY.mas_equalTo(bgView_2);
// make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(35));
}];
[self.diamondBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(80));
make.height.mas_equalTo(kGetScaleWidth(31));
}];
[self.giftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.equalTo(self.diamondBtn);
}];
[self.diamondNumView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.equalTo(self.titleView);
make.height.mas_equalTo(kGetScaleWidth(24));
make.leading.equalTo(self.numIcon.mas_trailing).mas_offset(kGetScaleWidth(10));
make.height.mas_equalTo(28);
make.leading.equalTo(self.numIcon.mas_trailing).mas_offset(12);
make.centerY.equalTo(self.numIcon);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(1);
make.leading.equalTo(self.headView);
make.trailing.equalTo(self.titleView);
make.top.equalTo(self.numIcon.mas_bottom).mas_offset(kGetScaleWidth(6));
[self.diamondBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(80));
make.height.mas_equalTo(kGetScaleWidth(31));
}];
[self.giftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.equalTo(self.diamondBtn);
}];
[self.indexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(4);
make.centerX.mas_equalTo(self.diamondBtn);
make.width.mas_equalTo(14);
make.top.mas_equalTo(self.diamondBtn.mas_bottom).mas_offset(2);
}];
[self.myDiamondNumView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.trailing.equalTo(self.myDiamondIcon.mas_leading).mas_offset(-kGetScaleWidth(8));
make.height.mas_equalTo(20);
make.leading.mas_equalTo(bgView_2);
make.top.mas_equalTo(bgView_2.mas_bottom).offset(12);
}];
[self.myDiamondIcon mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.equalTo(self.titleView);
make.width.height.equalTo(self.numIcon);
make.top.equalTo(self.numIcon.mas_bottom).mas_offset(kGetScaleWidth(9));
}];
[self.myDiamondNumView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.equalTo(self.myDiamondIcon.mas_leading).mas_offset(-kGetScaleWidth(8));
make.height.equalTo(self.titleView);
make.leading.equalTo(self.headView);
make.centerY.equalTo(self.myDiamondIcon);
make.leading.mas_equalTo(self.myDiamondNumView.mas_trailing);
make.width.height.mas_equalTo(20);
make.centerY.mas_equalTo(self.myDiamondNumView);
}];
[self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(self.headView);
make.trailing.equalTo(self.titleView);
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(162));
make.height.mas_equalTo(kGetScaleWidth(46));
make.leading.trailing.mas_equalTo(self).inset(15);
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(kGetScaleWidth(110));
make.height.mas_equalTo(kGetScaleWidth(40));
}];
[self.giveGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(0);
make.trailing.mas_equalTo(0);
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(20));
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(9);
make.height.mas_equalTo(kGetScaleWidth(370));
}];
}
- (void)keyboardWillShow:(NSNotification *)notification
{ if(!self.giveGiftView.textField.isFirstResponder){return;}
- (void)keyboardWillShow:(NSNotification *)notification {
if(!self.giveGiftView.textField.isFirstResponder){return;}
NSDictionary *userInfo = [notification userInfo];
CGFloat curkeyBoardHeight = [[[notification userInfo]objectForKey:@"UIKeyboardBoundsUserInfoKey"]CGRectValue].size.height;
CGRect begin = [[[notification userInfo]objectForKey:@"UIKeyboardFrameBeginUserInfoKey"]CGRectValue];
@@ -212,16 +231,13 @@
}];
[self.superview layoutIfNeeded];
}];
}
}
- (void)keyboardWillHide:(NSNotification *)notification{
if(!self.giveGiftView.textField.isFirstResponder){return;}
//
NSDictionary *userInfo = [notification userInfo];
NSValue *keyboardValue = [userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];
CGRect keyboardRect = [keyboardValue CGRectValue];
// NSValue *keyboardValue = [userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];
CGFloat animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
//
[self.superview layoutIfNeeded];
@@ -246,12 +262,13 @@
#pragma mark- UITextFieldDelegate
-(void)textFieldDidChange:(UITextField *)textField{
self.confirmBtn.selected = textField.text.length > 0;
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
}
-(void)textFieldDidChangeWithText:(NSString *)text{
if(self.giveGiftView.chooseGiftModel != nil){
self.confirmBtn.selected = text.length > 0;
}
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
}
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
ClientConfig *config = [ClientConfig shareConfig];
@@ -303,9 +320,19 @@
self.giveGiftView.hidden = YES;
self.type = 0;
self.confirmBtn.selected = self.diamondNumView.text.length > 0;
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
[self.giveGiftView resignFirstResponder];
[self.confirmBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(162));
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(kGetScaleWidth(110));
}];
[self.indexImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(4);
make.centerX.mas_equalTo(self.diamondBtn);
make.width.mas_equalTo(14);
make.top.mas_equalTo(self.diamondBtn.mas_bottom).mas_offset(2);
}];
}
///
@@ -319,8 +346,19 @@
}else{
self.confirmBtn.selected = NO;
}
[self.diamondNumView resignFirstResponder];
self.confirmBtn.alpha = self.confirmBtn.isSelected ? 1: 0.3;
[self.confirmBtn mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.typeStackView.mas_bottom).mas_offset(kGetScaleWidth(440));
make.top.equalTo(self.indexImageView.mas_bottom).mas_offset(kGetScaleWidth(354));
}];
[self.indexImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(4);
make.centerX.mas_equalTo(self.giftBtn);
make.width.mas_equalTo(14);
make.top.mas_equalTo(self.giftBtn.mas_bottom).mas_offset(2);
}];
}
-(void)setGiveDiamondModel:(XPMineGiveDiamondModel *)giveDiamondModel{
@@ -375,21 +413,25 @@
if (!_diamondNumView){
_diamondNumView = [MSBaseTextField new];
_diamondNumView.keyboardType = UIKeyboardTypeNumberPad;
_diamondNumView.font = [UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightMedium];
_diamondNumView.textColor = [DJDKMIMOMColor inputTextColor];
_diamondNumView.attributedPlaceholder = [[NSMutableAttributedString alloc]initWithString:@"0" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightRegular],NSForegroundColorAttributeName:[DJDKMIMOMColor disableButtonTextColor]}];
_diamondNumView.textAlignment = NSTextAlignmentRight;
_diamondNumView.font = kFontSemibold(20);
_diamondNumView.textColor = UIColorFromRGB(0x313131);
_diamondNumView.attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"0" attributes:@{NSFontAttributeName:kFontSemibold(20),NSForegroundColorAttributeName:UIColorFromRGB(0x313131)}];
// _diamondNumView.textAlignment = NSTextAlignmentRight;
[_diamondNumView addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
_diamondNumView.delegate = self;
}
return _diamondNumView;
}
-(UIView *)lineView{
if (!_lineView){
_lineView = [UIView new];
_lineView.backgroundColor = UIColorFromRGB(0xF7F7F7);
-(UIView *)indexImageView{
if (!_indexImageView){
_indexImageView = [UIImageView new];
[_indexImageView setCornerRadius:2];
[_indexImageView addGradientBackgroundWithColors:@[
UIColorFromRGB(0xE29030),
UIColorFromRGB(0xfcc074),
] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1.0, 0.5) cornerRadius:2];
}
return _lineView;
return _indexImageView;
}
-(UILabel *)myDiamondNumView{
if (!_myDiamondNumView){
@@ -412,12 +454,15 @@
if (!_confirmBtn){
_confirmBtn = [UIButton new];
[_confirmBtn setTitle:YMLocalizedString(@"TTAlertConfig0") forState:UIControlStateNormal];
[_confirmBtn setTitleColor:[DJDKMIMOMColor disableButtonTextColor] forState:UIControlStateNormal];
[_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(46))] forState:UIControlStateNormal];
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(46))] forState:UIControlStateSelected];
_confirmBtn.layer.cornerRadius = kGetScaleWidth(46) / 2;
[_confirmBtn setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorRGBAlpha(0xE29030, 1.0), UIColorRGBAlpha(0xFCC074, 1.0)]
gradientType:GradientTypeLeftToRight
imgSize:CGSizeMake(KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(40))]
forState:UIControlStateNormal];
_confirmBtn.layer.cornerRadius = kGetScaleWidth(20);
_confirmBtn.layer.masksToBounds = YES;
_confirmBtn.alpha = 0.3;
[_confirmBtn addTarget:self action:@selector(confirmAction) forControlEvents:UIControlEventTouchUpInside];
}
return _confirmBtn;
@@ -445,17 +490,11 @@
- (UIButton *)diamondBtn{
if (!_diamondBtn){
_diamondBtn = [UIButton new];
UIImage *noChooseImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
UIImage *chooseImage = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
[_diamondBtn setBackgroundImage:noChooseImage forState:UIControlStateNormal];
[_diamondBtn setBackgroundImage:chooseImage forState:UIControlStateSelected];
_diamondBtn.titleLabel.font = [UIFont systemFontOfSize:14];
_diamondBtn.titleLabel.font = kFontMedium(15);
[_diamondBtn setTitle:YMLocalizedString(@"XPMineChooseGiveDiamondView2") forState:UIControlStateNormal];
[_diamondBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
[_diamondBtn setTitleColor:UIColorFromRGB(0x6D6B89) forState:UIControlStateNormal];
[_diamondBtn setTitleColor:UIColorFromRGB(0x313131) forState:UIControlStateSelected];
[_diamondBtn setTitleColor:UIColorFromRGB(0x7b7b7d) forState:UIControlStateNormal];
_diamondBtn.selected = YES;
_diamondBtn.layer.cornerRadius = kGetScaleWidth((31))/2;
_diamondBtn.layer.masksToBounds = YES;
[_diamondBtn addTarget:self action:@selector(chooseDiamondAction) forControlEvents:UIControlEventTouchUpInside];
}
@@ -464,19 +503,12 @@
-(UIButton *)giftBtn{
if (!_giftBtn){
_giftBtn = [UIButton new];
UIImage *noChooseImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0),UIColorFromRGB(0xE6E6F0)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
UIImage *chooseImage = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(80), kGetScaleWidth(31))];
[_giftBtn setBackgroundImage:noChooseImage forState:UIControlStateNormal];
[_giftBtn setBackgroundImage:chooseImage forState:UIControlStateSelected];
_giftBtn.titleLabel.font = [UIFont systemFontOfSize:14];
_giftBtn.titleLabel.font = kFontMedium(15);
[_giftBtn setTitle:YMLocalizedString(@"XPMineChooseGiveDiamondView3") forState:UIControlStateNormal];
[_giftBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
[_giftBtn setTitleColor:UIColorFromRGB(0x6D6B89) forState:UIControlStateNormal];
[_giftBtn setTitleColor:UIColorFromRGB(0x313131) forState:UIControlStateSelected];
[_giftBtn setTitleColor:UIColorFromRGB(0x7b7b7d) forState:UIControlStateNormal];
_giftBtn.selected = NO;
_giftBtn.layer.cornerRadius = kGetScaleWidth((31))/2;
_giftBtn.layer.masksToBounds = YES;
[_giftBtn addTarget:self action:@selector(chooseGiftAction) forControlEvents:UIControlEventTouchUpInside];
}
return _giftBtn;
}

View File

@@ -4,7 +4,7 @@
//
// Created by YuMi on 2022/11/2.
//
#import "XPPageControl.h"
//#import "XPPageControl.h"
#import "XPMineChooseGiveGiftView.h"
#import "XPMineChooseGiveGiftViewCell.h"
#import "XPGuildEmptyCollectionViewCell.h"
@@ -12,13 +12,13 @@
@interface XPMineChooseGiveGiftView()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
@property (nonatomic,strong) UICollectionView *collectionView;
@property (nonatomic,strong) UIView *bgView;
@property (nonatomic,strong) XPPageControl *pageControl;
//@property (nonatomic,strong) XPPageControl *pageControl;
@property(nonatomic, strong) UIPageControl *pageControl;
@property (nonatomic,strong) NSMutableArray *listData;
@property (nonatomic,strong) NSIndexPath *indexPath;
@property (nonatomic,strong) UILabel *numView;
@property (nonatomic,strong) UILabel *numTitleLabel;
@property (nonatomic,strong) UIView *lineView;
@property (nonatomic,strong) UIButton *allBtn;
@end
@implementation XPMineChooseGiveGiftView
@@ -37,52 +37,58 @@
[self addSubview:self.bgView];
[self addSubview:self.collectionView];
[self addSubview:self.pageControl];
[self addSubview:self.numView];
[self addSubview:self.numTitleLabel];
[self addSubview:self.textField];
[self addSubview:self.lineView];
[self addSubview:self.allBtn];
}
- (void)initSubViewConstraints {
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(15));
make.trailing.mas_equalTo(-kGetScaleWidth(15));
make.leading.mas_equalTo(15);
make.trailing.mas_equalTo(-15);
make.top.equalTo(self);
make.height.mas_equalTo(kGetScaleWidth(290));
make.height.mas_equalTo(kGetScaleWidth(268));
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(15));
make.trailing.mas_equalTo(-kGetScaleWidth(15));
make.leading.mas_equalTo(15);
make.trailing.mas_equalTo(-15);
make.top.equalTo(self);
make.height.mas_equalTo(kGetScaleWidth(248));
}];
[self.pageControl mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self);
make.top.mas_equalTo(kGetScaleWidth(269));
make.height.mas_equalTo(kGetScaleWidth(3));
make.width.mas_equalTo(0);
make.centerX.equalTo(self);
make.bottom.mas_equalTo(self.bgView).offset(-4);
make.height.mas_equalTo(8);
make.width.mas_equalTo(KScreenWidth);
}];
UIView *bgView = [[UIView alloc] init];
[bgView setCornerRadius:12];
bgView.backgroundColor = UIColorFromRGB(0xf7f7f7);
[self insertSubview:bgView belowSubview:self.numTitleLabel];
[bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.bgView.mas_bottom).offset(14);
make.leading.trailing.mas_equalTo(self).inset(15);
make.height.mas_equalTo(52);
}];
[self.numTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(bgView);
make.leading.mas_equalTo(bgView).offset(10);
}];
[self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(15));
make.height.mas_equalTo(kGetScaleWidth(17));
make.leading.mas_equalTo(self.numTitleLabel.mas_trailing).offset(8);
make.height.mas_equalTo(28);
make.width.mas_equalTo(kGetScaleWidth(156));
make.top.equalTo(self.bgView.mas_bottom).mas_offset(kGetScaleWidth(23));
}];
[self.numView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.textField);
make.trailing.equalTo(self.textField.mas_leading).mas_offset(-kGetScaleWidth(10));
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.equalTo(self.textField);
make.leading.equalTo(self.numView);
make.height.mas_equalTo(1);
make.top.equalTo(self.textField.mas_bottom).mas_offset(kGetScaleWidth(11));
make.centerY.mas_equalTo(bgView);
}];
[self.allBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(kGetScaleWidth(36));
make.height.mas_equalTo(kGetScaleWidth(19));
make.trailing.equalTo(self.textField);
make.top.equalTo(self.lineView.mas_bottom).mas_offset(kGetScaleWidth(10));
make.width.mas_greaterThanOrEqualTo(38);
make.height.mas_equalTo(24);
make.centerY.mas_equalTo(bgView);
make.trailing.mas_equalTo(bgView).offset(-10);
}];
}
-(void)setListData:(NSMutableArray *)listData count:(NSInteger)count{
@@ -90,9 +96,12 @@
if(listData.count == 0)return;
[self.collectionView reloadData];
self.pageControl.count = count;
self.pageControl.curPage = 1;
self.pageControl.numberOfPages = count;
self.pageControl.currentPage = 0;
self.pageControl.hidden = count == 1;
self.pageControl.currentPageIndicatorTintColor = [UIColor colorWithRed:1.0 green:0.55 blue:0.01 alpha:1.0]; // #FF8C03
self.pageControl.pageIndicatorTintColor = [UIColor colorWithRed:0.81 green:0.81 blue:0.81 alpha:1.0]; // #CECECE
}
-(void)resignFirstResponder{
[self.textField resignFirstResponder];
@@ -131,8 +140,9 @@
}
-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
NSInteger page = scrollView.contentOffset.x / (KScreenWidth - kGetScaleWidth(30));
self.pageControl.curPage = ceil(page+1);
// NSInteger page = scrollView.contentOffset.x / (KScreenWidth - 30);
NSInteger currentPage = round(scrollView.contentOffset.x / scrollView.frame.size.width);
self.pageControl.currentPage = currentPage;
}
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
@@ -155,7 +165,7 @@
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
id cell = [collectionView cellForItemAtIndexPath:indexPath];
id cell = [collectionView cellForItemAtIndexPath:indexPath];
if([cell isKindOfClass:[XPMineChooseGiveGiftViewCell class]]){
XPMineChooseGiveGiftViewCell *getCell = (XPMineChooseGiveGiftViewCell *)cell;
self.indexPath = indexPath;
@@ -164,9 +174,9 @@
if(self.delegate && [self.delegate respondsToSelector:@selector(textFieldDidChangeWithText:)]){
[self.delegate textFieldDidChangeWithText:self.textField.text];
}
self.textField.text = @"1";
}
}
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{
return kGetScaleWidth(10);
@@ -207,28 +217,26 @@
-(UIView *)bgView{
if (!_bgView){
_bgView = [UIView new];
_bgView.backgroundColor = UIColorFromRGB(0xF3F5FA);
[_bgView setCornerWithLeftTopCorner:8 rightTopCorner:8 bottomLeftCorner:8 bottomRightCorner:8 size:CGSizeMake(kGetScaleWidth(345), kGetScaleWidth(290))];
_bgView.backgroundColor = UIColorFromRGB(0xF7F7F7);
[_bgView setCornerRadius:12];
}
return _bgView;
}
- (XPPageControl *)pageControl{
- (UIPageControl *)pageControl{
if (!_pageControl){
_pageControl = [[XPPageControl alloc]init];
_pageControl.backgroundColor = [UIColor clearColor];
_pageControl = [[UIPageControl alloc]init];
}
return _pageControl;
}
- (UILabel *)numView {
if (!_numView) {
_numView = [[UILabel alloc] init];
_numView.font = [UIFont systemFontOfSize:11];
_numView.textColor = [DJDKMIMOMColor disableButtonTextColor];
_numView.text = YMLocalizedString(@"XPMineChooseGiveGiftView0");
- (UILabel *)numTitleLabel {
if (!_numTitleLabel) {
_numTitleLabel = [[UILabel alloc] init];
_numTitleLabel.font = [UIFont systemFontOfSize:11];
_numTitleLabel.textColor = UIColorFromRGB(0x7b7b7d);
_numTitleLabel.text = YMLocalizedString(@"XPMineChooseGiveGiftView0");
}
return _numView;
return _numTitleLabel;
}
-(MSBaseTextField *)textField{
@@ -238,27 +246,23 @@
_textField.font = [UIFont systemFontOfSize:kGetScaleWidth(20) weight:UIFontWeightMedium];
_textField.textColor = [DJDKMIMOMColor inputTextColor];
_textField.attributedPlaceholder = [[NSMutableAttributedString alloc]initWithString:@"0" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kGetScaleWidth(20) weight:UIFontWeightRegular],NSForegroundColorAttributeName:[DJDKMIMOMColor disableButtonTextColor]}];
_textField.textAlignment = NSTextAlignmentRight;
_textField.text = @"1";
[_textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
}
return _textField;
}
-(UIView *)lineView{
if (!_lineView){
_lineView = [UIView new];
_lineView.backgroundColor = UIColorFromRGB(0xF7F7F7);
}
return _lineView;
}
-(UIButton *)allBtn{
if (!_allBtn){
_allBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_allBtn setTitle:YMLocalizedString(@"XPMineChooseGiveGiftView1") forState:UIControlStateNormal];
_allBtn.titleLabel.font = [UIFont systemFontOfSize:12];
[_allBtn setTitleColor:[DJDKMIMOMColor disableButtonTextColor] forState:UIControlStateNormal];
_allBtn.backgroundColor = UIColorFromRGB(0xF3F5FA);
[_allBtn setCornerWithLeftTopCorner:4 rightTopCorner:4 bottomLeftCorner:4 bottomRightCorner:4 size:CGSizeMake(kGetScaleWidth(36), kGetScaleWidth(19))];
_allBtn.titleLabel.font = kFontMedium(12);
[_allBtn setTitleColor:UIColorFromRGB(0xFF8C03) forState:UIControlStateNormal];
_allBtn.backgroundColor = [UIColor whiteColor];
[_allBtn setCornerRadius:12
corners:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner
borderWidth:1
borderColor:UIColorFromRGB(0xFF8C03)];
[_allBtn addTarget:self action:@selector(allChooseAction) forControlEvents:UIControlEventTouchUpInside];
}
return _allBtn;

View File

@@ -53,8 +53,7 @@
}
-(void)setIsChoose:(BOOL)isChoose{
_isChoose = isChoose;
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(72), kGetScaleWidth(72))];
UIColor *lineColor = [UIColor colorWithPatternImage:image];
UIColor *lineColor = UIColorFromRGB(0xFF8C03);
_giftImageView.layer.borderColor = _isChoose ? lineColor.CGColor : [UIColor clearColor].CGColor;
}
-(void)setGiftModel:(GiftInfoModel *)giftModel{
@@ -86,8 +85,8 @@
- (UILabel *)giftNameView {
if (!_giftNameView) {
_giftNameView = [[UILabel alloc] init];
_giftNameView.font = [UIFont systemFontOfSize:12];
_giftNameView.textColor = UIColorFromRGB(0x6D6B89);
_giftNameView.font = [UIFont systemFontOfSize:13];
_giftNameView.textColor = UIColorFromRGB(0x313131);
_giftNameView.textAlignment = NSTextAlignmentCenter;
}
return _giftNameView;
@@ -97,7 +96,8 @@
if (!_giftNumView) {
_giftNumView = [[UILabel alloc] init];
_giftNumView.font = [UIFont systemFontOfSize:12];
_giftNumView.textColor = UIColorFromRGB(0x6D6B89);
_giftNumView.textColor = UIColorFromRGB(0x7b7b7d);
_giftNumView.textAlignment = NSTextAlignmentCenter;
}
return _giftNumView;
}

View File

@@ -70,7 +70,7 @@
[self.numView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.equalTo(self.titleView);
make.height.mas_equalTo(kGetScaleWidth(24));
make.height.mas_equalTo(42);
make.top.mas_equalTo(kGetScaleWidth(78));
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -91,8 +91,8 @@
make.top.mas_equalTo(kGetScaleWidth(150));
}];
[self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(kGetScaleWidth(37));
make.width.mas_equalTo(kGetScaleWidth(135));
make.height.mas_equalTo(kGetScaleWidth(36));
make.width.mas_equalTo(kGetScaleWidth(244));
make.top.mas_equalTo(kGetScaleWidth(189));
make.centerX.equalTo(self);
}];
@@ -107,7 +107,6 @@
_poundageView.title = YMLocalizedString(@"XPMineConfirmGiveDiamondView7");
_titleView.text = YMLocalizedString(@"XPMineConfirmGiveDiamondView5");
[_confirmBtn setTitle:YMLocalizedString(@"XPMineConfirmGiveDiamondView8") forState:UIControlStateNormal];
}
}
- (void)setGoldNum:(NSInteger)goldNum{
@@ -133,13 +132,14 @@
_giveDiamondModel = giveDiamondModel;
_titleView.text = [NSString stringWithFormat:YMLocalizedString(@"XPMineConfirmGiveDiamondView1"),_giveDiamondModel.targetNick];
NSTextAttachment * attachment = [[NSTextAttachment alloc] init];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:@(self.inputDiamonds).stringValue attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightMedium],NSForegroundColorAttributeName:[DJDKMIMOMColor inputTextColor]}];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@" %@ ", @(self.inputDiamonds)]
attributes:@{NSFontAttributeName:kFontSemibold(30),
NSForegroundColorAttributeName:UIColorFromRGB(0x313131)}];
UIImage *iconImage = [UIImage imageNamed:@"moli_money_icon"];;
attachment.bounds = CGRectMake(0, roundf(self.numView.font.capHeight - 24)/2.f, 24, 24);
attachment.bounds = CGRectMake(0, roundf(self.numView.font.capHeight - 36)/2.f, 36, 36);
attachment.image =iconImage;
NSAttributedString * starAttribute = [NSMutableAttributedString attributedStringWithAttachment:(NSTextAttachment *)attachment];
[attributedString insertAttributedString:starAttribute atIndex:attributedString.length];
[attributedString insertAttributedString:starAttribute atIndex:0];
self.numView.attributedText = attributedString;
self.poundageView.hidden = NO;
self.totalNumView.hidden = NO;
@@ -229,7 +229,7 @@
-(UILabel *)numView{
if (!_numView){
_numView = [UILabel new];
_numView.font = [UIFont systemFontOfSize:kGetScaleWidth(30) weight:UIFontWeightMedium];
_numView.font = kFontSemibold(30);
_numView.textColor = [DJDKMIMOMColor inputTextColor];
_numView.textAlignment = NSTextAlignmentCenter;
}
@@ -262,13 +262,16 @@
- (UIButton *)confirmBtn{
if (!_confirmBtn){
_confirmBtn = [UIButton new];
UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(135), kGetScaleWidth(37))];
UIImage *image = [UIImage gradientColorImageFromColors:@[ UIColorFromRGB(0xE29030),
UIColorFromRGB(0xfcc074)]
gradientType:GradientTypeLeftToRight
imgSize:CGSizeMake(kGetScaleWidth(244), kGetScaleWidth(36))];
[_confirmBtn setBackgroundImage:image forState:UIControlStateNormal];
[_confirmBtn setTitle:YMLocalizedString(@"XPMineConfirmGiveDiamondView0") forState:UIControlStateNormal];
_confirmBtn.titleLabel.font = [UIFont systemFontOfSize:kGetScaleWidth(14) weight:UIFontWeightRegular];
_confirmBtn.titleLabel.font = kFontMedium(14);
[_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_confirmBtn addTarget:self action:@selector(confirmAction) forControlEvents:UIControlEventTouchUpInside];
_confirmBtn.layer.cornerRadius = kGetScaleWidth(37)/2;
_confirmBtn.layer.cornerRadius = kGetScaleWidth(36)/2;
_confirmBtn.layer.masksToBounds = YES;
}
return _confirmBtn;

View File

@@ -52,6 +52,7 @@
make.centerY.equalTo(self);
make.leading.mas_equalTo(kGetScaleWidth(15));
}];
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(self.headView.mas_trailing).mas_offset( kGetScaleWidth(10));
make.height.mas_equalTo(kGetScaleWidth(17));
@@ -64,10 +65,21 @@
make.height.mas_equalTo(kGetScaleWidth(14));
make.top.equalTo(self.titleView.mas_bottom).mas_offset(kGetScaleWidth(4));
}];
[self.arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(kGetScaleWidth(20));
make.centerY.equalTo(self);
make.trailing.mas_equalTo(-kGetScaleWidth(15));
make.width.height.mas_equalTo(kGetScaleWidth(20));
make.centerY.equalTo(self);
make.trailing.mas_equalTo(-kGetScaleWidth(15));
}];
UIView *line = [[UIView alloc] init];
line.backgroundColor = UIColorFromRGB(0xe4e4e4);
[self addSubview: line];
[line mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self);
make.leading.mas_equalTo(self.headView);
make.trailing.mas_equalTo(self.arrowView);
make.height.mas_equalTo(0.5);
}];
}
#pragma mark -
@@ -100,7 +112,7 @@
- (UIImageView *)arrowView{
if (!_arrowView){
_arrowView = [UIImageView new];
_arrowView.image = [UIImage imageNamed:@"mine_item_new_arrow"];
_arrowView.image = [[UIImage imageNamed:@"grey_right_arrow"] ms_SetImageForRTL];
}
return _arrowView;
}

View File

@@ -69,6 +69,15 @@
make.height.mas_equalTo(kGetScaleWidth(14));
}];
UIView *line = [[UIView alloc] init];
line.backgroundColor = UIColorFromRGB(0xe4e4e4);
[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.height.mas_equalTo(0.5);
}];
}
#pragma mark -
- (void)setModel:(XPMineGiveDiamondDetailsModel *)model{

View File

@@ -42,9 +42,7 @@
[self.bgView addSubview:self.codeView];
}
- (void)keyboardWillShow:(NSNotification *)notification
{
- (void)keyboardWillShow:(NSNotification *)notification {
NSDictionary *userInfo = [notification userInfo];
CGFloat curkeyBoardHeight = [[[notification userInfo]objectForKey:@"UIKeyboardBoundsUserInfoKey"]CGRectValue].size.height;
CGRect begin = [[[notification userInfo]objectForKey:@"UIKeyboardFrameBeginUserInfoKey"]CGRectValue];
@@ -54,13 +52,10 @@
if( begin.size.height > 0 && (begin.origin.y - end.origin.y > 0)){
CGFloat keyBoardHeight = curkeyBoardHeight;
CGFloat animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
[UIView animateWithDuration:animationDuration animations:^{
self.bgView.frame = CGRectMake(0, KScreenHeight - keyBoardHeight - kGetScaleWidth(162), KScreenWidth, kGetScaleWidth(162));
self.bgView.frame = CGRectMake(0, KScreenHeight - keyBoardHeight - kGetScaleWidth(162), KScreenWidth, kGetScaleWidth(162));
}];
}
}
- (void)keyboardWillHide:(NSNotification *)notification{
@@ -143,6 +138,7 @@
if (!_bgView){
_bgView = [UIView new];
_bgView.backgroundColor = [UIColor whiteColor];
[_bgView setCornerRadius:16 cornerMask:kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner];
}
return _bgView;
}

View File

@@ -7,7 +7,7 @@
#import "XPMineGiveDiamondSearchView.h"
@interface XPMineGiveDiamondSearchView()
@interface XPMineGiveDiamondSearchView() <UITextFieldDelegate>
///
@property (nonatomic,strong)UIImageView *bgView;
@@ -33,7 +33,7 @@
self.backgroundColor = [UIColor clearColor];
[self addSubview:self.bgView];
[self.bgView addSubview:self.textField];
[self.bgView addSubview:self.searchBtn];
// [self.bgView addSubview:self.searchBtn];
}
- (void)initSubViewConstraints {
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -42,17 +42,26 @@
make.top.equalTo(self);
make.height.mas_equalTo(kGetScaleWidth(32));
}];
UIImageView *searchImageView = [[UIImageView alloc] initWithImage:kImage(@"home_nav_search")];
[self.bgView addSubview:searchImageView];
[searchImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.bgView);
make.leading.mas_equalTo(15);
make.size.mas_equalTo(CGSizeMake(20, 20));
}];
[self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.bottom.equalTo(self.bgView);
make.leading.mas_equalTo(kGetScaleWidth(10));
make.trailing.mas_equalTo(-kGetScaleWidth(76));
}];
[self.searchBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-kGetScaleWidth(3));
make.centerY.equalTo(self.bgView);
make.width.mas_equalTo(kGetScaleWidth(66));
make.height.mas_equalTo(kGetScaleWidth(26));
make.top.bottom.equalTo(self.bgView);
make.leading.mas_equalTo(searchImageView.mas_trailing).offset(5);
make.trailing.mas_equalTo(-kGetScaleWidth(76));
}];
// [self.searchBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.trailing.mas_equalTo(-kGetScaleWidth(3));
// make.centerY.equalTo(self.bgView);
// make.width.mas_equalTo(kGetScaleWidth(66));
// make.height.mas_equalTo(kGetScaleWidth(26));
// }];
}
-(void)searchAction{
@@ -68,19 +77,30 @@
_textField.attributedPlaceholder = [[NSMutableAttributedString alloc]initWithString:YMLocalizedString(@"XPMineGiveDiamondSearchView3") attributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor secondTextColor],NSFontAttributeName:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]}];
}
}
#pragma mark -
#pragma mark -
- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
[self searchAction];
return YES;
}
#pragma mark -
- (UIImageView *)bgView{
if (!_bgView){
_bgView = [UIImageView new];
_bgView.userInteractionEnabled = YES;
_bgView.image = [UIImage imageNamed:@"mine_give_diamond_search"];
// _bgView.image = [UIImage imageNamed:@"mine_give_diamond_search"];
_bgView.backgroundColor = UIColorFromRGB(0xf7f7f7);
[_bgView setCornerRadius:kGetScaleWidth(32/2)];
}
return _bgView;
}
-(MSBaseTextField *)textField{
if (!_textField){
_textField = [[MSBaseTextField alloc]initWithFrame:CGRectZero];
_textField.delegate = self;
_textField.keyboardType = UIKeyboardTypeNumberPad;
_textField.returnKeyType = UIReturnKeySearch;
_textField.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
_textField.textColor = [DJDKMIMOMColor mainTextColor];
_textField.attributedPlaceholder = [[NSMutableAttributedString alloc]initWithString:YMLocalizedString(@"XPMineGiveDiamondSearchView1") attributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor secondTextColor],NSFontAttributeName:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular]}];

View File

@@ -192,7 +192,7 @@ UIKIT_EXTERN NSString * const kGiveDiamondDailyNum;
}
}
XPMineConfirmGiveDiamondView *confirmView = [[XPMineConfirmGiveDiamondView alloc]initWithFrame:CGRectZero];
XPMineConfirmGiveDiamondView *confirmView = [[XPMineConfirmGiveDiamondView alloc] initWithFrame:CGRectZero];
confirmView.poundage = poundage;
confirmView.inputDiamonds = self.inputDiamonds;
confirmView.delegate = self;

View File

@@ -144,7 +144,7 @@
}];
[self.searchView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.infoContainer.mas_bottom).offset(14);
make.top.equalTo(self.infoContainer.mas_top);//.offset(14);
make.leading.trailing.equalTo(self.view);
make.height.mas_equalTo(kGetScaleWidth(32));
}];
@@ -253,10 +253,17 @@
}
- (void)loadRechargeUserSuccess:(RechargeUserModel *)userModel {
if (!userModel) {
if (!userModel || userModel.starLevel < 0) {
return;
}
self.infoContainer.hidden = NO;
[self.searchView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.infoContainer.mas_bottom).offset(14);
make.leading.trailing.equalTo(self.view);
make.height.mas_equalTo(kGetScaleWidth(32));
}];
self.avatarImageView.imageUrl = userModel.avatar;
self.nameLabel.text = userModel.nick;
self.icon1ImageView.imageUrl = self.userInfo.userLevelVo.charmUrl;
@@ -278,18 +285,19 @@
if (userModel.starLevel > 4) {
[self.star_5 setSelected:YES];
}
[self.view layoutIfNeeded];
}
#pragma mark - Getters And Setters
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.showsVerticalScrollIndicator = NO;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor clearColor];
// _tableView.tableHeaderView = self.headView;
[_tableView registerClass:[XPMineGiveDiamondCell class] forCellReuseIdentifier:NSStringFromClass([XPMineGiveDiamondCell class])];
[_tableView registerClass:[XPMineFriendEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineFriendEmptyTableViewCell class])];
}
@@ -302,17 +310,7 @@
}
return _searchView;
}
//-(UIView *)headView{
// if (!_headView){
// _headView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, kGetScaleWidth(64))];
// UILabel *titleView = [[UILabel alloc]initWithFrame:CGRectMake(kGetScaleWidth(15), kGetScaleWidth(25), KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(19))];
// titleView.text = YMLocalizedString(@"XPMineGiveDiamondVC1");
// titleView.font = [UIFont systemFontOfSize:kGetScaleWidth(16) weight:UIFontWeightMedium];
// titleView.textColor = [DJDKMIMOMColor mainTextColor];
// [_headView addSubview:titleView];
// }
// return _headView;
//}
-(UILabel *)tagView{
if (!_tagView){
_tagView = [UILabel new];
@@ -328,6 +326,7 @@
_infoContainer = [[UIView alloc] init];
_infoContainer.backgroundColor = UIColorFromRGB(0xf7f7f7);
[_infoContainer setCornerRadius:10];
_infoContainer.hidden = YES;
}
return _infoContainer;
}

View File

@@ -81,7 +81,6 @@
}
- (void)initSubViewConstraints {
[self.myDiamondsView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(0));
make.leading.mas_equalTo(kGetScaleWidth(15));

View File

@@ -586,7 +586,7 @@ UIKIT_EXTERN NSString *kRequestTicket;
[self.functionArray removeAllObjects];
[self.functionArray addObjectsFromArray:items];
for (XPMineFunctionItemModel * _Nonnull obj in self.functionArray) {
if(obj.skipType == XPMineItemType_My_Gift && self.isHavePermission == NO){
[self.functionArray removeObject:obj];

View File

@@ -18,7 +18,7 @@
@property(nonatomic, strong) NSString *imageURLString;
@property(nonatomic, strong) NetImageView *imageView;
@property(nonatomic, strong) SVGAImageView *svgaImageView;
@property(nonatomic, strong) SVGAVideoEntity *videoItem;
//@property(nonatomic, strong) SVGAVideoEntity *videoItem;
@end
@@ -57,24 +57,23 @@
self.type == HomeBannerInfoSkipType_Web_WeekStar) {
self.imageView.hidden = YES;
self.svgaImageView.hidden = NO;
if (self.videoItem) {
[self playSVGAWith:self.videoItem];
} else {
SVGAParser *p = [[SVGAParser alloc] init];
@kWeakify(self);
[p parseWithURL:[NSURL URLWithString:imageURLString] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
@kStrongify(self);
if (videoItem) {
self.videoItem = videoItem;
[self playSVGAWith:videoItem];
}
} failureBlock:^(NSError * _Nullable error) {
@kStrongify(self);
SVGAParser *p = [[SVGAParser alloc] init];
@kWeakify(self);
[p parseWithURL:[NSURL URLWithString:imageURLString] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
@kStrongify(self);
if (videoItem) {
[self playSVGAWith:videoItem];
} else {
self.svgaImageView.hidden = YES;
self.imageView.hidden = NO;
self.imageView.imageUrl = imageURLString;
}];
}
}
} failureBlock:^(NSError * _Nullable error) {
@kStrongify(self);
self.svgaImageView.hidden = YES;
self.imageView.hidden = NO;
self.imageView.imageUrl = imageURLString;
}];
} else {
self.svgaImageView.hidden = YES;
self.imageView.hidden = NO;
@@ -109,7 +108,7 @@
if (self.svgaImageView && ![NSString isEmpty:content] && ![NSString isEmpty:key]) {
NSAttributedString *string = [[NSAttributedString alloc] initWithString:content
attributes:@{
NSFontAttributeName: kFontMedium(30),
NSFontAttributeName: kFontMedium(16),
NSForegroundColorAttributeName: UIColorFromRGB(0xF9F8CF)
}];
[self.svgaImageView setAttributedText:string

View File

@@ -128,6 +128,8 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
@end
@interface HomeCategoryTabList : UIView <UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
@property(nonatomic, assign) NSInteger lastSelectedIndex;
@property(nonatomic, strong) UIButton *arrowButton;
@property(nonatomic, strong) UIView *gradientMask;
@property(nonatomic, strong) UICollectionView *tabCollectionView;
@@ -145,7 +147,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
- (instancetype)init {
if (self = [super init]) {
self.backgroundColor = [[ClientConfig shareConfig] bgColor];
self.lastSelectedIndex = -1;
[self addSubview:self.tabCollectionView];
[self addSubview:self.arrowButton];
@@ -205,9 +207,15 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
}
[self.tabCollectionView reloadData];
if (_tabArray.count > 0) {
[self.tabCollectionView selectItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]
animated:NO
scrollPosition:UICollectionViewScrollPositionNone];
if (self.lastSelectedIndex > -1 && self.lastSelectedIndex < self.tabArray.count - 1) {
[self.tabCollectionView selectItemAtIndexPath:[NSIndexPath indexPathForRow:self.lastSelectedIndex inSection:0]
animated:NO
scrollPosition:UICollectionViewScrollPositionNone];
} else {
[self.tabCollectionView selectItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]
animated:NO
scrollPosition:UICollectionViewScrollPositionNone];
}
}
}
@@ -237,6 +245,10 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
self.lastSelectedIndex = indexPath.row;
}
#pragma mark -
- (UIButton *)arrowButton {
if (!_arrowButton) {

View File

@@ -172,6 +172,9 @@
if (isLock) {
return [self.micBossLockSkins objectForKey:@(self.currentSkinID).stringValue];
} else {
if (self.currentSkinID == 0) {
return kImage(@"room_boss_mic");
}
return [self.micBossSkins objectForKey:@(self.currentSkinID).stringValue];
}
}

View File

@@ -143,7 +143,18 @@ exitCurrentRoom:(void(^)(void))exit {
} else {
self.ballImageView.hidden = NO;
}
[self.coinsLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
if (self.bigBallImageView.hidden == NO) {
make.centerX.mas_equalTo(self.bigBallImageView);
make.width.mas_lessThanOrEqualTo(self.bigBallImageView).multipliedBy(0.8);
} else {
make.centerX.mas_equalTo(self.ballImageView);
make.width.mas_lessThanOrEqualTo(self.ballImageView).multipliedBy(0.8);
}
make.top.mas_equalTo(self).offset(kGetScaleWidth(18));
make.height.mas_equalTo(kGetScaleWidth(28));
}];
}
- (instancetype)initWithFrame:(CGRect)frame {
@@ -241,7 +252,7 @@ exitCurrentRoom:(void(^)(void))exit {
make.centerX.mas_equalTo(self.ballImageView);
make.top.mas_equalTo(self).offset(kGetScaleWidth(18));
make.height.mas_equalTo(kGetScaleWidth(28));
make.width.mas_lessThanOrEqualTo(self.bigBallImageView).multipliedBy(0.8);
make.width.mas_lessThanOrEqualTo(self.ballImageView).multipliedBy(0.8);
}];
UILabel *titleLabel_4 = [UILabel labelInitWithText:YMLocalizedString(@"Combo_5") font:kFontSemibold(14) textColor:[UIColor whiteColor]];

View File

@@ -386,6 +386,11 @@
- (void)handleNIMNotificationMessage:(NIMMessage *)message {
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
if (![notiMsg.content isKindOfClass:[NIMChatroomNotificationContent class]]) {
return;
}
switch (content.eventType) {
case NIMChatroomEventTypeInfoUpdated: //
{

View File

@@ -1012,6 +1012,9 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
- (void)handleNIMNotificationMessage:(NIMMessage *)message {
self.isMiniEnter = NO;
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
if (![notiMsg.content isKindOfClass:[NIMChatroomNotificationContent class]]) {
return;
}
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
if (content.eventType == NIMChatroomEventTypeEnter) {

View File

@@ -264,6 +264,11 @@
}
if (message.messageType == NIMMessageTypeNotification) {
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
if (![notiMsg.content isKindOfClass:[NIMChatroomNotificationContent class]]) {
return;
}
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
switch (content.eventType) {
case NIMChatroomEventTypeEnter:

View File

@@ -20,10 +20,14 @@
@property(nonatomic, strong) SVGAImageView *svgaImageView;
@property(nonatomic, strong) SVGAParser *parser;
@property(nonatomic, strong) UILabel *nameLabel;
@property(nonatomic, assign) BOOL isForRoomType;
+ (void)registerTo:(UICollectionView *)collectionView;
+ (RoomModeCollectionCell *)cellFro:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath displayName:(BOOL)displayName;
// cell id
+ (void)registerTo:(UICollectionView *)collectionView forIndex:(NSInteger)index;
+ (RoomModeCollectionCell *)cellFroIndex:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath displayName:(BOOL)displayName;
@end
@implementation RoomModeCollectionCell
@@ -32,14 +36,24 @@
[collectionView registerClass:[self class] forCellWithReuseIdentifier:@"RoomModeCollectionCell"];
}
+ (void)registerTo:(UICollectionView *)collectionView forIndex:(NSInteger)index {
[collectionView registerClass:[self class] forCellWithReuseIdentifier:[NSString stringWithFormat:@"RoomModeCollectionCell_%@", @(index)]];
}
+ (RoomModeCollectionCell *)cellFro:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath displayName:(BOOL)displayName {
RoomModeCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"RoomModeCollectionCell" forIndexPath:indexPath];
cell.nameLabel.hidden = !displayName;
return cell;
}
- (void)dealloc
{
+ (RoomModeCollectionCell *)cellFroIndex:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath displayName:(BOOL)displayName {
RoomModeCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:[NSString stringWithFormat:@"RoomModeCollectionCell_%@", @(indexPath.row)]
forIndexPath:indexPath];
cell.nameLabel.hidden = !displayName;
return cell;
}
- (void)dealloc {
if (_svgaImageView) {
[self.svgaImageView stopAnimation];
}
@@ -49,6 +63,14 @@
[super layoutSubviews];
}
- (void)prepareForReuse {
[super prepareForReuse];
self.imageView.image = nil;
if (_svgaImageView) {
[self.svgaImageView stopAnimation];
}
}
- (void)setMicInfoModel:(RoomMicInfoModel *)micInfoModel {
_micInfoModel = micInfoModel;
@@ -56,11 +78,7 @@
if (micInfoModel.dressType == MicResourceType_Skin) {
self.imageView.image = kImage(@"room_mode_default_skin");
}else {
self.imageView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.5];
[self.imageView setCornerRadius:kGetScaleWidth(27)
corners:kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMinXMinYCorner
borderWidth:1
borderColor:[UIColor whiteColor]];
self.imageView.image = kImage(@"room_mic_normal");
}
} else {
if (micInfoModel.dressType == MicResourceType_Skin) {
@@ -71,6 +89,15 @@
}
}
- (void)setIsForRoomType:(BOOL)isForRoomType {
_isForRoomType = isForRoomType;
if (isForRoomType) {
[self.imageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(self.statusView.mas_height).multipliedBy(0.8);
}];
}
}
- (void)playSVGA:(NSString *)path{
if (!_svgaImageView) {
[self.contentView addSubview:self.svgaImageView];
@@ -90,13 +117,7 @@
} failureBlock:^(NSError * _Nullable error) { }];
}
- (void)prepareForReuse {
[super prepareForReuse];
}
- (instancetype)initWithFrame:(CGRect)frame
{
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self.contentView addSubview:self.statusView];
@@ -140,7 +161,7 @@
- (UILabel *)nameLabel {
if (!_nameLabel) {
_nameLabel = [UILabel labelInitWithText:@"?" font:kFontRegular(18) textColor:[UIColor whiteColor]];
_nameLabel = [UILabel labelInitWithText:@"?" font:kFontRegular(13) textColor:[UIColor whiteColor]];
_nameLabel.textAlignment = NSTextAlignmentCenter;
}
return _nameLabel;
@@ -230,7 +251,7 @@
self.nextLevelLabel.text = [NSString stringWithFormat:@"%@%@", YMLocalizedString(@"1.0.33_text_9"), @(LevelInfo.nextLevel)];
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)];
self.adminLabel.text = [NSString stringWithFormat:YMLocalizedString(@"1.0.33_text_7"), @(LevelInfo.currentManagerNum), @(LevelInfo.managerLimitNum)];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@@ -281,14 +302,14 @@
[self.currentLevelLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(self.avatarImage);
make.top.mas_equalTo(self.avatarImage.mas_bottom).offset(12);
make.size.mas_equalTo(CGSizeMake(40, 17));
make.height.mas_equalTo(18);
}];
[self.contentView addSubview:self.nextLevelLabel];
[self.nextLevelLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(self.backgroundImageView).offset(-16);
make.top.mas_equalTo(self.avatarImage.mas_bottom).offset(12);
make.size.mas_equalTo(CGSizeMake(40, 17));
make.height.mas_equalTo(18);
}];
[self.contentView addSubview:self.expProgressView];
@@ -404,7 +425,7 @@
+ (CGFloat)cellHeight:(NSInteger)cellCount {
NSInteger line = cellCount/3 + cellCount%3;
return MAX(0, line) * (87 + 4 + 18) + MAX(0, line-1) * 10;
return MAX(0, line) * (90 + 4 + 18) + MAX(0, line-1) * 10;
}
+ (void)registerTo:(UITableView *)tableView {
@@ -469,6 +490,7 @@
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
RoomModeCollectionCell *cell = [RoomModeCollectionCell cellFro:collectionView indexPath:indexPath displayName:YES];
cell.isForRoomType = YES;
NSDictionary *dic = [self.dataSource xpSafeObjectAtIndex:indexPath.row];
if (dic) {
cell.selected = [[dic objectForKey:@"isUses"] boolValue];
@@ -671,6 +693,7 @@
+ (void)registerTo:(UITableView *)tableView {
[tableView registerClass:[self class] forCellReuseIdentifier:@"RoomModeMicEffectCard"];
}
+ (RoomModeMicEffectCard *)cellFro:(UITableView *)tableView
indexPath:(NSIndexPath *)indexPath
effects:(NSArray <RoomMicInfoModel *> *)effects
@@ -867,7 +890,7 @@
- (void)didTapHelp {
XPWebViewController *vc = [[XPWebViewController alloc] initWithRoomUID:@(self.roomInfo.uid).stringValue];
vc.url = @"https://jandan.net/pic";
vc.url = URLWithType(KRoomLevelRule);
[self.navigationController pushViewController:vc animated:YES];
}
@@ -934,7 +957,7 @@
case 1:
case 2:
case 3:
return 66;
return 46;
break;
default:
@@ -976,27 +999,6 @@
return headerView;
}
//- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
// switch (section) {
// case 0:
// return @"";
// break;
// case 1:
// return YMLocalizedString(@"1.0.33_text_2");
// break;
// case 2:
// return YMLocalizedString(@"1.0.33_text_3");
// break;
// case 3:
// return YMLocalizedString(@"1.0.33_text_4");
// break;
//
// default:
// return @"";
// break;
// }
//}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
switch (section) {
case 0:

View File

@@ -147,7 +147,13 @@
}
if (message.messageType == NIMMessageTypeNotification) {
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
if (![notiMsg.content isKindOfClass:[NIMChatroomNotificationContent class]]) {
return;
}
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
switch (content.eventType) {
case NIMChatroomEventTypeEnter:
case NIMChatroomEventTypeExit:

View File

@@ -180,9 +180,6 @@
item.title = YMLocalizedString(@"XPUserCardPresenter0");
} else {
switch (roomInfo.type) {
// case RoomType_Game:
// item.title = YMLocalizedString(@"XPUserCardPresenter1");
// break;
case RoomType_Anchor:
item.title = YMLocalizedString(@"XPMoreMenuPresenter12");
break;
@@ -206,7 +203,6 @@
item.title = [NSString stringWithFormat:YMLocalizedString(@"XPUserCardPresenter4"), i+1];
}
}
// targetMember.type != NIMChatroomMemberTypeCreator
MicroQueueModel * micModel = [micQueue objectForKey:[NSString stringWithFormat:@"%d", i - 1]];
if ((micModel && micModel.userInfo && micModel.userInfo.uid > 0) || (micModel.microState.position == -1 && roomInfo.type == RoomType_Game)) {
item.isEnable = NO;

View File

@@ -232,6 +232,13 @@
@implementation UserRoomMicPositionView
- (void)dealloc
{
if (self.handleDismiss) {
self.handleDismiss();
}
}
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
self.backgroundColor = [UIColor blackColor];
@@ -1217,7 +1224,15 @@
}
break;
case UserCardItemType_Manager: {
[TTPopup popupView:[self managerLimitToast] style:TTPopupStyleAlert];
return;
if (item.isSelect) {
if ([self isSuperUser]) {
[self.presenter superAdminHandleUser:self.cardInfo.uid opt:@"1" roomUid:roomUid isSet:!item.isSelect];
} else {
[self.presenter makeUserManager:self.cardInfo.uid roomId:roomId enable:!item.isSelect];
}
} else {
@kWeakify(self);
[self.presenter checkManagerLimit:roomUid success:^{
@kStrongify(self);
@@ -1226,13 +1241,11 @@
} else {
[self.presenter makeUserManager:self.cardInfo.uid roomId:roomId enable:!item.isSelect];
}
} failure:^(NSError * _Nonnull error) {}];
} else {
if ([self isSuperUser]) {
[self.presenter superAdminHandleUser:self.cardInfo.uid opt:@"1" roomUid:roomUid isSet:!item.isSelect];
} else {
[self.presenter makeUserManager:self.cardInfo.uid roomId:roomId enable:!item.isSelect];
}
} failure:^(NSError * _Nonnull error) {
if (error.code == 20505) {
[TTPopup popupView:[self managerLimitToast] style:TTPopupStyleAlert];
}
}];
}
}
break;
@@ -1248,6 +1261,53 @@
}
}
- (UIView *)managerLimitToast {
UIView *view = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth-80, kGetScaleWidth(290))];
[view setBackgroundColor:[UIColor whiteColor]];
[view setCornerRadius:16];
UILabel *tipTitleLabel = [UILabel labelInitWithText:YMLocalizedString(@"UserDetail_CP_Toast_0") font:kFontMedium(15) textColor:UIColorFromRGB(0x313131)];
tipTitleLabel.textAlignment = NSTextAlignmentCenter;
UILabel *tipContentLabel = [UILabel labelInitWithText:YMLocalizedString(@"1.0.33_text_19") font:kFontMedium(15) textColor:UIColorFromRGB(0x313131)];
tipContentLabel.numberOfLines = 0;
UIImageView *ruleImageView = [[UIImageView alloc] initWithImage:kImage(@"room_manager_limit")];
UIButton *confirmButton = [UIButton buttonWithType:UIButtonTypeCustom];
[confirmButton setCornerRadius:18];
[confirmButton addGradientBackgroundWithColors:@[
UIColorFromRGB(0xE29030), UIColorFromRGB(0xFCC074)
] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1, 0.5) cornerRadius:18];
[view addSubview:tipTitleLabel];
[view addSubview:tipContentLabel];
[view addSubview:ruleImageView];
[view addSubview:confirmButton];
[tipTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.top.trailing.mas_equalTo(view).inset(14);
make.height.mas_equalTo(22);
}];
[tipContentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(tipTitleLabel.mas_bottom).offset(12);
make.leading.trailing.mas_equalTo(view).inset(23);
}];
[ruleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.mas_equalTo(tipContentLabel);
make.top.mas_equalTo(tipContentLabel.mas_bottom).offset(12);
make.height.mas_equalTo(kGetScaleWidth(238));
}];
[confirmButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(view).offset(-14);
make.leading.trailing.mas_equalTo(tipContentLabel);
make.height.mas_equalTo(36);
}];
return view;
}
- (void)handleUpDown:(XPUserCardItemModel *)item {
// VIP T
if (self.userInfoModel.userVipInfoVO.preventKick &&
@@ -1416,15 +1476,14 @@
}
- (void)handleInviteMicro:(XPUserCardItemModel *)item {
self.upMicFlag = NO;
if ([AccountInfoStorage instance].getUid.integerValue == self.userInfoModel.uid) {
NSString * roomId = [NSString stringWithFormat:@"%ld", self.cardInfo.roomInfo.roomId];
[self.presenter upMicro:roomId position:item.position userInfo:self.userInfoModel];
} else {
if (self.cardInfo.roomInfo.leaveMode &&
item.isEnable == NO
// [item.position isEqualToString:@"-1"]
) {
item.isEnable == NO) {
return;
}
@@ -1435,7 +1494,8 @@
success:^{
@kStrongify(self);
[self buildUpMicMessage:item];
} failure:^(NSError * _Nonnull error) { }];
} failure:^(NSError * _Nonnull error) {
}];
} else {
[self buildUpMicMessage:item];
}
@@ -1462,7 +1522,6 @@
[self dismissViewControllerAnimated:YES completion:^{
[[NSNotificationCenter defaultCenter] postNotificationName:@"PopAfterUserCardAction" object:nil];
}];
}
- (void)handleAtUser:(XPUserCardItemModel *)item {

View File

@@ -435,6 +435,9 @@ UIKIT_EXTERN NSString *kRoomKickoutTime;
if (message.messageType == NIMMessageTypeNotification) {
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
if (![notiMsg.content isKindOfClass:[NIMChatroomNotificationContent class]]) {
return;
}
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
[self handleNIMNotificationMessage:content];
[self handleNIMNotificationSaveMessage:message];

View File

@@ -1855,11 +1855,21 @@ XPCandyTreeInsufficientBalanceViewDelegate>
continue;
}
NSLog(@" --- Message Raw Attach Content: %@, %ld", message.rawAttachContent, (long)message.messageType);
NSLog(@" --- Message Raw Attach Content: %@, %@, %ld", @(message.senderClientType), message.rawAttachContent, (long)message.messageType);
if (message.messageType == NIMMessageTypeNotification) {
NIMNotificationObject *notiMsg = (NIMNotificationObject *)message.messageObject;
NIMChatroomNotificationContent *content = (NIMChatroomNotificationContent *)notiMsg.content;
NSLog(@" --- Message Content class: %@", [notiMsg.content class]);
if ([notiMsg.content isKindOfClass:[NIMUnsupportedNotificationContent class]]) {
NSLog(@"Fuck %@", message);
}
if (![notiMsg.content isKindOfClass:[NIMChatroomNotificationContent class]]) {
return;
}
NSInteger onLineNumber = self.roomInfo.onlineNum;
switch (content.eventType) {
case NIMChatroomEventTypeInfoUpdated: //

View File

@@ -304,7 +304,9 @@
springAnimation.springBounciness = 10.f;
springAnimation.fromValue = [NSValue valueWithCGPoint:bannerView.center];
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(bannerView.frame.size.width / 2, bannerView.center.y)];
@kWeakify(self);
[springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
@kStrongify(self);
if (finished) {
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, bannerView.center.y)];
@@ -342,7 +344,6 @@
} else if (model.skipType == 7) {
//
}
}
#pragma mark - h5
-(void)receiveCommonH5Banner:(AttachmentModel *)attachment{

View File

@@ -157,14 +157,13 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[self.presenter autoLogin];
[self initTabs:NO defaultSelectedIndex:0];
[[ClientConfig shareConfig] clientInit];
// [[ClientConfig shareConfig] clientInit];
[[NIMSDK sharedSDK].loginManager addDelegate:self];
[[NIMSDK sharedSDK].chatManager addDelegate:self];
[[NIMSDK sharedSDK].systemNotificationManager addDelegate:self];
[[NIMSDK sharedSDK].broadcastManager addDelegate:self];
[self networkReachability];
[self.view addSubview:self.roomMineView];
@kWeakify(self);
@@ -242,7 +241,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[self.presenter loginNIM];
[self.presenter getUserInfo];
[[UploadFile share]initQCloud];
[[UploadFile share] initQCloud];
///
[self.presenter getVersionUpdate];
@@ -274,6 +273,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[[IAPManager sharedManager] handleLogin];
[[IAPManager sharedManager] retryCheckAllReceipt];
}
-(void)getRoomGameInfo{
[Api getRoomGameDetailsForHoem:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
@@ -345,6 +345,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[self monentsUnReadCount];
}
-(void)loginIng{
if ((self.userInfo.nick == nil || self.userInfo.avatar == nil) && self.isFormLogin == NO) {
[self completeUserInfo];
@@ -366,6 +367,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[self monentsUnReadCount];
}
- (void)getAuthorizationCodeInfoWithPhonefail{
[self completeUserInfo];
}
@@ -450,8 +452,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)clientStartApp {
// [self.presenter clientStartApp];
}
#pragma mark -
- (void)networkReachability{}
#pragma mark - BaseMvpProtocol
- (void)tokenInvalid {

View File

@@ -4037,20 +4037,26 @@ ineHeadView12" = "الحمل";
//"1.0.31_text_3" = "Selective cardiography";
"1.0.31_text_4" = "موقف الميكروفون";
"1.0.33_text_1" = "Room Mode";
"1.0.33_text_2" = "Room Type";
"1.0.33_text_3" = "Mic Skin";
"1.0.33_text_4" = "Mic Effect";
"1.0.33_text_5" = "Use";
"1.0.33_text_6" = "Room Value:";
"1.0.33_text_7" = "Room Admind:";
"1.0.33_text_8" = "Distance to Next Lv:";
"1.0.33_text_9" = "Lv.";
"1.0.33_text_10" = "Classic";
"1.0.33_text_11" = "Party";
"1.0.33_text_12" = "Carnival";
"1.0.33_text_13" = "Celebration";
"1.0.33_text_14" = "Unique";
"1.0.33_text_15" = "房間等級不夠,不能使用該皮膚。";
"1.0.33_text_16" = "Rules";
"1.0.33_text_17" = "1. You can contact the official customer service and provide relevant evidence to improve the star rating. \n2. The star rating is divided into 1~5 stars.5 stars is the best recharge agent. \n3. The star rating will be displayed when the user found the recharge agent. \n4. The higher the star rating, the higher the ranking in the transfer list. \n5. All interpretation rights belong to the official and have nothing to do with Google or Apple.";
"1.0.33_text_1" = "وضع الغرفة";
"1.0.33_text_2" = "نوع الغرفة";
"1.0.33_text_3" = "مظهر الميكروفون";
"1.0.33_text_4" = "تأثير الميكروفون";
"1.0.33_text_5" = "الاستخدام";
"1.0.33_text_6" = "قيمة الغرفة:";
"1.0.33_text_7" = "مشرف الغرفة:%@/%@";
"1.0.33_text_8" = "المسافة إلى المستوى التالي:";
"1.0.33_text_9" = "المستوى";
"1.0.33_text_10" = "كلاسيكي";
"1.0.33_text_11" = "حفلة";
"1.0.33_text_12" = "كرنفال";
"1.0.33_text_13" = "احتفال";
"1.0.33_text_14" = "فريد";
"1.0.33_text_15" = "مستوى الغرفة ليس كافيا لاستخدام هذا الجلد.";
"1.0.33_text_16" = "وصف مستوى الغرفة";
"1.0.33_text_17" = "١. يمكنك الاتصال بخدمة العملاء الرسمية وتقديم الأدلة ذات الصلة لتحسين تصنيف النجوم
\n\٢. ينقسم تصنيف النجوم إلى 1 ~ 5 نجوم. 5 نجوم هي أفضل وكيل إعادة شحن
\n\٣. سيتم عرض تصنيف النجوم عندما يجد المستخدم وكيل إعادة الشحن
\n\٤ كلما ارتفع تصنيف النجوم، ارتفع الترتيب في قائمة النقل
\n\٥. جميع حقوق التفسير مملوكة للمسؤول ولا علاقة لها بـ قوقل أو ابل";
"1.0.33_text_18" = "مستوى الغرفة>=%@ يمكن استخدامه";
"1.0.33_text_19" = "عدد المسؤولين المقابلين لمستوى غرفتك الحالي ممتلئ، يرجى الترقية أولاً ثم الإضافة!";

View File

@@ -2935,7 +2935,7 @@
///XPMineGiveDiamondDetailsCell
"XPMineGiveDiamondDetailsCell0"="Total Spend %@ Coins";
///XPMineChooseGiveGiftView
"XPMineChooseGiveGiftView0"="Quantity";
"XPMineChooseGiveGiftView0"="Quantity: ";
"XPMineChooseGiveGiftView1"="All";
"XPMineChooseGiveGiftView2"="Please select a gift first";
"XPMineChooseGiveGiftView3"="Invalid gift quantity, please re-enter";
@@ -3829,14 +3829,13 @@
"1.0.31_text_2" = "Country/Region List";
//"1.0.31_text_3" = "Selective cardiography";
"1.0.31_text_4" = "Mic Position";
"1.0.33_text_1" = "Room Mode";
"1.0.33_text_2" = "Room Type";
"1.0.33_text_3" = "Mic Skin";
"1.0.33_text_4" = "Mic Effect";
"1.0.33_text_5" = "Use";
"1.0.33_text_6" = "Room Value:";
"1.0.33_text_7" = "Room Admind:";
"1.0.33_text_7" = "Room Admind:%@/%@";
"1.0.33_text_8" = "Distance to Next Lv:";
"1.0.33_text_9" = "Lv.";
"1.0.33_text_10" = "Classic";
@@ -3844,6 +3843,8 @@
"1.0.33_text_12" = "Carnival";
"1.0.33_text_13" = "Celebration";
"1.0.33_text_14" = "Unique";
"1.0.33_text_15" = "房間等級不夠,不能使用該皮膚。";
"1.0.33_text_16" = "Rules";
"1.0.33_text_17" = "1. You can contact the official customer service and provide relevant evidence to improve the star rating. \n2. The star rating is divided into 1~5 stars.5 stars is the best recharge agent. \n3. The star rating will be displayed when the user found the recharge agent. \n4. The higher the star rating, the higher the ranking in the transfer list. \n5. All interpretation rights belong to the official and have nothing to do with Google or Apple.";
"1.0.33_text_15" = "Room level is not enough to use this skin.";
"1.0.33_text_16" = "Room Level Description";
"1.0.33_text_17" = "1. You can contact the official customer service and provide relevant evidence to improve the star rating.\n2. The star rating is divided into 1~5 stars.5 stars is the best recharge agent.\n3. The star rating will be displayed when the user found the recharge agent.\n4. The higher the star rating, the higher the ranking in the transfer list.\n5. All interpretation rights belong to the official and have nothing to do with Google or Apple.";
"1.0.33_text_18" = "Room Lv. >=%@ Can be used";
"1.0.33_text_19" = "The number of admins corresponding to your current room level is full, please upgrade first and then add!";

View File

@@ -959,6 +959,12 @@
"abbr": "UAE",
"mcc": "424",
"code": "971"
},
{
"name": "Yemen",
"abbr": "YE",
"mcc": "607",
"code": "967"
}
]
}

View File

@@ -2536,7 +2536,7 @@
///XPMineGiveDiamondDetailsCell
"XPMineGiveDiamondDetailsCell0"="Toplam Harcanan %@ Altın";
///XPMineChooseGiveGiftView
"XPMineChooseGiveGiftView0"="Miktar";
"XPMineChooseGiveGiftView0"="Miktar: ";
"XPMineChooseGiveGiftView1"="Hepsi";
"XPMineChooseGiveGiftView2"="Lütfen hediye seçin";
"XPMineChooseGiveGiftView3"="Hediye miktarı yanlış, lütfen tekrar girin";
@@ -3616,20 +3616,22 @@
//"1.0.31_text_3" = "Selective cardiography";
"1.0.31_text_4" = "Mikrofon pozisyonu";
"1.0.33_text_1" = "Room Mode";
"1.0.33_text_2" = "Room Type";
"1.0.33_text_3" = "Mic Skin";
"1.0.33_text_4" = "Mic Effect";
"1.0.33_text_5" = "Use";
"1.0.33_text_6" = "Room Value:";
"1.0.33_text_7" = "Room Admind:";
"1.0.33_text_8" = "Distance to Next Lv:";
"1.0.33_text_1" = "Oda Modu";
"1.0.33_text_2" = "Oda Türü";
"1.0.33_text_3" = "Mikrofon Görünümü";
"1.0.33_text_4" = "Mikrofon Efekti";
"1.0.33_text_5" = "Kullanım";
"1.0.33_text_6" = "Oda Değeri:";
"1.0.33_text_7" = "Oda Yöneticisi:%@/%@";
"1.0.33_text_8" = "Bir Sonraki Lv.'ye Uzaklık:";
"1.0.33_text_9" = "Lv.";
"1.0.33_text_10" = "Classic";
"1.0.33_text_11" = "Party";
"1.0.33_text_12" = "Carnival";
"1.0.33_text_13" = "Celebration";
"1.0.33_text_14" = "Unique";
"1.0.33_text_15" = "房間等級不夠,不能使用該皮膚。";
"1.0.33_text_16" = "Rules";
"1.0.33_text_17" = "1. You can contact the official customer service and provide relevant evidence to improve the star rating. \n2. The star rating is divided into 1~5 stars.5 stars is the best recharge agent. \n3. The star rating will be displayed when the user found the recharge agent. \n4. The higher the star rating, the higher the ranking in the transfer list. \n5. All interpretation rights belong to the official and have nothing to do with Google or Apple.";
"1.0.33_text_10" = "Klasik";
"1.0.33_text_11" = "Parti";
"1.0.33_text_12" = "Karnaval";
"1.0.33_text_13" = "Kutlama";
"1.0.33_text_14" = "Benzersiz";
"1.0.33_text_15" = "Bu skini kullanmak için oda seviyesi yeterli değil.";
"1.0.33_text_16" = "Oda Seviyesi Açıklaması";
"1.0.33_text_17" = "1. Yıldız derecelendirmesini artırmak için resmi müşteri hizmetleriyle iletişime geçebilir ve ilgili kanıtları sağlayabilirsiniz.\n2. Yıldız derecelendirmesi 1~5 yıldıza bölünmüştür. 5 yıldız en iyi şarj aracıdır.\n3. Yıldız derecelendirmesi, kullanıcı şarj aracısını bulduğunda görüntülenecektir.\n4. Yıldız derecelendirmesi ne kadar yüksekse, transfer listesindeki sıralama da o kadar yüksek olur.\n5. Tüm yorumlama hakları resmiyete aittir ve Google veya Apple ile hiçbir ilgisi yoktur.";
"1.0.33_text_18" = "Oda Lv. >=%@ Kullanılabilir";
"1.0.33_text_19" = "Mevcut oda seviyenize karşılık gelen yönetici sayısı doldu, lütfen önce yükseltin ve ardından ekleyin!";

View File

@@ -2580,7 +2580,7 @@
///XPMineGiveDiamondDetailsCell
"XPMineGiveDiamondDetailsCell0"="總支出%@金幣";
///XPMineChooseGiveGiftView
"XPMineChooseGiveGiftView0"="數量";
"XPMineChooseGiveGiftView0"="數量: ";
"XPMineChooseGiveGiftView1"="全部";
"XPMineChooseGiveGiftView2"="請先選擇禮物";
"XPMineChooseGiveGiftView3"="禮物數量有誤,請重新輸入";
@@ -3488,20 +3488,22 @@
//"1.0.31_text_3" = "Selective cardiography";
"1.0.31_text_4" = "選擇麥位";
"1.0.33_text_1" = "Room Mode";
"1.0.33_text_2" = "Room Type";
"1.0.33_text_3" = "Mic Skin";
"1.0.33_text_4" = "Mic Effect";
"1.0.33_text_5" = "Use";
"1.0.33_text_6" = "Room Value:";
"1.0.33_text_7" = "Room Admind:";
"1.0.33_text_8" = "Distance to Next Lv:";
"1.0.33_text_9" = "Lv.";
"1.0.33_text_10" = "Classic";
"1.0.33_text_11" = "Party";
"1.0.33_text_12" = "Carnival";
"1.0.33_text_13" = "Celebration";
"1.0.33_text_14" = "Unique";
"1.0.33_text_15" = "房間等級不夠,不能使用皮膚。";
"1.0.33_text_16" = "Rules";
"1.0.33_text_17" = "1. You can contact the official customer service and provide relevant evidence to improve the star rating. \n2. The star rating is divided into 1~5 stars.5 stars is the best recharge agent. \n3. The star rating will be displayed when the user found the recharge agent. \n4. The higher the star rating, the higher the ranking in the transfer list. \n5. All interpretation rights belong to the official and have nothing to do with Google or Apple.";
"1.0.33_text_1" = "房間模式";
"1.0.33_text_2" = "房型";
"1.0.33_text_3" = "麥克風皮膚";
"1.0.33_text_4" = "麥克風效果";
"1.0.33_text_5" = "使用";
"1.0.33_text_6" = "房間價值:";
"1.0.33_text_7" = "房間管理員:%@/%@";
"1.0.33_text_8" = "到下一等級的距離:";
"1.0.33_text_9" = "等级";
"1.0.33_text_10" = "經典的";
"1.0.33_text_11" = "派對";
"1.0.33_text_12" = "狂歡";
"1.0.33_text_13" = "慶典";
"1.0.33_text_14" = "獨特的";
"1.0.33_text_15" = "房間等級不足以使用皮膚。";
"1.0.33_text_16" = "房間等級說明";
"1.0.33_text_17" = "1.您可以聯絡官方客服並提供相關證據來提升星級。\n2.星級分為1~5星。5星是最好的儲值代理。\n3.用戶找到儲值代理商時會顯示星級。\n4.星級越高,在轉職榜的排名越高。\n5.所有解釋權歸官方所有與Google或蘋果無關。";
"1.0.33_text_18" = "房間等級>=%@可以使用";
"1.0.33_text_19" = "您目前房間等級對應的管理員人數已滿,請先升級再新增!";