相亲的部分UI

This commit is contained in:
fengshuo
2022-01-04 21:41:06 +08:00
parent 61821cf58b
commit 1c509f4d0d
50 changed files with 897 additions and 95 deletions

View File

@@ -234,6 +234,10 @@
E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E872309226E8D31500B90D4F /* LoginVerifCodeView.m */; };
E874B88827215D39003954B9 /* MicroStateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B88727215D39003954B9 /* MicroStateModel.m */; };
E874B88B27215EAF003954B9 /* MicroQueueModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E874B88A27215EAF003954B9 /* MicroQueueModel.m */; };
E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = E877A7EA2783E24700EFACED /* DatingStageView.m */; };
E877A7EE278428FB00EFACED /* MicroDatingProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = E877A7ED278428FB00EFACED /* MicroDatingProgressView.m */; };
E877A7F127842B2F00EFACED /* XPRoomDatingWebAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = E877A7F027842B2F00EFACED /* XPRoomDatingWebAlertView.m */; };
E877A7F427842EF800EFACED /* XPRoomDatingVipUpMicView.m in Sources */ = {isa = PBXBuildFile; fileRef = E877A7F327842EF800EFACED /* XPRoomDatingVipUpMicView.m */; };
E87888F42738C30E00BF1D57 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E87888F32738C30E00BF1D57 /* StoreKit.framework */; };
E8788934273A53D700BF1D57 /* XPSendGiftView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8788933273A53D700BF1D57 /* XPSendGiftView.m */; };
E878893C273A54C300BF1D57 /* Api+Gift.m in Sources */ = {isa = PBXBuildFile; fileRef = E878893B273A54C300BF1D57 /* Api+Gift.m */; };
@@ -872,6 +876,14 @@
E874B88727215D39003954B9 /* MicroStateModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroStateModel.m; sourceTree = "<group>"; };
E874B88927215EAF003954B9 /* MicroQueueModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroQueueModel.h; sourceTree = "<group>"; };
E874B88A27215EAF003954B9 /* MicroQueueModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroQueueModel.m; sourceTree = "<group>"; };
E877A7E92783E24700EFACED /* DatingStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DatingStageView.h; sourceTree = "<group>"; };
E877A7EA2783E24700EFACED /* DatingStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DatingStageView.m; sourceTree = "<group>"; };
E877A7EC278428FB00EFACED /* MicroDatingProgressView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroDatingProgressView.h; sourceTree = "<group>"; };
E877A7ED278428FB00EFACED /* MicroDatingProgressView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroDatingProgressView.m; sourceTree = "<group>"; };
E877A7EF27842B2F00EFACED /* XPRoomDatingWebAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomDatingWebAlertView.h; sourceTree = "<group>"; };
E877A7F027842B2F00EFACED /* XPRoomDatingWebAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomDatingWebAlertView.m; sourceTree = "<group>"; };
E877A7F227842EF800EFACED /* XPRoomDatingVipUpMicView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomDatingVipUpMicView.h; sourceTree = "<group>"; };
E877A7F327842EF800EFACED /* XPRoomDatingVipUpMicView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomDatingVipUpMicView.m; sourceTree = "<group>"; };
E87888F12738C23F00BF1D57 /* xplan-ios.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "xplan-ios.entitlements"; sourceTree = "<group>"; };
E87888F22738C2D400BF1D57 /* xplan-iosRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "xplan-iosRelease.entitlements"; sourceTree = "<group>"; };
E87888F32738C30E00BF1D57 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
@@ -2513,6 +2525,8 @@
E81D58812720082A003063FE /* MicroWaveView.m */,
E8DACCF92766EDC60052092C /* MicroGiftValueView.h */,
E8DACCFA2766EDC60052092C /* MicroGiftValueView.m */,
E877A7EC278428FB00EFACED /* MicroDatingProgressView.h */,
E877A7ED278428FB00EFACED /* MicroDatingProgressView.m */,
);
path = MicroView;
sourceTree = "<group>";
@@ -2984,6 +2998,10 @@
E8AEAEEC27141AE20017FCE0 /* XPRoomBackContainerView.m */,
E83953202769F33B00CF2F24 /* XPRoomFunctionContainerView.h */,
E83953212769F33B00CF2F24 /* XPRoomFunctionContainerView.m */,
E877A7EF27842B2F00EFACED /* XPRoomDatingWebAlertView.h */,
E877A7F027842B2F00EFACED /* XPRoomDatingWebAlertView.m */,
E877A7F227842EF800EFACED /* XPRoomDatingVipUpMicView.h */,
E877A7F327842EF800EFACED /* XPRoomDatingVipUpMicView.m */,
);
path = BaseUIContainerView;
sourceTree = "<group>";
@@ -3018,6 +3036,8 @@
181D7F1A2726CE2A00B7C059 /* StageView.m */,
181D7F1F2727D9DB00B7C059 /* SocialStageView.h */,
181D7F202727D9DB00B7C059 /* SocialStageView.m */,
E877A7E92783E24700EFACED /* DatingStageView.h */,
E877A7EA2783E24700EFACED /* DatingStageView.m */,
);
path = StageView;
sourceTree = "<group>";
@@ -3670,7 +3690,6 @@
E8B825CA26EA1231009E8E9F /* LoginVerifCodeViewController.m in Sources */,
189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */,
E8412FA62779BED1006E1101 /* XPRoomSettingTableViewCell.m in Sources */,
E8252FFB27688F0E002B3164 /* XPRoomRankViewController.m in Sources */,
9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */,
18E7B22626E8CDCF0064BC9B /* XplanFlutterBoostDelegate.m in Sources */,
E8EEB8F326FC2050007C6EBA /* SDWaitingView.m in Sources */,
@@ -3739,6 +3758,7 @@
E8B846CF26FDD96100A777FE /* XPMineRechageHeadView.m in Sources */,
186A534926FC6ED900D67B2C /* TTAlertMessageAttributedConfig.m in Sources */,
E81C27AE26EF39AB0031E639 /* AppDelegate+ThirdConfig.m in Sources */,
E877A7F127842B2F00EFACED /* XPRoomDatingWebAlertView.m in Sources */,
E8E70D8326F2F51A00F03460 /* XPMineHeadView.m in Sources */,
E8B825D026EA3825009E8E9F /* LoginPasswordViewController.m in Sources */,
E8EEB90C26FC5EBC007C6EBA /* XPMineUserInfoEditModel.m in Sources */,
@@ -3902,6 +3922,7 @@
187EEEDC26E89B32002833B2 /* BaseModel.m in Sources */,
E81366FC26F0D2980076364C /* UIButton+EnlargeTouchArea.m in Sources */,
E824546426F5FF1C00BE8163 /* XPMineResetPayPasswordPresenter.m in Sources */,
E877A7EE278428FB00EFACED /* MicroDatingProgressView.m in Sources */,
E8C6FFE32754F349004DC9F0 /* XPSearchListTableViewCell.m in Sources */,
E87A27032758BC81002DDC7A /* XPRoomSearchContainerViewController.m in Sources */,
E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */,
@@ -3945,6 +3966,7 @@
E89D60BA271D643A001F8895 /* Api+Room.m in Sources */,
E872308926E89BE000B90D4F /* LoginPhoneViewController.m in Sources */,
E8C6FFEA2755040B004DC9F0 /* XPHomeSearchNavView.m in Sources */,
E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */,
E8395339276A0CC100CF2F24 /* XPMineHeadwearTableViewCell.m in Sources */,
18E7B29026EA0E6B0064BC9B /* FlutterBoost+Xplan.m in Sources */,
E8B846DC26FDE24300A777FE /* RechargeListModel.m in Sources */,
@@ -3959,6 +3981,7 @@
E84B0E462727EF9D008818C6 /* XPRoomMessageParser.m in Sources */,
E838D9A0275E1BF60079E0B5 /* XPRoomAnimationView.m in Sources */,
E874B88827215D39003954B9 /* MicroStateModel.m in Sources */,
E877A7F427842EF800EFACED /* XPRoomDatingVipUpMicView.m in Sources */,
E896EF9F2771AE7B00AD2CC1 /* XPMineAttentionViewController.m in Sources */,
E89D60C1271D64B9001F8895 /* RoomInfoModel.m in Sources */,
E89DA66727006443008483C1 /* RechargeStorage.m in Sources */,

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,16 @@
//
// XPRoomDatingVipUpMicView.h
// xplan-ios
//
// Created by 冯硕 on 2022/1/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomDatingVipUpMicView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,100 @@
//
// XPRoomDatingVipUpMicView.m
// xplan-ios
//
// Created by on 2022/1/4.
//
#import "XPRoomDatingVipUpMicView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "XPMacro.h"
#import "ThemeColor.h"
#import "TTPopup.h"
@interface XPRoomDatingVipUpMicView ()
///
@property (nonatomic,strong) UIImageView *backImageView;
///
@property (nonatomic,strong) UITextView *contentView;
///
@property (nonatomic,strong) UIButton *closeButton;
@end
@implementation XPRoomDatingVipUpMicView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.backImageView];
[self addSubview:self.contentView];
[self addSubview:self.closeButton];
}
- (void)initSubViewConstraints {
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(260);
make.height.mas_equalTo(325 + 55);
}];
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.top.right.mas_equalTo(self);
make.height.mas_equalTo(325);
}];
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(44);
make.left.mas_equalTo(16);
make.centerX.mas_equalTo(self.backImageView);
make.height.mas_equalTo(271);
}];
[self.closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.backImageView.mas_bottom).offset(20);
make.centerX.mas_equalTo(self);
make.width.height.mas_equalTo(35);
}];
}
#pragma mark - Event Response
- (void)closeButtonAction:(UIButton *)sender {
[TTPopup dismiss];
}
#pragma mark - Getters And Setters
- (UIImageView *)backImageView {
if (!_backImageView) {
_backImageView = [[UIImageView alloc] init];
_backImageView.image = [UIImage imageNamed:@"room_mode_dating_vip_rule_bg"];
}
return _backImageView;
}
- (UITextView *)contentView {
if (!_contentView) {
_contentView = [[UITextView alloc] init];
_contentView.text = @"1.每轮相亲在“嘉宾交流”阶段累积送礼满999钻石且送礼价值最高的用户自动登上VIP席位\n\n2.若出现多个满足上VIP席位要求的用户VIP席位最终由送礼价值最高的用户获得若送礼价值相同以最先达到该值的用户为准\n\n3.VIP席位的用户可选择是否下麦其他用户不可因此代替坐上席位\n\n4.用户只能在“嘉宾交流”阶段抢夺VIP席位“嘉宾交流”阶段后直到结束本轮前即使送出超过之前VIP总礼物价值也不能换人\n\n5.每轮相亲结束后VIP席位清空下一轮重新开始抢位。";
_contentView.backgroundColor = [UIColor clearColor];
_contentView.textColor = UIColorFromRGB(0xFFF9BC);
_contentView.font = [UIFont systemFontOfSize:12];
}
return _contentView;
}
- (UIButton *)closeButton {
if (!_closeButton) {
_closeButton = [[UIButton alloc] init];
[_closeButton setImage:[UIImage imageNamed:@"room_mode_dating_alert_close"] forState:UIControlStateNormal];
[_closeButton addTarget:self action:@selector(closeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _closeButton;
}
@end

View File

@@ -0,0 +1,17 @@
//
// XPRoomDatingWebAlertView.h
// xplan-ios
//
// Created by 冯硕 on 2022/1/4.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomDatingWebAlertView : UIView
///需要打开的url
@property (nonatomic,copy) NSString *url;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,114 @@
//
// XPRoomDatingWebAlertView.m
// xplan-ios
//
// Created by on 2022/1/4.
//
#import "XPRoomDatingWebAlertView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "XPMacro.h"
#import "TTPopup.h"
#import "UIButton+EnlargeTouchArea.h"
///View
#import "XPWebViewController.h"
static CGFloat const kContentAspectRatio = 2/3.f;
@interface XPRoomDatingWebAlertView ()
///
@property (nonatomic,strong) UIImageView *backImageView;
///webView
@property (nonatomic, strong) XPWebViewController *webVC;
///
@property (nonatomic, strong) UIButton *closeButton;
@end
@implementation XPRoomDatingWebAlertView
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self initView];
[self initContrations];
}
return self;
}
- (void)initView {
[self addSubview:self.backImageView];
[self addSubview:self.closeButton];
[self.backImageView addSubview:self.webVC.view];
}
- (void)initContrations {
CGFloat kscale = 351/315;///
CGFloat height = (KScreenWidth - 60) * kscale;
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(KScreenWidth-60);
make.height.mas_equalTo(height + 55);
}];
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self);
make.height.mas_equalTo(height);
}];
[self.webVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.backImageView).inset(30);
make.bottom.mas_equalTo(self.backImageView).offset(-20);
make.top.mas_equalTo(self.backImageView);
}];
[self.closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(35, 35));
make.centerX.mas_equalTo(self);
make.top.mas_equalTo(self.backImageView.mas_bottom).offset(22);
}];
}
#pragma mark - Action
- (void)didClickCloseButton {
[TTPopup dismiss];
}
#pragma mark - Lazy Load
- (void)setUrl:(NSString *)url {
if (url) {
self.webVC.url = url;
}
}
- (XPWebViewController *)webVC {
if (_webVC == nil) {
_webVC = [[XPWebViewController alloc] init];
_webVC.view.backgroundColor = UIColor.clearColor;
}
return _webVC;
}
- (UIImageView *)backImageView {
if (!_backImageView) {
_backImageView = [[UIImageView alloc] init];
_backImageView.image = [UIImage imageNamed:@"room_mode_dating_background"];
_backImageView.userInteractionEnabled = YES;
}
return _backImageView;
}
- (UIButton *)closeButton {
if (_closeButton == nil) {
_closeButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_closeButton setImage:[UIImage imageNamed:@"room_mode_dating_alert_close"] forState:UIControlStateNormal];
[_closeButton addTarget:self action:@selector(didClickCloseButton) forControlEvents:UIControlEventTouchUpInside];
[_closeButton enlargeTouchArea:UIEdgeInsetsMake(10, 10, 10, 10)];
}
return _closeButton;
}
@end

View File

@@ -0,0 +1,16 @@
//
// DatingStageView.h
// xplan-ios
//
// Created by 冯硕 on 2022/1/4.
//
#import "StageView.h"
NS_ASSUME_NONNULL_BEGIN
@interface DatingStageView : StageView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,113 @@
//
// DatingStageView.m
// xplan-ios
//
// Created by on 2022/1/4.
//
#import "DatingStageView.h"
#import "MicroView.h"
#import "MicroGiftValueView.h"
#import "XPMacro.h"
#import "RoomInfoModel.h"
// 58 + 5
#define ownerWidth (58 + 5)
// 12 6
#define ownerHeight (ownerWidth + 6 + 12)
// 8 50 + 5
#define mcWidth (50 + 5)
#define mcHeight (mcWidth + 6 + 12)
// padding 12
#define paddingH 12
// 33
#define marginV1 33
//
#define dateingWidth 100
// 8
#define marginH (KScreenWidth - paddingH * 2 - mcWidth * 4 - dateingWidth) / 2
//
#define firstRowTop ownerHeight + marginV1
//
#define marginV2 27
//
#define secondRowTop (firstRowTop + mcHeight + 27)
@implementation DatingStageView
- (NSInteger)countOfMircoView {
return 10;
}
- (UIView<MicroViewProtocol> *)microViewForIndex:(NSInteger)index {
UIView<MicroViewProtocol> * microView = [super microViewForIndex:index];
if (microView) {
return microView;
}
return [[MicroView alloc]init];
}
/**
* | | * 58 + 5
* | 33 | * 33
* | 12 100 12 | * padding 20
* | 27 | * 15
* | 100 | * 8 50 + 5
* * 12 6
*/
- (CGRect)rectForViewAtIndex:(NSInteger)index {
///
if (index == 0) {
return CGRectMake(KScreenWidth / 2 - ownerWidth / 2, 0, ownerWidth, ownerHeight);
}
if (index >= 1 && index <= 4) {
CGRect rect = CGRectMake(paddingH + mcWidth * (index - 1) + dateingWidth * (index / 3) + marginH * (index / 2), firstRowTop, mcWidth, mcHeight);
return rect;
}
if (index >= 5 && index <= 8) {
return CGRectMake(paddingH + mcWidth * (index - 4 - 1) + marginH *((index -4)/ 2) + dateingWidth * (index / 7), secondRowTop, mcWidth, mcHeight);
}
if (index == 9) {
return CGRectMake(KScreenWidth- mcWidth - 20, 30, mcWidth, mcHeight);
}
return [super rectForViewAtIndex:index];
}
- (CGFloat)hightForStageView {
return ownerHeight + marginV1 + mcHeight + marginH + mcHeight;
}
- (CGPoint)centerForUserAtUid:(NSString *)uid {
NSInteger index = [self microIndexByUid:uid];
CGPoint point = CGPointZero;
if (index == 0) {
point = CGPointMake(KScreenWidth / 2, ownerWidth / 2 - 10);
}
if (index >= 1 && index <= 4) {
point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 1) + mcWidth / 2, firstRowTop + mcWidth / 2- 10);
}
if (index >= 5 && index <= 8) {
point = CGPointMake(paddingH + (mcWidth + marginH) * (index - 4 - 1) + mcWidth / 2, secondRowTop + mcWidth / 2 - 10);
}
if (index == 9) {
point = CGPointMake(KScreenWidth- mcWidth - 20 + mcWidth / 2, 30 + mcWidth / 2);
}
point = [self convertPoint:point toView:nil];
return point;
}
/**
* index
*/
- (void)didSelectAtIndex:(NSInteger)index {
NSLog(@"%d", index);
[super didSelectAtIndex:index];
}
@end

View File

@@ -0,0 +1,17 @@
//
// MicroDatingProgressView.h
// xplan-ios
//
// Created by 冯硕 on 2022/1/4.
//
#import <UIKit/UIKit.h>
#import "RoomInfoModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MicroDatingProgressView : UIView
///
@property (nonatomic,assign) RoomPlayDateingType blindDateState;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,104 @@
//
// MicroDatingProgressView.m
// xplan-ios
//
// Created by on 2022/1/4.
//
#import "MicroDatingProgressView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "TTPopup.h"
@interface MicroDatingProgressView ()
///
@property (nonatomic,strong) UIImageView *heartSceneImageView;
///
@property (nonatomic,strong) UIButton *talkButton;
@end
@implementation MicroDatingProgressView
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.heartSceneImageView];
[self addSubview:self.talkButton];
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapRecognizer)];
[self addGestureRecognizer:tap];
}
- (void)initSubViewConstraints {
[self.heartSceneImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(95, 84));
make.top.centerX.mas_equalTo(self);
}];
[self.talkButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.heartSceneImageView.mas_bottom).offset(7);
make.size.mas_equalTo(CGSizeMake(65, 21));
make.centerX.mas_equalTo(self.heartSceneImageView);
}];
}
#pragma mark - Event Response
- (void)didTapRecognizer {
[TTPopup dismiss];
// RoomDatingWebView * webView = [[RoomDatingWebView alloc] init];
// webView.url = HtmlUrlKey(kRoomDatingRule);
// [TTPopup popupView:webView style:TTPopupStyleAlert];
}
#pragma mark - Getters And Setters
- (void)setBlindDateState:(RoomPlayDateingType)blindDateState {
_blindDateState = blindDateState;
NSString *talkTitle = @"嘉宾交流";
switch (_blindDateState) {
case RoomPlayDateingType_Talk:
talkTitle = @"嘉宾交流";
break;
case RoomPlayDateingType_Pick:
talkTitle = @"心动选人";
break;
case RoomPlayDateingType_Result:
talkTitle = @"心动公布";
break;
default:
break;
}
[self.talkButton setTitle:talkTitle forState:UIControlStateNormal];
}
- (UIImageView *)heartSceneImageView {
if (!_heartSceneImageView) {
_heartSceneImageView = [[UIImageView alloc] init];
_heartSceneImageView.userInteractionEnabled = YES;
}
return _heartSceneImageView;
}
- (UIButton *)talkButton {
if (_talkButton == nil) {
_talkButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_talkButton setTitle:@"嘉宾交流" forState:UIControlStateNormal];
[_talkButton setTitleColor:UIColorFromRGB(0xFFE1E8) forState:UIControlStateNormal];
_talkButton.titleLabel.font = [UIFont boldSystemFontOfSize:13];
_talkButton.titleLabel.textAlignment = NSTextAlignmentCenter;
[_talkButton setBackgroundImage:[UIImage imageNamed:@"room_dating_progress_bg"] forState:UIControlStateNormal];
[_talkButton addTarget:self action:@selector(roomdatingRuleAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _talkButton;
}
@end

View File

@@ -52,6 +52,8 @@
@property (nonatomic,strong) YYAnimatedImageView *headWearImageView;
///
@property (nonatomic, strong) SpriteSheetImageManager *manager;
///
@property (nonatomic,strong) UIImageView *datingTypeView;
@end
@@ -173,7 +175,8 @@
[image drawInRect:CGRectMake(1, 1, scaledToSize.width - 2, scaledToSize.height - 2)];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
self.avatarImageView.backgroundColor = [UIColor colorWithPatternImage:newImage];
UIColor * image1 = [UIColor colorWithPatternImage:newImage];
self.avatarImageView.image = newImage;
self.postionLabel.text = [NSString stringWithFormat:@"%d", micState.position + 1];
}
@@ -192,7 +195,7 @@
}
self.nickLabel.text = userInfo.nick.length > 0 ? userInfo.nick : @"";
} else {
self.avatarImageView.image = nil;
// self.avatarImageView.image = nil;
[self.postionLabel setBackgroundColor:[ThemeColor positionNormalNickBackColor]];
}
if (userInfo.headWearUrl.length > 0) {
@@ -225,6 +228,28 @@
self.roomUid = roomUid;
}
- (void)configDatingMode:(BOOL)isDating position:(int)position {
if (isDating) {
NSString * typeImageName = @"";
if (position == 0 || position == 1 || position == 4 || position == 5) {
typeImageName = @"room_position_dating_male_bg";
} else if(position == 2 || position == 3 || position == 6 || position == 7){
typeImageName = @"room_position_dating_female_bg";
}
if (!self.datingTypeView.superview) {
[self insertSubview:self.datingTypeView aboveSubview:self.avatarImageView];
[self.datingTypeView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.avatarImageView);
}];
}
self.datingTypeView.image = [UIImage imageNamed:typeImageName];
self.datingTypeView.hidden = NO;
} else {
self.datingTypeView.hidden = YES;
[self.datingTypeView removeFromSuperview];
}
}
#pragma mark - Event Response
- (void)tapGiftValueRecognizer {
if (self.giftValueView.hidden) return;
@@ -336,4 +361,13 @@
}
return _headWearImageView;
}
- (UIImageView *)datingTypeView {
if (!_datingTypeView) {
_datingTypeView = [[UIImageView alloc] init];
_datingTypeView.userInteractionEnabled = YES;
}
return _datingTypeView;
}
@end

View File

@@ -54,13 +54,16 @@ NS_ASSUME_NONNULL_BEGIN
* 礼物值清零
*/
- (void)resetGiftValue;
/**
* 房主的uid
*/
- (void)configRoomUid:(NSString *)roomUid;
/**
* 是否是相亲模式
*/
- (void)configDatingMode:(BOOL)isDating position:(int)position;
@end
NS_ASSUME_NONNULL_END

View File

@@ -33,9 +33,6 @@
@implementation SocialStageView
- (NSInteger)countOfMircoView {
if (self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
return 10;
}
return 9;
}
@@ -56,39 +53,6 @@
* * 12 6
*/
- (CGRect)rectForViewAtIndex:(NSInteger)index {
if (self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
///
/**
* | | * 58 + 5
* | 33 | * 33
* | 12 100 12 | * padding 20
* | 27 | * 15
* | 100 | * 8 50 + 5
* * 12 6
*/
if (index == 0) {
return CGRectMake(KScreenWidth / 2 - ownerWidth / 2, 0, ownerWidth, ownerHeight);
}
CGFloat itemWidth = (50 + 5);
CGFloat itemHeight = (itemWidth + 6 + 12);
CGFloat paddingWidth = 12;
CGFloat dateingWidth = 100;
CGFloat itemMarginH = (KScreenWidth - paddingWidth * 2 - itemWidth * 4 - dateingWidth) / 2;
CGFloat secondRowTopHeight = (firstRowTop + itemHeight + 27);
if (index >= 1 && index <= 4) {
CGRect rect = CGRectMake(paddingWidth + itemWidth * (index - 1) + dateingWidth * (index / 3) + itemMarginH * (index / 2), firstRowTop, itemWidth, itemHeight);
NSLog(@"aaaaaaaaaa%.2f", rect.origin.x);
return rect;
}
if (index >= 5 && index <= 8) {
return CGRectMake(paddingWidth + itemWidth * (index - 4 - 1) + itemMarginH *((index -4)/ 2) + dateingWidth * (index / 7), secondRowTopHeight, itemWidth, itemHeight);
}
if (index == 9) {
return CGRectMake(KScreenWidth- itemWidth - 20, 30, itemWidth, itemHeight);
}
}
if (index == 0) {
return CGRectMake(KScreenWidth / 2 - ownerWidth / 2, 0, ownerWidth, ownerHeight);
}

View File

@@ -182,6 +182,7 @@
}
[view showGiftValueMode:roomInfo.showGiftValue];
[view configDatingMode:roomInfo.roomModeType == RoomModeType_Open_Blind position:model.microState.position];
if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) {
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
}
@@ -229,7 +230,6 @@
#pragma mark - RoomGuestDelegate
- (void)onRoomEntered {
[self initRtcRoom];
[self updateMicroSubViewsRoomInfoUpdate];
}
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getMicroQueue {
@@ -238,7 +238,6 @@
- (void)onRoomUpdate {
[self microQueueUpdated];
[self updateMicroSubViewsRoomInfoUpdate];
}
- (void)handleNIMNotificationMessage:(NIMMessage *)message {
@@ -572,53 +571,6 @@
return -1;
}
#pragma mark - Private Utils Methods -
- (void)updateMicroSubViewsRoomInfoUpdate {
///
NSInteger microCount = self.countOfMircoView;
if (microCount > self.microViews.count) {
NSInteger extraCount = microCount - self.microViews.count;
for (int i = 0; i < extraCount; i++) {
NSInteger index = i+ self.microViews.count;
UIView* microView = [self microViewForIndex:index];
if (microView) {
microView.tag = i;
microView.frame = [self rectForViewAtIndex:i];
[self addSubview:microView];
UITapGestureRecognizer* tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(microViewTapped:)];
[microView addGestureRecognizer:tap];
[self.microViews insertObject:microView atIndex:i];
}
}
for (int i = 0 ; i< self.microViews.count; i++) {
UIView* microView = [self.microViews objectAtIndex:i];
microView.frame = [self rectForViewAtIndex:i];
}
[self microQueueUpdated];
} else if(microCount < self.microViews.count) {
NSInteger extraCount = self.microViews.count - microCount;
for (int i = 0; i < extraCount; i++) {
NSInteger index = i+ microCount;
UIView* microView = [self microViewForIndex:index];
if (microView) {
[microView removeFromSuperview];
}
if ([self.microViews containsObject:microView]) {
[self.microViews removeObject:microView];
}
}
for (int i = 0 ; i< self.microViews.count; i++) {
UIView* microView = [self.microViews objectAtIndex:i];
microView.frame = [self rectForViewAtIndex:i];
}
[self microQueueUpdated];
}
}
/**
* index
*/

View File

@@ -31,6 +31,7 @@
#import "XPRoomMessageContainerView.h"
#import "RoomHeaderView.h"
#import "SocialStageView.h"
#import "DatingStageView.h"
#import "XPRoomAnimationView.h"
#import "XPRoomFunctionContainerView.h"
#import "XPArrangeMicViewController.h"
@@ -55,7 +56,11 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
///
@property (nonatomic,strong) RoomHeaderView *roomHeaderView;
///
@property (nonatomic,strong) SocialStageView *stageView;
@property (nonatomic,strong) StageView *stageView;
///
@property (nonatomic,strong) DatingStageView *datingView;
///view
@property (nonatomic,strong) SocialStageView *socialView;
///
@property (nonatomic,strong) XPRoomMessageContainerView *messageContainerView;
///
@@ -207,6 +212,45 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
}
}
- (void)changeStageViewOnRoomUpdate {
if (self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
if (self.stageView == self.datingView) {
return;
}
[self.stageView removeFromSuperview];
self.stageView = self.datingView;
} else {
if (self.stageView == self.socialView) {
return;
}
[self.stageView removeFromSuperview];
self.stageView = self.socialView;
}
if (!self.stageView.superview) {
[self.view insertSubview:self.stageView aboveSubview:self.roomHeaderView];
}
[self.stageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.view);
make.top.mas_equalTo(self.roomHeaderView.mas_bottom);
make.height.mas_equalTo(self.stageView.hightForStageView);
}];
[self.messageContainerView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.stageView.mas_bottom);
make.bottom.equalTo(self.menuContainerView.mas_top).offset(-5);
make.left.equalTo(self.view);
make.right.equalTo(self.activityContainerView.mas_left).offset(-10);
}];
[self.activityContainerView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.messageContainerView);
make.right.mas_equalTo(self.view);
make.bottom.mas_equalTo(self.menuContainerView.mas_top).offset(-5);
make.width.mas_equalTo(80);
}];
}
#pragma mark -
- (void)myGiftEffectUpdate:(NSNotification *)notification {
NSDictionary * dic = notification.object;
@@ -238,6 +282,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
config.shouldDismissOnBackgroundTouch = NO;
[TTPopup popupWithConfig:config];
} else {
[self changeStageViewOnRoomUpdate];
[self.roomHeaderView onRoomUpdate];
[self.activityContainerView onRoomUpdate];
[self.menuContainerView onRoomUpdate];
@@ -341,6 +386,7 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
self.roomInfo.leaveMode = roomInfo.leaveMode;
self.roomInfo.showGiftValue = roomInfo.showGiftValue;
self.roomInfo.roomModeType = roomInfo.roomModeType;
[self changeStageViewOnRoomUpdate];
[self.stageView onRoomUpdate];
[self.menuContainerView onRoomUpdate];
}
@@ -524,11 +570,25 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
return _roomHeaderView;
}
- (SocialStageView *)stageView {
if (!_stageView) {
_stageView = [[SocialStageView alloc] initWithDelegate:self];
- (SocialStageView *)socialView {
if (!_socialView) {
_socialView = [[SocialStageView alloc] initWithDelegate:self];
}
return _stageView;
return _socialView;
}
- (StageView *)stageView {
if (!_stageView) {
_stageView = [[StageView alloc] initWithDelegate:self];
}
return _stageView;
}
- (DatingStageView *)datingView {
if (!_datingView) {
_datingView = [[DatingStageView alloc] initWithDelegate:self];
}
return _datingView;
}
- (XPRoomMessageContainerView *)messageContainerView {