Compare commits
4 Commits
2.7.30
...
feature/1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a4d8ae4386 | ||
![]() |
79fca3d9b6 | ||
![]() |
c77e0c0f7b | ||
![]() |
c3627d5934 |
@@ -12860,6 +12860,10 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
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_OBJC_BRIDGING_HEADER = "";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = 1;
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
@@ -12898,6 +12902,10 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
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_COMPILATION_MODE = singlefile;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "";
|
SWIFT_OBJC_BRIDGING_HEADER = "";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
@@ -86,14 +86,16 @@ UIKIT_EXTERN NSString * adImageName;
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
config.debugMode = YES; // debug 模式下,开启调试模式
|
config.debugMode = YES; // debug 模式下,开启调试模式
|
||||||
config.channel = [YYUtility getAppSource];; config.blockMonitorEnable = YES; // 卡顿监控开关,默认关闭
|
config.channel = [YYUtility getAppSource];
|
||||||
|
config.blockMonitorEnable = YES; // 卡顿监控开关,默认关闭
|
||||||
config.reportLogLevel = BuglyLogLevelVerbose; // 设置打印日志级别
|
config.reportLogLevel = BuglyLogLevelVerbose; // 设置打印日志级别
|
||||||
[Bugly startWithAppId:@"86cf73b8d5" config:config];
|
[Bugly startWithAppId:@"c937fd00f7" config:config];
|
||||||
#else
|
#else
|
||||||
config.debugMode = NO; // release 模式下,关闭调试模式
|
config.debugMode = NO; // release 模式下,关闭调试模式
|
||||||
config.channel = [YYUtility getAppSource];; config.blockMonitorEnable = NO; // 卡顿监控开关,默认关闭
|
config.channel = [YYUtility getAppSource];;
|
||||||
|
config.blockMonitorEnable = NO; // 卡顿监控开关,默认关闭
|
||||||
config.reportLogLevel = BuglyLogLevelWarn; // 设置自定义日志上报的级别,默认不上报自定义日志
|
config.reportLogLevel = BuglyLogLevelWarn; // 设置自定义日志上报的级别,默认不上报自定义日志
|
||||||
NSString *buylyKey = isEnterprise == NO ? @"5334684d86" : @"d65df59a68";
|
NSString *buylyKey = @"8627948559"; // isEnterprise == NO ? @"5334684d86" : @"d65df59a68";
|
||||||
[Bugly startWithAppId:buylyKey config:config];
|
[Bugly startWithAppId:buylyKey config:config];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
BIN
YuMi/Assets.xcassets/AppIcon.appiconset/1024_副本.png
Normal file
After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 40 KiB |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"filename" : "1024ï¼1024 1.png",
|
"filename" : "1024_副本.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"platform" : "ios",
|
"platform" : "ios",
|
||||||
"size" : "1024x1024"
|
"size" : "1024x1024"
|
||||||
|
@@ -5,12 +5,11 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_hour_no_1_ar@2x.png",
|
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_hour_no_1_ar@3x.png",
|
"filename" : "图层 2@3x (1).png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 9.7 KiB |
BIN
YuMi/Assets.xcassets/Language/ar/home_hour_no_1_ar.imageset/图层 2@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 8.5 KiB |
@@ -5,12 +5,11 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_week_no_1_ar@2x.png",
|
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_week_no_1_ar@3x.png",
|
"filename" : "图层 1@3x (1).png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 9.9 KiB |
BIN
YuMi/Assets.xcassets/Language/ar/home_week_no_1_ar.imageset/图层 1@3x (1).png
vendored
Normal file
After Width: | Height: | Size: 7.8 KiB |
@@ -5,12 +5,11 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_hour_no_1_en@2x.png",
|
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_hour_no_1_en@3x.png",
|
"filename" : "图层 2@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 9.3 KiB |
BIN
YuMi/Assets.xcassets/Language/en/home_hour_no_1_en.imageset/图层 2@3x.png
vendored
Normal file
After Width: | Height: | Size: 8.4 KiB |
@@ -5,12 +5,11 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_week_no_1_en@2x.png",
|
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "home_week_no_1_en@3x.png",
|
"filename" : "图层 1@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 10 KiB |
BIN
YuMi/Assets.xcassets/Language/en/home_week_no_1_en.imageset/图层 1@3x.png
vendored
Normal file
After Width: | Height: | Size: 8.4 KiB |
22
YuMi/Assets.xcassets/utils/user_info_id_beatiful_mark_short.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 13 KiB |
@@ -5,12 +5,12 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_header_topic_icon@2x.png",
|
"filename" : "组 2217@2x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_header_topic_icon@3x.png",
|
"filename" : "组 2217@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 1.0 KiB |
BIN
YuMi/Assets.xcassets/yna/room_header_topic_icon.imageset/组 2217@2x.png
vendored
Normal file
After Width: | Height: | Size: 775 B |
BIN
YuMi/Assets.xcassets/yna/room_header_topic_icon.imageset/组 2217@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
@@ -20,8 +20,8 @@
|
|||||||
- (instancetype)initWithFrame:(CGRect)frame {
|
- (instancetype)initWithFrame:(CGRect)frame {
|
||||||
self = [super initWithFrame:frame];
|
self = [super initWithFrame:frame];
|
||||||
if (self) {
|
if (self) {
|
||||||
NetImageConfig * config = [[NetImageConfig alloc]init];
|
NetImageConfig *config = [[NetImageConfig alloc]init];
|
||||||
config.imageType = ImageTypeUserIcon;
|
config.imageType = ImageTypeUserInfoAlbum;
|
||||||
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
|
||||||
_imageView = [[NetImageView alloc] initWithConfig:config];
|
_imageView = [[NetImageView alloc] initWithConfig:config];
|
||||||
_imageView.layer.masksToBounds = YES;
|
_imageView.layer.masksToBounds = YES;
|
||||||
@@ -105,7 +105,7 @@ didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
|||||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||||
|
|
||||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
return CGSizeMake(80, 80);
|
return CGSizeMake(81, 81);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - SDPhotoBrowserDelegate
|
#pragma mark - SDPhotoBrowserDelegate
|
||||||
@@ -126,8 +126,8 @@ didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
|||||||
if (!_albumCollectionView) {
|
if (!_albumCollectionView) {
|
||||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||||
layout.minimumInteritemSpacing = 10;
|
layout.minimumInteritemSpacing = 4.5;
|
||||||
layout.minimumLineSpacing = 10;
|
layout.minimumLineSpacing = 4.5;
|
||||||
_albumCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
|
_albumCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
|
||||||
collectionViewLayout:layout];
|
collectionViewLayout:layout];
|
||||||
_albumCollectionView.backgroundColor = [UIColor clearColor];
|
_albumCollectionView.backgroundColor = [UIColor clearColor];
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
[self.contentView addSubview:self.numberImageView];
|
[self.contentView addSubview:self.numberImageView];
|
||||||
[self.numberImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.numberImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.top.mas_equalTo(8);
|
make.left.top.mas_equalTo(4);
|
||||||
make.width.height.mas_equalTo(20);
|
make.width.height.mas_equalTo(20);
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
@@ -148,8 +148,9 @@
|
|||||||
self.contentView.backgroundColor = [UIColor whiteColor];
|
self.contentView.backgroundColor = [UIColor whiteColor];
|
||||||
[self.contentView addSubview:self.giftsCollectionView];
|
[self.contentView addSubview:self.giftsCollectionView];
|
||||||
[self.giftsCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.giftsCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.left.mas_equalTo(self.contentView).offset(14);
|
// make.left.mas_equalTo(self.contentView).offset(14);
|
||||||
make.edges.mas_equalTo(self.contentView);
|
make.top.mas_equalTo(self.contentView).offset(0);
|
||||||
|
make.left.right.bottom.mas_equalTo(self.contentView);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self.contentView addSubview:self.noDataLabel];
|
[self.contentView addSubview:self.noDataLabel];
|
||||||
@@ -170,12 +171,17 @@
|
|||||||
[self.giftsCollectionView reloadData];
|
[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) {
|
if (isExpand) {
|
||||||
NSInteger line = (dataSource.count / 4) + (dataSource.count % 4 > 0 ? 1 : 0);
|
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 {
|
} else {
|
||||||
return 120;
|
return height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,8 +207,12 @@
|
|||||||
|
|
||||||
#pragma mark - UICollectionViewDelegateFlowLayout
|
#pragma mark - UICollectionViewDelegateFlowLayout
|
||||||
|
|
||||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
- (CGSize)collectionView:(UICollectionView *)collectionView
|
||||||
return CGSizeMake(86, 120);
|
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 -
|
#pragma mark -
|
||||||
@@ -210,7 +220,7 @@
|
|||||||
if (!_giftsCollectionView) {
|
if (!_giftsCollectionView) {
|
||||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||||
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||||
layout.minimumInteritemSpacing = 10;
|
layout.minimumInteritemSpacing = 2.5;
|
||||||
layout.minimumLineSpacing = 10;
|
layout.minimumLineSpacing = 10;
|
||||||
_giftsCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
|
_giftsCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
|
||||||
collectionViewLayout:layout];
|
collectionViewLayout:layout];
|
||||||
|
@@ -310,8 +310,11 @@ typedef enum : NSUInteger {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||||
|
|
||||||
if (section == Medal) {
|
if (section == Medal) {
|
||||||
return self.medalInfo.medalCount == 0 ? 0 : 30;
|
return self.medalInfo.medalCount == 0 ? 0 : 30;
|
||||||
|
} else if (section == Gifts || section == LuckyGifts) {
|
||||||
|
return 50;
|
||||||
}
|
}
|
||||||
return 30;
|
return 30;
|
||||||
}
|
}
|
||||||
|
@@ -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]];
|
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 {
|
- (void)showRightNavHandle {
|
||||||
NSMutableArray<TTActionSheetConfig *> *array = [NSMutableArray array];
|
NSMutableArray<TTActionSheetConfig *> *array = [NSMutableArray array];
|
||||||
NSString *uid = [NSString stringWithFormat:@"%ld",self.uid];
|
NSString *uid = [NSString stringWithFormat:@"%ld",self.uid];
|
||||||
|
@@ -76,6 +76,7 @@ return view;\
|
|||||||
@property (nonatomic,strong) UIImageView *beautifulImageView;
|
@property (nonatomic,strong) UIImageView *beautifulImageView;
|
||||||
///id
|
///id
|
||||||
@property (nonatomic,strong) UILabel *idLabel;
|
@property (nonatomic,strong) UILabel *idLabel;
|
||||||
|
@property (nonatomic, strong) UIImageView *idIconImageView;
|
||||||
///
|
///
|
||||||
@property (nonatomic, strong) UIImageView *copyIdImageView;
|
@property (nonatomic, strong) UIImageView *copyIdImageView;
|
||||||
|
|
||||||
@@ -129,6 +130,8 @@ return view;\
|
|||||||
@property (nonatomic, strong) UILabel *fansNum;
|
@property (nonatomic, strong) UILabel *fansNum;
|
||||||
@property (nonatomic, strong) UILabel *followersNum;
|
@property (nonatomic, strong) UILabel *followersNum;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XPMineUserInfoHeaderView
|
@implementation XPMineUserInfoHeaderView
|
||||||
@@ -145,7 +148,7 @@ return view;\
|
|||||||
|
|
||||||
+ (CGFloat)headerHeight:(UserInfoModel *)model {
|
+ (CGFloat)headerHeight:(UserInfoModel *)model {
|
||||||
if (model.userDesc.length == 0) {
|
if (model.userDesc.length == 0) {
|
||||||
return 500;
|
return 470;
|
||||||
} else {
|
} else {
|
||||||
// 限定宽度
|
// 限定宽度
|
||||||
CGFloat maxWidth = KScreenWidth - 70;
|
CGFloat maxWidth = KScreenWidth - 70;
|
||||||
@@ -165,7 +168,7 @@ return view;\
|
|||||||
// 计算行数
|
// 计算行数
|
||||||
NSInteger numberOfLines = ceil(textRect.size.height / lineHeight);
|
NSInteger numberOfLines = ceil(textRect.size.height / lineHeight);
|
||||||
if (numberOfLines>1) {
|
if (numberOfLines>1) {
|
||||||
return 520;
|
return 480;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 500;
|
return 500;
|
||||||
@@ -194,7 +197,7 @@ return view;\
|
|||||||
|
|
||||||
[self.onlineButton addSubview:self.onlineIconView];
|
[self.onlineButton addSubview:self.onlineIconView];
|
||||||
[self.onlineIconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.onlineIconView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.leading.mas_equalTo(4);
|
make.leading.mas_equalTo(8);
|
||||||
make.centerY.mas_equalTo(0);
|
make.centerY.mas_equalTo(0);
|
||||||
make.width.mas_equalTo(12);
|
make.width.mas_equalTo(12);
|
||||||
make.height.mas_equalTo(12);
|
make.height.mas_equalTo(12);
|
||||||
@@ -208,9 +211,7 @@ return view;\
|
|||||||
self.onlineIconView.clearsAfterStop = NO;
|
self.onlineIconView.clearsAfterStop = NO;
|
||||||
self.onlineIconView.videoItem = videoItem;
|
self.onlineIconView.videoItem = videoItem;
|
||||||
[self.onlineIconView startAnimation];
|
[self.onlineIconView startAnimation];
|
||||||
} failureBlock:^(NSError * _Nonnull error) {
|
} failureBlock:^(NSError * _Nonnull error) { }];
|
||||||
|
|
||||||
}];
|
|
||||||
|
|
||||||
[self addSubview:self.pageButton];
|
[self addSubview:self.pageButton];
|
||||||
[self.pageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.pageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
@@ -262,19 +263,15 @@ return view;\
|
|||||||
|
|
||||||
[self.nickStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.nickStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.centerX.mas_equalTo(self.userInfoView);
|
make.centerX.mas_equalTo(self.userInfoView);
|
||||||
make.top.mas_equalTo(self.avatarView.mas_bottom).offset(18);
|
make.top.mas_equalTo(self.avatarView.mas_bottom).offset(10);
|
||||||
make.height.mas_equalTo(25);
|
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) {
|
[self.nobleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.width.height.mas_equalTo(20);
|
make.width.height.mas_equalTo(20);
|
||||||
}];
|
}];
|
||||||
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
[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.userInfoView addSubview:self.idStackView];
|
||||||
[self.idStackView addArrangedSubview:self.idLabel];
|
[self.idStackView addArrangedSubview:self.idLabel];
|
||||||
|
[self.idStackView addSubview:self.idIconImageView];
|
||||||
[self.idStackView addSubview:self.copyIdImageView];
|
[self.idStackView addSubview:self.copyIdImageView];
|
||||||
[self.idStackView insertSubview:self.beautifulImageView belowSubview:self.idLabel];
|
[self.idStackView insertSubview:self.beautifulImageView belowSubview:self.idLabel];
|
||||||
|
|
||||||
@@ -291,18 +289,18 @@ return view;\
|
|||||||
} else {
|
} else {
|
||||||
make.centerX.mas_equalTo(self.userInfoView);
|
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) {
|
[self.beautifulImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.height.mas_equalTo(23.5);
|
make.height.mas_equalTo(23.5);
|
||||||
make.left.mas_equalTo(self.idLabel).offset(-24);
|
make.left.mas_equalTo(self.idLabel).offset(-18);
|
||||||
make.right.mas_equalTo(self.idLabel).offset(8);
|
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);
|
make.centerY.mas_equalTo(self.idLabel);
|
||||||
if (isMSRTL()) {
|
make.right.mas_equalTo(self.idLabel.mas_left).offset(0);
|
||||||
// make.centerX.mas_equalTo(self.idLabel).offset(-8);
|
|
||||||
} else {
|
|
||||||
make.centerX.mas_equalTo(self.idLabel).offset(-10);
|
|
||||||
}
|
|
||||||
}];
|
}];
|
||||||
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
make.height.mas_equalTo(14);
|
make.height.mas_equalTo(14);
|
||||||
@@ -313,7 +311,7 @@ return view;\
|
|||||||
if (isMSRTL()) {
|
if (isMSRTL()) {
|
||||||
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
|
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
|
||||||
} else {
|
} 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);
|
make.top.mas_equalTo(self.idStackView.mas_bottom).offset(4);
|
||||||
}];
|
}];
|
||||||
[self.locateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
[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 stackSpaceView]];
|
||||||
[self.locateDateStackView addArrangedSubview:self.locateLabel];
|
[self.locateDateStackView addArrangedSubview:self.locateLabel];
|
||||||
@@ -627,10 +625,10 @@ return view;\
|
|||||||
_userInfo = userInfo;
|
_userInfo = userInfo;
|
||||||
if (_userInfo) {
|
if (_userInfo) {
|
||||||
self.nameLabel.text = userInfo.nick;
|
self.nameLabel.text = userInfo.nick;
|
||||||
CGFloat width = [self widthOfText:userInfo.nick withFont:self.nameLabel.font] + 4;
|
// CGFloat width = [self widthOfText:userInfo.nick withFont:self.nameLabel.font];
|
||||||
[self.nameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
|
// [self.nameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||||
make.width.mas_equalTo(width);
|
// make.width.mas_equalTo(width);
|
||||||
}];
|
// }];
|
||||||
|
|
||||||
NSString *locateString = @"";
|
NSString *locateString = @"";
|
||||||
if (userInfo.region.length > 0) {
|
if (userInfo.region.length > 0) {
|
||||||
@@ -658,37 +656,54 @@ return view;\
|
|||||||
} else {
|
} else {
|
||||||
text = [NSString stringWithFormat:@" %ld", (long)_userInfo.erbanNo];
|
text = [NSString stringWithFormat:@" %ld", (long)_userInfo.erbanNo];
|
||||||
}
|
}
|
||||||
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",text] attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x191919)}];
|
NSString *offsetSpace = @"";
|
||||||
NSTextAttachment * attachment_id = [[NSTextAttachment alloc] init];
|
if (hasBeautifulID) {
|
||||||
UIImage *idIconImage = [UIImage imageNamed:@"user_info_id_mark"];
|
if (_userInfo.erbanNo > 9) {
|
||||||
attachment_id.bounds = CGRectMake(0, -1, 11, 11);
|
offsetSpace = @" ";
|
||||||
attachment_id.image = idIconImage;
|
} else if (_userInfo.erbanNo > 99) {
|
||||||
if (!hasBeautifulID) {
|
offsetSpace = @" ";
|
||||||
[textAtt insertAttributedString:[NSMutableAttributedString attributedStringWithAttachment:attachment_id] atIndex:0];
|
} else if (_userInfo.erbanNo > 999) {
|
||||||
|
offsetSpace = @"";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.idLabel.attributedText = textAtt;
|
self.idLabel.text = [NSString stringWithFormat:@"%@%@",offsetSpace,text];
|
||||||
self.beautifulImageView.hidden = !hasBeautifulID;
|
self.beautifulImageView.hidden = !hasBeautifulID;
|
||||||
|
self.idIconImageView.hidden = hasBeautifulID;
|
||||||
if (hasBeautifulID) {
|
if (hasBeautifulID) {
|
||||||
self.idLabel.alpha = 1;
|
self.idLabel.alpha = 1;
|
||||||
self.idLabel.textColor = [UIColor whiteColor];
|
self.idLabel.textColor = [UIColor whiteColor];
|
||||||
// 加载原始图片
|
if (_userInfo.erbanNo > 999) {
|
||||||
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark"];
|
// 加载原始图片
|
||||||
|
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark"];
|
||||||
|
|
||||||
// 设置图片拉伸区域的插入值 (cap insets)
|
// 设置图片拉伸区域的插入值 (cap insets)
|
||||||
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 30, 0, 20);
|
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 {
|
} else {
|
||||||
self.idLabel.alpha = 0.8;
|
self.idLabel.alpha = 0.8;
|
||||||
if (isMSRTL()) {
|
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||||
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
|
if (isMSRTL()) {
|
||||||
make.right.mas_equalTo(self.idLabel.mas_left).offset(-6);
|
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");
|
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : YMLocalizedString(@"XPMineUserInfoHeaderView6");
|
||||||
@@ -696,11 +711,22 @@ return view;\
|
|||||||
[self.signLabel setFont:_userInfo.userDesc.length > 0 ? [UIFont systemFontOfSize:12 weight:UIFontWeightMedium] : [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]];
|
[self.signLabel setFont:_userInfo.userDesc.length > 0 ? [UIFont systemFontOfSize:12 weight:UIFontWeightMedium] : [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]];
|
||||||
self.fansNum.text = [@(_userInfo.fansNum) stringValue];
|
self.fansNum.text = [@(_userInfo.fansNum) stringValue];
|
||||||
self.followersNum.text = [@(_userInfo.followNum) 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 setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
|
||||||
self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
|
// 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 setBackgroundImage:sexBackgroundImage forState:UIControlStateNormal];
|
||||||
self.sexImageView.selected = _userInfo.gender != GenderType_Male;
|
// 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.officialImageView.hidden = userInfo.defUser != UserLevelType_Offical;
|
||||||
self.newUserImageView.hidden = !userInfo.newUser;
|
self.newUserImageView.hidden = !userInfo.newUser;
|
||||||
@@ -860,7 +886,7 @@ return view;\
|
|||||||
_nickStackView = [[UIStackView alloc] init];
|
_nickStackView = [[UIStackView alloc] init];
|
||||||
_nickStackView.backgroundColor = [UIColor clearColor];
|
_nickStackView.backgroundColor = [UIColor clearColor];
|
||||||
_nickStackView.axis = UILayoutConstraintAxisHorizontal;
|
_nickStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||||
_nickStackView.distribution = UIStackViewDistributionEqualCentering;
|
_nickStackView.distribution = UIStackViewDistributionFill;
|
||||||
_nickStackView.alignment = UIStackViewAlignmentCenter;
|
_nickStackView.alignment = UIStackViewAlignmentCenter;
|
||||||
_nickStackView.spacing = 4;
|
_nickStackView.spacing = 4;
|
||||||
if (isMSRTL()) {
|
if (isMSRTL()) {
|
||||||
@@ -889,7 +915,7 @@ return view;\
|
|||||||
[_sexImageView setImage:kImage(@"home_age_girl_icon") forState:UIControlStateSelected];
|
[_sexImageView setImage:kImage(@"home_age_girl_icon") forState:UIControlStateSelected];
|
||||||
_sexImageView.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
_sexImageView.titleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||||
[_sexImageView setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
[_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.cornerRadius = 14/2;
|
||||||
_sexImageView.layer.masksToBounds = YES;
|
_sexImageView.layer.masksToBounds = YES;
|
||||||
}
|
}
|
||||||
@@ -933,6 +959,15 @@ return view;\
|
|||||||
return _idLabel;
|
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 {
|
- (UIImageView *)copyIdImageView {
|
||||||
if (!_copyIdImageView) {
|
if (!_copyIdImageView) {
|
||||||
_copyIdImageView = [[UIImageView alloc] init];
|
_copyIdImageView = [[UIImageView alloc] init];
|
||||||
@@ -980,18 +1015,19 @@ return view;\
|
|||||||
[_onlineButton addTarget:self
|
[_onlineButton addTarget:self
|
||||||
action:@selector(onlineButtonAction:)
|
action:@selector(onlineButtonAction:)
|
||||||
forControlEvents:UIControlEventTouchUpInside];
|
forControlEvents:UIControlEventTouchUpInside];
|
||||||
[_onlineButton setTitle:[NSString stringWithFormat:@" %@ ", YMLocalizedString(@"XPMineSimpleUserInfoHeaderView2")]
|
[_onlineButton setTitle:[NSString stringWithFormat:@"%@ ", YMLocalizedString(@"XPMineSimpleUserInfoHeaderView2")]
|
||||||
forState:UIControlStateNormal];
|
forState:UIControlStateNormal];
|
||||||
[_onlineButton.titleLabel setFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium]];
|
[_onlineButton.titleLabel setFont:[UIFont systemFontOfSize:12 weight:UIFontWeightMedium]];
|
||||||
[_onlineButton setTitleColor:UIColorFromRGB(0xf7f7f7) forState:UIControlStateNormal];
|
[_onlineButton setTitleColor:UIColorFromRGB(0xf7f7f7) forState:UIControlStateNormal];
|
||||||
// [_onlineButton setImage:[UIImage imageNamed:@"mine_online_mark"] forState:UIControlStateNormal];
|
// [_onlineButton setImage:[UIImage imageNamed:@"mine_online_mark"] forState:UIControlStateNormal];
|
||||||
[_onlineButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
[_onlineButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||||
_onlineButton.layer.cornerRadius = 11;
|
_onlineButton.layer.cornerRadius = 12;
|
||||||
_onlineButton.layer.masksToBounds = YES;
|
_onlineButton.layer.masksToBounds = YES;
|
||||||
_onlineButton.hidden = YES;
|
_onlineButton.hidden = YES;
|
||||||
|
|
||||||
// CGFloat spacing = 4.0; // 图片和标题之间的间距
|
// 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;
|
return _onlineButton;
|
||||||
}
|
}
|
||||||
@@ -1003,7 +1039,7 @@ return view;\
|
|||||||
placeholderImage:[UIImageConstant defaultBannerPlaceholder]];
|
placeholderImage:[UIImageConstant defaultBannerPlaceholder]];
|
||||||
_pi_cycleScrollView.backgroundColor = [UIColor clearColor];
|
_pi_cycleScrollView.backgroundColor = [UIColor clearColor];
|
||||||
_pi_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
_pi_cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||||
_pi_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleNone;
|
_pi_cycleScrollView.pageControlStyle = SDCycleScrollViewPageContolStyleAnimated;//SDCycleScrollViewPageContolStyleNone;
|
||||||
_pi_cycleScrollView.autoScroll = NO;
|
_pi_cycleScrollView.autoScroll = NO;
|
||||||
// SDCycleScrollView没有适配阿语,在RTL下会乱滚,都用LTR算了
|
// SDCycleScrollView没有适配阿语,在RTL下会乱滚,都用LTR算了
|
||||||
_pi_cycleScrollView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
|
_pi_cycleScrollView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
|
||||||
@@ -1043,7 +1079,7 @@ return view;\
|
|||||||
_tagStackView.axis = UILayoutConstraintAxisHorizontal;
|
_tagStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||||
_tagStackView.distribution = UIStackViewDistributionFillProportionally;
|
_tagStackView.distribution = UIStackViewDistributionFillProportionally;
|
||||||
_tagStackView.alignment = UIStackViewAlignmentCenter;
|
_tagStackView.alignment = UIStackViewAlignmentCenter;
|
||||||
_tagStackView.spacing = 4;
|
_tagStackView.spacing = 6;
|
||||||
}
|
}
|
||||||
return _tagStackView;
|
return _tagStackView;
|
||||||
}
|
}
|
||||||
|
@@ -48,8 +48,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)handleTapGesture {
|
- (void)handleTapGesture {
|
||||||
if (_didTapAvatar) {
|
if (self.didTapAvatar) {
|
||||||
_didTapAvatar(self.type);
|
self.didTapAvatar(self.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.delegate) {
|
if (self.delegate) {
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
#import "FifteenMicStageView.h"
|
#import "FifteenMicStageView.h"
|
||||||
#import "ArabMicroView.h"
|
#import "ArabMicroView.h"
|
||||||
//第一行距离顶部
|
//第一行距离顶部
|
||||||
#define firstRowTopMargin 35
|
#define firstRowTopMargin 60
|
||||||
// 房主头像宽 58 + 光圈 5
|
// 房主头像宽 58 + 光圈 5
|
||||||
//#define ownerWidth (45 + 5) * kScreenScale
|
#define ownerWidth (45 + 5) * kScreenScale
|
||||||
// 昵称高12,距离头像间距 10
|
// 昵称高12,距离头像间距 10
|
||||||
#define ownerHeight (ownerWidth + 10 + 12)
|
#define ownerHeight (ownerWidth + 10 + 12)
|
||||||
// 下面 8 个坑位宽55 + 光圈 5
|
// 下面 8 个坑位宽55 + 光圈 5
|
||||||
@@ -65,23 +65,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
|
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
|
||||||
// NSInteger index = [self getIndexByUid:uid];
|
NSInteger index = [self getIndexByUid:uid];
|
||||||
CGPoint point = CGPointZero;
|
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 && index <= 4) {
|
||||||
// }
|
point = CGPointMake(paddingH + (mcWidth + marginH) * (index) + mcWidth / 2, firstRowTopMargin + mcHeight / 2);
|
||||||
//
|
}
|
||||||
// if (index == 0) {
|
|
||||||
// point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10 + ownerTopMargin);
|
if (index >= 5 && index < 10) {
|
||||||
// }
|
point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 5) + mcWidth / 2, sRowTop + mcHeight / 2);
|
||||||
//
|
}
|
||||||
// if (index >= 1 && index <= 4) {
|
|
||||||
// point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 1) + mcWidth / 2, firstRowTop + mcWidth / 2- 10);
|
if (index >= 10 && index < 15) {
|
||||||
// }
|
point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 10) + mcWidth / 2, tRowTop + mcHeight / 2);
|
||||||
//
|
}
|
||||||
// if (index >= 5 && index <= 9) {
|
|
||||||
// point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 4 - 1) + mcWidth / 2, secondRowTop + mcWidth / 2 - 10);
|
|
||||||
// }
|
|
||||||
point = [self convertPoint:point toView:nil];
|
point = [self convertPoint:point toView:nil];
|
||||||
return point;
|
return point;
|
||||||
}
|
}
|
||||||
|
@@ -697,7 +697,7 @@
|
|||||||
NSString * position = [NSString stringWithFormat:@"%d", pkUserInfo.position];
|
NSString * position = [NSString stringWithFormat:@"%d", pkUserInfo.position];
|
||||||
NSString* roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
NSString* roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId];
|
||||||
MicroQueueModel *micro = [self.micQueue objectForKey:position];
|
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;
|
UserInfoModel * userInfo = self.hostDelegate.getUserInfo;
|
||||||
userInfo.groupType = pkUserInfo.groupType;
|
userInfo.groupType = pkUserInfo.groupType;
|
||||||
NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init];
|
NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init];
|
||||||
@@ -711,10 +711,56 @@
|
|||||||
if (error) return;
|
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 - 讲话的波纹回调
|
#pragma mark - RtcDelegate - 讲话的波纹回调
|
||||||
- (void)usersSpeaking:(NSMutableArray *)uids {
|
- (void)usersSpeaking:(NSMutableArray *)uids {
|
||||||
if ([RtcManager instance].isRemoteMuted) {
|
if ([RtcManager instance].isRemoteMuted) {
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#import "TenMicStageView.h"
|
#import "TenMicStageView.h"
|
||||||
#import "ArabMicroView.h"
|
#import "ArabMicroView.h"
|
||||||
//第一行距离顶部
|
//第一行距离顶部
|
||||||
#define firstRowTopMargin 35
|
#define firstRowTopMargin 60
|
||||||
// 房主头像宽 58 + 光圈 5
|
// 房主头像宽 58 + 光圈 5
|
||||||
//#define ownerWidth (45 + 5) * kScreenScale
|
//#define ownerWidth (45 + 5) * kScreenScale
|
||||||
// 昵称高12,距离头像间距 10
|
// 昵称高12,距离头像间距 10
|
||||||
@@ -60,5 +60,20 @@
|
|||||||
// return 3 * (lineMargin + mcHeight) + lineMargin;
|
// 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
|
@end
|
||||||
|
@@ -3646,9 +3646,9 @@
|
|||||||
"MSRoomMenuGameVC0"="Confirm to start the game?";
|
"MSRoomMenuGameVC0"="Confirm to start the game?";
|
||||||
"MSRoomMenuGameVC1"="You do not have the right to start this game, please contact the room owner or administrator~";
|
"MSRoomMenuGameVC1"="You do not have the right to start this game, please contact the room owner or administrator~";
|
||||||
|
|
||||||
"XPRoomTypeSelectionViewController0" = "classic";
|
"XPRoomTypeSelectionViewController0" = "Classic";
|
||||||
"XPRoomTypeSelectionViewController1" = "party";
|
"XPRoomTypeSelectionViewController1" = "Party";
|
||||||
"XPRoomTypeSelectionViewController2" = "carnival";
|
"XPRoomTypeSelectionViewController2" = "Carnival";
|
||||||
"XPRoomTypeSelectionViewController3" = "After the setting is completed, members who are out of the microphone order will be removed. Do you confirm the setting?";
|
"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";
|
"XPRoomTypeSelectionViewController4" = "Room type";
|
||||||
"XPRoomTypeSelectionViewController5" = "Using";
|
"XPRoomTypeSelectionViewController5" = "Using";
|
||||||
|