This commit is contained in:
启星
2025-09-24 09:28:49 +08:00
parent dad4a5164d
commit 6b15cc818f
11 changed files with 75 additions and 39 deletions

View File

@@ -102,6 +102,9 @@ QXRoomUserInfoViewDelegate
} }
} }
[self playHWDMP4]; [self playHWDMP4];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[QXGiftPlayerManager shareManager] startPlay];
});
self.navigationController.viewControllers = marr; self.navigationController.viewControllers = marr;
// self.navigationController.interactivePopGestureRecognizer.enabled = NO; // self.navigationController.interactivePopGestureRecognizer.enabled = NO;
} }
@@ -110,8 +113,12 @@ QXRoomUserInfoViewDelegate
// [[QXGiftPlayerManager shareManager] stopPlay]; // [[QXGiftPlayerManager shareManager] stopPlay];
self.continuousView.hidden = YES; self.continuousView.hidden = YES;
[self stopHWDMP4]; [self stopHWDMP4];
}
-(void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
[[QXGiftPlayerManager shareManager] stopPlay];
} }
-(void)initSubViews{ -(void)initSubViews{
// [self updateBgImage:@"room_background"]; // [self updateBgImage:@"room_background"];
@@ -235,12 +242,28 @@ QXRoomUserInfoViewDelegate
} }
#pragma mark - #pragma mark -
-(void)joinRoom{ -(void)joinRoom{
if (self.roomModel) {
[self resetSubviews];
[self configRoomDataIsJoin:YES];
}else{
MJWeakSelf
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
[QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
weakSelf.roomModel = roomModel;
[self resetSubviews];
[self configRoomDataIsJoin:YES];
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
showToast(msg);
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf.navigationController popViewControllerAnimated:YES];
});
}];
}
[self resetSubviews];
[self configRoomDataIsJoin:YES];
//// roomModel.room_info.pk_room_id = @"33"; //// roomModel.room_info.pk_room_id = @"33";
// //
// //
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { // } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
// showToast(msg); // showToast(msg);
// [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId]; // [[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomId];
@@ -884,7 +907,7 @@ QXRoomUserInfoViewDelegate
self.sendGiftView.roomId = self.roomId; self.sendGiftView.roomId = self.roomId;
[self.sendGiftView showInView:self.view]; [self.sendGiftView showInView:self.view];
// [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{ // [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{
// //
// }]; // }];
} }
/// ///
@@ -985,7 +1008,7 @@ QXRoomUserInfoViewDelegate
#pragma mark - pk #pragma mark - pk
-(void)recievePKInviteWithSendRoomId:(NSString *)SendRoomId AcceptRoomId:(NSString *)AcceptRoomId PkId:(NSString *)PkId message:(nonnull NSString *)message{ -(void)recievePKInviteWithSendRoomId:(NSString *)SendRoomId AcceptRoomId:(NSString *)AcceptRoomId PkId:(NSString *)PkId message:(nonnull NSString *)message{
if (self.seatContentView.myPitNumber == 9) { if (self.seatContentView.myPitNumber == 9) {
/// ///
MJWeakSelf MJWeakSelf
QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))]; QXAlertView *al = [[QXAlertView alloc] initWithFrame:CGRectMake(0, 0, ScaleWidth(300), ScaleWidth(175))];
al.type = QXAlertViewTypeAgreeSong; al.type = QXAlertViewTypeAgreeSong;
@@ -999,7 +1022,7 @@ QXRoomUserInfoViewDelegate
}; };
al.cancelBlock = ^{ al.cancelBlock = ^{
// [QXMineNetwork roomPkAgreeWithPk_id:PkId type:@"2" successBlock:^(NSDictionary * _Nonnull dict) { // [QXMineNetwork roomPkAgreeWithPk_id:PkId type:@"2" successBlock:^(NSDictionary * _Nonnull dict) {
// //
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) { // } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
// showToast(msg); // showToast(msg);
// }]; // }];
@@ -1143,34 +1166,34 @@ QXRoomUserInfoViewDelegate
// ScaleWidth(429)); // ScaleWidth(429));
// CGRect initialFrame = CGRectOffset(finalFrame, 0, finalFrame.size.height); // CGRect initialFrame = CGRectOffset(finalFrame, 0, finalFrame.size.height);
// vc.view.frame = initialFrame; // vc.view.frame = initialFrame;
// //
// // // //
// vc.view.layer.cornerRadius = 10; // vc.view.layer.cornerRadius = 10;
// vc.view.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner; // vc.view.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
// vc.view.clipsToBounds = YES; // vc.view.clipsToBounds = YES;
// //
// // // //
// vc.view.layer.shadowColor = [UIColor blackColor].CGColor; // vc.view.layer.shadowColor = [UIColor blackColor].CGColor;
// vc.view.layer.shadowOffset = CGSizeMake(0, -5); // vc.view.layer.shadowOffset = CGSizeMake(0, -5);
// vc.view.layer.shadowOpacity = 0.3; // vc.view.layer.shadowOpacity = 0.3;
// vc.view.layer.shadowRadius = 10; // vc.view.layer.shadowRadius = 10;
// //
// // // //
// [self addChildViewController:vc]; // [self addChildViewController:vc];
// [self.view addSubview:vc.view]; // [self.view addSubview:vc.view];
// [vc didMoveToParentViewController:self]; // [vc didMoveToParentViewController:self];
// //
// // // //
// UIView *dimmingView = [[UIView alloc] initWithFrame:self.view.bounds]; // UIView *dimmingView = [[UIView alloc] initWithFrame:self.view.bounds];
// dimmingView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5]; // dimmingView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
// dimmingView.alpha = 0; // dimmingView.alpha = 0;
// dimmingView.tag = 212; // dimmingView.tag = 212;
// [self.view insertSubview:dimmingView belowSubview:vc.view]; // [self.view insertSubview:dimmingView belowSubview:vc.view];
// //
// // // //
// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissHalfScreenView)]; // UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissHalfScreenView)];
// [dimmingView addGestureRecognizer:tap]; // [dimmingView addGestureRecognizer:tap];
// //
// // // //
// [UIView animateWithDuration:0.3 animations:^{ // [UIView animateWithDuration:0.3 animations:^{
// vc.view.frame = finalFrame; // vc.view.frame = finalFrame;
@@ -1326,7 +1349,7 @@ QXRoomUserInfoViewDelegate
self.sendGiftView.roomId = self.roomId; self.sendGiftView.roomId = self.roomId;
[self.sendGiftView showInView:self.view]; [self.sendGiftView showInView:self.view];
// [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{ // [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{
// //
// }]; // }];
} }
@@ -1547,7 +1570,7 @@ QXRoomUserInfoViewDelegate
self.sendGiftView.roomId = self.userInfoView.roomId; self.sendGiftView.roomId = self.userInfoView.roomId;
[self.sendGiftView showInView:self.view]; [self.sendGiftView showInView:self.view];
// [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{ // [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{
// //
// }]; // }];
} }
break; break;
@@ -1570,7 +1593,7 @@ QXRoomUserInfoViewDelegate
self.sendGiftView.roomId = self.roomId; self.sendGiftView.roomId = self.roomId;
[self.sendGiftView showInView:self.view]; [self.sendGiftView showInView:self.view];
// [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{ // [[QXGlobal shareGlobal] showView:self.sendGiftView controller:self popType:(PopViewTypeBottomToUpActionSheet) tapDismiss:YES finishBlock:^{
// //
// }]; // }];
} }
#pragma - mark #pragma - mark

View File

@@ -508,8 +508,8 @@ NSInteger maxMessageCount = 20;
make.top.equalTo(self.nameLabel.mas_bottom).offset(2); make.top.equalTo(self.nameLabel.mas_bottom).offset(2);
}]; }];
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];
@@ -731,8 +731,8 @@ NSInteger maxMessageCount = 20;
make.top.equalTo(self.nameLabel.mas_bottom).offset(2); make.top.equalTo(self.nameLabel.mas_bottom).offset(2);
}]; }];
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];

View File

@@ -308,8 +308,8 @@
self.nameLabel.text = md.nickname?md.nickname:@""; self.nameLabel.text = md.nickname?md.nickname:@"";
[self.iconBgView removeAllSubviews]; [self.iconBgView removeAllSubviews];
[self.rankBtn setTitle:[NSString stringWithFormat:@" %@",md.total?md.total:md.gift_prices] forState:(UIControlStateNormal)]; [self.rankBtn setTitle:[NSString stringWithFormat:@" %@",md.total?md.total:md.gift_prices] forState:(UIControlStateNormal)];
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0 ; i < md.icon.count; i++) { for (int i = 0 ; i < md.icon.count; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];
@@ -326,7 +326,7 @@
make.width.mas_equalTo(iconWidth); make.width.mas_equalTo(iconWidth);
make.height.mas_equalTo(iconHeight); make.height.mas_equalTo(iconHeight);
make.centerY.equalTo(self.iconBgView); make.centerY.equalTo(self.iconBgView);
make.centerX.equalTo(self.iconBgView).offset(-38/2+(margin+iconWidth)*i); make.centerX.equalTo(self.iconBgView).offset(-UserIconWidth/2+(margin+iconWidth)*i);
}]; }];
}else{ }else{
[iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -9,12 +9,14 @@
#import "QXRoomSeatContentView.h" #import "QXRoomSeatContentView.h"
#import "QXRoomSeatDelegate.h" #import "QXRoomSeatDelegate.h"
#import "QXUserModel.h" #import "QXUserModel.h"
#import "QXSelectAuctionInfoView.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface QXRoomSeatTypeAuctionView : UIView @interface QXRoomSeatTypeAuctionView : UIView
@property (nonatomic,weak)id<QXRoomSeatDelegate>delegate; @property (nonatomic,weak)id<QXRoomSeatDelegate>delegate;
@property (nonatomic,strong)QXRoomModel *roomModel; @property (nonatomic,strong)QXRoomModel *roomModel;
@property (nonatomic,assign)NSInteger myPitNumber; @property (nonatomic,assign)NSInteger myPitNumber;
@property (nonatomic,strong)QXSelectAuctionInfoView *auctionInfoView;
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number; -(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number;

View File

@@ -8,7 +8,6 @@
#import "QXRoomSeatTypeAuctionView.h" #import "QXRoomSeatTypeAuctionView.h"
#import "QXRoomSeatContentView.h" #import "QXRoomSeatContentView.h"
#import "UIButton+QX.h" #import "UIButton+QX.h"
#import "QXSelectAuctionInfoView.h"
#import "QXMineNetwork.h" #import "QXMineNetwork.h"
#import "QXTimer.h" #import "QXTimer.h"
#import "QXRoomAuctionResultView.h" #import "QXRoomAuctionResultView.h"
@@ -63,7 +62,6 @@
@property (nonatomic,strong)QXRoomSeatContentView *sixthSeatView; @property (nonatomic,strong)QXRoomSeatContentView *sixthSeatView;
@property (nonatomic,strong)UIButton *moreBtn; @property (nonatomic,strong)UIButton *moreBtn;
@property (nonatomic,strong)QXSelectAuctionInfoView *auctionInfoView;
@property (nonatomic,strong)NSMutableArray *seatArray; @property (nonatomic,strong)NSMutableArray *seatArray;
@property (nonatomic,strong)QXTimer *timer; @property (nonatomic,strong)QXTimer *timer;
@@ -165,8 +163,8 @@
}]; }];
self.compereView.delegate = self; self.compereView.delegate = self;
// //
// //
// //
self.intimacyBtn = [[UIButton alloc] init]; self.intimacyBtn = [[UIButton alloc] init];
[self.intimacyBtn setTitle:@"亲密拍" forState:(UIControlStateNormal)]; [self.intimacyBtn setTitle:@"亲密拍" forState:(UIControlStateNormal)];
[self.intimacyBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)]; [self.intimacyBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
@@ -182,7 +180,7 @@
make.centerX.equalTo(self.bgView).offset(-(ScaleWidth(70)/2+5)); make.centerX.equalTo(self.bgView).offset(-(ScaleWidth(70)/2+5));
make.top.mas_equalTo(32); make.top.mas_equalTo(32);
}]; }];
// //
self.realLoveBtn = [[UIButton alloc] init]; self.realLoveBtn = [[UIButton alloc] init];
[self.realLoveBtn setTitle:@"真爱拍" forState:(UIControlStateNormal)]; [self.realLoveBtn setTitle:@"真爱拍" forState:(UIControlStateNormal)];
[self.realLoveBtn addTarget:self action:@selector(typeAction:) forControlEvents:(UIControlEventTouchUpInside)]; [self.realLoveBtn addTarget:self action:@selector(typeAction:) forControlEvents:(UIControlEventTouchUpInside)];
@@ -197,7 +195,7 @@
make.left.equalTo(self.intimacyBtn.mas_right).offset(5); make.left.equalTo(self.intimacyBtn.mas_right).offset(5);
make.top.mas_equalTo(32); make.top.mas_equalTo(32);
}]; }];
// //
self.helpBtn = [[UIButton alloc] init]; self.helpBtn = [[UIButton alloc] init];
[self.helpBtn setImage:[UIImage imageNamed:@"room_auction_help"] forState:(UIControlStateNormal)]; [self.helpBtn setImage:[UIImage imageNamed:@"room_auction_help"] forState:(UIControlStateNormal)];
[self.bgView addSubview:self.helpBtn]; [self.bgView addSubview:self.helpBtn];
@@ -288,7 +286,7 @@
make.left.mas_equalTo(26); make.left.mas_equalTo(26);
make.right.mas_equalTo(-26); make.right.mas_equalTo(-26);
}]; }];
// //
self.relationView = [[QXRoomAuctionPriceView alloc] init]; self.relationView = [[QXRoomAuctionPriceView alloc] init];
self.relationView.imageView.image = [UIImage imageNamed:@"room_auction_relationship"]; self.relationView.imageView.image = [UIImage imageNamed:@"room_auction_relationship"];
self.relationView.titleLabel.text = @"关系"; self.relationView.titleLabel.text = @"关系";
@@ -321,7 +319,7 @@
make.height.mas_equalTo(ScaleWidth(36)+18); make.height.mas_equalTo(ScaleWidth(36)+18);
make.bottom.equalTo(self.auctionBtn.mas_top).offset(-8); make.bottom.equalTo(self.auctionBtn.mas_top).offset(-8);
}]; }];
// //
// //
@@ -348,7 +346,7 @@
make.top.equalTo(self.auctionBgView); make.top.equalTo(self.auctionBgView);
make.height.mas_equalTo(47); make.height.mas_equalTo(47);
}]; }];
// //
self.secondSeatView = [[QXRoomAuctionSeatView alloc] init]; self.secondSeatView = [[QXRoomAuctionSeatView alloc] init];
self.secondSeatView.bgImageView.image = [UIImage imageNamed:@"room_auction_second_bg"]; self.secondSeatView.bgImageView.image = [UIImage imageNamed:@"room_auction_second_bg"];
self.secondSeatView.rankView.image = [UIImage imageNamed:@"room_auction_second"]; self.secondSeatView.rankView.image = [UIImage imageNamed:@"room_auction_second"];
@@ -428,7 +426,7 @@
make.top.equalTo(self.forthSeatView); make.top.equalTo(self.forthSeatView);
make.bottom.equalTo(self.bgView); make.bottom.equalTo(self.bgView);
}]; }];
//// ////
self.sixthSeatView = [[QXRoomSeatContentView alloc] init]; self.sixthSeatView = [[QXRoomSeatContentView alloc] init];
[self.bgView addSubview:self.sixthSeatView]; [self.bgView addSubview:self.sixthSeatView];
// self.sixthSeatView.isAutionSeat = YES; // self.sixthSeatView.isAutionSeat = YES;

View File

@@ -103,6 +103,9 @@
animations:^{ animations:^{
self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01); self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (self->_auctionView.auctionInfoView != nil) {
[self->_auctionView.auctionInfoView hide];
}
[self->_auctionView destroyViews]; [self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview]; [self->_auctionView removeFromSuperview];
self->_auctionView = nil; self->_auctionView = nil;
@@ -390,6 +393,9 @@
animations:^{ animations:^{
self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01); self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (self->_auctionView.auctionInfoView != nil) {
[self->_auctionView.auctionInfoView hide];
}
[self->_auctionView destroyViews]; [self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview]; [self->_auctionView removeFromSuperview];
self->_auctionView = nil; self->_auctionView = nil;
@@ -608,6 +614,9 @@
animations:^{ animations:^{
self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01); self->_auctionView.transform = CGAffineTransformMakeScale(0.01, 0.01);
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
if (self->_auctionView.auctionInfoView != nil) {
[self->_auctionView.auctionInfoView hide];
}
[self->_auctionView destroyViews]; [self->_auctionView destroyViews];
[self->_auctionView removeFromSuperview]; [self->_auctionView removeFromSuperview];
self->_auctionView = nil; self->_auctionView = nil;

View File

@@ -154,7 +154,7 @@
// [self.leftBtn setBackgroundImage:[UIImage imageNamed:@"start_live"] forState:(UIControlStateNormal)]; // [self.leftBtn setBackgroundImage:[UIImage imageNamed:@"start_live"] forState:(UIControlStateNormal)];
// [self.leftBtn addTarget:self action:@selector(leftAction) forControlEvents:(UIControlEventTouchUpInside)]; // [self.leftBtn addTarget:self action:@selector(leftAction) forControlEvents:(UIControlEventTouchUpInside)];
// [self addSubview:self.leftBtn]; // [self addSubview:self.leftBtn];
// //
// self.rightBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.leftBtn.right+7.5, self.userHeaderView.bottom+54, self.leftBtn.width, 67)]; // self.rightBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.leftBtn.right+7.5, self.userHeaderView.bottom+54, self.leftBtn.width, 67)];
// [self.rightBtn setBackgroundImage:[UIImage imageNamed:@"become_anchor"] forState:(UIControlStateNormal)]; // [self.rightBtn setBackgroundImage:[UIImage imageNamed:@"become_anchor"] forState:(UIControlStateNormal)];
// [self.rightBtn addTarget:self action:@selector(rightAction) forControlEvents:(UIControlEventTouchUpInside)]; // [self.rightBtn addTarget:self action:@selector(rightAction) forControlEvents:(UIControlEventTouchUpInside)];
@@ -210,7 +210,7 @@
} }
for (int i = 0;i<userModel.icon.count;i++) { for (int i = 0;i<userModel.icon.count;i++) {
NSString*icon = userModel.icon[i]; NSString*icon = userModel.icon[i];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*ScaleWidth(42), self.idLabel.bottom+5, ScaleWidth(42), ScaleWidth(16))]; UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*UserIconWidth, self.idLabel.bottom+5, UserIconWidth, UserIconHeight)];
[imageView sd_setImageWithURL:[NSURL URLWithString:icon]]; [imageView sd_setImageWithURL:[NSURL URLWithString:icon]];
[self addSubview:imageView]; [self addSubview:imageView];
[self.iconArray addObject:imageView]; [self.iconArray addObject:imageView];

View File

@@ -104,7 +104,7 @@
}]; }];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(42, 16); layout.itemSize = CGSizeMake(UserIconWidth, UserIconHeight);
layout.minimumLineSpacing = 7; layout.minimumLineSpacing = 7;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];

View File

@@ -274,8 +274,8 @@
- (void)awakeFromNib { - (void)awakeFromNib {
[super awakeFromNib]; [super awakeFromNib];
// Initialization code // Initialization code
CGFloat iconWidth = 38; CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = 16; CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6; CGFloat margin = 6;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init]; UIImageView *iconImageView = [[UIImageView alloc] init];

View File

@@ -13,6 +13,10 @@
//#define StatusHeight kSafeAreaTop + 20 //#define StatusHeight kSafeAreaTop + 20
///导航高度 + safe高 ///导航高度 + safe高
#define NavContentHeight (kSafeAreaTop + NavHeight) #define NavContentHeight (kSafeAreaTop + NavHeight)
///称号高
#define UserIconHeight 17
/// 称号宽
#define UserIconWidth 74
///导航高 ///导航高
#define NavHeight 44 #define NavHeight 44
///工具栏高度 ///工具栏高度