0D54E0EF2F0A61E600A80EE7 /* DeepChordsSdk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DeepChordsSdk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
16E2FB8C843A2136E114E451 /* Pods-demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-demo.debug.xcconfig"; path = "Target Support Files/Pods-demo/Pods-demo.debug.xcconfig"; sourceTree = "<group>"; };
248D8B53B5A178ACA5867275 /* Pods_DeepChordsSdk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DeepChordsSdk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 3F03696D2F2B604900F3CB95 /* playboy copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "playboy copy-Info.plist"; path = "/Users/yaozuopan/Documents/code/ShenYin/ShenYin/playboy copy-Info.plist"; sourceTree = "<absolute>"; };
3F7602EA2EFA891200588C18 /* DeepChordsSdk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DeepChordsSdk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3F887B9C2E38D8DC00C98658 /* ShenYin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ShenYin.app; sourceTree = BUILT_PRODUCTS_DIR; };
3F8F58282EBCA2B800FFC00B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3F887BAE2E38D8DD00C98658 /* Exceptions for "ShenYin" folder in "ShenYin" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
- Info.plist,
- playboy.storyboard,
- playboy.xcassets,
- Sdk/DcSdk/tool/CCBleManager.swift,
- Sdk/DcSdk/tool/CCConfig.swift,
- Sdk/DcSdk/tool/CCDevice.swift,
- Sdk/DcSdk/tool/CCPage.swift,
- Sdk/DcSdk/tool/DcCall.swift,
- Sdk/DcSdk/tool/DcChatManager.swift,
- Sdk/DcSdk/tool/DcChinese2Enligsh.swift,
- Sdk/DcSdk/tool/DcSdkManager.swift,
- Sdk/DcSdk/tool/DcStereo.swift,
- Sdk/DcSdk/tool/DcSubTitle.swift,
- Sdk/DcSdk/tool/DcTcty.swift,
- Sdk/DcSdk/tool/DcXcly.swift,
- Sdk/DcSdk/tool/JLAudioUnitKit.xcframework,
- Sdk/DcSdk/tool/OpusTools.swift,
- Sdk/DcSdk/VC/AiFunctionVC.swift,
- Sdk/DcSdk/VC/DcChatVC.swift,
- Sdk/DcSdk/VC/DcChinese2EnglishVC.swift,
- Sdk/DcSdk/VC/DcDialogTranslateVC.swift,
- Sdk/DcSdk/VC/DcStereoCallVC.swift,
- Sdk/DcSdk/VC/DcSubTitleVC.swift,
- Sdk/DcSdk/VC/DcTctyVC.swift,
- Sdk/DcSdk/VC/DcXclyVC.swift,
- Sdk/DcSdk/VC/HomeDeviceVC.swift,
- Sdk/DcSdk/VC/ModeVC.swift,
- "ShenYin copy-Info.plist",
+ Channel/DeepChords/DeepChords.plist,
+ Channel/PLAYBOY/DcSdk/tool/CCBleManager.swift,
+ Channel/PLAYBOY/DcSdk/tool/CCConfig.swift,
+ Channel/PLAYBOY/DcSdk/tool/CCDevice.swift,
+ Channel/PLAYBOY/DcSdk/tool/CCPage.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcCall.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcChatManager.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcChinese2Enligsh.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcSdkManager.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcStereo.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcSubTitle.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcTcty.swift,
+ Channel/PLAYBOY/DcSdk/tool/DcXcly.swift,
+ Channel/PLAYBOY/DcSdk/tool/JLAudioUnitKit.xcframework,
+ Channel/PLAYBOY/DcSdk/tool/OpusTools.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbAiFunctionVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbChatVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbChinese2EnglishVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbDialogTranslateVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbHomeVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbModeVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbStereoCallVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbSubTitleVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbTabBC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbTctyVC.swift,
+ Channel/PLAYBOY/DcSdk/VC/PbXclyVC.swift,
+ Channel/PLAYBOY/PLAYBOY.plist,
+ Channel/PLAYBOY/PLAYBOY.storyboard,
+ Channel/PLAYBOY/PLAYBOY.xcassets,
);
target = 3F887B9B2E38D8DC00C98658 /* ShenYin */;
};
3FD1DFF52F0E00BF00A62733 /* Exceptions for "ShenYin" folder in "playboy" target */ = {
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
membershipExceptions = (
- "/Localized: LaunchScreen.storyboard",
- Assets.xcassets,
- Info.plist,
- Sdk/JoySdk/tool/CCBleManager.swift,
- Sdk/JoySdk/tool/CCConfig.swift,
- Sdk/JoySdk/tool/CCDevice.swift,
- Sdk/JoySdk/tool/CCPage.swift,
- Sdk/JoySdk/tool/JoyCallRecord.swift,
- Sdk/JoySdk/tool/JoyChat.swift,
- Sdk/JoySdk/tool/JoyChinse2English.swift,
- Sdk/JoySdk/tool/JoyDialog.swift,
- Sdk/JoySdk/tool/JoyGemAI.framework,
- Sdk/JoySdk/tool/JoyRecord.swift,
- Sdk/JoySdk/tool/JoySdkManager.swift,
- Sdk/JoySdk/tool/JoyTcty.swift,
- Sdk/JoySdk/VC/AiFunctionVC.swift,
- Sdk/JoySdk/VC/HomeDeviceVC.swift,
- Sdk/JoySdk/VC/JoyCallingRecordVC.swift,
- Sdk/JoySdk/VC/JoyChatVC.swift,
- Sdk/JoySdk/VC/JoyChinese2EnglishVC.swift,
- Sdk/JoySdk/VC/JoyDialogTranlateVC.swift,
- Sdk/JoySdk/VC/JoyStereoCallVC.swift,
- Sdk/JoySdk/VC/JoySubTitleVC.swift,
- Sdk/JoySdk/VC/JoyTctyVC.swift,
- Sdk/JoySdk/VC/JoyXclyVC.swift,
- Sdk/JoySdk/VC/ModeVC.swift,
+ "/Localized: Channel/DeepChords/DeepChords.storyboard",
+ Channel/DeepChords/DeepChords.plist,
+ Channel/DeepChords/DeepChords.xcassets,
+ Channel/DeepChords/JoySdk/tool/CCBleManager.swift,
+ Channel/DeepChords/JoySdk/tool/CCConfig.swift,
+ Channel/DeepChords/JoySdk/tool/CCDevice.swift,
+ Channel/DeepChords/JoySdk/tool/CCPage.swift,
+ Channel/DeepChords/JoySdk/tool/JoyCallRecord.swift,
+ Channel/DeepChords/JoySdk/tool/JoyChat.swift,
+ Channel/DeepChords/JoySdk/tool/JoyChinse2English.swift,
+ Channel/DeepChords/JoySdk/tool/JoyDialog.swift,
+ Channel/DeepChords/JoySdk/tool/JoyGemAI.framework,
+ Channel/DeepChords/JoySdk/tool/JoyRecord.swift,
+ Channel/DeepChords/JoySdk/tool/JoySdkManager.swift,
+ Channel/DeepChords/JoySdk/tool/JoyTcty.swift,
+ Channel/DeepChords/JoySdk/VC/JoyAiFunctionVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyCallingRecordVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyChatVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyChinese2EnglishVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyDialogTranslateVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyHomeVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyModeVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyStereoCallVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoySubTitleVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyTabBC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyTctyVC.swift,
+ Channel/DeepChords/JoySdk/VC/JoyXclyVC.swift,
);
target = 3FD1DFE32F0E00BF00A62733 /* playboy */;
};
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
/* Begin PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */
- 3FCC8B152F1E0280004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "ShenYin" target */ = {
+ 3FCB298D2F6A7BBD007AB47F /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "ShenYin" target */ = {
isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
attributesByRelativePath = {
- Sdk/JoySdk/tool/JoyGemAI.framework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
+ Channel/DeepChords/JoySdk/tool/JoyGemAI.framework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
};
buildPhase = 3FEFE9092F1B252000D82F17 /* Embed Frameworks */;
membershipExceptions = (
- Sdk/JoySdk/tool/JoyGemAI.framework,
+ Channel/DeepChords/JoySdk/tool/JoyGemAI.framework,
);
};
- 3FCC8B1A2F1E030E004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "playboy" target */ = {
+ 3FCB29902F6A7DAD007AB47F /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "playboy" target */ = {
isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
attributesByRelativePath = {
- Sdk/DcSdk/tool/JLAudioUnitKit.xcframework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
+ Channel/PLAYBOY/DcSdk/tool/JLAudioUnitKit.xcframework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
};
buildPhase = 3FD1DFEF2F0E00BF00A62733 /* Embed Frameworks */;
membershipExceptions = (
- Sdk/DcSdk/tool/JLAudioUnitKit.xcframework,
+ Channel/PLAYBOY/DcSdk/tool/JLAudioUnitKit.xcframework,
);
};
3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" phase from "DeepChordsSdk" target */ = {
isa = PBXFileSystemSynchronizedRootGroup;
exceptions = (
3F887BAE2E38D8DD00C98658 /* Exceptions for "ShenYin" folder in "ShenYin" target */,
- 3FCC8B152F1E0280004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "ShenYin" target */,
+ 3FCB298D2F6A7BBD007AB47F /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "ShenYin" target */,
3FD1DFF52F0E00BF00A62733 /* Exceptions for "ShenYin" folder in "playboy" target */,
- 3FCC8B1A2F1E030E004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "playboy" target */,
+ 3FCB29902F6A7DAD007AB47F /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "playboy" target */,
);
path = ShenYin;
sourceTree = "<group>";
3F887B9D2E38D8DC00C98658 /* Products */,
34A14A83ECF09370871C891F /* Pods */,
676B86A4BA2639E8694D56B4 /* Frameworks */,
- 3F03696D2F2B604900F3CB95 /* playboy copy-Info.plist */,
);
sourceTree = "<group>";
};
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_ENTITLEMENTS = ShenYin/ShenYin.entitlements;
+ CODE_SIGN_ENTITLEMENTS = ShenYin/Channel/DeepChords/DeepChords.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202603171720;
"$(PROJECT_DIR)/ShenYin/Sdk/JoySdk",
"$(PROJECT_DIR)/framework",
"$(PROJECT_DIR)/ShenYin/Sdk/JoySdk/tool",
+ "$(PROJECT_DIR)/ShenYin/Channel/DeepChords/JoySdk/tool",
);
GENERATE_INFOPLIST_FILE = YES;
- INFOPLIST_FILE = ShenYin/Info.plist;
+ INFOPLIST_FILE = ShenYin/Channel/DeepChords/DeepChords.plist;
INFOPLIST_KEY_CFBundleDisplayName = DeepChords;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "扫描附近蓝牙设备需要获得权限";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "允许APP使用定位方便查找耳机";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "修改用户头像、提交意见反馈需要访问相册";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
- INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
+ INFOPLIST_KEY_UILaunchStoryboardName = DeepChords;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_ENTITLEMENTS = ShenYin/ShenYin.entitlements;
+ CODE_SIGN_ENTITLEMENTS = ShenYin/Channel/DeepChords/DeepChords.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202603171720;
"$(PROJECT_DIR)/ShenYin/Sdk/JoySdk",
"$(PROJECT_DIR)/framework",
"$(PROJECT_DIR)/ShenYin/Sdk/JoySdk/tool",
+ "$(PROJECT_DIR)/ShenYin/Channel/DeepChords/JoySdk/tool",
);
GENERATE_INFOPLIST_FILE = YES;
- INFOPLIST_FILE = ShenYin/Info.plist;
+ INFOPLIST_FILE = ShenYin/Channel/DeepChords/DeepChords.plist;
INFOPLIST_KEY_CFBundleDisplayName = DeepChords;
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "扫描附近蓝牙设备需要获得权限";
INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "允许APP使用定位方便查找耳机";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "修改用户头像、提交意见反馈需要访问相册";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
- INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
+ INFOPLIST_KEY_UILaunchStoryboardName = DeepChords;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_ENTITLEMENTS = ShenYin/PLAYBOY.entitlements;
+ CODE_SIGN_ENTITLEMENTS = ShenYin/Channel/PLAYBOY/PLAYBOY.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202603171655;
"$(PROJECT_DIR)/ShenYin/Sdk/JoySdk/tool",
);
GENERATE_INFOPLIST_FILE = YES;
- INFOPLIST_FILE = "ShenYin/ShenYin copy-Info.plist";
+ INFOPLIST_FILE = ShenYin/Channel/PLAYBOY/PLAYBOY.plist;
INFOPLIST_KEY_CFBundleDisplayName = "PLAYBOY眼镜";
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "扫描附近蓝牙设备需要获得权限";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "录音需要使用麦克风";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "修改用户头像、提交意见反馈需要访问相册";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
- INFOPLIST_KEY_UILaunchStoryboardName = playboy.storyboard;
+ INFOPLIST_KEY_UILaunchStoryboardName = PLAYBOY.storyboard;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
- CODE_SIGN_ENTITLEMENTS = ShenYin/PLAYBOY.entitlements;
+ CODE_SIGN_ENTITLEMENTS = ShenYin/Channel/PLAYBOY/PLAYBOY.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202603171655;
"$(PROJECT_DIR)/DeepChordsSdk",
);
GENERATE_INFOPLIST_FILE = YES;
- INFOPLIST_FILE = "ShenYin/ShenYin copy-Info.plist";
+ INFOPLIST_FILE = ShenYin/Channel/PLAYBOY/PLAYBOY.plist;
INFOPLIST_KEY_CFBundleDisplayName = "PLAYBOY眼镜";
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "扫描附近蓝牙设备需要获得权限";
INFOPLIST_KEY_NSMicrophoneUsageDescription = "录音需要使用麦克风";
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "修改用户头像、提交意见反馈需要访问相册";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
- INFOPLIST_KEY_UILaunchStoryboardName = playboy.storyboard;
+ INFOPLIST_KEY_UILaunchStoryboardName = PLAYBOY.storyboard;
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleLightContent;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait;
import UIKit
-class AiFunctionVC:BaseVC{
+class JoyAiFunctionVC:BaseVC{
let bgView = UIScrollView()
let headerView = HomeHeadView()
let functionView = HomeFunctionView()
v.isEditable = false
v.font = .regular(14)
v.text = ""
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 0, right: 18)
}
view.addSubviews([rhythView,textView,toolBar])
//
-// HomeDeviceVC.swift
+// JoyHomeVC.swift
// ShenYin
//
// Created by liangshi on 2025/10/20.
import UIKit
-class HomeDeviceVC:BaseVC{
+class JoyHomeVC:BaseVC{
private var collectionView:UICollectionView!
let imgView = UIImageView()
let edtLabel = UILabel()
}
}
-extension HomeDeviceVC:UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout {
+extension JoyHomeVC:UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let model = DeviceVM.shared.dataList[indexPath.row]
- App.shared.goToPage(AiFunctionVC(device: model))
+ App.shared.goToPage(JoyAiFunctionVC(device: model))
}
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView{
let header = HomeHeadInfoView.header(with: collectionView, indexPath: indexPath)
v.isEditable = false
v.font = .regular(14)
v.text = ""
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 13, bottom: 0, right: 13)
// v.backgroundColor = .green
}
v.isEditable = false
v.font = .regular(14)
v.text = ""
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 13, bottom: 0, right: 13)
// v.backgroundColor = .yellow
}
func setupUI(){
- if CCDevice.isJoy{
- let homeVC = HomeDeviceVC()
+ let homeVC = JoyHomeVC()
let modeVC = ModeVC()
let appearance = UITabBarAppearance()
appearance.configureWithDefaultBackground()
appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.rgb(0x8D8D8D)]
- appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.color(.first)]
+ appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.color(.level1)]
self.tabBar.standardAppearance = appearance
self.tabBar.backgroundColor = .white
view.backgroundColor = .color(.bgColor)
- }
- else{
- let homeVC = HomeDeviceVC()
- let modeVC = ModeVC()
- let customerVC = CustomerVC()
- let mineVC = MineVC()
-
- let item0 = UITabBarItem(title: "设备".l10n , image: UIImage(named: "tab_0_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_0_selected")?.withRenderingMode(.alwaysOriginal))
- let nc0 = BaseNC(rootViewController: homeVC)
- nc0.tabBarItem = item0
-
- let item1 = UITabBarItem(title: "模式".l10n, image: UIImage(named: "tab_1_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_1_selected")?.withRenderingMode(.alwaysOriginal))
- let nc1 = BaseNC(rootViewController: modeVC)
- nc1.tabBarItem = item1
-
-// let item2 = UITabBarItem(title: "睡眠".l10n, image: UIImage(named: "tab_2_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_2_selected")?.withRenderingMode(.alwaysOriginal))
-// let nc2 = BaseNC(rootViewController: sleepVC)
-// nc2.tabBarItem = item2
-
- let item3 = UITabBarItem(title: "客服".l10n, image: UIImage(named: "tab_3_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_3_selected")?.withRenderingMode(.alwaysOriginal))
- let nc3 = BaseNC(rootViewController: customerVC)
- nc3.tabBarItem = item3
-
- let item4 = UITabBarItem(title: "我的".l10n, image: UIImage(named: "tab_4_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_4_selected")?.withRenderingMode(.alwaysOriginal))
- let nc4 = BaseNC(rootViewController: mineVC)
- nc4.tabBarItem = item4
-
- self.viewControllers = [nc0,nc1,nc3,nc4]
-
- let appearance = UITabBarAppearance()
- appearance.configureWithDefaultBackground()
- appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.color(.secondary)]
- appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
- self.tabBar.standardAppearance = appearance
- self.tabBar.backgroundColor = .rgb(0x242424)
- view.backgroundColor = .color(.bgColor)
- }
+
textView.do { v in
v.placeHolde = "此处将显示原文".l10n
- v.textView.textColor = .color(.secondary)
+ v.textView.textColor = .color(.level2)
}
translateTextView.do { v in
- v.textView.textColor = .color(.first)
+ v.textView.textColor = .color(.level1)
v.placeHolde = "此处将显示译文".l10n
v.bgView.yc.addgradientLayer(colors: [.color(.theme),.color(.bgColor)], direction: .top2down,rect: CGRect(x: 0, y: 0, width: kScreenWid, height: (kScreenHei - kNavBtm - 120 - 10)/2))
v.bgView.alpha = 0.1
v.font = .regular(14)
v.text = ""
v.backgroundColor = .white
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 0, right: 18)
}
view.addSubviews([rhythView,textView,toolBar])
}
}
func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {
- Logger.debug("peripheral: %@ failed to connect", peripheral)
+ Logger.debug("peripheral: %@ failed to connect", peripheral,"error \(error)")
conetedFailureCallback?(connectPeripheral!)
}
func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?) {
- Logger.debug("蓝牙已断开 \(peripheral)")
+ Logger.debug("蓝牙已断开 \(peripheral)","error \(error)")
YLprogressHUD.showAutoHiden("蓝牙已断开".l10n)
self.isConnetd = false
if CCDevice.isJoy{
App.shared.goToPage(JoyChatVC())
}
else{
-// App.shared.goToPage(DcChatVC())
+// App.shared.goToPage(PbChatVC())
}
}
static func gotoFieldRecord(){
App.shared.goToPage(JoyXclyVC())
}
else{
-// App.shared.goToPage(DcXclyVC())
+// App.shared.goToPage(PbXclyVC())
}
}
static func gotoCallRecord(){
}
}
else{
-// App.shared.goToPage(DcStereoCallVC())
+// App.shared.goToPage(PbStereoCallVC())
}
}
static func gotoChinese2Enlgish(){
App.shared.goToPage(JoyChinese2EnglishVC())
}
else{
-// App.shared.goToPage(DcChinese2EnglishVC())
+// App.shared.goToPage(PbChinese2EnglishVC())
}
}
static func gotoTcty(){
App.shared.goToPage(JoyTctyVC())
}
else{
-// App.shared.goToPage(DcTctyVC())
+// App.shared.goToPage(PbTctyVC())
}
}
static func gotoDialogTranslate(){
App.shared.goToPage(JoyDialogTranslateVC())
}
else{
-// App.shared.goToPage(DcDialogTranslateVC())
+// App.shared.goToPage(PbDialogTranslateVC())
}
}
static func gotoSubTitle(){
/// 日记管理
class Logger {
- static var isDebug: Bool = false
+ static var isDebug: Bool = true
fileprivate static let shared = Logger()
private var fileHandle:FileHandle?
import UIKit
-class AiFunctionVC:BaseVC{
+class PbAiFunctionVC:BaseVC{
private let bgView = UIScrollView()
private let headerView = AiFunctionHeadView()
private let functionView = AiFunctionView()
v.image = UIImage(named: "home_chat")
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.text = "AI" + "智能对话".l10n
}
// v.backgroundColor = .lightGray
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.numberOfLines = 2
}
////
-//// DcChatVC.swift
+//// PbChatVC.swift
//// ShenYin
////
//// Created by liangshi on 2025/12/26.
import UIKit
import AVFAudio
import DeepChordsSdk
-class DcChatVC:BaseVC{
+class PbChatVC:BaseVC{
let rightItem = ChatNavigationBarItem(frame: CGRect(x: 0, y: 0, width: 80, height: 44))
let roleItem = ChatRoleItem(frame: CGRect(x: 0, y: 0, width: 100, height: 44))
}
-extension DcChatVC:ChatRecordBarDelegate{
+extension PbChatVC:ChatRecordBarDelegate{
func recordBarCancel(_ toolBar: ChatRecordBar) {
DcChatManager.shared.stopChat()
if let item = DcChatManager.shared.dataList.last,item.content.isEmpty{
}
}
-extension DcChatVC:UITableViewDelegate,UITableViewDataSource {
+extension PbChatVC:UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return DcChatManager.shared.dataList.count
}
import UIKit
import AVFAudio
-class DcChinese2EnglishVC:BaseVC{
+class PbChinese2EnglishVC:BaseVC{
let toolBar = RecordBar()
let tableView = UITableView(frame: CGRectZero, style: .plain)
let bg = UIImageView()
}
}
}
-extension DcChinese2EnglishVC:RecordBarDelegate{
+extension PbChinese2EnglishVC:RecordBarDelegate{
func recordBarLanguageChange(_ bar: RecordBar) {
}
}
}
}
-extension DcChinese2EnglishVC:UITableViewDelegate,UITableViewDataSource {
+extension PbChinese2EnglishVC:UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return dataList.count
}
import UIKit
import AVFoundation
import DeepChordsSdk
-class DcDialogTranslateVC:BaseVC{
+class PbDialogTranslateVC:BaseVC{
let toolBar = DialogRecordBar()
let splitView = DialogSplitView()
}
}
-extension DcDialogTranslateVC:UITableViewDelegate,UITableViewDataSource {
+extension PbDialogTranslateVC:UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return dataList.count
}
}
}
-extension DcDialogTranslateVC:DialogRecordBarDelegate{
+extension PbDialogTranslateVC:DialogRecordBarDelegate{
func recordBar(_ bar: DialogRecordBar, layoutChange: DialogRecordLayoutType) {
if layoutChange == .spolit{
splitView.isHidden = false
DCBleRecord.shared.stop()
}
}
-extension DcDialogTranslateVC : PcmSoundDelegate {
+extension PbDialogTranslateVC : PcmSoundDelegate {
func remaining(_ frames: UInt) {
Logger.debug("[frame:\(frames)]");
}
import UIKit
import Kingfisher
-class HomeDeviceVC:BaseVC{
+class PbHomeVC:BaseVC{
private var collectionView:UICollectionView!
let imgView = UIImageView()
var currentBg:BackgroundModel?
}
}
-extension HomeDeviceVC:UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout {
+extension PbHomeVC:UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
}
else{
let model = DeviceVM.shared.dataList[indexPath.row]
- App.shared.goToPage(AiFunctionVC(device: model))
+ App.shared.goToPage(PbAiFunctionVC(device: model))
}
}
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView{
v.image = UIImage(named: "add_device")
}
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .semiBold(14)
v.adjustsFontSizeToFitWidth = true
v.text = "添加新设备".l10n
import UIKit
import AVFAudio
-class DcStereoCallVC:BaseVC{
+class PbStereoCallVC:BaseVC{
let toolBar = FieldRecordBar()
let line = UIView()
let selfTextView = UITextView()
v.isEditable = false
v.font = .regular(14)
v.text = ""
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 13, bottom: 0, right: 13)
// v.backgroundColor = .green
}
v.isEditable = false
v.font = .regular(14)
v.text = ""
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 13, bottom: 0, right: 13)
// v.backgroundColor = .yellow
}
}
}
-extension DcStereoCallVC:FieldRecordBarDelegate{
+extension PbStereoCallVC:FieldRecordBarDelegate{
func fieldRecordBar(_ bar: FieldRecordBar, languageChange language: CCAiLanguage) {
DcStereo.shared.setRecordLanage(language)
AiLanguageCache.save(type: .thly, lan: language)
import AVKit
@available(iOS 15.0, *)
-class DcSubTitleVC: BaseVC {
+class PbSubTitleVC: BaseVC {
let languageItem = LanguageSelectItem()
let toolBar = RecordBar()
let tableView = UITableView(frame: CGRectZero, style: .plain)
@available(iOS 15.0, *)
-extension DcSubTitleVC:RecordBarDelegate{
+extension PbSubTitleVC:RecordBarDelegate{
func recordBarLanguageChange(_ bar: RecordBar) {
sdk.stopEarRecord()
}
}
@available(iOS 15.0, *)
-extension DcSubTitleVC:UITableViewDelegate,UITableViewDataSource {
+extension PbSubTitleVC:UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return sdk.dataList.count
}
--- /dev/null
+//
+// BaseTC.swift
+// Magpie
+//
+// Created by incar on 2024/1/2.
+//
+
+import UIKit
+
+class BaseTC:UITabBarController{
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ // Do any additional setup after loading the view.
+ setupUI()
+ }
+
+
+ func setupUI(){
+ let homeVC = PbHomeVC()
+ let modeVC = ModeVC()
+ let customerVC = CustomerVC()
+ let mineVC = MineVC()
+
+ let item0 = UITabBarItem(title: "设备".l10n , image: UIImage(named: "tab_0_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_0_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc0 = BaseNC(rootViewController: homeVC)
+ nc0.tabBarItem = item0
+
+ let item1 = UITabBarItem(title: "模式".l10n, image: UIImage(named: "tab_1_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_1_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc1 = BaseNC(rootViewController: modeVC)
+ nc1.tabBarItem = item1
+
+ // let item2 = UITabBarItem(title: "睡眠".l10n, image: UIImage(named: "tab_2_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_2_selected")?.withRenderingMode(.alwaysOriginal))
+ // let nc2 = BaseNC(rootViewController: sleepVC)
+ // nc2.tabBarItem = item2
+
+ let item3 = UITabBarItem(title: "客服".l10n, image: UIImage(named: "tab_3_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_3_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc3 = BaseNC(rootViewController: customerVC)
+ nc3.tabBarItem = item3
+
+ let item4 = UITabBarItem(title: "我的".l10n, image: UIImage(named: "tab_4_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_4_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc4 = BaseNC(rootViewController: mineVC)
+ nc4.tabBarItem = item4
+
+ self.viewControllers = [nc0,nc1,nc3,nc4]
+
+ let appearance = UITabBarAppearance()
+ appearance.configureWithDefaultBackground()
+ appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.color(.level2)]
+ appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+ self.tabBar.standardAppearance = appearance
+ self.tabBar.backgroundColor = .rgb(0x242424)
+ view.backgroundColor = .color(.bgColor)
+
+
+// self.selectedIndex = 3
+ }
+}
import UIKit
import AVFoundation
-class DcTctyVC:BaseVC{
+class PbTctyVC:BaseVC{
let toolBar = RecordBar()
let textView = PlaceHolderTextView()
let translateTextView = PlaceHolderTextView()
textView.do { v in
v.placeHolde = "此处将显示原文".l10n
- v.textView.textColor = .color(.secondary)
+ v.textView.textColor = .color(.level2)
}
translateTextView.do { v in
- v.textView.textColor = .color(.first)
+ v.textView.textColor = .color(.level1)
v.placeHolde = "此处将显示译文".l10n
if CCDevice.isJoy{
v.bgView.yc.addgradientLayer(colors: [.color(.theme),.color(.bgColor)], direction: .top2down,rect: CGRect(x: 0, y: 0, width: kScreenWid, height: (kScreenHei - kNavBtm - 120 - 10)/2))
}
}
-extension DcTctyVC:RecordBarDelegate{
+extension PbTctyVC:RecordBarDelegate{
func recordBarLanguageChange(_ bar:RecordBar){
AiLanguageCache.save(type: .tscy_left, lan: bar.leftItem.language)
AiLanguageCache.save(type: .tscy_right, lan: bar.rightItem.language)
import UIKit
import AVFAudio
-class DcXclyVC:BaseVC{
+class PbXclyVC:BaseVC{
let toolBar = FieldRecordBar()
let textView = UITextView()
let rhythView = RhythView()
v.font = .regular(14)
v.text = ""
v.backgroundColor = .clear
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 0, right: 18)
}
view.addSubviews([rhythView,textView,toolBar])
}
}
-extension DcXclyVC:FieldRecordBarDelegate{
+extension PbXclyVC:FieldRecordBarDelegate{
func fieldRecordBar(_ bar: FieldRecordBar, languageChange language: CCAiLanguage) {
DcXcly.shared.setRecoordLanage(language)
AiLanguageCache.save(type: .xcly, lan: language)
// App.shared.goToPage(JoyChatVC())
}
else{
- App.shared.goToPage(DcChatVC())
+ App.shared.goToPage(PbChatVC())
}
}
static func gotoFieldRecord(){
// App.shared.goToPage(JoyXclyVC())
}
else{
- App.shared.goToPage(DcXclyVC())
+ App.shared.goToPage(PbXclyVC())
}
}
static func gotoCallRecord(){
}
else{
// if JoySdkManager.shared.callRecord.supportStereo{
- App.shared.goToPage(DcStereoCallVC())
+ App.shared.goToPage(PbStereoCallVC())
// }
// else{
-// App.shared.goToPage(DcCallingRecordVC())
+// App.shared.goToPage(JoyCallingRecordVC())
// }
}
}
// App.shared.goToPage(JoyChinese2EnglishVC())
}
else{
- App.shared.goToPage(DcChinese2EnglishVC())
+ App.shared.goToPage(PbChinese2EnglishVC())
}
}
static func gotoTcty(){
// App.shared.goToPage(JoyTctyVC())
}
else{
- App.shared.goToPage(DcTctyVC())
+ App.shared.goToPage(PbTctyVC())
}
}
static func gotoDialogTranslate(){
// App.shared.goToPage(JoyDialogTranslateVC())
}
else{
- App.shared.goToPage(DcDialogTranslateVC())
+ App.shared.goToPage(PbDialogTranslateVC())
}
}
static func gotoSubTitle(){
}
else{
if #available(iOS 15.0, *) {
- App.shared.goToPage(DcSubTitleVC())
+ App.shared.goToPage(PbSubTitleVC())
} else {
// Fallback on earlier versions
}
switch event {
case 0x01:
// 0x01(打开AI对话)
- if let vc = App.shared.topVC() as? DcChatVC {
+ if let vc = App.shared.topVC() as? PbChatVC {
// vc.startRecord()
}else{
- App.shared.goToPage(DcChatVC())
+ App.shared.goToPage(PbChatVC())
}
break
case 0x02:
case 0x03:
//0x03(打开耳机录音)
if DcCall.shared.isInCall {
- if let vc = App.shared.topVC() as? DcStereoCallVC {
+ if let vc = App.shared.topVC() as? PbStereoCallVC {
vc.startRecord()
}
else{
- App.shared.goToPage(DcStereoCallVC(autoStart: true))
+ App.shared.goToPage(PbStereoCallVC(autoStart: true))
DcStereo.shared.recordStart()
}
}
else{
- if let vc = App.shared.topVC() as? DcXclyVC {
+ if let vc = App.shared.topVC() as? PbXclyVC {
vc.startRecord()
}
else{
- App.shared.goToPage(DcXclyVC(autoStart: true))
+ App.shared.goToPage(PbXclyVC(autoStart: true))
DcXcly.shared.recordStart()
}
}
break
case 0x04:
// 0x04(关闭耳机录音)
- if let topVC = App.shared.topVC(), let vc = topVC as? DcXclyVC {
+ if let topVC = App.shared.topVC(), let vc = topVC as? PbXclyVC {
vc.stopRecord()
}
- if let topVC = App.shared.topVC(), let vc = topVC as? DcStereoCallVC {
+ if let topVC = App.shared.topVC(), let vc = topVC as? PbStereoCallVC {
vc.stopRecord()
}
break
import UIKit
public enum YLColor {
- ///
+ /// 背景色
case bgColor
/// 主题色
case theme
/// 次级主题色
case subTheme
/// 主标题
- case first
+ case level1
/// 二级标题
- case secondary
+ case level2
/// 三级标题
case level3
return 0x0092E1
case .subTheme:
return 0xF4FAFF
- case .first:
+ case .level1:
return 0x121212
- case .secondary:
+ case .level2:
return 0x666666
case .level3:
return 0x999999
return 0xFFCB57
case .subTheme:
return 0xF4FAFF
- case .first:
+ case .level1:
return 0xffffff
- case .secondary:
+ case .level2:
return 0x999999
case .level3:
return 0xcccccc
separatorLine.isHidden = true
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(16)
v.textAlignment = .center
v.lineBreakMode = .byTruncatingTail
view.addSubview(navBar)
// self.automaticallyAdjustsScrollViewInsets = false
navigationController?.navigationBar.isHidden = true
- if self.isKind(of: HomeDeviceVC.self) ||
+ if
self.isKind(of: ModeVC.self) ||
self.isKind(of: SleepVC.self) ||
self.isKind(of: CustomerVC.self) ||
}
originalLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
}
else{
bgView.backgroundColor = .color(.cellBg)
- originalLabel.textColor = .color(.first)
+ originalLabel.textColor = .color(.level1)
icon.image = CCDevice.isJoy ? UIImage(named: "logo_2"):UIImage(named: "logo_4")
icon.snp.remakeConstraints { make in
make.size.equalTo(36)
addSubviews([titleLabel])
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.numberOfLines = 0
contentView.addSubviews([titleLabel])
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.numberOfLines = 0
bgView.addSubview(listContainerView)
segmentedView.do { (v) in
- segmentedDataSource.titleNormalColor = .color(.secondary)
- segmentedDataSource.titleSelectedColor = .color(.first)
+ segmentedDataSource.titleNormalColor = .color(.level2)
+ segmentedDataSource.titleSelectedColor = .color(.level1)
segmentedDataSource.titleNormalFont = .regular(14)
segmentedDataSource.titleSelectedFont = .bold(16)
segmentedDataSource.isTitleZoomEnabled = true
originalLabel.do { v in
v.text = "你好,欢迎使用AI翻译,点击下方按钮立即开始咱们的对话吧".l10n
v.font = .medium(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
}
else{
bgView.backgroundColor = .color(.cellBg)
- originalLabel.textColor = .color(.first)
+ originalLabel.textColor = .color(.level1)
bgView.snp.remakeConstraints { make in
make.top.bottom.equalToSuperview().inset(10)
titleLabel.do {v in
v.numberOfLines = 0
v.textAlignment = .center
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(18)
}
desLabel.do {v in
v.text = "我可以帮你搜索、答疑、写作,请把你的任务交给我吧~".l10n
v.numberOfLines = 0
v.textAlignment = .center
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .bold(14)
}
}
v.image = UIImage(named: "search")
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.text = "智能体".l10n
v.yc.setCornerRadius(18)
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.text = "智能体".l10n
}
v.yc.setCornerRadius(8)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.textAlignment = .left
v.text = "英语练习"
private func setupUI() {
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.textAlignment = .center
titleLabel.text = "按住说话".l10n
}
cancelLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .center
v.text = "松手发送,上移取消".l10n
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
}
originalLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
translationLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
v.image = UIImage(named: "add_device")
}
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.text = "添加新设备".l10n
v.contentMode = .scaleAspectFit
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.text = "Deep Lite2 Ultra"
v.adjustsFontSizeToFitWidth = true
v.yc.setCornerRadius(25)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(24)
v.textAlignment = .left
}
deviceLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.text = "共4个智能设备"
}
nameLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(22)
v.textAlignment = .left
v.text = "设备".l10n
v.image = UIImage(named: "polygon")
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
}
valueLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(10)
}
}
}
originalLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
make.left.equalToSuperview().inset(18)
}
bgView.backgroundColor = .color(.cellBg)
- originalLabel.textColor = .color(.first)
+ originalLabel.textColor = .color(.level1)
}
}
else{
make.left.equalToSuperview().inset(18)
}
bgView.backgroundColor = .color(.cellBg)
- originalLabel.textColor = .color(.first)
+ originalLabel.textColor = .color(.level1)
}
}
}
}
originalLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.numberOfLines = 0
v.textAlignment = .left
}
translationLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
make.left.equalToSuperview().inset(18)
}
bgView.backgroundColor = .color(.cellBg)
- originalLabel.textColor = .color(.secondary)
- translationLabel.textColor = .color(.first)
+ originalLabel.textColor = .color(.level2)
+ translationLabel.textColor = .color(.level1)
}
line.setNeedsLayout()
}
v.image = UIImage(named: "record_select_language")
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(10)
}
}
icon.do { v in
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(10)
}
}
v.image = UIImage(named: "polygon")
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
}
valueLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(10)
v.text = CCDevice.isJoy ? "耳机".l10n:"眼镜".l10n
}
override func setupViews() {
addSubviews([startWave,stopWave,lable])
lable.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(32)
v.textAlignment = .center
v.text = "00:00:00"
dateLabel.text = model.createTime
typeLabel.text = model.type.title
durationLabel.text = YLToos.formatSeconds(model.duration)
- titleLabel.textColor = model.favorite == "0" ? UIColor.color(.first):.color(.theme)
+ titleLabel.textColor = model.favorite == "0" ? UIColor.color(.level1):.color(.theme)
collectionIcon.image = UIImage(named: model.favorite == "0" ? "collection_normal":"collection_selected")
}
}
}
typeLabel.text = localModel.type.title
durationLabel.text = YLToos.formatSeconds(localModel.duration)
- titleLabel.textColor = localModel.favorite == "0" ? UIColor.color(.first):.color(.theme)
+ titleLabel.textColor = localModel.favorite == "0" ? UIColor.color(.level1):.color(.theme)
collectionIcon.image = UIImage(named: localModel.favorite == "0" ? "collection_normal":"collection_selected")
}
}
bgView.addGestureRecognizer(longTap)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.textAlignment = .left
v.text = "周一会议总结"
}
durationLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "00:32:27"
}
typeLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "现场录音"
}
dateLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "2025-06-02 10:28"
cancelBtn.do { v in
v.setTitle("取消".l10n, for: .normal)
- v.setTitleColor(.color(.secondary), for: .normal)
+ v.setTitleColor(.color(.level2), for: .normal)
v.titleLabel?.font = .regular(14)
v.addTarget(self, action: #selector(cancelAction), for: .touchUpInside)
// v.backgroundColor = .yellow
v.attributedPlaceholder = NSAttributedString(string: "搜索".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
v.returnKeyType = .done
v.delegate = self
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged)
}
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
)
var style = MonthHeaderView.InvariantViewProperties.base
style.font = .systemFont(ofSize: 18, weight: .semibold)
- style.textColor = .color(.first)
+ style.textColor = .color(.level1)
return MonthHeaderView.calendarItemModel(
invariantViewProperties: style,
content: content
// 配置星期标题的样式
var style = DayOfWeekView.InvariantViewProperties.base
style.font = .systemFont(ofSize: 14, weight: .medium)
- style.textColor = .color(.first)
+ style.textColor = .color(.level1)
// 返回星期标题的视图模型(content参数名应为dayOfWeekText,而非text)
return DayOfWeekView.calendarItemModel(
let date = calendar.date(from: day.components)
let selectedDate = date?.format(.short)
if let text = defaultDate, selectedDate == text {
- invariantViewProperties.textColor = .color(.first)
+ invariantViewProperties.textColor = .color(.level1)
invariantViewProperties.backgroundShapeDrawingConfig.fillColor = .color(.theme)
}
else{
- invariantViewProperties.textColor = .color(.secondary)
+ invariantViewProperties.textColor = .color(.level2)
}
if let date = date,date > Date(){
invariantViewProperties.textColor = CCDevice.isJoy ? .color(.placeholder):.rgb(0x333333)
override func setupViews() {
addSubviews([titleLabel])
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.numberOfLines = 0
dateLabel.text = model.createTime
typeLabel.text = model.type.title
durationLabel.text = YLToos.formatSeconds(model.duration)
- titleLabel.textColor = model.favorite == "0" ? UIColor.color(.first):.color(.theme)
+ titleLabel.textColor = model.favorite == "0" ? UIColor.color(.level1):.color(.theme)
collectionIcon.image = UIImage(named: model.favorite == "0" ? "collection_normal":"collection_selected")
selectedIcon.image = UIImage(named: cloudModel!.isSelcted ? "btn_selected":"btn_normal")
}
// dateLabel.text = localModel.model.createTime
// typeLabel.text = localModel.model.type.title
// durationLabel.text = YLToos.formatSeconds(localModel.model.duration)
-// titleLabel.textColor = localModel.model.favorite == "0" ? UIColor.color(.first):.color(.theme)
+// titleLabel.textColor = localModel.model.favorite == "0" ? UIColor.color(.level1):.color(.theme)
// collectionIcon.image = UIImage(named: localModel.model.favorite == "0" ? "collection_normal":"collection_selected")
// selectedIcon.image = UIImage(named: localModel.isSelcted ? "btn_selected":"btn_normal")
// }
v.layer.masksToBounds = true
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.textAlignment = .left
v.text = "周一会议总结"
}
durationLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "00:32:27"
}
typeLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "现场录音"
}
dateLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "2025-06-02 10:28"
m.width.greaterThanOrEqualTo(58)
}
- leftLabel.textColor = .color(.secondary)
- leftLabel.yc.setBorder(width: 1, color: .color(.secondary), radius: 11)
+ leftLabel.textColor = .color(.level2)
+ leftLabel.yc.setBorder(width: 1, color: .color(.level2), radius: 11)
leftLabel.font = .regular(12)
leftLabel.textAlignment = .center
leftLabel.yc.addTap(target: self, action: #selector(allSelctedAction))
v.image = UIImage(named: "polygon")
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(10)
}
}
// dateLabel.text = model.createTime
// typeLabel.text = model.type.title
// durationLabel.text = YLToos.formatSeconds(model.duration)
-// titleLabel.textColor = model.favorite == "0" ? UIColor.color(.first):.color(.theme)
+// titleLabel.textColor = model.favorite == "0" ? UIColor.color(.level1):.color(.theme)
// collectionIcon.image = UIImage(named: model.favorite == "0" ? "collection_normal":"collection_selected")
// }
// }
dateLabel.text = localModel.model.createTime
typeLabel.text = localModel.model.type.title
durationLabel.text = YLToos.formatSeconds(localModel.model.duration)
- titleLabel.textColor = localModel.model.favorite == "0" ? UIColor.color(.first):.color(.theme)
+ titleLabel.textColor = localModel.model.favorite == "0" ? UIColor.color(.level1):.color(.theme)
collectionIcon.image = UIImage(named: localModel.model.favorite == "0" ? "collection_normal":"collection_selected")
selectedIcon.image = UIImage(named: localModel.isSelcted ? "btn_selected":"btn_normal")
}
v.layer.masksToBounds = true
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.textAlignment = .left
v.text = "周一会议总结"
}
durationLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "00:32:27"
}
typeLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "现场录音"
}
dateLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "2025-06-02 10:28"
m.width.greaterThanOrEqualTo(58)
}
- leftLabel.textColor = .color(.secondary)
- leftLabel.yc.setBorder(width: 1, color: .color(.secondary), radius: 11)
+ leftLabel.textColor = .color(.level2)
+ leftLabel.yc.setBorder(width: 1, color: .color(.level2), radius: 11)
leftLabel.font = .regular(12)
leftLabel.textAlignment = .center
leftLabel.yc.addTap(target: self, action: #selector(allSelctedAction))
}
textView.do { v in
v.text = ""
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.contentInset = UIEdgeInsets(top: 0, left: 13, bottom: 0, right: 13)
v.backgroundColor = .clear
v.isEditable = false
icon.do { v in
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(10)
}
}
label.yc.setBorder(width: 2, color: .color(.theme), radius: 8)
}
else{
- label.textColor = .color(.first)
- label.yc.setBorder(width: 0, color: .color(.first), radius: 8)
+ label.textColor = .color(.level1)
+ label.yc.setBorder(width: 0, color: .color(.level1), radius: 8)
}
}
}
timeLabel.do { (v) in
v.font = .regular(14)
v.textAlignment = .center
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.text = data.createTime
}
originView.do { v in
v.image = UIImage(named: "home_recordHistory")
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(18)
v.text = "历史记录".l10n
}
// v.backgroundColor = .lightGray
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.numberOfLines = 2
}
yc.setCornerRadius(22)
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(18)
}
// view.addSubviews([titleLabel,addView,scanView])
// titleLabel.do { v in
// v.text = "从这里选择一项用来添加设备".l10n
-// v.textColor = .color(.first)
+// v.textColor = .color(.level1)
// v.font = .medium(14)
// v.textAlignment = .center
// }
backgroundColor = UIColor.color(.bgColor)
addSubviews([titleLabel,desLabel])
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(16)
v.textAlignment = .center
v.numberOfLines = 0
v.layer.masksToBounds = true
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.textAlignment = .left
v.numberOfLines = 0
}
valueLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(13)
v.textAlignment = .left
v.numberOfLines = 0
}
originalLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.numberOfLines = 0
v.textAlignment = .left
}
translationLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
make.left.equalToSuperview().inset(18)
}
bgView.backgroundColor = .color(.cellBg)
- originalLabel.textColor = .color(.secondary)
- translationLabel.textColor = .color(.first)
+ originalLabel.textColor = .color(.level2)
+ translationLabel.textColor = .color(.level1)
// }
line.setNeedsLayout()
}
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
valueLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .right
}
}
originalLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.numberOfLines = 0
v.textAlignment = .left
}
translationLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
titleLabel.do { v in
v.text = "请输入手机号码".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
phoneView.do { v in
titleLabel.do { v in
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
}
codeView.do { v in
titleLabel.do { v in
v.text = "用户登录".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
phoneView.do { v in
// v.textField.text = "13480939445"
// backgroundColor = .red
addSubviews([toolView,thirdView])
toolView.addSubviews([registerLabel,pwdLabel,line1])
- line1.backgroundColor = .color(.secondary)
+ line1.backgroundColor = .color(.level2)
registerLabel.do { v in
v.text = "注册".l10n
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .center
v.yc.addTap(target: self, action: #selector(registerAction))
pwdLabel.do { v in
v.text = "忘记密码".l10n
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .center
v.yc.addTap(target: self, action: #selector(forgetAction))
titleLabel.do { v in
v.text = self.type == .forget ? "忘记密码".l10n:"重置密码".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
phoneView.do { v in
v.textField.attributedPlaceholder = NSAttributedString(string: "请输入手机号码/邮箱".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
titleLabel.do { v in
v.text = "用户登录".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
phoneView.do { v in
// v.textField.text = "13480939445"
titleLabel.do { v in
v.text = "用户注册".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
codeView.do { v in
titleLabel.do { v in
v.text = "请输入新的安全邮箱地址".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
phoneView.do { v in
v.textField.attributedPlaceholder = NSAttributedString(string: "请输入邮箱地址".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
titleLabel.do { v in
v.text = "请输入新的安全手机号码".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
phoneView.do { v in
titleLabel.do { v in
v.text = "验证码登录".l10n
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
codeView.do { v in
titleLabel.do { v in
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
}
codeView.do { v in
titleLabel.do { v in
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
}
codeView.do { v in
titleLabel.do { v in
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
}
codeView.do { v in
v.addTarget(self, action: #selector(agreeBtnAction), for: .touchUpInside)
}
agreeTitle.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "登录并同意".l10n
v.add(target: self, action: #selector(agreementAction))
}
andlabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = " 和 ".l10n
override func setupViews() {
// backgroundColor = .red
textField.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.keyboardType = .phonePad
v.attributedPlaceholder = NSAttributedString(string: "请输入验证码".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
}
func addRightLine(height:Float){
let line = UIView()
- line.backgroundColor = .color(.secondary)
+ line.backgroundColor = .color(.level2)
addSubview(line)
line.snp.makeConstraints { make in
make.height.equalTo(height)
// backgroundColor = .red
textField.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.keyboardType = .phonePad
v.attributedPlaceholder = NSAttributedString(string: "请输入手机号码".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
let label = UILabel()
- label.textColor = .color(.secondary)
+ label.textColor = .color(.level2)
label.font = .medium(16)
let imageAtt = NSTextAttachment()
imageAtt.image = UIImage(named: "arrow_next")
tipsLabel.do { v in
v.numberOfLines = 0
v.font = .medium(22)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
let text = "您好, \n欢迎使用DeepChords".l10n
let stype = NSMutableParagraphStyle()
stype.lineSpacing = 10
// backgroundColor = .red
addSubviews([toolView,thirdView])
toolView.addSubviews([registerLabel,pwdLabel,smsLabel,line1,line2])
- line1.backgroundColor = .color(.secondary)
- line2.backgroundColor = .color(.secondary)
+ line1.backgroundColor = .color(.level2)
+ line2.backgroundColor = .color(.level2)
registerLabel.do { v in
v.text = "注册".l10n
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .center
v.yc.addTap(target: self, action: #selector(registerAction))
}
pwdLabel.do { v in
v.text = "忘记密码".l10n
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .center
v.yc.addTap(target: self, action: #selector(forgetAction))
}
smsLabel.do { v in
v.text = "验证码登录".l10n
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.yc.addTap(target: self, action: #selector(smsAction))
label.do { v in
v.text = "其他登录方式".l10n
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .center
}
// backgroundColor = .red
textField.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.keyboardType = .default
v.attributedPlaceholder = NSAttributedString(string: "请输入密码".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
v.isSecureTextEntry = true
inputBgView.yc.addTap(target: self, action: #selector(tapAction))
titleLabel.do { v in
v.text = "国家/地区".l10n
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .medium(16)
v.textAlignment = .center
}
valeLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(16)
v.textAlignment = .center
}
v.yc.setBorder(width: 1.5, color: .white, radius: 8)
}
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.text = "当前版本".l10n + ":\(Bundle.main.appVersion ?? "") "
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = CustomSectionHeader.header(withTableView: tableView)
view.titleLabel.text = list[section].title
- view.titleLabel.textColor = .color(.secondary)
+ view.titleLabel.textColor = .color(.level2)
return view
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
v.backgroundColor = .black.withAlphaComponent(0.1)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(20)
v.textAlignment = .left
}
valueLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
}
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
valueLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(14)
v.textAlignment = .right
}
v.layer.masksToBounds = true
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
v.textAlignment = .left
v.text = "Deep Gen2 Max"
titleLabel.do { v in
v.textAlignment = .center
v.font = .bold(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.text = "联系方式".l10n
}
bgView.do { v in
v.font = .regular(14)
v.returnKeyType = .done
v.delegate = self
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
}
titleLabel.do { v in
v.textAlignment = .center
v.font = .bold(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.text = "问题描述或建议".l10n
}
bgView.do { v in
titleLabel.do { v in
v.textAlignment = .center
v.font = .bold(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.text = "问题类型".l10n
}
errorItem.do { v in
backgroundColor = .color(.theme)
}
else{
- titleLabel.textColor = .color(.first)
+ titleLabel.textColor = .color(.level1)
backgroundColor = .color(.bgColor)
}
}
v.textAlignment = .center
v.adjustsFontSizeToFitWidth = true
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.yc.setCornerRadius(6)
}
}
// v.backgroundColor = .green
}
line.do { v in
- v.backgroundColor = .color(.secondary)
+ v.backgroundColor = .color(.level2)
}
chatItem.do { v in
icon.do { v in
}
titleLabel.do { v in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(16)
}
}
v.yc.setCornerRadius(8)
}
nameLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(16)
v.textAlignment = .left
v.lineBreakMode = .byTruncatingTail
}
contentLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.lineBreakMode = .byTruncatingTail
}
timeLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .right
}
override func setupViews() {
backgroundColor = .color(.bgColor)
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(18)
v.textAlignment = .left
v.lineBreakMode = .byTruncatingTail
v.clearButtonMode = .whileEditing
v.backgroundColor = .clear
v.attributedPlaceholder = NSAttributedString(string: "请输入型号查询".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.returnKeyType = .done
v.delegate = self
v.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged)
v.text = "移除设备后会同步退出账号,在此设备上将无法访问该账号的数据".l10n
v.textAlignment = .left
v.font = .regular(12)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.numberOfLines = 0
}
}
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
v.text = "录音结束后提示重命名".l10n
}
detailLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(10)
v.textAlignment = .left
v.text = "关闭后自动命名并保存".l10n
}
titleLabel.do { (v) in
v.text = "系统权限管理".l10n
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
titleLabel.do { v in
v.font = .medium(18)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
}
codeView.do { v in
label.do { v in
v.font = .regular(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.numberOfLines = 0
var text = ""
if CCDevice.isJoy{
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(14)
v.textAlignment = .left
}
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(26)
v.textAlignment = .left
}
deviceLabel.do { (v) in
v.backgroundColor = .color(.cellBg)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .center
v.yc.setCornerRadius(15)
v.image = UIImage(named: "mine_cloud")
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(14)
v.textAlignment = .left
v.text = ""
}
nameLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.text = "云储存空间".l10n
v.text = "当前版本".l10n
v.textAlignment = .center
v.font = .regular(16)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
}
btn.do { v in
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
valueLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .right
}
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
valueLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .right
}
}
titleLabel.do { v in
v.text = "音效风格".l10n
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.textAlignment = .left
v.font = .regular(14)
}
unitLabel.do { v in
v.text = "dp"
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.textAlignment = .left
v.font = .regular(12)
}
valueLabel1.do { v in
v.text = "+12"
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.textAlignment = .left
v.font = .regular(12)
}
valueLabel2.do { v in
v.text = "0"
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.textAlignment = .left
v.font = .regular(12)
}
valueLabel3.do { v in
v.text = "-12"
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.textAlignment = .left
v.font = .regular(12)
}
}
titleLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.textAlignment = .center
v.font = .regular(12)
v.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2)
}
valueLabel.do { v in
v.text = "0"
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.textAlignment = .center
v.font = .regular(12)
v.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2)
titleLabel.do { v in
v.text = CCBleManager.shared.connectPeripheral?.device.name ?? ""
v.font = .regular(20)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
desLabel.do { v in
v.text = "耳机在附近,可通过响铃进行查找".l10n
v.font = .regular(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
}
leftBtn.do { v in
}
else{
backgroundColor = .color(.cellBg)
- titleLabel.textColor = .color(.first)
+ titleLabel.textColor = .color(.level1)
valueLabel.backgroundColor = .color(.theme)
valueLabel.textColor = .white
}
titleLabel.do { v in
v.text = CCBleManager.shared.connectPeripheral?.device.name ?? ""
v.font = .regular(20)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
desLabel.do { v in
v.text = "眼镜在附近,可通过响铃进行查找".l10n
v.font = .regular(14)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
}
btn.do { v in
}
else{
backgroundColor = .color(.cellBg)
- titleLabel.textColor = .color(.first)
+ titleLabel.textColor = .color(.level1)
valueLabel.backgroundColor = .color(.theme)
valueLabel.textColor = .white
}
addSubviews([titleLabel])
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.text = "环境声音控制".l10n
}
imgBg.backgroundColor = .color(.theme)
}
else{
- titleLabel.textColor = .color(.secondary)
+ titleLabel.textColor = .color(.level2)
imgBg.backgroundColor = .color(.bgColor)
}
}
v.contentMode = .center
}
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
}
}
addSubviews([titleLabel])
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.text = "EQ调音".l10n
}
titleLabel.do { v in
v.text = CCDevice.isJoy ? "查找耳机".l10n:"查找眼镜".l10n
v.font = .bold(16)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
}
}
originalLabel.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.numberOfLines = 0
v.textAlignment = .left
}
}
else{
bgView.backgroundColor = .color(.cellBg)
- originalLabel.textColor = .color(.first)
+ originalLabel.textColor = .color(.level1)
icon.image = CCDevice.isJoy ? UIImage(named: "logo_2"):UIImage(named: "logo_4")
icon.snp.remakeConstraints { make in
make.size.equalTo(36)
startBtn.do { v in
v.yc.setCornerRadius(16)
v.backgroundColor = .color(.cellBg)
- v.setTitleColor(.color(.first), for: .normal)
+ v.setTitleColor(.color(.level1), for: .normal)
v.titleLabel?.font = .bold(16)
v.setTitle("开始对话".l10n, for: .normal)
v.addTarget(self, action: #selector(startBtnAction), for: .touchUpInside)
endBtn.do { v in
v.yc.setCornerRadius(16)
v.backgroundColor = .color(.cellBg)
- v.setTitleColor(.color(.first), for: .normal)
- v.setTitleColor(.color(.secondary), for: .highlighted)
+ v.setTitleColor(.color(.level1), for: .normal)
+ v.setTitleColor(.color(.level2), for: .highlighted)
v.titleLabel?.font = .bold(16)
v.setTitle("结束对话".l10n, for: .normal)
v.addTarget(self, action: #selector(endBtnAction), for: .touchUpInside)
interruptBtn.do { v in
v.yc.setCornerRadius(16)
v.backgroundColor = .color(.cellBg)
- v.setTitleColor(.color(.first), for: .normal)
- v.setTitleColor(.color(.secondary), for: .highlighted)
+ v.setTitleColor(.color(.level1), for: .normal)
+ v.setTitleColor(.color(.level2), for: .highlighted)
v.titleLabel?.font = .bold(16)
v.setTitle("打断".l10n, for: .normal)
v.addTarget(self, action: #selector(interruptBtnAction), for: .touchUpInside)
nameLabel.do { v in
v.text = "远山"
v.font = .bold(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
tagLabel.do { v in
v.text = "旋律"
v.font = .regular(12)
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
}
musicView.do { v in
v.yc.setCornerRadius(6)
navBar.title = "白噪音".l10n
view.backgroundColor = .color(.bgColor)
segmentedView.do { (v) in
- segmentedDataSource.titleNormalColor = .color(.secondary)
- segmentedDataSource.titleSelectedColor = .color(.first)
+ segmentedDataSource.titleNormalColor = .color(.level2)
+ segmentedDataSource.titleSelectedColor = .color(.level1)
segmentedDataSource.titleNormalFont = .regular(14)
segmentedDataSource.titleSelectedFont = .bold(16)
segmentedDataSource.isTitleZoomEnabled = true
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
valueLabel.do { v in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .right
v.adjustsFontSizeToFitWidth = true
}
else if style == .theme3 {
layer.cornerRadius = 12
- setTitleColor(.color(.first), for: .normal)
+ setTitleColor(.color(.level1), for: .normal)
backgroundColor = .color(.cellBg)
titleLabel?.font = .regular(14)
}
}
else if style == .theme3 {
layer.cornerRadius = 12
- setTitleColor(.color(.first), for: .normal)
+ setTitleColor(.color(.level1), for: .normal)
backgroundColor = .color(.cellBg)
titleLabel?.font = .regular(14)
}
setTitleColor(.white, for: .normal)
backgroundColor = .clear
layer.borderWidth = 1.4
- layer.borderColor = UIColor.color(.first).cgColor
+ layer.borderColor = UIColor.color(.level1).cgColor
}
}
}
label.do { v in
v.backgroundColor = .clear
v.textAlignment = .center
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(16)
}
textView.do { v in
v.isEditable = false
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.backgroundColor = .clear
v.contentInset = UIEdgeInsets(top: 18, left: 18, bottom: 18, right: 18)
}
textView.do { v in
v.isEditable = true
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.backgroundColor = .clear
v.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
// v.backgroundColor = .green
v.attributedPlaceholder = NSAttributedString(string: "请输入...".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
v.returnKeyType = .done
v.delegate = self
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
addSubview(bgView)
v.image = UIImage(named: "home_header")
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(20)
v.textAlignment = .center
v.text = CCBleManager.shared.connectPeripheral?.device.name ?? ""
}
desLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(24)
v.textAlignment = .center
v.text = "连接成功"
super.setupStyle()
contentView.backgroundColor = .color(.cellBg)
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .semiBold(16)
v.textAlignment = .center
v.text = title
var enable:Bool = true{
didSet{
if enable{
- titleLabel.textColor = .color(.first)
+ titleLabel.textColor = .color(.level1)
}
else{
- titleLabel.textColor = .color(.secondary)
+ titleLabel.textColor = .color(.level2)
}
}
}
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
super.setupStyle()
contentView.backgroundColor = .color(.cellBg)
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .semiBold(16)
v.textAlignment = .center
v.text = title
super.setupStyle()
contentView.backgroundColor = .color(.cellBg)
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .semiBold(16)
v.textAlignment = .center
v.text = title
super.setupStyle()
contentView.backgroundColor = .color(.cellBg)
titleLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .semiBold(16)
v.textAlignment = .center
v.text = title
var enable:Bool = true{
didSet{
if enable{
- titleLabel.textColor = .color(.first)
+ titleLabel.textColor = .color(.level1)
}
else{
- titleLabel.textColor = .color(.secondary)
+ titleLabel.textColor = .color(.level2)
}
}
}
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
detailLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(10)
v.textAlignment = .left
}
v.backgroundColor = .clear
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .semiBold(24)
v.textAlignment = .left
v.text = "团队玩法说明".l10n
}
titleLabel1.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(16)
v.textAlignment = .left
v.text = "运动团队是什么?".l10n
attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: text.count))
v.attributedText = attributedString
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .medium(14)
v.textAlignment = .left
v.numberOfLines = 0
v.image = UIImage(named: "group_des")
}
titleLabel2.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .medium(16)
v.textAlignment = .left
v.text = "团队玩法有什么?".l10n
attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: text.count))
v.attributedText = attributedString
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .medium(14)
v.textAlignment = .left
v.numberOfLines = 0
// backgroundColor = .blue
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .semiBold(16)
v.textAlignment = .center
v.text = "请选择语言".l10n
label.yc.setBorder(width: 1.5, color: .color(.theme), radius: 9)
}
else{
- label.textColor = .color(.first)
- label.yc.setBorder(width: 1.5, color: .color(.first), radius: 9)
+ label.textColor = .color(.level1)
+ label.yc.setBorder(width: 1.5, color: .color(.level1), radius: 9)
}
}
}
var enable:Bool = true{
didSet{
if enable{
- titleLabel.textColor = .color(.first)
+ titleLabel.textColor = .color(.level1)
}
else{
titleLabel.textColor = .color(.level3)
v.backgroundColor = .color(.cellBg)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
icon.image = UIImage(named: "cloud_upload")
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(14)
v.textAlignment = .left
}
storageLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .regular(14)
v.textAlignment = .left
}
nameLabel.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(14)
v.textAlignment = .left
v.text = "云储存空间".l10n
make.center.equalToSuperview()
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(20)
v.textAlignment = .center
v.text = "已成功更新到云储存空间".l10n
addSubviews([label,icon])
label.do { v in
v.font = .regular(14)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
icon.do { v in
}
progressLabel.do { v in
v.text = "00:00"
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.textAlignment = .center
v.font = .regular(12)
}
make.center.equalToSuperview()
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(20)
v.textAlignment = .center
v.text = "播放录音".l10n
make.centerY.equalToSuperview().offset(-60)
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .bold(20)
v.textAlignment = .center
v.text = "保存录音".l10n
v.text = Date().format(.full3)
v.attributedPlaceholder = NSAttributedString(string: "请输入录音名字".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
v.font = .bold(16)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
// v.becomeFirstResponder()
}
cancelButton.do { (v) in
v.setTitle("取消".l10n, for: .normal)
v.titleLabel?.font = .bold(16)
- v.setTitleColor(.color(.first), for: .normal)
+ v.setTitleColor(.color(.level1), for: .normal)
v.backgroundColor = .color(.bgColor)
v.addTarget(self, action: #selector(cancelButtonAction), for: .touchUpInside)
v.yc.setCornerRadius(12)
addSubviews([label])
label.do { v in
v.font = .regular(16)
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
}
v.backgroundColor = .clear
}
titleLabel.do { (v) in
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .semiBold(16)
v.textAlignment = .center
v.text = tipsType.title
attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: text.count))
v.attributedText = attributedString
- v.textColor = .color(.first)
+ v.textColor = .color(.level1)
v.font = .semiBold(16)
v.textAlignment = .center
v.numberOfLines = 0
v.setImage(UIImage(named: "tip_selected"), for: .selected)
}
agreeTitle.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "下次不再提示".l10n
v.setImage(UIImage(named: "tip_selected"), for: .selected)
}
agreeTitle.do { (v) in
- v.textColor = .color(.secondary)
+ v.textColor = .color(.level2)
v.font = .regular(12)
v.textAlignment = .left
v.text = "下次不再提示".l10n
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleURLTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>CFBundleURLName</key>
- <string>weixin</string>
- <key>CFBundleURLSchemes</key>
- <array>
- <string>wxf19317f23b00d8ab</string>
- </array>
- </dict>
- </array>
- <key>LSApplicationQueriesSchemes</key>
- <array>
- <string>weixin</string>
- <string>weixinURLParamsAPI</string>
- <string>weixinULAPI</string>
- </array>
- <key>NSAppTransportSecurity</key>
- <dict>
- <key>NSAllowsArbitraryLoads</key>
- <true/>
- </dict>
- <key>UIApplicationSceneManifest</key>
- <dict>
- <key>UIApplicationSupportsMultipleScenes</key>
- <false/>
- <key>UISceneConfigurations</key>
- <dict>
- <key>UIWindowSceneSessionRoleApplication</key>
- <array>
- <dict>
- <key>UISceneConfigurationName</key>
- <string>Default Configuration</string>
- <key>UISceneDelegateClassName</key>
- <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
- <key>UISceneStoryboardFile</key>
- <string>Main</string>
- </dict>
- </array>
- </dict>
- </dict>
- <key>UIBackgroundModes</key>
- <array>
- <string>bluetooth-peripheral</string>
- <string>bluetooth-central</string>
- <string>audio</string>
- </array>
- <key>UIViewControllerBasedStatusBarAppearance</key>
- <true/>
-</dict>
-</plist>