私聊界面的UI完善

This commit is contained in:
fengshuo
2024-03-01 01:27:25 +08:00
parent 26d586290c
commit 678297f771
35 changed files with 4891 additions and 3651 deletions

View File

@@ -23,7 +23,8 @@ pod 'SVGAPlayer'
pod 'NIMSDK_LITE', '9.6.1'
pod 'LookinServer', :configurations => ['Debug']
# Pods for yinmeng-ios
end

View File

@@ -3,6 +3,9 @@ PODS:
- DeviceKit (4.9.0)
- HandyJSON (5.0.2)
- Kingfisher (7.10.2)
- LookinServer (1.2.6):
- LookinServer/Core (= 1.2.6)
- LookinServer/Core (1.2.6)
- MBProgressHUD (1.2.0)
- Moya (15.0.0):
- Moya/Core (= 15.0.0)
@@ -41,6 +44,7 @@ DEPENDENCIES:
- DeviceKit (~> 4.0)
- HandyJSON
- Kingfisher
- LookinServer
- MBProgressHUD
- Moya
- NIMSDK_LITE (= 9.6.1)
@@ -58,6 +62,7 @@ SPEC REPOS:
- DeviceKit
- HandyJSON
- Kingfisher
- LookinServer
- MBProgressHUD
- Moya
- NIMSDK_LITE
@@ -77,6 +82,7 @@ SPEC CHECKSUMS:
DeviceKit: 847709bf70b78fd9ab765bd571fb9f5f815c3fc1
HandyJSON: 9e4e236f5d2dbefad5155a77417bbea438201c03
Kingfisher: 99edc495d3b7607e6425f0d6f6847b2abd6d716d
LookinServer: de929b55f8fa2e241c18c39af3f900eaa9166389
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
NIMSDK_LITE: b020e3dbbc9f53934609bc35ecba7798be503e1a
@@ -91,6 +97,6 @@ SPEC CHECKSUMS:
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
SVGAPlayer: 318b85a78b61292d6ae9dfcd651f3f0d1cdadd86
PODFILE CHECKSUM: 975d6fb232bd31671465589b82e2a0c52188d41f
PODFILE CHECKSUM: 27f0d4aae2435f02d30619007e2b2ba1e9205d05
COCOAPODS: 1.14.3

8
Pods/Manifest.lock generated
View File

@@ -3,6 +3,9 @@ PODS:
- DeviceKit (4.9.0)
- HandyJSON (5.0.2)
- Kingfisher (7.10.2)
- LookinServer (1.2.6):
- LookinServer/Core (= 1.2.6)
- LookinServer/Core (1.2.6)
- MBProgressHUD (1.2.0)
- Moya (15.0.0):
- Moya/Core (= 15.0.0)
@@ -41,6 +44,7 @@ DEPENDENCIES:
- DeviceKit (~> 4.0)
- HandyJSON
- Kingfisher
- LookinServer
- MBProgressHUD
- Moya
- NIMSDK_LITE (= 9.6.1)
@@ -58,6 +62,7 @@ SPEC REPOS:
- DeviceKit
- HandyJSON
- Kingfisher
- LookinServer
- MBProgressHUD
- Moya
- NIMSDK_LITE
@@ -77,6 +82,7 @@ SPEC CHECKSUMS:
DeviceKit: 847709bf70b78fd9ab765bd571fb9f5f815c3fc1
HandyJSON: 9e4e236f5d2dbefad5155a77417bbea438201c03
Kingfisher: 99edc495d3b7607e6425f0d6f6847b2abd6d716d
LookinServer: de929b55f8fa2e241c18c39af3f900eaa9166389
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
NIMSDK_LITE: b020e3dbbc9f53934609bc35ecba7798be503e1a
@@ -91,6 +97,6 @@ SPEC CHECKSUMS:
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
SVGAPlayer: 318b85a78b61292d6ae9dfcd651f3f0d1cdadd86
PODFILE CHECKSUM: 975d6fb232bd31671465589b82e2a0c52188d41f
PODFILE CHECKSUM: 27f0d4aae2435f02d30619007e2b2ba1e9205d05
COCOAPODS: 1.14.3

File diff suppressed because it is too large Load Diff

View File

@@ -39,111 +39,118 @@
<key>orderHint</key>
<integer>3</integer>
</dict>
<key>MBProgressHUD.xcscheme</key>
<key>LookinServer.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>Moya.xcscheme</key>
<key>MBProgressHUD.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>NIMSDK_LITE.xcscheme</key>
<key>Moya.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>NSObject+Rx.xcscheme</key>
<key>NIMSDK_LITE.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
</dict>
<key>Nuke.xcscheme</key>
<key>NSObject+Rx.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
</dict>
<key>Pods-yinmeng-ios.xcscheme</key>
<key>Nuke.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>10</integer>
</dict>
<key>Protobuf-Protobuf_Privacy.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>12</integer>
</dict>
<key>Protobuf.xcscheme</key>
<key>Pods-yinmeng-ios.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>11</integer>
</dict>
<key>Reusable.xcscheme</key>
<key>Protobuf-Protobuf_Privacy.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>13</integer>
</dict>
<key>RxCocoa.xcscheme</key>
<key>Protobuf.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>12</integer>
</dict>
<key>Reusable.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>14</integer>
</dict>
<key>RxRelay.xcscheme</key>
<key>RxCocoa.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>15</integer>
</dict>
<key>RxSwift.xcscheme</key>
<key>RxRelay.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>16</integer>
</dict>
<key>SSZipArchive.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>18</integer>
</dict>
<key>SVGAPlayer.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>19</integer>
</dict>
<key>SnapKit.xcscheme</key>
<key>RxSwift.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>17</integer>
</dict>
<key>SSZipArchive.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>19</integer>
</dict>
<key>SVGAPlayer.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>20</integer>
</dict>
<key>SnapKit.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>18</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict/>

View File

@@ -124,6 +124,30 @@ SOFTWARE.
## LookinServer
MIT License
Copyright (c) [2023] [LI KAI]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
## MBProgressHUD
Copyright © 2009-2020 Matej Bukovinski

View File

@@ -159,6 +159,36 @@ SOFTWARE.
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>MIT License
Copyright (c) [2023] [LI KAI]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.</string>
<key>License</key>
<string>GPL-3.0</string>
<key>Title</key>
<string>LookinServer</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright © 2009-2020 Matej Bukovinski

View File

@@ -3,6 +3,7 @@ ${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework
${BUILT_PRODUCTS_DIR}/DeviceKit/DeviceKit.framework
${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework
${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework
${BUILT_PRODUCTS_DIR}/LookinServer/LookinServer.framework
${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework
${BUILT_PRODUCTS_DIR}/Moya/Moya.framework
${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMSDK.framework

View File

@@ -2,6 +2,7 @@ ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DeviceKit.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LookinServer.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Moya.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NIMSDK.framework

View File

@@ -180,6 +180,7 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/DeviceKit/DeviceKit.framework"
install_framework "${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework"
install_framework "${BUILT_PRODUCTS_DIR}/LookinServer/LookinServer.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework"
install_framework "${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMSDK.framework"

View File

@@ -1,11 +1,11 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx" "${PODS_CONFIGURATION_BUILD_DIR}/Nuke" "${PODS_CONFIGURATION_BUILD_DIR}/Protobuf" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/SVGAPlayer" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_ROOT}/NIMSDK_LITE/NIMSDK"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/LookinServer" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx" "${PODS_CONFIGURATION_BUILD_DIR}/Nuke" "${PODS_CONFIGURATION_BUILD_DIR}/Protobuf" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/SVGAPlayer" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_ROOT}/NIMSDK_LITE/NIMSDK"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON/HandyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx/NSObject_Rx.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nuke/Nuke.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable/Reusable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive/SSZipArchive.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGAPlayer/SVGAPlayer.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON/HandyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LookinServer/LookinServer.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx/NSObject_Rx.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nuke/Nuke.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable/Reusable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive/SSZipArchive.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGAPlayer/SVGAPlayer.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -l"c++" -l"iconv" -l"resolv" -l"sqlite3.0" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "Alamofire" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "DeviceKit" -framework "Foundation" -framework "HandyJSON" -framework "Kingfisher" -framework "MBProgressHUD" -framework "Moya" -framework "NIMNOS" -framework "NIMSDK" -framework "NSObject_Rx" -framework "Nuke" -framework "Protobuf" -framework "QuartzCore" -framework "Reusable" -framework "RxCocoa" -framework "RxRelay" -framework "RxSwift" -framework "SSZipArchive" -framework "SVGAPlayer" -framework "Security" -framework "SnapKit" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -weak_framework "Combine" -weak_framework "SwiftUI"
OTHER_LDFLAGS = $(inherited) -l"c++" -l"iconv" -l"resolv" -l"sqlite3.0" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "Alamofire" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "DeviceKit" -framework "Foundation" -framework "HandyJSON" -framework "Kingfisher" -framework "LookinServer" -framework "MBProgressHUD" -framework "Moya" -framework "NIMNOS" -framework "NIMSDK" -framework "NSObject_Rx" -framework "Nuke" -framework "Protobuf" -framework "QuartzCore" -framework "Reusable" -framework "RxCocoa" -framework "RxRelay" -framework "RxSwift" -framework "SSZipArchive" -framework "SVGAPlayer" -framework "Security" -framework "SnapKit" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -weak_framework "Combine" -weak_framework "SwiftUI"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -73,6 +73,7 @@
E8E4AB252B901E400096D77C /* ChatMoreMenuCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8E4AB242B901E400096D77C /* ChatMoreMenuCell.swift */; };
E8E4AB282B902A9C0096D77C /* ChatListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8E4AB272B902A9C0096D77C /* ChatListCell.swift */; };
E8FF28B42B90ADBE005D2BE7 /* AppKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8FF28B32B90ADBE005D2BE7 /* AppKeys.swift */; };
E8FF28B62B90ED6C005D2BE7 /* ChatNavView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8FF28B52B90ED6C005D2BE7 /* ChatNavView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -150,6 +151,7 @@
E8E4AB242B901E400096D77C /* ChatMoreMenuCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatMoreMenuCell.swift; sourceTree = "<group>"; };
E8E4AB272B902A9C0096D77C /* ChatListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatListCell.swift; sourceTree = "<group>"; };
E8FF28B32B90ADBE005D2BE7 /* AppKeys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppKeys.swift; sourceTree = "<group>"; };
E8FF28B52B90ED6C005D2BE7 /* ChatNavView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatNavView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -203,6 +205,7 @@
E8E4AB262B902A750096D77C /* ChatList */,
E8479E3C2B8DC61F009AF878 /* ChatBaseCell.swift */,
E8479E472B8DD6E1009AF878 /* ChatTextCell.swift */,
E8FF28B52B90ED6C005D2BE7 /* ChatNavView.swift */,
);
path = View;
sourceTree = "<group>";
@@ -715,6 +718,7 @@
E8E4AB282B902A9C0096D77C /* ChatListCell.swift in Sources */,
E86A43D52B8774B70084C04D /* AuthViewModel.swift in Sources */,
E8D15AB32B8B000400369467 /* PlanetStarVC.swift in Sources */,
E8FF28B62B90ED6C005D2BE7 /* ChatNavView.swift in Sources */,
E8D15A9D2B899E1500369467 /* YMNetworkHelper.swift in Sources */,
E8E4AB1B2B901AF50096D77C /* UIView+.swift in Sources */,
2311D69D2B8DC311001C70AB /* PlanetStarModel.swift in Sources */,

View File

@@ -7,7 +7,7 @@
<key>yinmeng-ios.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>20</integer>
<integer>21</integer>
</dict>
</dict>
</dict>

View File

@@ -5,35 +5,15 @@
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
uuid = "904BC081-F189-4956-A57F-7ACAED4ADA8A"
uuid = "B72A7630-2547-456B-951B-4C7FD280A268"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "yinmeng-ios/HttpRequest/YMLastNeverResult.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "34"
endingLineNumber = "34"
landmarkName = "mapResult(success:failure:progress:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "8C81B94B-5918-47EC-A4D7-DA45EBFC4202"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "yinmeng-ios/HttpRequest/YMLastNeverResult.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "47"
endingLineNumber = "47"
landmarkName = "mapResult(success:failure:progress:)"
landmarkType = "7">
breakpointStackSelectionBehavior = "1"
scope = "1"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "chat_input_text@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "chat_input_text@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: 2.7 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

View File

@@ -159,3 +159,56 @@ extension UIView {
}
}
extension UIView {
//4
func addCorner(cornerRadii:CornerRadii, frame:CGRect){
let path = createPathWithRoundedRect(bounds: frame, cornerRadii:cornerRadii)
let shapLayer = CAShapeLayer()
shapLayer.frame = self.bounds
shapLayer.path = path
self.layer.mask = shapLayer
}
//
struct CornerRadii {
var topLeft :CGFloat = 0
var topRight :CGFloat = 0
var bottomLeft :CGFloat = 0
var bottomRight :CGFloat = 0
}
//线
func createPathWithRoundedRect( bounds:CGRect,cornerRadii:CornerRadii) -> CGPath
{
let minX = bounds.minX
let minY = bounds.minY
let maxX = bounds.maxX
let maxY = bounds.maxY
//
let topLeftCenterX = minX + cornerRadii.topLeft
let topLeftCenterY = minY + cornerRadii.topLeft
let topRightCenterX = maxX - cornerRadii.topRight
let topRightCenterY = minY + cornerRadii.topRight
let bottomLeftCenterX = minX + cornerRadii.bottomLeft
let bottomLeftCenterY = maxY - cornerRadii.bottomLeft
let bottomRightCenterX = maxX - cornerRadii.bottomRight
let bottomRightCenterY = maxY - cornerRadii.bottomRight
//YESiOSUIView
let path :CGMutablePath = CGMutablePath();
//
path.addArc(center: CGPoint(x: topLeftCenterX, y: topLeftCenterY), radius: cornerRadii.topLeft, startAngle: CGFloat.pi, endAngle: CGFloat.pi * 3 / 2, clockwise: false)
//
path.addArc(center: CGPoint(x: topRightCenterX, y: topRightCenterY), radius: cornerRadii.topRight, startAngle: CGFloat.pi * 3 / 2, endAngle: 0, clockwise: false)
//
path.addArc(center: CGPoint(x: bottomRightCenterX, y: bottomRightCenterY), radius: cornerRadii.bottomRight, startAngle: 0, endAngle: CGFloat.pi / 2, clockwise: false)
//
path.addArc(center: CGPoint(x: bottomLeftCenterX, y: bottomLeftCenterY), radius: cornerRadii.bottomLeft, startAngle: CGFloat.pi / 2, endAngle: CGFloat.pi, clockwise: false)
path.closeSubpath();
return path;
}
}

View File

@@ -7,7 +7,7 @@
import UIKit
import NIMSDK
class ChatListVC: BaseViewController {
class ChatListVC: BaseViewController, HiddenNavigationBarProtocol {
var list:NSMutableArray?
@@ -21,6 +21,30 @@ class ChatListVC: BaseViewController {
NIMSDK.shared().conversationManager.add(self)
NIMSDK.shared().loginManager.add(self)
getList()
view.addSubview(backImgView)
view.addSubview(tableView)
view.addSubview(clearBtn)
view.addSubview(titleLb)
backImgView.snp.makeConstraints { make in
make.edges.equalTo(view)
}
tableView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalToSuperview().offset(NavHeight)
}
clearBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 28, height: 28))
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(StatusBarHeight + 8)
}
titleLb.snp.makeConstraints { make in
make.centerY.equalTo(clearBtn)
make.left.equalToSuperview().offset(16)
}
}
private lazy var tableView: UITableView = {
@@ -37,11 +61,45 @@ class ChatListVC: BaseViewController {
return tableView
}()
private lazy var backImgView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "auth_login_bg")
imageView.isUserInteractionEnabled = true
imageView.layer.masksToBounds = true
imageView.contentMode = .scaleAspectFill
return imageView
}()
private lazy var clearBtn: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "chat_clear"), for: .normal)
button.setImage(UIImage(named: "chat_clear"), for: .selected)
button.addTarget(self, action: #selector(clearClick), for: .touchUpInside)
return button
}()
private lazy var titleLb: UILabel = {
let label = UILabel()
label.textColor = .white
label.text = "消息中心"
label.font = UIFont.systemFont(ofSize: 18, weight: .medium)
return label
}()
@objc func clearClick() {
NIMSDK.shared().conversationManager.markAllMessagesRead()
}
}
extension ChatListVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(for: indexPath, cellType: ChatListCell.self)
if indexPath.row < list?.count ?? 0 {
let res = list?.object(at: indexPath.row) as? NIMRecentSession
cell.rescent = res
}
return cell
}
@@ -50,7 +108,18 @@ extension ChatListVC: UITableViewDelegate, UITableViewDataSource {
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 64
return 82
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
if indexPath.row < list?.count ?? 0 {
let res = list?.object(at: indexPath.row) as? NIMRecentSession
if let session = res?.session {
let chat = ChatVC(session: session)
self.navigationController?.pushViewController(chat, animated: true)
}
}
}
}

View File

@@ -7,14 +7,14 @@
import UIKit
import NIMSDK
class ChatVC: BaseViewController {
class ChatVC: BaseViewController, HiddenNavigationBarProtocol {
// /
private var isBecome: Bool = false
///
private var isSended: Bool = true
///
private let ToolBarLastH: CGFloat = 52
private let ToolBarLastH: CGFloat = (52 + SafeAraeBottomHeight)
public init(session: NIMSession) {
vm = ChatViewModel(session: session)
@@ -29,13 +29,19 @@ class ChatVC: BaseViewController {
var vm:ChatViewModel
override var preferredStatusBarStyle: UIStatusBarStyle {
.darkContent
}
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = ThemeColor(hexStr: "#F6F6F6")
let height = ScreenHeight - (ToolBarLastH + SafeAraeBottomHeight + NavHeight)
chatTableView.frame = CGRect(x: 0, y: 0, width: ScreenWidth, height: height)
let height = ScreenHeight - (ToolBarLastH + NavHeight)
chatTableView.frame = CGRect(x: 0, y: NavHeight, width: ScreenWidth, height: height)
navView.frame = CGRect(x: 0, y: 0, width: ScreenWidth, height: NavHeight)
view.addSubview(chatTableView)
view.addSubview(keyboardView)
view.addSubview(navView)
}
///cell
@@ -43,13 +49,15 @@ class ChatVC: BaseViewController {
chatTableView.register(cellType: ChatTextCell.self)
}
private lazy var chatTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
tableView.delegate = self
tableView.dataSource = self
tableView.tableFooterView = UIView()
tableView.separatorStyle = .none
tableView.backgroundColor = .clear
tableView.backgroundColor = ThemeColor(hexStr: "#F8F8FB")
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
@@ -57,12 +65,20 @@ class ChatVC: BaseViewController {
}()
private lazy var keyboardView: ChatKeyboardView = {
let toolBarY = ScreenHeight - NavHeight - ToolBarLastH - SafeAraeBottomHeight
let toolBarY = ScreenHeight - ToolBarLastH
let view = ChatKeyboardView(frame: CGRect(x: 0, y: toolBarY, width: ScreenWidth, height: ToolBarLastH))
view.backgroundColor = .white
view.delegate = self
return view
}()
private lazy var navView: ChatNavView = {
let view = ChatNavView(frame: .zero)
view.backgroundColor = .white
return view
}()
}
// MARK: - ChatKeyboardViewDelegate

View File

@@ -48,7 +48,7 @@ class ChatGrowingTextView: UITextView {
let label = UILabel(frame: frame)
label.numberOfLines = 1
label.text = "请输入你要发送的消息"
label.textColor = ThemeColor(hexStr: "#F6F6F6")
label.textColor = ThemeColor(hexStr: "#8E92A2")
label.font = UIFont.systemFont(ofSize: self.kDefultSize)
return label
}()

View File

@@ -28,8 +28,9 @@ extension ChatKeyboardViewDelegate {
class ChatKeyboardView: UIView {
private let kSpace: CGFloat = 8.0
private let kViewWH: CGFloat = 36.0
private let kLeft: CGFloat = 12.0
private let kSpace: CGFloat = 12.0
private let kViewWH: CGFloat = 25.0
private let kLineHeight: CGFloat = 0.75
// MARK: - var lazy
@@ -47,6 +48,17 @@ class ChatKeyboardView: UIView {
///
fileprivate var isShowKeyboard = false
///
fileprivate lazy var changeButton : UIButton = {
let button = UIButton(type: .custom)
let x: CGFloat = self.kLeft
button.frame = CGRect(x: x, y: self.kSpace, width: self.kViewWH, height: self.kViewWH)
button.setImage(UIImage(named: "chat_more"), for: .normal)
button.setImage(UIImage(named: "chat_more"), for: .highlighted)
button.addTarget(self, action: #selector(moreDidAction(_:)), for: .touchUpInside)
return button
}()
///
fileprivate lazy var moreButton : UIButton = {
let button = UIButton(type: .custom)
@@ -61,32 +73,23 @@ class ChatKeyboardView: UIView {
///
fileprivate lazy var chatTextView: ChatGrowingTextView = {
let w: CGFloat = ScreenWidth - self.kViewWH * 2 - self.kSpace * 3 - self.kSpace
let textView = ChatGrowingTextView(frame: CGRect(x: self.kSpace, y: self.kSpace, width: w, height: self.kViewWH))
let textView = ChatGrowingTextView(frame: CGRect(x: self.kSpace + self.kLeft + self.kViewWH, y: self.kSpace, width: w, height: 36))
textView.placeholder = "请输入..."
textView.textColor = ThemeColor(hexStr: "#000000")
textView.maxNumberOfLines = 5
textView.delegate = self
textView.backgroundColor = ThemeColor(hexStr: "#F1F1FA")
textView.layer.cornerRadius = 4
textView.layer.masksToBounds = true
textView.didTextChangedHeightClosure = { [weak self] height in
self?.changeKeyboardHeight(height: height)
}
return textView
}()
fileprivate lazy var topLineView: UIView = {
let lineView1 = UIView(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: kLineHeight))
lineView1.backgroundColor = ThemeColor(hexStr: "#E5E5E5")
return lineView1
}()
fileprivate lazy var bottomLineView: UIView = {
let lineView2 = UIView(frame: CGRect(x: 0, y: self.toolBarHeight - kLineHeight, width: ScreenWidth, height: kLineHeight))
lineView2.backgroundColor = ThemeColor(hexStr: "#E5E5E5")
return lineView2
}()
fileprivate lazy var toolBarView: UIView = {
let view = UIView(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: self.toolBarHeight))
view.backgroundColor = ThemeColor(hexStr: "#F7F7F7")
view.backgroundColor = .clear
return view
}()
@@ -94,7 +97,7 @@ class ChatKeyboardView: UIView {
fileprivate lazy var contentView: UIView = {
let y = self.toolBarView.maxY
let view = UIView(frame: CGRect(x: 0, y: y, width: ScreenWidth, height: self.contentHeight))
view.backgroundColor = ThemeColor(hexStr: "#F8F8F8")
view.backgroundColor = .white
return view
}()
@@ -123,14 +126,13 @@ class ChatKeyboardView: UIView {
}
func setupKeyboardView() {
self.backgroundColor = ThemeColor(hexStr: "#F7F7F7")
self.backgroundColor = .clear
self.isUserInteractionEnabled = true
addSubview(toolBarView)
toolBarView.addSubview(moreButton)
toolBarView.addSubview(changeButton)
toolBarView.addSubview(chatTextView)
toolBarView.addSubview(topLineView)
toolBarView.addSubview(bottomLineView)
addSubview(contentView)
contentView.addSubview(moreMenuView)
@@ -347,9 +349,6 @@ extension ChatKeyboardView {
moreButton.frame = CGRect(x: moreButton.x, y: spaceY, width: moreButton.width, height: moreButton.height)
contentView.frame = CGRect(x: contentView.x, y: toolBarView.maxY, width: contentView.width, height: contentHeight)
topLineView.frame = CGRect(x: 0, y: 0, width: ScreenWidth, height: kLineHeight)
bottomLineView.frame = CGRect(x: 0, y: toolBarView.height - kLineHeight, width: ScreenWidth, height: kLineHeight)
if (isShowKeyboard) {
if (isShowMore) {

View File

@@ -7,21 +7,173 @@
import UIKit
import Reusable
import NIMSDK
import Kingfisher
func showTime(msglastTime: TimeInterval, showDetail: Bool) -> String {
//
let nowDate = Date()
let msgDate = Date(timeIntervalSince1970: msglastTime)
var result: String?
let components: Set<Calendar.Component> = [.year, .month, .day, .weekday, .hour, .minute]
let calendar = Calendar.current
let nowDateComponents = calendar.dateComponents(components, from: nowDate)
let msgDateComponents = calendar.dateComponents(components, from: msgDate)
var hour = msgDateComponents.hour ?? 0
let oneDayTimeIntervalValue: TimeInterval = 24 * 60 * 60 //
result = getPeriodOfTime(hour: hour, minute: msgDateComponents.minute ?? 0)
if hour > 12 {
hour -= 12
}
let isSameMonth = (nowDateComponents.year == msgDateComponents.year) && (nowDateComponents.month == msgDateComponents.month)
if isSameMonth && (nowDateComponents.day == msgDateComponents.day) { //
result = "\(result ?? "") \(hour):\(String(format: "%02d", msgDateComponents.minute ?? 0))"
} else if isSameMonth && (nowDateComponents.day == (msgDateComponents.day! + 1)) { //
result = showDetail ? "昨天\(result ?? "") \(hour):\(String(format: "%02d", msgDateComponents.minute ?? 0))" : "昨天"
} else if isSameMonth && (nowDateComponents.day == (msgDateComponents.day! + 2)) { //
result = showDetail ? "前天\(result ?? "") \(hour):\(String(format: "%02d", msgDateComponents.minute ?? 0))" : "前天"
} else if nowDate.timeIntervalSince(msgDate) < 7 * oneDayTimeIntervalValue { //
let weekDay = weekdayStr(msgDateComponents.weekday ?? 1)
result = showDetail ? "\(weekDay)\(result ?? "") \(hour):\(String(format: "%02d", msgDateComponents.minute ?? 0))" : weekDay
} else { //
let day = "\(msgDateComponents.year ?? 0)-\(msgDateComponents.month ?? 0)-\(msgDateComponents.day ?? 0)"
result = showDetail ? "\(day)\(result ?? "") \(hour):\(String(format: "%02d", msgDateComponents.minute ?? 0))" : day
}
return result ?? ""
}
func getPeriodOfTime(hour: Int, minute: Int) -> String {
var periodOfTime = ""
if hour >= 0 && hour < 6 {
periodOfTime = "凌晨"
} else if hour >= 6 && hour < 12 {
periodOfTime = "上午"
} else if hour == 12 {
periodOfTime = "中午"
} else if hour > 12 && hour < 18 {
periodOfTime = "下午"
} else if hour >= 18 && hour <= 23 {
periodOfTime = "晚上"
}
return periodOfTime
}
func weekdayStr(_ weekday: Int) -> String {
switch weekday {
case 1:
return "星期日"
case 2:
return "星期一"
case 3:
return "星期二"
case 4:
return "星期三"
case 5:
return "星期四"
case 6:
return "星期五"
case 7:
return "星期六"
default:
return ""
}
}
class ChatListCell: UITableViewCell, Reusable {
var rescent:NIMRecentSession? {
didSet {
if let sessionId = rescent?.session?.sessionId {
NIMSDK.shared().userManager.fetchUserInfos([sessionId]) { users, error in
if error == nil {
let user = users?[safe:0]
if let url = user?.userInfo?.avatarUrl {
self.avatarImgView.kf.setImage(with: URL(string: url),
placeholder: nil)
}
self.nameLb.text = user?.userInfo?.nickName
}
}
textLb.text = rescent?.lastMessage?.text ?? "消息"
if let count = rescent?.unreadCount, count > 0 {
badgeLb.text = "\(count)"
badgeLb.isHidden = false
} else {
badgeLb.isHidden = true
}
if let message = rescent?.lastMessage {
self.dateLb.isHidden = false
self.dateLb.text = showTime(msglastTime: rescent?.lastMessage?.timestamp ?? 0, showDetail: false)
} else {
self.dateLb.isHidden = true
}
}
}
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
backgroundColor = .clear
contentView.addSubview(backView)
backView.addSubview(avatarImgView)
backView.addSubview(textLb)
backView.addSubview(nameLb)
backView.addSubview(dateLb)
backView.addSubview(badgeLb)
backView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(16)
make.top.equalToSuperview().offset(10)
make.bottom.equalToSuperview()
}
avatarImgView.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 60, height: 60))
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(8)
}
nameLb.snp.makeConstraints { make in
make.left.equalTo(avatarImgView.snp.right).offset(12)
make.bottom.equalTo(avatarImgView.snp.centerY).offset(-4)
make.right.lessThanOrEqualTo(backView).offset(-20)
}
textLb.snp.makeConstraints { make in
make.left.equalTo(nameLb)
make.top.equalTo(avatarImgView.snp.centerY).offset(4)
make.right.lessThanOrEqualTo(backView).offset(-20)
}
dateLb.snp.makeConstraints { make in
make.centerY.equalTo(nameLb)
make.right.equalToSuperview().offset(-8)
}
badgeLb.snp.makeConstraints { make in
make.right.equalTo(dateLb)
make.centerY.equalTo(textLb)
make.size.equalTo(CGSize(width: 18, height: 18))
}
}
private lazy var backView: UIView = {
let view = UIView()
view.backgroundColor = ThemeColor(hexStr: "#525566")
view.layer.masksToBounds = true
view.addCorner(cornerRadii: UIView.CornerRadii.init(topLeft: 36, topRight: 10, bottomLeft: 36, bottomRight: 10), frame: CGRectMake(0, 0, ScreenWidth - 32, 72))
return view
}()
@@ -50,7 +202,7 @@ class ChatListCell: UITableViewCell, Reusable {
private lazy var dateLb: UILabel = {
let label = UILabel()
label.textColor = .red
label.textColor = ThemeColor(hexStr: "#7D8499")
label.font = UIFont.systemFont(ofSize: 12, weight: .light)
return label
}()
@@ -61,11 +213,13 @@ class ChatListCell: UITableViewCell, Reusable {
label.backgroundColor = .red
label.textAlignment = .center
label.font = UIFont.systemFont(ofSize: 11)
label.layer.cornerRadius = 9
label.layer.masksToBounds = true
return label
}()
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}

View File

@@ -0,0 +1,78 @@
//
// ChatNavView.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/3/1.
//
import UIKit
class ChatNavView: BaseView {
override func loadSubViews() {
addSubview(backBtn)
addSubview(titleLb)
addSubview(likeBtn)
addSubview(optBtn)
backBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 18, height: 18))
make.left.equalToSuperview().offset(16)
make.bottom.equalTo(self).offset(-13)
}
titleLb.snp.makeConstraints { make in
make.centerX.equalTo(self)
make.centerY.equalTo(backBtn)
}
likeBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 48, height: 21))
make.centerY.equalTo(backBtn)
make.right.equalTo(optBtn.snp.left).offset(-10)
}
optBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 18, height: 18))
make.right.equalTo(self).offset(-16)
make.centerY.equalTo(backBtn)
}
}
private lazy var backBtn: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "chat_back"), for: .normal)
button.setImage(UIImage(named: "chat_back"), for: .selected)
return button
}()
private lazy var titleLb: UILabel = {
let label = UILabel()
label.textColor = ThemeColor(hexStr: "#2B2D33")
label.font = UIFont.systemFont(ofSize: 16, weight: .medium)
label.textAlignment = .center
return label
}()
private lazy var likeBtn: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("关注", for: .normal)
button.setTitleColor(ThemeColor(hexStr: "#FFDA24"), for: .normal)
button.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
button.layer.masksToBounds = true
button.layer.cornerRadius = 26
button.isEnabled = false
button.addTarget(self, action: #selector(likeClick), for: .touchUpInside)
return button
}()
private lazy var optBtn: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "chat_opt"), for: .normal)
button.setImage(UIImage(named: "chat_opt"), for: .selected)
return button
}()
@objc func likeClick() {
//TODO:
}
}