更新 API 测试环境 URL,优化中点矩形计算逻辑以适配屏幕尺寸,增加常量定义以提升代码可读性和可维护性。
This commit is contained in:
@@ -57,7 +57,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
||||
///正式环境
|
||||
#define API_HOST_URL @"https://api.hfighting.com"
|
||||
///测试环境
|
||||
#define API_HOST_TEST_URL @"http://beta.api.molistar.xyz"
|
||||
#define API_HOST_TEST_URL @"http://beta.api.pekolive.com" // http://beta.api.pekolive.com | http://beta.api.molistar.xyz
|
||||
|
||||
#define API_Image_URL @"https://image.hfighting.com"
|
||||
|
||||
|
@@ -161,9 +161,9 @@
|
||||
CGFloat rightCenterX = CGRectGetMinX(rightRect) + mcWidth / 2;
|
||||
CGFloat midX = (leftCenterX + rightCenterX) / 2.0;
|
||||
|
||||
// 以中点为中心,返回 75x75 的矩形
|
||||
CGFloat size = 75.0;
|
||||
return CGRectMake(midX - size / 2.0, circleCenterY - size / 2.0, size, size);
|
||||
// 以中点为中心,返回适配屏幕的矩形
|
||||
CGFloat size = kGetScaleWidth(kMidpointRectSize);
|
||||
return CGRectMake(midX - size / 2.0, circleCenterY - size / 4.0, size, size);
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -9,9 +9,13 @@
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "RoomGuestDelegate.h"
|
||||
#import "MicroViewProtocol.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
// 中点矩形尺寸常量
|
||||
static const CGFloat kMidpointRectSize = 75.0;
|
||||
|
||||
@class MicroQueueModel;
|
||||
|
||||
@protocol StageViewDelegate
|
||||
|
@@ -1292,8 +1292,8 @@
|
||||
CGFloat rightTopY = CGRectGetMinY(rightRect);
|
||||
CGFloat midTopY = (leftTopY + rightTopY) / 2.0 - 10.0;
|
||||
|
||||
// 返回75x75的矩形
|
||||
CGFloat size = 75.0;
|
||||
// 返回适配屏幕的矩形
|
||||
CGFloat size = kGetScaleWidth(kMidpointRectSize);
|
||||
return CGRectMake(midX - size / 2.0, midTopY, size, size);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user