Compare commits

...

4 Commits

Author SHA1 Message Date
eggmanQQQ
a4d8ae4386 修正混淆環境容易出錯的部分 2024-06-28 17:36:24 +08:00
eggmanQQQ
79fca3d9b6 Last update 2024-06-28 17:24:13 +08:00
eggmanQQQ
c77e0c0f7b 更新 Bugly ID 2024-06-28 11:35:19 +08:00
eggmanQQQ
c3627d5934 个人资料页礼物适配大小 2024-06-28 10:54:28 +08:00
39 changed files with 250 additions and 115 deletions

View File

@@ -12860,6 +12860,10 @@
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
@@ -12898,6 +12902,10 @@
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_COMPILATION_MODE = singlefile;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 5.0;

View File

@@ -86,14 +86,16 @@ UIKIT_EXTERN NSString * adImageName;
#ifdef DEBUG
config.debugMode = YES; // debug
config.channel = [YYUtility getAppSource];; config.blockMonitorEnable = YES; //
config.channel = [YYUtility getAppSource];
config.blockMonitorEnable = YES; //
config.reportLogLevel = BuglyLogLevelVerbose; //
[Bugly startWithAppId:@"86cf73b8d5" config:config];
[Bugly startWithAppId:@"c937fd00f7" config:config];
#else
config.debugMode = NO; // release
config.channel = [YYUtility getAppSource];; config.blockMonitorEnable = NO; //
config.channel = [YYUtility getAppSource];;
config.blockMonitorEnable = NO; //
config.reportLogLevel = BuglyLogLevelWarn; //
NSString *buylyKey = isEnterprise == NO ? @"5334684d86" : @"d65df59a68";
NSString *buylyKey = @"8627948559"; // isEnterprise == NO ? @"5334684d86" : @"d65df59a68";
[Bugly startWithAppId:buylyKey config:config];
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "1024*1024 1.png",
"filename" : "1024_副本.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"

View File

@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
"filename" : "home_hour_no_1_ar@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_hour_no_1_ar@3x.png",
"filename" : "图层 2@3x (1).png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
"filename" : "home_week_no_1_ar@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_week_no_1_ar@3x.png",
"filename" : "图层 1@3x (1).png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
"filename" : "home_hour_no_1_en@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_hour_no_1_en@3x.png",
"filename" : "图层 2@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -5,12 +5,11 @@
"scale" : "1x"
},
{
"filename" : "home_week_no_1_en@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "home_week_no_1_en@3x.png",
"filename" : "图层 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "room_header_topic_icon@2x.png",
"filename" : "组 2217@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_header_topic_icon@3x.png",
"filename" : "组 2217@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -20,8 +20,8 @@
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserIcon;
NetImageConfig *config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserInfoAlbum;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_imageView = [[NetImageView alloc] initWithConfig:config];
_imageView.layer.masksToBounds = YES;
@@ -105,7 +105,7 @@ didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
#pragma mark - UICollectionViewDelegateFlowLayout
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
return CGSizeMake(80, 80);
return CGSizeMake(81, 81);
}
#pragma mark - SDPhotoBrowserDelegate
@@ -126,8 +126,8 @@ didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (!_albumCollectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
layout.minimumInteritemSpacing = 10;
layout.minimumLineSpacing = 10;
layout.minimumInteritemSpacing = 4.5;
layout.minimumLineSpacing = 4.5;
_albumCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
collectionViewLayout:layout];
_albumCollectionView.backgroundColor = [UIColor clearColor];

View File

@@ -51,7 +51,7 @@
[self.contentView addSubview:self.numberImageView];
[self.numberImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.mas_equalTo(8);
make.left.top.mas_equalTo(4);
make.width.height.mas_equalTo(20);
}];
}
@@ -148,8 +148,9 @@
self.contentView.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:self.giftsCollectionView];
[self.giftsCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.contentView).offset(14);
make.edges.mas_equalTo(self.contentView);
// make.left.mas_equalTo(self.contentView).offset(14);
make.top.mas_equalTo(self.contentView).offset(0);
make.left.right.bottom.mas_equalTo(self.contentView);
}];
[self.contentView addSubview:self.noDataLabel];
@@ -170,12 +171,17 @@
[self.giftsCollectionView reloadData];
}
+ (CGFloat)cellHeight:(BOOL)isExpand source:(NSArray *)dataSource {
+ (CGFloat)cellHeight:(BOOL)isExpand
source:(NSArray *)dataSource {
NSInteger width = (KScreenWidth - 28 - 2.5*3)/4;
NSInteger height = width * 120 / 86;
if (isExpand) {
NSInteger line = (dataSource.count / 4) + (dataSource.count % 4 > 0 ? 1 : 0);
return MAX(line * 120 + line * 10, 120);
return MAX(line * height + line * 10, height);
} else {
return 120;
return height;
}
}
@@ -201,8 +207,12 @@
#pragma mark - UICollectionViewDelegateFlowLayout
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
return CGSizeMake(86, 120);
- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout *)collectionViewLayout
sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
NSInteger width = (KScreenWidth - 28 - 2.5*3)/4;
NSInteger height = width * 120 / 86;
return CGSizeMake(width, height);
}
#pragma mark -
@@ -210,7 +220,7 @@
if (!_giftsCollectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
layout.minimumInteritemSpacing = 10;
layout.minimumInteritemSpacing = 2.5;
layout.minimumLineSpacing = 10;
_giftsCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
collectionViewLayout:layout];

View File

@@ -310,8 +310,11 @@ typedef enum : NSUInteger {
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section == Medal) {
return self.medalInfo.medalCount == 0 ? 0 : 30;
} else if (section == Gifts || section == LuckyGifts) {
return 50;
}
return 30;
}

View File

@@ -172,7 +172,6 @@ XPMineCustomNavViewDelegate, XPMineUserInfoProtocol, XPMineUserInfoHeaderViewDel
return [KeyWithType(KeyType_SecretaryUidKey) isEqualToString:[NSString stringWithFormat:@"%ld", self.uid]] || [KeyWithType(KeyType_SystemNotifiUidKey) isEqualToString:[NSString stringWithFormat:@"%ld", self.uid]] || [KeyWithType(KeyType_GuildUidKey) isEqualToString:[NSString stringWithFormat:@"%ld", self.uid]];
}
- (void)showRightNavHandle {
NSMutableArray<TTActionSheetConfig *> *array = [NSMutableArray array];
NSString *uid = [NSString stringWithFormat:@"%ld",self.uid];

View File

@@ -76,6 +76,7 @@ return view;\
@property (nonatomic,strong) UIImageView *beautifulImageView;
///id
@property (nonatomic,strong) UILabel *idLabel;
@property (nonatomic, strong) UIImageView *idIconImageView;
///
@property (nonatomic, strong) UIImageView *copyIdImageView;
@@ -129,6 +130,8 @@ return view;\
@property (nonatomic, strong) UILabel *fansNum;
@property (nonatomic, strong) UILabel *followersNum;
@end
@implementation XPMineUserInfoHeaderView
@@ -145,7 +148,7 @@ return view;\
+ (CGFloat)headerHeight:(UserInfoModel *)model {
if (model.userDesc.length == 0) {
return 500;
return 470;
} else {
//
CGFloat maxWidth = KScreenWidth - 70;
@@ -165,7 +168,7 @@ return view;\
//
NSInteger numberOfLines = ceil(textRect.size.height / lineHeight);
if (numberOfLines>1) {
return 520;
return 480;
}
}
return 500;
@@ -194,7 +197,7 @@ return view;\
[self.onlineButton addSubview:self.onlineIconView];
[self.onlineIconView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(4);
make.leading.mas_equalTo(8);
make.centerY.mas_equalTo(0);
make.width.mas_equalTo(12);
make.height.mas_equalTo(12);
@@ -208,9 +211,7 @@ return view;\
self.onlineIconView.clearsAfterStop = NO;
self.onlineIconView.videoItem = videoItem;
[self.onlineIconView startAnimation];
} failureBlock:^(NSError * _Nonnull error) {
}];
} failureBlock:^(NSError * _Nonnull error) { }];
[self addSubview:self.pageButton];
[self.pageButton mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -262,19 +263,15 @@ return view;\
[self.nickStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.userInfoView);
make.top.mas_equalTo(self.avatarView.mas_bottom).offset(18);
make.height.mas_equalTo(25);
make.top.mas_equalTo(self.avatarView.mas_bottom).offset(10);
make.height.mas_equalTo(20);
}];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(25);
make.width.mas_equalTo(10);
}];
[self.nobleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(20);
}];
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(28, 14));
make.height.mas_equalTo(14);
}];
}
@@ -282,6 +279,7 @@ return view;\
[self.userInfoView addSubview:self.idStackView];
[self.idStackView addArrangedSubview:self.idLabel];
[self.idStackView addSubview:self.idIconImageView];
[self.idStackView addSubview:self.copyIdImageView];
[self.idStackView insertSubview:self.beautifulImageView belowSubview:self.idLabel];
@@ -291,18 +289,18 @@ return view;\
} else {
make.centerX.mas_equalTo(self.userInfoView);
}
make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(4);
make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(6);
}];
[self.beautifulImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(23.5);
make.left.mas_equalTo(self.idLabel).offset(-24);
make.right.mas_equalTo(self.idLabel).offset(8);
make.left.mas_equalTo(self.idLabel).offset(-18);
make.right.mas_equalTo(self.idLabel).offset(4);
make.centerY.mas_equalTo(self.idLabel).offset(-0.5);
}];
[self.idIconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(14);
make.centerY.mas_equalTo(self.idLabel);
if (isMSRTL()) {
// make.centerX.mas_equalTo(self.idLabel).offset(-8);
} else {
make.centerX.mas_equalTo(self.idLabel).offset(-10);
}
make.right.mas_equalTo(self.idLabel.mas_left).offset(0);
}];
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(14);
@@ -313,7 +311,7 @@ return view;\
if (isMSRTL()) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
} else {
make.left.mas_equalTo(self.idLabel.mas_right).offset(8);
make.left.mas_equalTo(self.idLabel.mas_right).offset(0);
}
}];
}
@@ -325,7 +323,7 @@ return view;\
make.top.mas_equalTo(self.idStackView.mas_bottom).offset(4);
}];
[self.locateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(16);
make.height.mas_equalTo(14);
}];
[self.locateDateStackView addArrangedSubview:[self stackSpaceView]];
[self.locateDateStackView addArrangedSubview:self.locateLabel];
@@ -627,10 +625,10 @@ return view;\
_userInfo = userInfo;
if (_userInfo) {
self.nameLabel.text = userInfo.nick;
CGFloat width = [self widthOfText:userInfo.nick withFont:self.nameLabel.font] + 4;
[self.nameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(width);
}];
// CGFloat width = [self widthOfText:userInfo.nick withFont:self.nameLabel.font];
// [self.nameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(width);
// }];
NSString *locateString = @"";
if (userInfo.region.length > 0) {
@@ -658,37 +656,54 @@ return view;\
} else {
text = [NSString stringWithFormat:@" %ld", (long)_userInfo.erbanNo];
}
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",text] attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x191919)}];
NSTextAttachment * attachment_id = [[NSTextAttachment alloc] init];
UIImage *idIconImage = [UIImage imageNamed:@"user_info_id_mark"];
attachment_id.bounds = CGRectMake(0, -1, 11, 11);
attachment_id.image = idIconImage;
if (!hasBeautifulID) {
[textAtt insertAttributedString:[NSMutableAttributedString attributedStringWithAttachment:attachment_id] atIndex:0];
NSString *offsetSpace = @"";
if (hasBeautifulID) {
if (_userInfo.erbanNo > 9) {
offsetSpace = @" ";
} else if (_userInfo.erbanNo > 99) {
offsetSpace = @" ";
} else if (_userInfo.erbanNo > 999) {
offsetSpace = @"";
}
}
self.idLabel.attributedText = textAtt;
self.idLabel.text = [NSString stringWithFormat:@"%@%@",offsetSpace,text];
self.beautifulImageView.hidden = !hasBeautifulID;
self.idIconImageView.hidden = hasBeautifulID;
if (hasBeautifulID) {
self.idLabel.alpha = 1;
self.idLabel.textColor = [UIColor whiteColor];
//
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark"];
if (_userInfo.erbanNo > 999) {
//
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark"];
// (cap insets)
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 30, 0, 20);
// (cap insets)
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 20, 0, 4);
//
UIImage *resizableImage = [originalImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch];
//
UIImage *resizableImage = [originalImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch];
//
self.beautifulImageView.image = resizableImage;
//
self.beautifulImageView.image = resizableImage;
} else {
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark_short"];
self.beautifulImageView.image = originalImage;
}
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
if (isMSRTL()) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
} else {
make.left.mas_equalTo(self.idLabel.mas_right).offset(6);
}
}];
} else {
self.idLabel.alpha = 0.8;
if (isMSRTL()) {
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-6);
}];
}
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
if (isMSRTL()) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
} else {
make.left.mas_equalTo(self.idLabel.mas_right).offset(2);
}
}];
}
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : YMLocalizedString(@"XPMineUserInfoHeaderView6");
@@ -697,10 +712,21 @@ return view;\
self.fansNum.text = [@(_userInfo.fansNum) stringValue];
self.followersNum.text = [@(_userInfo.followNum) stringValue];
UIImage *sexBackgroundImage = nil;
if (_userInfo.gender == GenderType_Male) {
sexBackgroundImage = [UIImage gradientColorImageFromColors:@[UIColorRGBAlpha(0x6BB3FF, 0.5),UIColorFromRGB(0x6BB3FF)]
gradientType:GradientTypeTopToBottom
imgSize:CGSizeMake(35, 16)];
} else {
sexBackgroundImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xF2A0C3),UIColorFromRGB(0xEB74A6)]
gradientType:GradientTypeTopToBottom
imgSize:CGSizeMake(35, 16)];
}
[self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
self.sexImageView.selected = _userInfo.gender != GenderType_Male;
// self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
[self.sexImageView setBackgroundImage:sexBackgroundImage forState:UIControlStateNormal];
// self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
// self.sexImageView.selected = _userInfo.gender != GenderType_Male;
self.officialImageView.hidden = userInfo.defUser != UserLevelType_Offical;
self.newUserImageView.hidden = !userInfo.newUser;
@@ -860,7 +886,7 @@ return view;\
_nickStackView = [[UIStackView alloc] init];
_nickStackView.backgroundColor = [UIColor clearColor];
_nickStackView.axis = UILayoutConstraintAxisHorizontal;
_nickStackView.distribution = UIStackViewDistributionEqualCentering;
_nickStackView.distribution = UIStackViewDistributionFill;
_nickStackView.alignment = UIStackViewAlignmentCenter;
_nickStackView.spacing = 4;
if (isMSRTL()) {
@@ -889,7 +915,7 @@ return view;\
[_sexImageView setImage:kImage(@"home_age_girl_icon") forState:UIControlStateSelected];
_sexImageView.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
[_sexImageView setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
_sexImageView.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
_sexImageView.imageEdgeInsets = UIEdgeInsetsMake(0, 2, 0, 0);
_sexImageView.layer.cornerRadius = 14/2;
_sexImageView.layer.masksToBounds = YES;
}
@@ -933,6 +959,15 @@ return view;\
return _idLabel;
}
- (UIImageView *)idIconImageView {
if (!_idIconImageView) {
_idIconImageView = [[UIImageView alloc] init];
_idIconImageView.userInteractionEnabled = YES;
_idIconImageView.image = [UIImage getLanguageImage:@"user_info_id_mark"];
}
return _idIconImageView;
}
- (UIImageView *)copyIdImageView {
if (!_copyIdImageView) {
_copyIdImageView = [[UIImageView alloc] init];
@@ -980,18 +1015,19 @@ return view;\
[_onlineButton addTarget:self
action:@selector(onlineButtonAction:)
forControlEvents:UIControlEventTouchUpInside];
[_onlineButton setTitle:[NSString stringWithFormat:@" %@ ", YMLocalizedString(@"XPMineSimpleUserInfoHeaderView2")]
[_onlineButton setTitle:[NSString stringWithFormat:@"%@ ", YMLocalizedString(@"XPMineSimpleUserInfoHeaderView2")]
forState:UIControlStateNormal];
[_onlineButton.titleLabel setFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium]];
[_onlineButton setTitleColor:UIColorFromRGB(0xf7f7f7) forState:UIControlStateNormal];
// [_onlineButton setImage:[UIImage imageNamed:@"mine_online_mark"] forState:UIControlStateNormal];
[_onlineButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
_onlineButton.layer.cornerRadius = 11;
_onlineButton.layer.cornerRadius = 12;
_onlineButton.layer.masksToBounds = YES;
_onlineButton.hidden = YES;
// CGFloat spacing = 4.0; //
// _onlineButton.imageEdgeInsets = UIEdgeInsetsMake(0, spacing / 2, 0, 0);
_onlineButton.imageEdgeInsets = UIEdgeInsetsMake(0, 40, 0, 0);
_onlineButton.titleEdgeInsets = UIEdgeInsetsMake(0, 24, 0, 0);
}
return _onlineButton;
}
@@ -1003,7 +1039,7 @@ return view;\
placeholderImage:[UIImageConstant defaultBannerPlaceholder]];
_pi_cycleScrollView.backgroundColor = [UIColor clearColor];
_pi_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
_pi_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleNone;
_pi_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;//SDCycleScrollViewPageContolStyleNone;
_pi_cycleScrollView.autoScroll = NO;
// SDCycleScrollViewRTLLTR
_pi_cycleScrollView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
@@ -1043,7 +1079,7 @@ return view;\
_tagStackView.axis = UILayoutConstraintAxisHorizontal;
_tagStackView.distribution = UIStackViewDistributionFillProportionally;
_tagStackView.alignment = UIStackViewAlignmentCenter;
_tagStackView.spacing = 4;
_tagStackView.spacing = 6;
}
return _tagStackView;
}

View File

@@ -48,8 +48,8 @@
}
- (void)handleTapGesture {
if (_didTapAvatar) {
_didTapAvatar(self.type);
if (self.didTapAvatar) {
self.didTapAvatar(self.type);
}
if (self.delegate) {

View File

@@ -8,9 +8,9 @@
#import "FifteenMicStageView.h"
#import "ArabMicroView.h"
//
#define firstRowTopMargin 35
#define firstRowTopMargin 60
// 58 + 5
//#define ownerWidth (45 + 5) * kScreenScale
#define ownerWidth (45 + 5) * kScreenScale
// 12 10
#define ownerHeight (ownerWidth + 10 + 12)
// 8 55 + 5
@@ -65,23 +65,21 @@
}
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
// NSInteger index = [self getIndexByUid:uid];
NSInteger index = [self getIndexByUid:uid];
CGPoint point = CGPointZero;
// if (index == -1 && self.hostDelegate.getRoomInfo.leaveMode && self.hostDelegate.getRoomInfo.uid == uid.integerValue) {
// point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10 + ownerTopMargin);
// }
//
// if (index == 0) {
// point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10 + ownerTopMargin);
// }
//
// if (index >= 1 && index <= 4) {
// point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 1) + mcWidth / 2, firstRowTop + mcWidth / 2- 10);
// }
//
// if (index >= 5 && index <= 9) {
// point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 4 - 1) + mcWidth / 2, secondRowTop + mcWidth / 2 - 10);
// }
if (index >= 0 && index <= 4) {
point = CGPointMake(paddingH + (mcWidth + marginH) * (index) + mcWidth / 2, firstRowTopMargin + mcHeight / 2);
}
if (index >= 5 && index < 10) {
point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 5) + mcWidth / 2, sRowTop + mcHeight / 2);
}
if (index >= 10 && index < 15) {
point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 10) + mcWidth / 2, tRowTop + mcHeight / 2);
}
point = [self convertPoint:point toView:nil];
return point;
}

View File

@@ -697,7 +697,7 @@
NSString * position = [NSString stringWithFormat:@"%d", pkUserInfo.position];
NSString* roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
MicroQueueModel *micro = [self.micQueue objectForKey:position];
if (micro && micro.userInfo && micro.userInfo.uid != pkUserInfo.uid.integerValue) return;
if (micro && micro.userInfo && micro.userInfo.uid != pkUserInfo.uid.integerValue){ return; }
UserInfoModel * userInfo = self.hostDelegate.getUserInfo;
userInfo.groupType = pkUserInfo.groupType;
NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init];
@@ -711,10 +711,56 @@
if (error) return;
}];
}
}
} else if (attachment.first == CustomMessageType_Room_PK && attachment.second == Custom_Message_Sub_Room_PK_Mode_Close) {
NSDictionary * dic = attachment.data;
///
NSString * uid = [AccountInfoStorage instance].getUid;
if (dic.allKeys.count > 0 && [[[dic objectForKey:@"operatorUid"] stringValue] isEqualToString:uid]) {
NSInteger micIndex = -1;
MicroQueueModel *micro;
for (MicroQueueModel *model in self.micQueue.allValues) {
if (model.userInfo) {
if (model.userInfo.uid == uid.integerValue) {
micro = model;
micIndex = [[[self __keysForValue:model inDictionary:self.micQueue] xpSafeObjectAtIndex:0] integerValue];
break;
}
}
}
if (micro == nil) {
return;
}
NSString *position = [NSString stringWithFormat:@"%ld", (long)micIndex];
NSString *roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
UserInfoModel * userInfo = self.hostDelegate.getUserInfo;
userInfo.groupType = GroupType_default;
NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init];
request.key = position;
NSMutableDictionary *curUserInfo = [[NSMutableDictionary alloc]initWithDictionary:[self userInfoToQueueExt:userInfo]];
[curUserInfo setValue:@(YES) forKey:@"isNoProhibitMic"];
request.value = [curUserInfo toJSONString];
request.roomId = roomId;
request.transient = YES;
[[NIMSDK sharedSDK].chatroomManager updateChatroomQueueObject:request completion:^(NSError * _Nullable error) {
if (error) return;
}];
}
}
}
}
- (NSArray *)__keysForValue:(id)value inDictionary:(NSDictionary *)dictionary {
NSMutableArray *keys = [NSMutableArray array];
for (id key in dictionary) {
if ([dictionary[key] isEqual:value]) {
[keys addObject:key];
}
}
return [keys copy];
}
#pragma mark - RtcDelegate -
- (void)usersSpeaking:(NSMutableArray *)uids {
if ([RtcManager instance].isRemoteMuted) {

View File

@@ -8,7 +8,7 @@
#import "TenMicStageView.h"
#import "ArabMicroView.h"
//
#define firstRowTopMargin 35
#define firstRowTopMargin 60
// 58 + 5
//#define ownerWidth (45 + 5) * kScreenScale
// 12 10
@@ -60,5 +60,20 @@
// return 3 * (lineMargin + mcHeight) + lineMargin;
}
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
NSInteger index = [self getIndexByUid:uid];
CGPoint point = CGPointZero;
if (index >= 0 && index <= 4) {
point = CGPointMake(paddingH + (mcWidth + marginH) * (index) + mcWidth / 2, firstRowTopMargin + mcWidth / 2);
}
if (index >= 5 && index < 10) {
point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 5) + mcWidth / 2, sRowTop + mcWidth / 2);
}
point = [self convertPoint:point toView:nil];
return point;
}
@end

View File

@@ -3646,9 +3646,9 @@
"MSRoomMenuGameVC0"="Confirm to start the game?";
"MSRoomMenuGameVC1"="You do not have the right to start this game, please contact the room owner or administrator~";
"XPRoomTypeSelectionViewController0" = "classic";
"XPRoomTypeSelectionViewController1" = "party";
"XPRoomTypeSelectionViewController2" = "carnival";
"XPRoomTypeSelectionViewController0" = "Classic";
"XPRoomTypeSelectionViewController1" = "Party";
"XPRoomTypeSelectionViewController2" = "Carnival";
"XPRoomTypeSelectionViewController3" = "After the setting is completed, members who are out of the microphone order will be removed. Do you confirm the setting?";
"XPRoomTypeSelectionViewController4" = "Room type";
"XPRoomTypeSelectionViewController5" = "Using";