From b50abb9f00cd747d29c305e637a5e377742a4674 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Thu, 25 Aug 2022 15:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=9D=BF=E5=9D=97=E6=97=A0=E6=B3=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=85=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xplan-ios/Global/XPMacro.h | 1 + .../XPRoomActivityContainerView.m | 14 ++++++++------ .../XPRoomFunctionContainerView.m | 2 +- .../MenuContainerView/XPRoomMenuContainerView.m | 5 +++-- .../View/UserCard/View/XPUserCardViewController.m | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/xplan-ios/Global/XPMacro.h b/xplan-ios/Global/XPMacro.h index 0dd53cc2..6b04865d 100644 --- a/xplan-ios/Global/XPMacro.h +++ b/xplan-ios/Global/XPMacro.h @@ -25,6 +25,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns #define kNavigationHeight (kStatusBarHeight + 44) #define kTabBarHeight (iPhoneXSeries ? 49.0+34.0 : 49.0) #define kScreenScale ((CGFloat)KScreenWidth / (CGFloat)375) +#define kScreenHeightScale ((CGFloat)KScreenHeight / (CGFloat)812) #define kHalfScreenHeight KScreenHeight * 0.65 #define kWeakify(o) try{}@finally{} __weak typeof(o) o##Weak = o; diff --git a/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m b/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m index 0e07a8c2..6d9ff6e6 100644 --- a/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m +++ b/xplan-ios/Main/Room/View/ActivityContainerView/XPRoomActivityContainerView.m @@ -16,6 +16,7 @@ #import "NetImageView.h" #import "TTPopup.h" #import "XCHUDTool.h" +#import "XPMacro.h" ///Model #import "UserInfoModel.h" #import "RoomInfoModel.h" @@ -86,25 +87,26 @@ [self.stackView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.mas_equalTo(self); }]; - + + CGFloat itemWidth = KScreenHeight > 667 ? 65 : 55 * kScreenHeightScale; [self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(65, 65)); + make.size.mas_equalTo(CGSizeMake(itemWidth , itemWidth)); }]; [self.sailingImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(65, 65)); + make.size.mas_equalTo(CGSizeMake(itemWidth, itemWidth)); }]; [self.firstRechargeImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(65, 65)); + make.size.mas_equalTo(CGSizeMake(itemWidth, itemWidth)); }]; [self.candyTreeImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(65, 65)); + make.size.mas_equalTo(CGSizeMake(itemWidth, itemWidth)); }]; [self.joinDatingView mas_makeConstraints:^(MASConstraintMaker *make) { - make.height.mas_equalTo(35); + make.height.mas_equalTo(35* kScreenHeightScale); }]; } diff --git a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m index 922387fd..a8bcbf39 100644 --- a/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/xplan-ios/Main/Room/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -355,7 +355,7 @@ - (void)xPRoomNewUserGreetView:(XPRoomNewUserGreetView *)view didClickCheckout:(UIButton *)sender { XPRoomHalfMessageView *halfMessageView = [[XPRoomHalfMessageView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight)]; - [self addSubview:halfMessageView]; + [[UIApplication sharedApplication].delegate.window addSubview:halfMessageView]; [UIView animateWithDuration:.35 animations:^{ CGRect rect = halfMessageView.frame; rect.origin.y = 0; diff --git a/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m b/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m index dbc48c40..0cb5beeb 100644 --- a/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m +++ b/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m @@ -16,6 +16,7 @@ #import "StatisticsServiceHelper.h" #import "Themecolor.h" #import "XPMacro.h" +#import "XCCurrentVCStackManager.h" ///Model #import "XPRoomMenuItem.h" #import "MicroQueueModel.h" @@ -125,7 +126,7 @@ case XPRoomMenuItemType_Message: { XPRoomHalfMessageView *halfMessageView = [[XPRoomHalfMessageView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight)]; - [self.superview addSubview:halfMessageView]; + [[UIApplication sharedApplication].delegate.window addSubview:halfMessageView]; [UIView animateWithDuration:.35 animations:^{ CGRect rect = halfMessageView.frame; rect.origin.y = 0; @@ -415,7 +416,7 @@ - (void)xPRoomMessageBubbleView:(XPRoomMessageBubbleView *)view didSelectSession:(NIMRecentSession *)session { XPRoomHalfMessageView *halfMessageView = [[XPRoomHalfMessageView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight)]; halfMessageView.chatUserId = session.session.sessionId; - [self.superview addSubview:halfMessageView]; + [[UIApplication sharedApplication].delegate.window addSubview:halfMessageView]; [UIView animateWithDuration:.35 animations:^{ CGRect rect = halfMessageView.frame; rect.origin.y = 0; diff --git a/xplan-ios/Main/Room/View/UserCard/View/XPUserCardViewController.m b/xplan-ios/Main/Room/View/UserCard/View/XPUserCardViewController.m index 52b17c0a..fbdde706 100644 --- a/xplan-ios/Main/Room/View/UserCard/View/XPUserCardViewController.m +++ b/xplan-ios/Main/Room/View/UserCard/View/XPUserCardViewController.m @@ -741,7 +741,7 @@ [self dismissViewControllerAnimated:YES completion:^{ XPRoomHalfMessageView *halfMessageView = [[XPRoomHalfMessageView alloc] initWithFrame:CGRectMake(0, KScreenHeight, KScreenWidth, KScreenHeight)]; halfMessageView.chatUserId = self.cardInfo.uid; - [[XCCurrentVCStackManager shareManager].currentNavigationController.view addSubview:halfMessageView]; + [[UIApplication sharedApplication].delegate.window addSubview:halfMessageView]; [UIView animateWithDuration:.35 animations:^{ CGRect rect = halfMessageView.frame; rect.origin.y = 0;