diff --git a/yinmeng-ios.xcodeproj/project.pbxproj b/yinmeng-ios.xcodeproj/project.pbxproj index 5650103..417e371 100644 --- a/yinmeng-ios.xcodeproj/project.pbxproj +++ b/yinmeng-ios.xcodeproj/project.pbxproj @@ -48,7 +48,18 @@ 234E2E0C2B9879D400433CF7 /* RoomQuitClickCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E0B2B9879D400433CF7 /* RoomQuitClickCell.swift */; }; 234E2E0E2B99A24F00433CF7 /* RoomQuitItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E0D2B99A24F00433CF7 /* RoomQuitItemModel.swift */; }; 234E2E112B99B50400433CF7 /* RoomQuitViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E102B99B50400433CF7 /* RoomQuitViewModel.swift */; }; - 234E2E142B99F23C00433CF7 /* RoomNormalMicSeatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E132B99F23C00433CF7 /* RoomNormalMicSeatView.swift */; }; + 234E2E1E2B9AB43700433CF7 /* RoomNormalMicSeatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E1C2B9AB43700433CF7 /* RoomNormalMicSeatView.swift */; }; + 234E2E202B9AB44800433CF7 /* MicSeatSuperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E1F2B9AB44800433CF7 /* MicSeatSuperView.swift */; }; + 234E2E222B9AB48900433CF7 /* NormalMicSeatSuperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E212B9AB48900433CF7 /* NormalMicSeatSuperView.swift */; }; + 234E2E252B9AB64700433CF7 /* NormalMicSeatCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E242B9AB64700433CF7 /* NormalMicSeatCell.swift */; }; + 234E2E282B9ABA5B00433CF7 /* NormalMicSeatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E272B9ABA5B00433CF7 /* NormalMicSeatView.swift */; }; + 234E2E2A2B9AC07B00433CF7 /* MicSeatGiftValueView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E292B9AC07B00433CF7 /* MicSeatGiftValueView.swift */; }; + 234E2E312B9B001A00433CF7 /* RoomChatScreenView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E302B9B001A00433CF7 /* RoomChatScreenView.swift */; }; + 234E2E332B9B019B00433CF7 /* RoomChatScreenHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E322B9B019B00433CF7 /* RoomChatScreenHeaderView.swift */; }; + 234E2E352B9B06E800433CF7 /* RoomChatScreenUserChatCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234E2E342B9B06E800433CF7 /* RoomChatScreenUserChatCell.swift */; }; + 234E2E372B9B307700433CF7 /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = 234E2E362B9B307700433CF7 /* 1.png */; }; + 234E2E392B9B309800433CF7 /* 2.png in Resources */ = {isa = PBXBuildFile; fileRef = 234E2E382B9B309800433CF7 /* 2.png */; }; + 234E2E3B2B9B30AB00433CF7 /* 3.png in Resources */ = {isa = PBXBuildFile; fileRef = 234E2E3A2B9B30AB00433CF7 /* 3.png */; }; 25C63BC8F805551E8754E409 /* Pods_yinmeng_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2F175918AD0811681497739 /* Pods_yinmeng_ios.framework */; }; E81A7BAE2B885B20009E736E /* Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A7BAA2B885B20009E736E /* Base64.m */; }; E81A7BAF2B885B20009E736E /* MAIDESEncryptTool.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A7BAB2B885B20009E736E /* MAIDESEncryptTool.m */; }; @@ -162,7 +173,18 @@ 234E2E0B2B9879D400433CF7 /* RoomQuitClickCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomQuitClickCell.swift; sourceTree = ""; }; 234E2E0D2B99A24F00433CF7 /* RoomQuitItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomQuitItemModel.swift; sourceTree = ""; }; 234E2E102B99B50400433CF7 /* RoomQuitViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomQuitViewModel.swift; sourceTree = ""; }; - 234E2E132B99F23C00433CF7 /* RoomNormalMicSeatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomNormalMicSeatView.swift; sourceTree = ""; }; + 234E2E1C2B9AB43700433CF7 /* RoomNormalMicSeatView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoomNormalMicSeatView.swift; sourceTree = ""; }; + 234E2E1F2B9AB44800433CF7 /* MicSeatSuperView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MicSeatSuperView.swift; sourceTree = ""; }; + 234E2E212B9AB48900433CF7 /* NormalMicSeatSuperView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NormalMicSeatSuperView.swift; sourceTree = ""; }; + 234E2E242B9AB64700433CF7 /* NormalMicSeatCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NormalMicSeatCell.swift; sourceTree = ""; }; + 234E2E272B9ABA5B00433CF7 /* NormalMicSeatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NormalMicSeatView.swift; sourceTree = ""; }; + 234E2E292B9AC07B00433CF7 /* MicSeatGiftValueView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MicSeatGiftValueView.swift; sourceTree = ""; }; + 234E2E302B9B001A00433CF7 /* RoomChatScreenView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomChatScreenView.swift; sourceTree = ""; }; + 234E2E322B9B019B00433CF7 /* RoomChatScreenHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomChatScreenHeaderView.swift; sourceTree = ""; }; + 234E2E342B9B06E800433CF7 /* RoomChatScreenUserChatCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomChatScreenUserChatCell.swift; sourceTree = ""; }; + 234E2E362B9B307700433CF7 /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; }; + 234E2E382B9B309800433CF7 /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2.png; sourceTree = ""; }; + 234E2E3A2B9B30AB00433CF7 /* 3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3.png; sourceTree = ""; }; A9FB906EB4D17C552C15A2B3 /* Pods-yinmeng-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.debug.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.debug.xcconfig"; sourceTree = ""; }; B2F175918AD0811681497739 /* Pods_yinmeng_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_yinmeng_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CB0AC98C54C1D41FA4CA102B /* Pods-yinmeng-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.release.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.release.xcconfig"; sourceTree = ""; }; @@ -302,6 +324,7 @@ 234E2DED2B98411800433CF7 /* View */ = { isa = PBXGroup; children = ( + 234E2E2B2B9AFCDB00433CF7 /* RoomChatScreenView */, 234E2E122B99F21600433CF7 /* MicSeatView */, 234E2DFE2B986D6600433CF7 /* RoomQuitView */, 234E2DF52B984FA800433CF7 /* RoomTopView */, @@ -398,11 +421,122 @@ 234E2E122B99F21600433CF7 /* MicSeatView */ = { isa = PBXGroup; children = ( - 234E2E132B99F23C00433CF7 /* RoomNormalMicSeatView.swift */, + 234E2E172B9AB36200433CF7 /* Model */, + 234E2E162B9AB36200433CF7 /* Tool */, + 234E2E182B9AB36200433CF7 /* View */, + 234E2E152B9AB36200433CF7 /* ViewModel */, ); path = MicSeatView; sourceTree = ""; }; + 234E2E152B9AB36200433CF7 /* ViewModel */ = { + isa = PBXGroup; + children = ( + ); + path = ViewModel; + sourceTree = ""; + }; + 234E2E162B9AB36200433CF7 /* Tool */ = { + isa = PBXGroup; + children = ( + ); + path = Tool; + sourceTree = ""; + }; + 234E2E172B9AB36200433CF7 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 234E2E182B9AB36200433CF7 /* View */ = { + isa = PBXGroup; + children = ( + 234E2E1D2B9AB43700433CF7 /* MicSeatSuperView */, + 234E2E1B2B9AB43700433CF7 /* MicSeatView */, + ); + path = View; + sourceTree = ""; + }; + 234E2E1B2B9AB43700433CF7 /* MicSeatView */ = { + isa = PBXGroup; + children = ( + 234E2E1C2B9AB43700433CF7 /* RoomNormalMicSeatView.swift */, + ); + path = MicSeatView; + sourceTree = ""; + }; + 234E2E1D2B9AB43700433CF7 /* MicSeatSuperView */ = { + isa = PBXGroup; + children = ( + 234E2E262B9AB86000433CF7 /* SubView */, + 234E2E232B9AB62800433CF7 /* Cell */, + 234E2E1F2B9AB44800433CF7 /* MicSeatSuperView.swift */, + 234E2E212B9AB48900433CF7 /* NormalMicSeatSuperView.swift */, + ); + path = MicSeatSuperView; + sourceTree = ""; + }; + 234E2E232B9AB62800433CF7 /* Cell */ = { + isa = PBXGroup; + children = ( + 234E2E242B9AB64700433CF7 /* NormalMicSeatCell.swift */, + ); + path = Cell; + sourceTree = ""; + }; + 234E2E262B9AB86000433CF7 /* SubView */ = { + isa = PBXGroup; + children = ( + 234E2E272B9ABA5B00433CF7 /* NormalMicSeatView.swift */, + 234E2E292B9AC07B00433CF7 /* MicSeatGiftValueView.swift */, + ); + path = SubView; + sourceTree = ""; + }; + 234E2E2B2B9AFCDB00433CF7 /* RoomChatScreenView */ = { + isa = PBXGroup; + children = ( + 234E2E2C2B9AFCDB00433CF7 /* ViewModel */, + 234E2E2D2B9AFCDB00433CF7 /* Model */, + 234E2E2E2B9AFCDB00433CF7 /* View */, + 234E2E2F2B9AFCDB00433CF7 /* Tool */, + ); + path = RoomChatScreenView; + sourceTree = ""; + }; + 234E2E2C2B9AFCDB00433CF7 /* ViewModel */ = { + isa = PBXGroup; + children = ( + ); + path = ViewModel; + sourceTree = ""; + }; + 234E2E2D2B9AFCDB00433CF7 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 234E2E2E2B9AFCDB00433CF7 /* View */ = { + isa = PBXGroup; + children = ( + 234E2E302B9B001A00433CF7 /* RoomChatScreenView.swift */, + 234E2E322B9B019B00433CF7 /* RoomChatScreenHeaderView.swift */, + 234E2E342B9B06E800433CF7 /* RoomChatScreenUserChatCell.swift */, + ); + path = View; + sourceTree = ""; + }; + 234E2E2F2B9AFCDB00433CF7 /* Tool */ = { + isa = PBXGroup; + children = ( + ); + path = Tool; + sourceTree = ""; + }; 4B36689ACEFDA475774E1FD5 /* Pods */ = { isa = PBXGroup; children = ( @@ -637,6 +771,9 @@ isa = PBXGroup; children = ( E8E4AAB82B8F99B90096D77C /* yinmeng-ios.entitlements */, + 234E2E362B9B307700433CF7 /* 1.png */, + 234E2E382B9B309800433CF7 /* 2.png */, + 234E2E3A2B9B30AB00433CF7 /* 3.png */, E86A43B12B85E1FC0084C04D /* Modules */, E86A43AB2B85DFC20084C04D /* Extension */, E86A43A72B85DF7A0084C04D /* Base */, @@ -872,12 +1009,15 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 234E2E392B9B309800433CF7 /* 2.png in Resources */, + 234E2E372B9B307700433CF7 /* 1.png in Resources */, 2311D6D92B920442001C70AB /* yinLogo.png in Resources */, E884E86B2B6900C600ADE6EE /* LaunchScreen.storyboard in Resources */, 2311D6BE2B90A1E9001C70AB /* PublishVoice.svga in Resources */, 2311D6A52B8F0E06001C70AB /* StarGift.svga in Resources */, E884E8682B6900C600ADE6EE /* Assets.xcassets in Resources */, 2311D6C02B90A221001C70AB /* RecordPlayer.svga in Resources */, + 234E2E3B2B9B30AB00433CF7 /* 3.png in Resources */, E884E8662B6900C500ADE6EE /* Main.storyboard in Resources */, 2311D6DD2B9204EF001C70AB /* logoBg.png in Resources */, 2311D6DB2B920478001C70AB /* textLogo.png in Resources */, @@ -945,11 +1085,13 @@ E86A43E82B884C5E0084C04D /* String+.swift in Sources */, 2311D6D12B91DDDF001C70AB /* UserPayViewModel.swift in Sources */, 2311D6B12B9062A3001C70AB /* HomeVoiceFollowCell.swift in Sources */, + 234E2E312B9B001A00433CF7 /* RoomChatScreenView.swift in Sources */, E8D15AA32B89B03D00369467 /* Deserialized.swift in Sources */, + 234E2E222B9AB48900433CF7 /* NormalMicSeatSuperView.swift in Sources */, E8E4AAB72B8F95CA0096D77C /* AuthAppleManager.swift in Sources */, E89F19452B917DBA0098E797 /* ChatSendVoiceView.swift in Sources */, E8D15AC22B8C703C00369467 /* UserFunctionView.swift in Sources */, - 234E2E142B99F23C00433CF7 /* RoomNormalMicSeatView.swift in Sources */, + 234E2E1E2B9AB43700433CF7 /* RoomNormalMicSeatView.swift in Sources */, 2311D6AF2B906148001C70AB /* HomeVoiceFollowView.swift in Sources */, E86A43DA2B877A840084C04D /* AppConfigObject.swift in Sources */, 2311D6BC2B909A4F001C70AB /* HomeVoicePublishView.swift in Sources */, @@ -960,6 +1102,7 @@ 234E2E0A2B98779900433CF7 /* RoomQuitUserInfoEmptyCell.swift in Sources */, E81A7BAE2B885B20009E736E /* Base64.m in Sources */, 2311D6D72B91EF62001C70AB /* PlanetStarPopUpView.swift in Sources */, + 234E2E352B9B06E800433CF7 /* RoomChatScreenUserChatCell.swift in Sources */, E8479E462B8DD5BF009AF878 /* Date+.swift in Sources */, E81A7BB22B886299009E736E /* HUDTool.swift in Sources */, 234E2E082B98738D00433CF7 /* RoomQuitUserInfoCell.swift in Sources */, @@ -973,9 +1116,11 @@ E86A43AA2B85DFA90084C04D /* BaseViewController.swift in Sources */, E8E4AB1F2B901BFC0096D77C /* ChatGrowingTextView.swift in Sources */, E884E85F2B6900C500ADE6EE /* AppDelegate.swift in Sources */, + 234E2E282B9ABA5B00433CF7 /* NormalMicSeatView.swift in Sources */, 2311D6B72B908979001C70AB /* PlayVoiceManager.swift in Sources */, E8D15AEA2B8CD77800369467 /* H5Utils.swift in Sources */, E8D15AAA2B8ACC6B00369467 /* YMNetworkFun.swift in Sources */, + 234E2E202B9AB44800433CF7 /* MicSeatSuperView.swift in Sources */, E8D15AB82B8B003C00369467 /* UserInfoVC.swift in Sources */, 234E2DF72B984FB200433CF7 /* RoomTopView.swift in Sources */, E86A43B82B85F0B80084C04D /* AuthLaunchVC.swift in Sources */, @@ -985,6 +1130,7 @@ E86A43CD2B874C8E0084C04D /* BaseView.swift in Sources */, E8D15AE82B8CD47100369467 /* WebViewController.swift in Sources */, E89F194B2B919ECB0098E797 /* ChatImageCell.swift in Sources */, + 234E2E2A2B9AC07B00433CF7 /* MicSeatGiftValueView.swift in Sources */, E8D15AA12B89AF4F00369467 /* UserTokenObject.swift in Sources */, 234E2E0E2B99A24F00433CF7 /* RoomQuitItemModel.swift in Sources */, 233E515B2B8C849600582F9C /* PlanetStarClickItemView.swift in Sources */, @@ -1011,6 +1157,7 @@ E86A43BA2B85F1360084C04D /* AuthLoginVC.swift in Sources */, E8D15ABC2B8B87BA00369467 /* UserViewModel.swift in Sources */, E8479E432B8DD077009AF878 /* ChatUIConfig.swift in Sources */, + 234E2E252B9AB64700433CF7 /* NormalMicSeatCell.swift in Sources */, E8479E4D2B8DDBC5009AF878 /* ChatAttributeTool.swift in Sources */, E81A7BAF2B885B20009E736E /* MAIDESEncryptTool.m in Sources */, E8D15AA82B89B74700369467 /* YMRequestX.swift in Sources */, @@ -1026,6 +1173,7 @@ 2311D6CF2B91D35E001C70AB /* UserPayViewItemView.swift in Sources */, E8D15AB32B8B000400369467 /* PlanetStarVC.swift in Sources */, E8FF28B62B90ED6C005D2BE7 /* ChatNavView.swift in Sources */, + 234E2E332B9B019B00433CF7 /* RoomChatScreenHeaderView.swift in Sources */, E8D15A9D2B899E1500369467 /* YMNetworkHelper.swift in Sources */, E8E4AB1B2B901AF50096D77C /* UIView+.swift in Sources */, 2311D69D2B8DC311001C70AB /* PlanetStarModel.swift in Sources */, diff --git a/yinmeng-ios/1.png b/yinmeng-ios/1.png new file mode 100644 index 0000000..87308cf Binary files /dev/null and b/yinmeng-ios/1.png differ diff --git a/yinmeng-ios/2.png b/yinmeng-ios/2.png new file mode 100644 index 0000000..5341326 Binary files /dev/null and b/yinmeng-ios/2.png differ diff --git a/yinmeng-ios/3.png b/yinmeng-ios/3.png new file mode 100644 index 0000000..4ea6435 Binary files /dev/null and b/yinmeng-ios/3.png differ diff --git a/yinmeng-ios/Assets.xcassets/room/MicSeat/Contents.json b/yinmeng-ios/Assets.xcassets/room/MicSeat/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/room/MicSeat/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/Contents.json new file mode 100644 index 0000000..80538b6 --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_mic_gift_value_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_mic_gift_value_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/room_mic_gift_value_icon@2x.png b/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/room_mic_gift_value_icon@2x.png new file mode 100644 index 0000000..c010559 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/room_mic_gift_value_icon@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/room_mic_gift_value_icon@3x.png b/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/room_mic_gift_value_icon@3x.png new file mode 100644 index 0000000..d862188 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/room/MicSeat/room_mic_gift_value_icon.imageset/room_mic_gift_value_icon@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/Contents.json new file mode 100644 index 0000000..1303d39 --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "yin_room_mic_position_normal@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "yin_room_mic_position_normal@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/yin_room_mic_position_normal@2x.png b/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/yin_room_mic_position_normal@2x.png new file mode 100644 index 0000000..5963d41 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/yin_room_mic_position_normal@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/yin_room_mic_position_normal@3x.png b/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/yin_room_mic_position_normal@3x.png new file mode 100644 index 0000000..11145a7 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/room/MicSeat/yin_room_mic_position_normal.imageset/yin_room_mic_position_normal@3x.png differ diff --git a/yinmeng-ios/Extension/UIImage/UIImage+.swift b/yinmeng-ios/Extension/UIImage/UIImage+.swift index cea44f8..56c40f5 100644 --- a/yinmeng-ios/Extension/UIImage/UIImage+.swift +++ b/yinmeng-ios/Extension/UIImage/UIImage+.swift @@ -120,6 +120,56 @@ extension UIImage{ UIGraphicsEndImageContext() return image } + + + + static func createImageWithCorners(color:UIColor, size: CGSize, topLeft: CGFloat, topRight: CGFloat, bottomLeft: CGFloat, bottomRight: CGFloat) -> UIImage? { + UIGraphicsBeginImageContextWithOptions(size, false, 0) + guard let context = UIGraphicsGetCurrentContext() else { return nil } + + let path = UIBezierPath(rect: CGRect(origin: .zero, size: size)) + context.addPath(path.cgPath) + + // 设置左上角的圆角 + path.move(to: CGPoint(x: topLeft, y: 0)) + path.addLine(to: CGPoint(x: 0, y: topLeft)) + if topLeft > 0 { + path.addArc(withCenter: CGPoint(x: topLeft, y: topLeft), radius: topLeft, startAngle: CGFloat.pi, endAngle: CGFloat.pi * 3 / 2, clockwise: true) + } + + // 设置右上角的圆角 + let topRightFrom = CGPoint(x: size.width - topRight, y: 0) + path.addLine(to: topRightFrom) + if topRight > 0 { + path.addArc(withCenter: CGPoint(x: size.width - topRight, y: topRight), radius: topRight, startAngle: CGFloat.pi * 3 / 2, endAngle: CGFloat.pi, clockwise: true) + } + + // 设置左下角的圆角 + let bottomLeftFrom = CGPoint(x: 0, y: size.height - bottomLeft) + path.addLine(to: bottomLeftFrom) + if bottomLeft > 0 { + path.addArc(withCenter: CGPoint(x: bottomLeft, y: size.height - bottomLeft), radius: bottomLeft, startAngle: 0, endAngle: CGFloat.pi / 2, clockwise: false) + } + + // 设置右下角的圆角 + path.addLine(to: CGPoint(x: size.width, y: size.height - bottomRight)) + if bottomRight > 0 { + path.addArc(withCenter: CGPoint(x: size.width - bottomRight, y: size.height - bottomRight), radius: bottomRight, startAngle: CGFloat.pi / 2, endAngle: 0, clockwise: false) + } + + path.close() + context.clip() + + // 填充颜色,或者可以在这里添加自定义的图片 + context.setFillColor(color.cgColor) + context.fillPath() + + let image = UIGraphicsGetImageFromCurrentImageContext() + UIGraphicsEndImageContext() + return image + } + + } extension UIImage{ diff --git a/yinmeng-ios/Extension/UILabel/UILabel+.swift b/yinmeng-ios/Extension/UILabel/UILabel+.swift index ec3e083..c7e9cc3 100644 --- a/yinmeng-ios/Extension/UILabel/UILabel+.swift +++ b/yinmeng-ios/Extension/UILabel/UILabel+.swift @@ -7,7 +7,7 @@ import Foundation extension UILabel{ - static func getCustomLabel(text:String? = "",font:UIFont? = nil,color:UIColor? = nil,textAlignment:NSTextAlignment? = .left)->UILabel{ + static func getCustomLabel(text:String? = "",font:UIFont? = nil,color:UIColor? = nil,textAlignment:NSTextAlignment? = .left,numberOfLines:Int? = 1)->UILabel{ let customView = UILabel() if let _text = text { customView.text = text @@ -21,6 +21,9 @@ extension UILabel{ if let _textAlignment = textAlignment{ customView.textAlignment = _textAlignment } + if let _numberOfLines = numberOfLines{ + customView.numberOfLines = _numberOfLines + } return customView } static func getLabelHeigth(text:String,width:CGFloat,font:UIFont)-> CGFloat{ diff --git a/yinmeng-ios/Info.plist b/yinmeng-ios/Info.plist index 0a91a49..f3ae914 100644 --- a/yinmeng-ios/Info.plist +++ b/yinmeng-ios/Info.plist @@ -12,9 +12,5 @@ UIApplicationSupportsMultipleScenes - UIBackgroundModes - - audio - diff --git a/yinmeng-ios/Modules/Room/VC/RoomVC.swift b/yinmeng-ios/Modules/Room/VC/RoomVC.swift index 5455217..929dc46 100644 --- a/yinmeng-ios/Modules/Room/VC/RoomVC.swift +++ b/yinmeng-ios/Modules/Room/VC/RoomVC.swift @@ -16,6 +16,8 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol { private func setUILayout(){ view.addSubview(backgroundView) view.addSubview(topView) + view.addSubview(micSeatView) + view.addSubview(chatScreenView) backgroundView.snp.makeConstraints { make in make.edges.equalTo(self.view) } @@ -23,6 +25,18 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol { make.leading.trailing.top.equalTo(self.view) make.height.equalTo(UIDevice.scaleWidth(width: NavHeight)) } + micSeatView.snp.makeConstraints { make in + make.leading.trailing.equalTo(self.view) + make.top.equalTo(self.topView.snp.bottom).offset(UIDevice.scaleWidth(width: 30)) + make.height.equalTo(UIDevice.scaleWidth(width: 340)) + } + chatScreenView.snp.makeConstraints { make in + make.top.equalTo(micSeatView.snp.bottom).offset(UIDevice.scaleWidth(width: 5)) + make.leading.equalTo(UIDevice.scaleWidth(width: 0)) + make.trailing.equalTo(-UIDevice.scaleWidth(width: 90)) + make.bottom.equalTo(-UIDevice.scaleWidth(width: 0)) + } + } private func requestData(){ @@ -38,4 +52,14 @@ class RoomVC: BaseViewController, HiddenNavigationBarProtocol { return _topView }() + private lazy var micSeatView:MicSeatSuperView = { + let _micSeatView = NormalMicSeatSuperView(frame: .zero) + + return _micSeatView + }() + private lazy var chatScreenView:RoomChatScreenView = { + let _chatScreenView = RoomChatScreenView(frame: .zero) + + return _chatScreenView + }() } diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/Cell/NormalMicSeatCell.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/Cell/NormalMicSeatCell.swift new file mode 100644 index 0000000..bd752b5 --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/Cell/NormalMicSeatCell.swift @@ -0,0 +1,41 @@ +// +// NormalMicSeatCell.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class NormalMicSeatCell: UICollectionViewCell { + override init(frame: CGRect) { + super.init(frame: frame) + setUILayout() + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + private func setUILayout(){ + backgroundColor = .clear + contentView.addSubview(micSeatView) + micSeatView.snp.makeConstraints { make in + make.edges.equalTo(contentView) + } + } + var text:String = ""{ + didSet{ + micSeatView.nameView.text = "号麦位" + micSeatView.postionView.text = "\(text)" + } + } + //MARK: - 懒加载 + private lazy var micSeatView:NormalMicSeatView = { + let _micSeatView = NormalMicSeatView(frame: .zero, isOwner: false) + + return _micSeatView + }() + + +} diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/MicSeatSuperView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/MicSeatSuperView.swift new file mode 100644 index 0000000..ecd5a1c --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/MicSeatSuperView.swift @@ -0,0 +1,20 @@ +// +// MicSeatSuperView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class MicSeatSuperView: UIView { + + /* + // Only override draw() if you perform custom drawing. + // An empty implementation adversely affects performance during animation. + override func draw(_ rect: CGRect) { + // Drawing code + } + */ + +} diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift new file mode 100644 index 0000000..aa92852 --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/NormalMicSeatSuperView.swift @@ -0,0 +1,73 @@ +// +// NormalMicSeatSuperView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class NormalMicSeatSuperView: MicSeatSuperView { + + override init(frame: CGRect) { + super.init(frame: frame) + setUILayout() + registerCell() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + private func setUILayout(){ + addSubview(roomOwnerView) + addSubview(collectionView) + roomOwnerView.snp.makeConstraints { make in + + + make.height.equalTo(UIDevice.scaleWidth(width: 103)) + make.top.leading.trailing.equalTo(UIDevice.scaleWidth(width: 0)) + } + collectionView.snp.makeConstraints { make in + make.top.equalTo(roomOwnerView.snp.bottom).offset(UIDevice.scaleWidth(width: 18)) + make.leading.bottom.trailing.equalTo(self).inset(UIDevice.scaleWidth(width: 0)) + + } + + } + private func registerCell(){ + collectionView.register(NormalMicSeatCell.self, forCellWithReuseIdentifier: "NormalMicSeatCell") + collectionView.delegate = self + collectionView.dataSource = self + } + //MARK: - 懒加载 + + private lazy var roomOwnerView:NormalMicSeatView = { + let _roomOwnerView = NormalMicSeatView(frame: .zero, isOwner: true) + return _roomOwnerView + }() + + private lazy var collectionView:UICollectionView = { + let flowLayout = UICollectionViewFlowLayout() + + flowLayout.sectionInset = UIEdgeInsets(top: 0, left: UIDevice.scaleWidth(width: 10), bottom: 0, right: UIDevice.scaleWidth(width: 10)) + let width = ScreenWidth - UIDevice.scaleWidth(width: 20) + flowLayout.itemSize = CGSize(width: width/4, height: UIDevice.scaleWidth(width: 100)) + flowLayout.minimumLineSpacing = UIDevice.scaleWidth(width: 15) + flowLayout.minimumInteritemSpacing = 0 + let _collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) + _collectionView.backgroundColor = .clear + return _collectionView + }() + +} + +extension NormalMicSeatSuperView:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return 8 + } + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "NormalMicSeatCell", for: indexPath) as! NormalMicSeatCell + cell.text = "\(indexPath.row)" + return cell + } +} diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/MicSeatGiftValueView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/MicSeatGiftValueView.swift new file mode 100644 index 0000000..5b6547c --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/MicSeatGiftValueView.swift @@ -0,0 +1,60 @@ +// +// MicSeatGiftNumView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class MicSeatGiftValueView: UIView { + + override init(frame: CGRect) { + super.init(frame: frame) + setUILayout() + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + private func setUILayout(){ + addSubview(backgroundView) + backgroundView.addSubview(giftIconView) + backgroundView.addSubview(numView) + + backgroundView.snp.makeConstraints { make in + make.edges.equalTo(self) + } + giftIconView.snp.makeConstraints { make in + make.leading.equalTo(UIDevice.scaleWidth(width: 4)) + make.centerY.equalTo(backgroundView) + make.width.height.equalTo(UIDevice.scaleWidth(width: 11)) + } + numView.snp.makeConstraints { make in + make.leading.equalTo(giftIconView.snp.trailing).offset((UIDevice.scaleWidth(width: 3))) + make.centerY.equalTo(giftIconView) + make.trailing.equalTo(-UIDevice.scaleWidth(width: 4)) + } + } + //MARK: - 懒加载 + private lazy var backgroundView:UIView = { + let _backgroundView = UIView() + _backgroundView.backgroundColor = ThemeColor(hexStr: "#FFFFFF", alpha: 0.3) + _backgroundView.layer.cornerRadius = UIDevice.scaleWidth(width: 16)/2 + _backgroundView.layer.masksToBounds = true + return _backgroundView + }() + private lazy var giftIconView:UIImageView = { + let _giftIconView = UIImageView() + _giftIconView.isUserInteractionEnabled = true + _giftIconView.image = UIImage(named: "room_mic_gift_value_icon") + + return _giftIconView + }() + private lazy var numView:UILabel = { + let _numView = UILabel.getCustomLabel(text: "0",font: UIFont.getScaleFont(ofSize: 10, weight: .regular),color: .white) + + return _numView + }() +} diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/NormalMicSeatView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/NormalMicSeatView.swift new file mode 100644 index 0000000..d936d17 --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatSuperView/SubView/NormalMicSeatView.swift @@ -0,0 +1,130 @@ +// +// NormalMicSeatView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class NormalMicSeatView: UIView { + + init(frame: CGRect,isOwner:Bool) { + super.init(frame: frame) + self.isOwner = isOwner + if isOwner{ + setOwnerUILayout() + return + } + setUILayout() + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + private func setOwnerUILayout(){ + addSubview(avatarView) + addSubview(nameStackView) + + + nameStackView.addArrangedSubview(postionView) + nameStackView.addArrangedSubview(nameView) + nameStackView.addArrangedSubview(genderView) + nameStackView.addArrangedSubview(giftValueView) + + avatarView.snp.makeConstraints { make in + make.width.height.equalTo(UIDevice.scaleWidth(width: 58)) + make.centerX.equalTo(self) + } + nameStackView.snp.makeConstraints { make in + make.top.equalTo(avatarView.snp.bottom).offset(UIDevice.scaleWidth(width: 10)) + make.width.lessThanOrEqualTo(self) + make.centerX.equalTo(self) + } + postionView.snp.makeConstraints { make in + make.width.height.equalTo(UIDevice.scaleWidth(width: 14)) + } + giftValueView.snp.makeConstraints { make in + make.height.equalTo(UIDevice.scaleWidth(width: 16)) + } + + avatarView.layer.cornerRadius = UIDevice.scaleWidth(width: 58) / 2 + genderView.isHidden = false + postionView.isHidden = true + } + private func setUILayout(){ + addSubview(avatarView) + addSubview(nameStackView) + addSubview(giftValueView) + + nameStackView.addArrangedSubview(postionView) + nameStackView.addArrangedSubview(nameView) + nameStackView.addArrangedSubview(genderView) + + avatarView.snp.makeConstraints { make in + make.width.height.equalTo(UIDevice.scaleWidth(width: 55)) + make.centerX.equalTo(self) + } + nameStackView.snp.makeConstraints { make in + make.top.equalTo(avatarView.snp.bottom).offset(UIDevice.scaleWidth(width: 10)) + make.width.lessThanOrEqualTo(self) + make.centerX.equalTo(self) + } + postionView.snp.makeConstraints { make in + make.width.height.equalTo(UIDevice.scaleWidth(width: 14)) + } + giftValueView.snp.makeConstraints { make in + make.height.equalTo(UIDevice.scaleWidth(width: 16)) + make.top.equalTo(nameStackView.snp.bottom).offset(UIDevice.scaleWidth(width: 5)) + make.centerX.equalTo(avatarView) + make.width.lessThanOrEqualTo(self) + } + + avatarView.layer.cornerRadius = UIDevice.scaleWidth(width: 55) / 2 + genderView.isHidden = true + postionView.isHidden = false + } + private var isOwner:Bool = false + //MARK: - 懒加载 + private lazy var avatarView:UIImageView = { + let _avatarView = UIImageView() + _avatarView.isUserInteractionEnabled = true + _avatarView.layer.masksToBounds = true + _avatarView.image = UIImage(named: "yin_room_mic_position_normal") + return _avatarView + }() + + private lazy var nameStackView:UIStackView = { + let _nameStackView = UIStackView() + _nameStackView.axis = .horizontal + _nameStackView.distribution = .fill + _nameStackView.alignment = .center + _nameStackView.spacing = UIDevice.scaleWidth(width: 2) + return _nameStackView + }() + lazy var postionView:UILabel = { + let _postionView = UILabel.getCustomLabel(font: UIFont.getScaleFont(ofSize: 10, weight: .regular),color: .white,textAlignment: .center) + _postionView.layer.cornerRadius = UIDevice.scaleWidth(width:14)/2 + _postionView.layer.masksToBounds = true + _postionView.backgroundColor = ThemeColor(hexStr: "#FFFFFF", alpha: 0.2) + return _postionView + }() + + lazy var nameView:UILabel = { + let _nameView = UILabel.getCustomLabel(text:"小灰类",font: UIFont.getScaleFont(ofSize: 10, weight: .regular),color: .white,textAlignment: .center) + return _nameView + }() + private lazy var genderView:UIImageView = { + let _genderView = UIImageView() + _genderView.image = UIImage(named: "yin_plane_star__woman") + return _genderView + }() + private lazy var giftValueView:MicSeatGiftValueView = { + let _giftValueView = MicSeatGiftValueView(frame: .zero) + _giftValueView.isUserInteractionEnabled = true + return _giftValueView + }() + + +} diff --git a/yinmeng-ios/Modules/Room/View/MicSeatView/RoomNormalMicSeatView.swift b/yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatView/RoomNormalMicSeatView.swift similarity index 100% rename from yinmeng-ios/Modules/Room/View/MicSeatView/RoomNormalMicSeatView.swift rename to yinmeng-ios/Modules/Room/View/MicSeatView/View/MicSeatView/RoomNormalMicSeatView.swift diff --git a/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenHeaderView.swift b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenHeaderView.swift new file mode 100644 index 0000000..0ba1e64 --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenHeaderView.swift @@ -0,0 +1,61 @@ +// +// RoomChatScreenHeaderView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class RoomChatScreenHeaderView: UIView { + + override init(frame: CGRect) { + super.init(frame: frame) + setUILayout() + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + private func setUILayout(){ + backgroundColor = .clear + addSubview(backgroundView) + addSubview(contentView) + let width:CGFloat = ScreenWidth - UIDevice.scaleWidth(width: 105) + let height = UILabel.getLabelHeigth(text: contentView.text ?? "", width: width - UIDevice.scaleWidth(width: 20), font: contentView.font) + UIDevice.scaleWidth(width: 20) + self.frame = CGRect(x: 0, y: 0, width: width, height: height) + + + backgroundView.snp.makeConstraints { make in + make.leading.trailing.top.equalTo(self) + make.bottom.equalTo(-UIDevice.scaleWidth(width: 10)) + } + contentView.snp.makeConstraints { make in + make.leading.trailing.equalTo(self).inset(UIDevice.scaleWidth(width: 10)) + make.centerY.equalTo(self.backgroundView) + } + + + } + var color:UIColor? = nil{ + didSet{ + guard let _color = color else { return } + backgroundView.backgroundColor = _color + } + } + //MARK: - 懒加载 + private lazy var backgroundView:UIView = { + let _backgroundView = UIView() + _backgroundView.backgroundColor = ThemeColor(hexStr: "#FFFFFF", alpha: 0.15) + _backgroundView.layer.cornerRadius = UIDevice.scaleWidth(width: 7) + _backgroundView.layer.masksToBounds = true + return _backgroundView + }() + + private lazy var contentView:UILabel = { + let _contentView = UILabel.getCustomLabel(text: "平台严禁未成年人直播或打赏,倡导绿色互动,禁止宣传及发布政治、低俗、暴力、色情等违规违法内容,严禁违规交易和诱导欺诈用户,如有违规将对账号进行封禁,发现请及时举报。",font: UIFont.getScaleFont(ofSize: 12, weight: .regular),color: ThemeColor(hexStr: "#05FFE3"),numberOfLines: 0) + + return _contentView + }() +} diff --git a/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenUserChatCell.swift b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenUserChatCell.swift new file mode 100644 index 0000000..a9034b4 --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenUserChatCell.swift @@ -0,0 +1,147 @@ +// +// RoomChatScreenUserChatView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class RoomChatScreenUserChatCell: UITableViewCell { + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setUILayout() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + private func setUILayout(){ + layer.masksToBounds = true + selectionStyle = .none + backgroundColor = .clear + contentView.addSubview(avatarVeiw) + contentView.addSubview(nameStackView) + contentView.addSubview(tagStackView) + contentView.addSubview(bgTextView) + + + + nameStackView.addArrangedSubview(vipImageView) + nameStackView.addArrangedSubview(nameView) + + tagStackView.addArrangedSubview(experIconView) + tagStackView.addArrangedSubview(charmIconView) + + bgTextView.addSubview(textView) + + + nameStackView.snp.makeConstraints { make in + make.leading.equalTo(UIDevice.scaleWidth(width: 38)) + make.height.equalTo(UIDevice.scaleWidth(width: 26)) + make.top.equalTo(UIDevice.scaleWidth(width: 0)) + } + vipImageView.snp.makeConstraints { make in + make.width.height.equalTo(UIDevice.scaleWidth(width: 26)) + } + avatarVeiw.snp.makeConstraints { make in + make.top.equalTo(nameStackView.snp.top).offset(UIDevice.scaleWidth(width: 5)) + make.width.height.equalTo(UIDevice.scaleWidth(width: 36)) + make.leading.equalTo(UIDevice.scaleWidth(width: 0)) + + } + + tagStackView.snp.makeConstraints { make in + make.height.equalTo(UIDevice.scaleWidth(width: 18)) + make.top.equalTo(nameStackView.snp.bottom).offset(UIDevice.scaleWidth(width: 0)) + make.leading.equalTo(avatarVeiw.snp.trailing).offset((UIDevice.scaleWidth(width: 8))) + } + + experIconView.snp.makeConstraints { make in + make.height.equalTo(UIDevice.scaleWidth(width: 18)) + make.width.equalTo(UIDevice.scaleWidth(width: 21)) + } + charmIconView.snp.makeConstraints { make in + make.height.equalTo(UIDevice.scaleWidth(width: 18)) + make.width.equalTo(UIDevice.scaleWidth(width: 21)) + } + let width = ScreenWidth - UIDevice.scaleWidth(width: 148) + bgTextView.snp.makeConstraints { make in + make.top.equalTo(tagStackView.snp.bottom).offset(UIDevice.scaleWidth(width: 6)) + make.leading.equalTo(tagStackView) + make.width.lessThanOrEqualTo(width) + make.height.greaterThanOrEqualTo(10) + } + + textView.snp.makeConstraints { make in + make.top.bottom.equalTo(bgTextView).inset(UIDevice.scaleWidth(width: 8)) + make.leading.trailing.equalTo(bgTextView).inset(UIDevice.scaleWidth(width: 12)) + } + bgTextView.superview?.layoutIfNeeded() + } + override func layoutSubviews() { +// bgTextView.addCorner(cornerRadii: CornerRadii(topLeft: 6,topRight: 12,bottomLeft: 12,bottomRight: 12), frame: bgTextView.frame) + } + //MARK: - 懒加载 + private lazy var avatarVeiw:UIImageView = { + let _avatarVeiw = UIImageView() + _avatarVeiw.layer.cornerRadius = UIDevice.scaleWidth(width: 36)/2 + _avatarVeiw.layer.masksToBounds = true + _avatarVeiw.layer.borderColor = ThemeColor(hexStr: "#FFE710").cgColor + _avatarVeiw.backgroundColor = .red + _avatarVeiw.isUserInteractionEnabled = true + return _avatarVeiw + }() + private lazy var nameStackView:UIStackView = { + let _nameStackView = UIStackView() + _nameStackView.axis = .horizontal + _nameStackView.distribution = .fill + _nameStackView.alignment = .center + _nameStackView.spacing = UIDevice.scaleWidth(width: 2) + return _nameStackView + }() + private lazy var vipImageView:UIImageView = { + let _vipImageView = UIImageView() + _vipImageView.image = UIImage(named: "1") + return _vipImageView + }() + private lazy var nameView:UILabel = { + let _nameView = UILabel.getCustomLabel(text: "我:", font: UIFont.getScaleFont(ofSize: 12, weight: .regular), color: ThemeColor(hexStr: "#FFFFFF", alpha: 0.5)) + + return _nameView + }() + private lazy var bgTextView:UIView = { + let _bgTextView = UIImageView() + _bgTextView.backgroundColor = ThemeColor(hexStr: "#FFFFFF", alpha: 0.2) + + return _bgTextView + }() + + private lazy var textView:UILabel = { + let _textView = UILabel.getCustomLabel(text:"或呃呃或呃呃或呃呃或呃呃",font: UIFont.getScaleFont(ofSize: 12, weight: .regular),numberOfLines: 0) + _textView.isUserInteractionEnabled = true + return _textView + }() + + private lazy var tagStackView:UIStackView = { + let _tagStackView = UIStackView() + _tagStackView.axis = .horizontal + _tagStackView.distribution = .fill + _tagStackView.alignment = .center + _tagStackView.spacing = UIDevice.scaleWidth(width: 4) + return _tagStackView + }() + + private lazy var experIconView:UIImageView = { + let _experView = UIImageView() + _experView.image = UIImage(named: "2") + return _experView + }() + private lazy var charmIconView:UIImageView = { + let _charmView = UIImageView() + _charmView.image = UIImage(named: "2") + return _charmView + }() + +} diff --git a/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenView.swift b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenView.swift new file mode 100644 index 0000000..964fa89 --- /dev/null +++ b/yinmeng-ios/Modules/Room/View/RoomChatScreenView/View/RoomChatScreenView.swift @@ -0,0 +1,70 @@ +// +// RoomChatScreenView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/8. +// + +import UIKit + +class RoomChatScreenView: UIView { + + override init(frame: CGRect) { + super.init(frame: frame) + setUILayout() + registerCell() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + private func setUILayout(){ + addSubview(chatTableView) + chatTableView.snp.makeConstraints { make in + make.leading.equalTo(UIDevice.scaleWidth(width: 15)) + make.top.bottom.right.equalTo(self) + } + + } + private func registerCell(){ + chatTableView.delegate = self + chatTableView.dataSource = self + chatTableView.tableHeaderView = tableHeaderView + chatTableView.register(RoomChatScreenUserChatCell.self, forCellReuseIdentifier: "RoomChatScreenUserChatCell") + } + + + + //MARK: - 懒加载 + private lazy var chatTableView:UITableView = { + let _chatTableView = UITableView(frame: .zero, style: .plain) + _chatTableView.tableFooterView = UIView() + _chatTableView.separatorStyle = .none + _chatTableView.backgroundColor = .clear + _chatTableView.showsVerticalScrollIndicator = false + _chatTableView.tag = 888 + + + return _chatTableView + }() + private lazy var tableHeaderView:RoomChatScreenHeaderView = { + let _tableHeaderView = RoomChatScreenHeaderView(frame: .zero) + + return _tableHeaderView + }() +} +extension RoomChatScreenView:UITableViewDelegate,UITableViewDataSource{ + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 1 + } + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 90 + } + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: "RoomChatScreenUserChatCell", for: indexPath) as! RoomChatScreenUserChatCell + + return cell + } + + +} diff --git a/yinmeng-ios/Modules/Room/View/RoomQuitView/View/RoomQuitView.swift b/yinmeng-ios/Modules/Room/View/RoomQuitView/View/RoomQuitView.swift index 82e3b5d..bd9d0dc 100644 --- a/yinmeng-ios/Modules/Room/View/RoomQuitView/View/RoomQuitView.swift +++ b/yinmeng-ios/Modules/Room/View/RoomQuitView/View/RoomQuitView.swift @@ -26,16 +26,14 @@ class RoomQuitView: UIView { fatalError("init(coder:) has not been implemented") } private func setUILayout(){ - addSubview(dissBtn) + addSubview(bgMaskView) addSubview(collectionView) addSubview(textView) addSubview(tableView) - dissBtn.snp.makeConstraints { make in - make.edges.equalTo(self) - } + bgMaskView.snp.makeConstraints { make in make.trailing.top.bottom.equalTo(self) make.width.equalTo(UIDevice.scaleWidth(width: 250)) @@ -66,15 +64,9 @@ class RoomQuitView: UIView { tableView.dataSource = self } //MARK: - UIButtonTarget - @objc func dissViewAction(){ - UIView.animate(withDuration: 0.1) { - self.frame = CGRect(x: ScreenWidth, y: 0, width: ScreenWidth, height: ScreenHeight) - }completion: { iscompletion in - self.removeFromSuperview() - } - } + //MARK: - 懒加载 - let emptyCellHeight = ScreenHeight - StatusBarHeight - UIDevice.scaleWidth(width: 128) + let emptyCellHeight = UIDevice.scaleWidth(width: 300) var delegate:RoomQuitViewProtocol? var clickModelList:[RoomQuitItemModel] { let quitModel = RoomQuitItemModel() @@ -87,13 +79,6 @@ class RoomQuitView: UIView { return [quitModel,reportModel] } var roomModelList:[RoomQuitModel] = [] - private lazy var dissBtn:UIButton = { - let _dissBtn = UIButton() - _dissBtn.addTarget(self, action: #selector(dissViewAction), for: .touchUpInside) - - - return _dissBtn - }() private lazy var bgMaskView:UIVisualEffectView = { var _bgMaskView = UIVisualEffectView() let blurEffect = UIBlurEffect(style: .dark) diff --git a/yinmeng-ios/Modules/Room/View/RoomTopView/RoomTopView.swift b/yinmeng-ios/Modules/Room/View/RoomTopView/RoomTopView.swift index b9397c5..70185f9 100644 --- a/yinmeng-ios/Modules/Room/View/RoomTopView/RoomTopView.swift +++ b/yinmeng-ios/Modules/Room/View/RoomTopView/RoomTopView.swift @@ -40,6 +40,7 @@ class RoomTopView: UIView { textStackView.addArrangedSubview(giftIconView) textStackView.addArrangedSubview(lockIconView) + addSubview(quitView) superStackView.snp.makeConstraints { make in make.leading.equalTo(UIDevice.scaleWidth(width: 15)) @@ -102,15 +103,17 @@ class RoomTopView: UIView { } } @objc func settingBntAction(){ - let quitView = RoomQuitView(frame: .zero) - quitView.delegate = self - quitView.frame = CGRect(x: ScreenWidth, y: 0, width: ScreenWidth, height: ScreenHeight) - keyWindow.addSubview(quitView) - UIView.animate(withDuration: 0.1) { - quitView.frame = CGRect(x: 0, y: 0, width:ScreenWidth, height: ScreenHeight) - } + + let pop = FFPopup.init(contentView: quitView, showType: .slideInFromRight, dismissType: .slideOutToRight, maskType: FFPopup.MaskType.dimmed, dismissOnBackgroundTouch: true, dismissOnContentTouch: false) + pop.show(layout: FFPopupLayout(horizontal: FFPopup.HorizontalLayout.right, vertical: FFPopup.VerticalLayout.center), duration:0) + } //MARK: - 懒加载 + private lazy var quitView:RoomQuitView = { + let _quitView = RoomQuitView(frame: CGRect(x: ScreenWidth, y: 0, width: UIDevice.scaleWidth(width: 250), height: ScreenHeight)) + + return _quitView + }() private lazy var settingBnt:UIButton = { let _settingBtn = UIButton.getCustomBtn(image: UIImage(named: "yin_room_top_right")) _settingBtn.setBtnClickRadius = UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8)