XQMuse.xcodeproj/project.pbxproj
@@ -45,6 +45,10 @@ 1324A64D2C80706700AA5098 /* PlanGuide_1_VC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1324A64B2C80706700AA5098 /* PlanGuide_1_VC.xib */; }; 13271D852C75EF8200DE1328 /* AddBankInfoVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13271D842C75EF8200DE1328 /* AddBankInfoVC.xib */; }; 13271D862C75EF8200DE1328 /* AddBankInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13271D832C75EF8200DE1328 /* AddBankInfoVC.swift */; }; 1327C67D2C81C288005DA44B /* PlanGuidePromptSupplyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1327C67C2C81C288005DA44B /* PlanGuidePromptSupplyView.swift */; }; 1327C67F2C81C28F005DA44B /* PlanGuidePromptSupplyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1327C67E2C81C28F005DA44B /* PlanGuidePromptSupplyView.xib */; }; 1327C6822C81D107005DA44B /* PlanGuide_3_VC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1327C6802C81D107005DA44B /* PlanGuide_3_VC.swift */; }; 1327C6832C81D107005DA44B /* PlanGuide_3_VC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1327C6812C81D107005DA44B /* PlanGuide_3_VC.xib */; }; 132C40292C816003002E3270 /* SourceHanSerifCN-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 132C40282C816002002E3270 /* SourceHanSerifCN-Medium.otf */; }; 132DB8FE2C74826D00EF33A7 /* SettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 132DB8FC2C74826D00EF33A7 /* SettingVC.swift */; }; 132DB8FF2C74826D00EF33A7 /* SettingVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 132DB8FD2C74826D00EF33A7 /* SettingVC.xib */; }; @@ -177,6 +181,8 @@ 139C16602C6A0FBB00A924D9 /* TestLeftRightCollectionViewFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 139C165F2C6A0FBB00A924D9 /* TestLeftRightCollectionViewFlowLayout.swift */; }; 139C16632C6A108A00A924D9 /* HomeRelaxBannerCCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 139C16612C6A108A00A924D9 /* HomeRelaxBannerCCell.swift */; }; 139C16642C6A108A00A924D9 /* HomeRelaxBannerCCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139C16622C6A108A00A924D9 /* HomeRelaxBannerCCell.xib */; }; 139F1F602C81AE840055CE8F /* PlanGuidePromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 139F1F5F2C81AE840055CE8F /* PlanGuidePromptView.swift */; }; 139F1F622C81AE920055CE8F /* PlanGuidePromptView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139F1F612C81AE920055CE8F /* PlanGuidePromptView.xib */; }; 13A0A89E2C746A8700DF08B6 /* CommonAlertSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A0A89C2C746A8600DF08B6 /* CommonAlertSheetView.swift */; }; 13A0A89F2C746A8700DF08B6 /* CommonAlertSheetView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13A0A89D2C746A8700DF08B6 /* CommonAlertSheetView.xib */; }; 13A0A8A22C746AE600DF08B6 /* Enums.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13A0A8A12C746AE600DF08B6 /* Enums.swift */; }; @@ -198,6 +204,7 @@ 13B021DB2C75DD0600414769 /* BankWithdrawVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B021DA2C75DD0600414769 /* BankWithdrawVC.xib */; }; 13B021DC2C75DD0600414769 /* BankWithdrawVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13B021D92C75DD0600414769 /* BankWithdrawVC.swift */; }; 13B06A082C78A0D300477FA9 /* apngb-animated.png in Resources */ = {isa = PBXBuildFile; fileRef = 13B06A072C78A0D300477FA9 /* apngb-animated.png */; }; 13BA27132C81B6DD006D4CD1 /* SourceHanSerifCN-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 13BA27122C81B6DD006D4CD1 /* SourceHanSerifCN-Light.otf */; }; 13BF65D82C80402500E20F0E /* bg_movie.mov in Resources */ = {isa = PBXBuildFile; fileRef = 13BF65D72C80402500E20F0E /* bg_movie.mov */; }; 13BF65DC2C80407600E20F0E /* PlanGuideVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BF65DA2C80407600E20F0E /* PlanGuideVC.swift */; }; 13BF65DD2C80407600E20F0E /* PlanGuideVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13BF65DB2C80407600E20F0E /* PlanGuideVC.xib */; }; @@ -283,6 +290,10 @@ 1324A64B2C80706700AA5098 /* PlanGuide_1_VC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlanGuide_1_VC.xib; sourceTree = "<group>"; }; 13271D832C75EF8200DE1328 /* AddBankInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddBankInfoVC.swift; sourceTree = "<group>"; }; 13271D842C75EF8200DE1328 /* AddBankInfoVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddBankInfoVC.xib; sourceTree = "<group>"; }; 1327C67C2C81C288005DA44B /* PlanGuidePromptSupplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanGuidePromptSupplyView.swift; sourceTree = "<group>"; }; 1327C67E2C81C28F005DA44B /* PlanGuidePromptSupplyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlanGuidePromptSupplyView.xib; sourceTree = "<group>"; }; 1327C6802C81D107005DA44B /* PlanGuide_3_VC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanGuide_3_VC.swift; sourceTree = "<group>"; }; 1327C6812C81D107005DA44B /* PlanGuide_3_VC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlanGuide_3_VC.xib; sourceTree = "<group>"; }; 132C40282C816002002E3270 /* SourceHanSerifCN-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SourceHanSerifCN-Medium.otf"; sourceTree = "<group>"; }; 132DB8FC2C74826D00EF33A7 /* SettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingVC.swift; sourceTree = "<group>"; }; 132DB8FD2C74826D00EF33A7 /* SettingVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SettingVC.xib; sourceTree = "<group>"; }; @@ -417,6 +428,8 @@ 139C165F2C6A0FBB00A924D9 /* TestLeftRightCollectionViewFlowLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestLeftRightCollectionViewFlowLayout.swift; sourceTree = "<group>"; }; 139C16612C6A108A00A924D9 /* HomeRelaxBannerCCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeRelaxBannerCCell.swift; sourceTree = "<group>"; }; 139C16622C6A108A00A924D9 /* HomeRelaxBannerCCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeRelaxBannerCCell.xib; sourceTree = "<group>"; }; 139F1F5F2C81AE840055CE8F /* PlanGuidePromptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanGuidePromptView.swift; sourceTree = "<group>"; }; 139F1F612C81AE920055CE8F /* PlanGuidePromptView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlanGuidePromptView.xib; sourceTree = "<group>"; }; 13A0A89C2C746A8600DF08B6 /* CommonAlertSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommonAlertSheetView.swift; sourceTree = "<group>"; }; 13A0A89D2C746A8700DF08B6 /* CommonAlertSheetView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CommonAlertSheetView.xib; sourceTree = "<group>"; }; 13A0A8A12C746AE600DF08B6 /* Enums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Enums.swift; sourceTree = "<group>"; }; @@ -438,6 +451,7 @@ 13B021D92C75DD0600414769 /* BankWithdrawVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankWithdrawVC.swift; sourceTree = "<group>"; }; 13B021DA2C75DD0600414769 /* BankWithdrawVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BankWithdrawVC.xib; sourceTree = "<group>"; }; 13B06A072C78A0D300477FA9 /* apngb-animated.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "apngb-animated.png"; sourceTree = "<group>"; }; 13BA27122C81B6DD006D4CD1 /* SourceHanSerifCN-Light.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "SourceHanSerifCN-Light.otf"; sourceTree = "<group>"; }; 13BF65D72C80402500E20F0E /* bg_movie.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = bg_movie.mov; sourceTree = "<group>"; }; 13BF65DA2C80407600E20F0E /* PlanGuideVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanGuideVC.swift; sourceTree = "<group>"; }; 13BF65DB2C80407600E20F0E /* PlanGuideVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PlanGuideVC.xib; sourceTree = "<group>"; }; @@ -670,6 +684,7 @@ 137175C42C6C3C2100B38EF1 /* Fonts */ = { isa = PBXGroup; children = ( 13BA27122C81B6DD006D4CD1 /* SourceHanSerifCN-Light.otf */, 132C40282C816002002E3270 /* SourceHanSerifCN-Medium.otf */, 1324A6472C80632500AA5098 /* SourceHanSerifCN-Regular.otf */, 1324A6462C80632400AA5098 /* SourceHanSerifCN-Semibold.otf */, @@ -957,6 +972,17 @@ path = TCell; sourceTree = "<group>"; }; 139F1F5E2C81AD570055CE8F /* View */ = { isa = PBXGroup; children = ( 139F1F5F2C81AE840055CE8F /* PlanGuidePromptView.swift */, 139F1F612C81AE920055CE8F /* PlanGuidePromptView.xib */, 1327C67C2C81C288005DA44B /* PlanGuidePromptSupplyView.swift */, 1327C67E2C81C28F005DA44B /* PlanGuidePromptSupplyView.xib */, ); path = View; sourceTree = "<group>"; }; 13A0A8A02C746ADA00DF08B6 /* Enums */ = { isa = PBXGroup; children = ( @@ -983,12 +1009,15 @@ 13BF65D92C80404C00E20F0E /* Plans */ = { isa = PBXGroup; children = ( 139F1F5E2C81AD570055CE8F /* View */, 13BF65DA2C80407600E20F0E /* PlanGuideVC.swift */, 13BF65DB2C80407600E20F0E /* PlanGuideVC.xib */, 1324A64A2C80706700AA5098 /* PlanGuide_1_VC.swift */, 1324A64B2C80706700AA5098 /* PlanGuide_1_VC.xib */, 13E4ECEC2C80778A0095AD04 /* PlanGuide_2_VC.swift */, 13E4ECED2C80778A0095AD04 /* PlanGuide_2_VC.xib */, 1327C6802C81D107005DA44B /* PlanGuide_3_VC.swift */, 1327C6812C81D107005DA44B /* PlanGuide_3_VC.xib */, ); path = Plans; sourceTree = "<group>"; @@ -1153,6 +1182,7 @@ 13A37A012C75C1DE0038D5C8 /* LevelVC.xib in Resources */, 1324A6452C805B4000AA5098 /* FlyFlowerSong.otf in Resources */, 130C07092C76D51900ADB098 /* SpendingDetailHeaderVC.xib in Resources */, 1327C6832C81D107005DA44B /* PlanGuide_3_VC.xib in Resources */, 138FE0DF2C757B2A00A964E8 /* BindPhone_1_VC.xib in Resources */, 13FB6D842C6EEFE900A0685D /* MenuListTCell.xib in Resources */, 13B06A082C78A0D300477FA9 /* apngb-animated.png in Resources */, @@ -1195,6 +1225,7 @@ 1300BD3B2C6DFB1C000BCA5E /* VIPCenterVC.xib in Resources */, 139466482C6B8E0200F6FB15 /* UpdatePhoneVC.xib in Resources */, 134A453A2C6E167D00538D78 /* CourseOfficalCommendTopCCell.xib in Resources */, 13BA27132C81B6DD006D4CD1 /* SourceHanSerifCN-Light.otf in Resources */, 13271D852C75EF8200DE1328 /* AddBankInfoVC.xib in Resources */, 1377B40D2C6D936A00CF7CA5 /* CommentUserInputContentTCell.xib in Resources */, 137175CC2C6C412A00B38EF1 /* BackgroundVoiceVC.xib in Resources */, @@ -1212,8 +1243,10 @@ 13A0A8AE2C74757200DF08B6 /* MessageTCell.xib in Resources */, 1324A6482C80632500AA5098 /* SourceHanSerifCN-Semibold.otf in Resources */, 130913EA2C6DE33200418201 /* PaymentOrderResultVC.xib in Resources */, 139F1F622C81AE920055CE8F /* PlanGuidePromptView.xib in Resources */, 130ED7ED2C6AF05C00D0736E /* Home_Style_4_Inner_CCell.xib in Resources */, 137175C62C6C3C4700B38EF1 /* SourceHanSansCN-Regular.otf in Resources */, 1327C67F2C81C28F005DA44B /* PlanGuidePromptSupplyView.xib in Resources */, 131E75C42C6B87C500E2C85D /* ForgotPasswordChangeVC.xib in Resources */, 1333DC792C72D8C400D8ACAE /* CourseDetail_3_TCell.xib in Resources */, 13A659462C6F4B9E00F731FA /* CourseDetail_1_TCell.xib in Resources */, @@ -1303,6 +1336,7 @@ 137ECAD62C783C7700C338BE /* TreeTeskVC.swift in Sources */, 13FB6D802C6EED6000A0685D /* CourseMenuVC.swift in Sources */, 13985DBA2C69B8ED0046B6DC /* HomeVC.swift in Sources */, 1327C6822C81D107005DA44B /* PlanGuide_3_VC.swift in Sources */, 13FCCE262C75E8C400AC7E02 /* BankInfoTCell.swift in Sources */, 13985DAF2C69B7B00046B6DC /* BaseNav.swift in Sources */, 134A45352C6E0E0000538D78 /* CourseVCTeacherSpecialVC.swift in Sources */, @@ -1354,6 +1388,7 @@ 13A0A8AA2C74740800DF08B6 /* NoticeCenterVC.swift in Sources */, 13985DCC2C69E9FA0046B6DC /* PavilionVC.swift in Sources */, 138F0C322C7594BB0072A16C /* TreatyVC.swift in Sources */, 139F1F602C81AE840055CE8F /* PlanGuidePromptView.swift in Sources */, 13985DC42C69E0BF0046B6DC /* HomeTopMenuCCell.swift in Sources */, 1385E00A2C6C57A900AADB1F /* HomeItemDetailVC.swift in Sources */, 1333DC7C2C72E78F00D8ACAE /* CourseSendGiftView.swift in Sources */, @@ -1381,6 +1416,7 @@ 1377B40C2C6D936A00CF7CA5 /* CommentUserInputContentTCell.swift in Sources */, 13EA70042C75FA16005DF280 /* WalletRechargeVC.swift in Sources */, 1385DFFA2C6C4EBC00AADB1F /* RefreshModel.swift in Sources */, 1327C67D2C81C288005DA44B /* PlanGuidePromptSupplyView.swift in Sources */, 134CC7E12C73283700EAEFB7 /* PavilionSearchVC.swift in Sources */, 13EA70012C75F880005DF280 /* IdCardView.swift in Sources */, 135C2A682C7F033300CC2A67 /* CLFullScreenRightController.swift in Sources */, XQMuse/Assets.xcassets/Btns/btn_close_3.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "btn_close_3@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "btn_close_3@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } XQMuse/Assets.xcassets/Btns/btn_close_3.imageset/btn_close_3@2x.png
XQMuse/Assets.xcassets/Btns/btn_close_3.imageset/btn_close_3@3x.png
XQMuse/Assets.xcassets/Placeholder/bg_guide_1.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "bg_guide_1@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "bg_guide_1@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } XQMuse/Assets.xcassets/Placeholder/bg_guide_1.imageset/bg_guide_1@2x.png
XQMuse/Assets.xcassets/Placeholder/bg_guide_1.imageset/bg_guide_1@3x.png
XQMuse/Assets.xcassets/Placeholder/bg_prompt.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "bg_prompt@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "bg_prompt@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } XQMuse/Assets.xcassets/Placeholder/bg_prompt.imageset/bg_prompt@2x.png
XQMuse/Assets.xcassets/Placeholder/bg_prompt.imageset/bg_prompt@3x.png
XQMuse/Config/Fonts/SourceHanSerifCN-Light.otfBinary files differ
XQMuse/Config/Themes.swift
@@ -15,6 +15,11 @@ return UIFont(name: "SourceHanSansCN-Regular", size: fontSize) ?? .systemFont(ofSize: fontSize,weight: .medium) } func Def_SourceHanSerifCN_Light(fontSize:Double)->UIFont{ return UIFont(name: "SourceHanSerifCN-Light", size: fontSize) ?? .systemFont(ofSize: fontSize,weight: .medium) } func Def_Agenda_Light(fontSize:Double)->UIFont{ return UIFont(name: "Agenda-Light", size: fontSize) ?? .systemFont(ofSize: fontSize) } XQMuse/Info.plist
@@ -9,6 +9,7 @@ </dict> <key>UIAppFonts</key> <array> <string>SourceHanSerifCN-Light.otf</string> <string>SourceHanSansCN-Regular.otf</string> <string>Agenda-Light.otf</string> <string>FlyFlowerSong.otf</string> XQMuse/Root/Home/HomeVC.swift
@@ -30,8 +30,6 @@ titleItems.append(TitleItem(title: "放松助眠", subTitle: "与内心的宁静与喜悦入睡",hasMore:true)) titleItems.append(TitleItem(title: "放松助眠", subTitle: "与内心的宁静与喜悦入睡",hasMore:true)) titleItems.append(TitleItem(title: "放松助眠", subTitle: "与内心的宁静与喜悦入睡",hasMore:true)) // PayMusicVC.show() } override func setUI() { XQMuse/Root/Plans/PlanGuideVC.swift
@@ -19,7 +19,7 @@ @IBOutlet weak var label_subTitle: UILabel! @IBOutlet weak var label_info: UILabel! @IBOutlet weak var btn_custom: UIButton! private lazy var player:AVPlayer = { let bgPath = Bundle.main.url(forResource: "bg_movie", withExtension: "mov") let p = AVPlayer(url: bgPath!) @@ -33,10 +33,10 @@ return pLayer }() override func viewDidLoad() { super.viewDidLoad() override func viewDidLoad() { super.viewDidLoad() } } override func setUI() { @@ -75,7 +75,10 @@ self?.player.play() } NotificationCenter.default.rx.notification(PlantGuideQuit_Noti).take(until: self.rx.deallocated).subscribe(onNext: {daa in NotificationCenter.default.rx.notification(PlantGuideQuit_Noti).take(until: self.rx.deallocated).subscribe(onNext: {data in if data.object as? Bool == true{ } self.dismiss(animated: true) }).disposed(by: disposeBag) } @@ -87,9 +90,20 @@ @IBAction func backAction(_ sender: UIButton) { self.dismiss(animated: true) } @IBAction func customAction(_ sender: UIButton) { let vc = PlanGuide_1_VC() jq_push(vc: vc) PlanGuidePromptView.show { type in switch type { case .seeOther: let vc = PlanGuide_1_VC() self.jq_push(vc: vc) case .toSeting: self.dismiss(animated: true) { let vc = BackgroundVoiceVC() vc.hidesBottomBarWhenPushed = true JQ_currentNavigationController().pushViewController(vc) } } } } } XQMuse/Root/Plans/PlanGuide_2_VC.swift
@@ -30,8 +30,6 @@ questions.append("您是否沉迷情感倍受伤害?") questions.append("您是否人生迷茫踌躇彷徨?") questions.append("您是否内心纠结敏感多疑?") questions.append("其他") nextQuestion() } @@ -127,7 +125,10 @@ DispatchQueue.main.asyncAfter(delay: 1.8) { if self.questionIndex == self.questions.count - 1{ //todo PlanGuidePromptSupplyView.show { text in let vc = PlanGuide_3_VC() self.push(vc: vc) } }else{ self.nextQuestion() } XQMuse/Root/Plans/PlanGuide_3_VC.swift
New file @@ -0,0 +1,132 @@ // // PlanGuide_3_VC.swift // XQMuse // // Created by 无故事王国 on 2024/8/30. // import UIKit import JQTools class PlanGuide_3_VC: BaseVC { @IBOutlet weak var label_title: UILabel! @IBOutlet weak var btn_previous: UIButton! @IBOutlet weak var btn_next: UIButton! @IBOutlet weak var view_content: UIView! @IBOutlet weak var collectionVIew: UICollectionView! private var setIndex = Set<IndexPath>() private var items = [["原生家庭","亲子关系","夫妻关系"],["情感纠结","思念亲人","优质睡眠","提升能量"],["高维智慧","清理净化","情绪稳定"]] override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) let btn = navigationItem.leftBarButtonItem?.customView as! UIButton btn.isHidden = true } override func viewDidLoad() { super.viewDidLoad() } override func setUI() { label_title.font = Def_SourceHanSerif_Medium(fontSize: 16) label_title.textColor = UIColor(hexString: "#304D1F") btn_previous.titleLabel?.font = Def_SourceHanSerif_Medium(fontSize: 13) btn_next.titleLabel?.font = Def_SourceHanSerif_Medium(fontSize: 13) view_content.jq_gradientColor(colorArr: [UIColor(hexString: "#D2EDE4")!.cgColor,UIColor.white.withAlphaComponent(0.8).cgColor], cornerRadius: 20, startPoint: CGPoint(x: 0, y: 1), endPoint: CGPoint(x: 0, y: 0), bounds: nil, locations:nil) collectionVIew.delegate = self collectionVIew.dataSource = self collectionVIew.backgroundColor = .clear collectionVIew.register(Planguide_3_CCell.self, forCellWithReuseIdentifier: "cell") let flowLayout = EqualCellSpaceFlowLayout(.center, 5.5) flowLayout.headerReferenceSize = CGSize(width: JQ_ScreenW, height: 2) flowLayout.itemSize = CGSize(width: 75, height: 38) collectionVIew.collectionViewLayout = flowLayout } @IBAction func nextAction(_ sender: UIButton) { NotificationCenter.default.post(name: PlantGuideQuit_Noti, object: true) } @IBAction func previousAction(_ sender: UIButton) { self.navigationController?.popViewController() } @IBAction func backAction(_ sender: UIButton) { NotificationCenter.default.post(name: PlantGuideQuit_Noti, object: nil) } } extension PlanGuide_3_VC:UICollectionViewDelegate & UICollectionViewDataSource{ func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { if setIndex.contains(indexPath){ setIndex.remove(indexPath) }else{ setIndex.insert(indexPath) } collectionView.reloadData() } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return items[section].count } func numberOfSections(in collectionView: UICollectionView) -> Int { return items.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! Planguide_3_CCell cell.label_title.text = items[indexPath.section][indexPath.row] cell.isSelect(setIndex.contains(indexPath)) return cell } } class Planguide_3_CCell:UICollectionViewCell{ var label_title:UILabel! override init(frame: CGRect) { super.init(frame: frame) jq_cornerRadius = 20 jq_borderWidth = 0.8 jq_borderColor = UIColor(hexString: "#304D1F") label_title = UILabel() label_title.textColor = UIColor(hexString: "#304D1F") label_title.font = Def_SourceHanSerif_Medium(fontSize: 12) label_title.textAlignment = .center addSubview(label_title) label_title.snp.makeConstraints { make in make.edges.equalToSuperview() } } func isSelect(_ status:Bool){ if status{ label_title.textColor = .white label_title.backgroundColor = UIColor(hexString: "#5E9456") label_title.jq_borderWidth = 0 }else{ label_title.textColor = UIColor(hexString: "#304D1F") label_title.backgroundColor = .clear label_title.font = Def_SourceHanSerif_Medium(fontSize: 12) label_title.jq_borderWidth = 0.8 } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } XQMuse/Root/Plans/PlanGuide_3_VC.xib
New file @@ -0,0 +1,146 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina6_12" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PlanGuide_3_VC" customModule="XQMuse" customModuleProvider="target"> <connections> <outlet property="btn_next" destination="mjg-yw-BNT" id="pZm-MB-Fxd"/> <outlet property="btn_previous" destination="f0V-Ke-TXG" id="dxO-rv-rYT"/> <outlet property="collectionVIew" destination="EPg-5A-Whu" id="ieG-Ef-0tp"/> <outlet property="label_title" destination="zr7-aq-qYT" id="9XT-zw-qSm"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view_content" destination="brX-RP-UDe" id="TtU-Rr-3cj"/> </connections> </placeholder> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_guide_1" translatesAutoresizingMaskIntoConstraints="NO" id="4Xs-QJ-ZeM"> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="brX-RP-UDe"> <rect key="frame" x="0.0" y="442" width="393" height="410"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zr7-aq-qYT"> <rect key="frame" x="92.666666666666686" y="19.999999999999996" width="208" height="40.666666666666657"/> <string key="text">您在这方空间最想 解决和收获的是哪方面问题</string> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uDg-bP-wh9"> <rect key="frame" x="181.66666666666666" y="334" width="30" height="29"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="跳过"> <color key="titleColor" red="0.15686274509803921" green="0.15686274509803921" blue="0.15686274509803921" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <connections> <action selector="backAction:" destination="-1" eventType="touchUpInside" id="IAE-j0-MLR"/> </connections> </button> <stackView opaque="NO" contentMode="scaleToFill" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="yza-20-eYp"> <rect key="frame" x="31.666666666666657" y="274" width="330" height="40"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="f0V-Ke-TXG"> <rect key="frame" x="0.0" y="0.0" width="120" height="40"/> <constraints> <constraint firstAttribute="width" constant="120" id="fXc-Uf-tcc"/> </constraints> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="上一步"> <color key="titleColor" red="0.18823529411764706" green="0.30196078431372547" blue="0.12156862745098039" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="20"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="ld_borderColorXIB"> <color key="value" red="0.18823529411764706" green="0.30196078431372547" blue="0.12156862745098039" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="ld_borderWidthXIB"> <real key="value" value="1"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="previousAction:" destination="-1" eventType="touchUpInside" id="8SL-S4-p5e"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mjg-yw-BNT"> <rect key="frame" x="140" y="0.0" width="190" height="40"/> <color key="backgroundColor" red="0.36862745099999999" green="0.58039215690000001" blue="0.33725490200000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="190" id="MXa-mp-2t4"/> </constraints> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="选好了,进入下一步"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="20"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="nextAction:" destination="-1" eventType="touchUpInside" id="zlt-h4-xAd"/> </connections> </button> </subviews> <constraints> <constraint firstAttribute="height" constant="40" id="Wzf-in-EI3"/> </constraints> </stackView> <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="EPg-5A-Whu"> <rect key="frame" x="0.0" y="90.666666666666643" width="393" height="153.33333333333337"/> <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="04l-Xt-4og"> <size key="itemSize" width="128" height="128"/> <size key="headerReferenceSize" width="0.0" height="0.0"/> <size key="footerReferenceSize" width="0.0" height="0.0"/> <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> </collectionViewFlowLayout> </collectionView> </subviews> <constraints> <constraint firstItem="uDg-bP-wh9" firstAttribute="centerX" secondItem="brX-RP-UDe" secondAttribute="centerX" id="5OG-fi-LWT"/> <constraint firstAttribute="trailing" secondItem="EPg-5A-Whu" secondAttribute="trailing" id="7Fv-cR-9NY"/> <constraint firstItem="zr7-aq-qYT" firstAttribute="centerX" secondItem="brX-RP-UDe" secondAttribute="centerX" id="9Yd-KN-MXW"/> <constraint firstAttribute="height" constant="410" id="Cbr-uY-YXL"/> <constraint firstItem="yza-20-eYp" firstAttribute="top" secondItem="EPg-5A-Whu" secondAttribute="bottom" constant="30" id="DOh-xB-tm2"/> <constraint firstItem="uDg-bP-wh9" firstAttribute="top" secondItem="yza-20-eYp" secondAttribute="bottom" constant="20" id="E0T-dQ-D4I"/> <constraint firstItem="EPg-5A-Whu" firstAttribute="leading" secondItem="brX-RP-UDe" secondAttribute="leading" id="TEJ-ha-Dwf"/> <constraint firstAttribute="bottomMargin" secondItem="uDg-bP-wh9" secondAttribute="bottom" constant="5" id="TWJ-a0-R2h"/> <constraint firstItem="zr7-aq-qYT" firstAttribute="top" secondItem="brX-RP-UDe" secondAttribute="top" constant="20" id="VqA-il-plf"/> <constraint firstItem="EPg-5A-Whu" firstAttribute="top" secondItem="zr7-aq-qYT" secondAttribute="bottom" constant="30" id="Z4b-qz-WhM"/> <constraint firstItem="yza-20-eYp" firstAttribute="centerX" secondItem="brX-RP-UDe" secondAttribute="centerX" id="tKa-Tv-q5Z"/> </constraints> </view> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstAttribute="trailing" secondItem="4Xs-QJ-ZeM" secondAttribute="trailing" id="Scr-hQ-4rg"/> <constraint firstItem="4Xs-QJ-ZeM" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="TqB-FB-Fn6"/> <constraint firstItem="brX-RP-UDe" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Tqf-Js-ht6"/> <constraint firstItem="4Xs-QJ-ZeM" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="dgr-Sn-AqV"/> <constraint firstAttribute="trailing" secondItem="brX-RP-UDe" secondAttribute="trailing" id="lEh-z3-IMq"/> <constraint firstAttribute="bottom" secondItem="4Xs-QJ-ZeM" secondAttribute="bottom" id="yHl-IZ-ej5"/> <constraint firstAttribute="bottom" secondItem="brX-RP-UDe" secondAttribute="bottom" id="ygi-cR-p9N"/> </constraints> <point key="canvasLocation" x="140" y="21"/> </view> </objects> <resources> <image name="bg_guide_1" width="390" height="825"/> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> XQMuse/Root/Plans/View/PlanGuidePromptSupplyView.swift
New file @@ -0,0 +1,69 @@ // // PlanGuidePromptSupplyView.swift // XQMuse // // Created by 无故事王国 on 2024/8/30. // import UIKit import JQTools import QMUIKit class PlanGuidePromptSupplyView: UIView,JQNibView{ @IBOutlet weak var label_title: UILabel! @IBOutlet weak var view_content: UIView! @IBOutlet weak var textView: QMUITextView! @IBOutlet weak var btn_submit: UIButton! @IBOutlet weak var btn_close: UIButton! private var clouse:((String?)->Void)? override func awakeFromNib() { super.awakeFromNib() label_title.font = Def_FlyFlowerSong(fontSize: 24) textView.font = Def_SourceHanSerif_Regular(fontSize: 11) textView.placeholderColor = UIColor(hexStr: "#C7C7CC") view_content.transform = .init(scaleX: 0.1, y: 0.1) btn_submit.titleLabel?.font = Def_SourceHanSerif_Semibold(fontSize: 13) btn_close.alpha = 0 alpha = 0 layoutIfNeeded() } static func show(_ clouse:@escaping (String?)->Void){ let planGuidePromptView = PlanGuidePromptSupplyView.jq_loadNibView() sceneDelegate?.window?.addSubview(planGuidePromptView) planGuidePromptView.frame = sceneDelegate?.window?.frame ?? .zero planGuidePromptView.clouse = clouse UIView.animate(withDuration: 0.5) { planGuidePromptView.view_content.transform = .init(scaleX: 1.0, y: 1.0) planGuidePromptView.alpha = 1 }completion: { _ in UIView.animate(withDuration: 0.4) { planGuidePromptView.btn_close.alpha = 1 } } } private func closeAction(){ UIView.animate(withDuration: 0.5) { self.view_content.transform = .init(scaleX: 0.1, y: 0.1) self.alpha = 0 self.btn_close.alpha = 0 }completion: { _ in self.removeFromSuperview() } } @IBAction func submitAndNextAction(_ sender: UIButton) { clouse?("") closeAction() } @IBAction func nextAction(_ sender: UIButton) { clouse?(nil) closeAction() } } XQMuse/Root/Plans/View/PlanGuidePromptSupplyView.xib
New file @@ -0,0 +1,143 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina6_12" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="System colors in document resources" minToolsVersion="11.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="PlanGuidePromptSupplyView" customModule="XQMuse" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mUB-hL-I8J"> <rect key="frame" x="40" y="241.66666666666666" width="313" height="393.66666666666674"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="补充说明" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FPB-J6-cs1"> <rect key="frame" x="122" y="31.000000000000028" width="69.333333333333314" height="21"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" red="0.18823529411764706" green="0.30196078431372547" blue="0.12156862745098039" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qty-pc-XqY"> <rect key="frame" x="30" y="293.66666666666674" width="253" height="40"/> <color key="backgroundColor" red="0.36862745098039218" green="0.58039215686274503" blue="0.33725490196078434" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="40" id="VXh-8M-ahP"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="15"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="提交,并进入下一步"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="20"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="submitAndNextAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="9pF-2W-1qq"/> </connections> </button> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9MB-gE-Rrv"> <rect key="frame" x="30" y="79.333333333333329" width="253" height="184.33333333333337"/> <subviews> <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="mEd-rf-3JQ" customClass="QMUITextView"> <rect key="frame" x="6" y="6" width="241" height="172.33333333333334"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="textColor" systemColor="labelColor"/> <fontDescription key="fontDescription" type="system" pointSize="14"/> <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="请输入补充说明内容"/> </userDefinedRuntimeAttributes> </textView> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="mEd-rf-3JQ" firstAttribute="leading" secondItem="9MB-gE-Rrv" secondAttribute="leading" constant="6" id="MKZ-6y-e67"/> <constraint firstItem="mEd-rf-3JQ" firstAttribute="top" secondItem="9MB-gE-Rrv" secondAttribute="top" constant="6" id="Zxe-jf-cmb"/> <constraint firstAttribute="trailing" secondItem="mEd-rf-3JQ" secondAttribute="trailing" constant="6" id="vxw-qi-Ufv"/> <constraint firstAttribute="bottom" secondItem="mEd-rf-3JQ" secondAttribute="bottom" constant="6" id="yVs-OP-qWs"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="20"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="color" keyPath="ld_borderColorXIB"> <color key="value" red="0.93725490196078431" green="0.93725490196078431" blue="0.93725490196078431" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="ld_borderWidthXIB"> <real key="value" value="1"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </view> </subviews> <color key="backgroundColor" systemColor="systemBackgroundColor"/> <constraints> <constraint firstItem="FPB-J6-cs1" firstAttribute="top" secondItem="mUB-hL-I8J" secondAttribute="top" constant="31" id="7iq-y2-Z73"/> <constraint firstItem="9MB-gE-Rrv" firstAttribute="leading" secondItem="mUB-hL-I8J" secondAttribute="leading" constant="30" id="Csv-NB-iRa"/> <constraint firstItem="qty-pc-XqY" firstAttribute="top" secondItem="9MB-gE-Rrv" secondAttribute="bottom" constant="30" id="L6O-6e-iIK"/> <constraint firstItem="9MB-gE-Rrv" firstAttribute="top" secondItem="FPB-J6-cs1" secondAttribute="bottom" constant="27.5" id="Q0I-k5-nZR"/> <constraint firstAttribute="bottom" secondItem="qty-pc-XqY" secondAttribute="bottom" constant="60" id="Tde-KI-lar"/> <constraint firstAttribute="trailing" secondItem="9MB-gE-Rrv" secondAttribute="trailing" constant="30" id="VpI-XY-jr9"/> <constraint firstAttribute="width" secondItem="mUB-hL-I8J" secondAttribute="height" multiplier="1:1.2579" id="Xli-wH-KSO"/> <constraint firstItem="qty-pc-XqY" firstAttribute="trailing" secondItem="9MB-gE-Rrv" secondAttribute="trailing" id="Z67-Fy-xFS"/> <constraint firstItem="qty-pc-XqY" firstAttribute="leading" secondItem="9MB-gE-Rrv" secondAttribute="leading" id="acq-o0-zf1"/> <constraint firstItem="FPB-J6-cs1" firstAttribute="centerX" secondItem="mUB-hL-I8J" secondAttribute="centerX" id="s91-eg-vov"/> </constraints> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="25"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Gd-xz-7Zj"> <rect key="frame" x="183.66666666666666" y="670.33333333333337" width="25.666666666666657" height="25.666666666666629"/> <constraints> <constraint firstAttribute="width" constant="25.670000000000002" id="GPo-Dy-PLN"/> <constraint firstAttribute="height" constant="25.670000000000002" id="bmd-uv-wuA"/> </constraints> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" image="btn_close_3"/> <connections> <action selector="nextAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="9Mo-f3-CE0"/> </connections> </button> </subviews> <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="mUB-hL-I8J" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="40" id="Chq-7d-6Lg"/> <constraint firstItem="mUB-hL-I8J" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="HPR-3q-fHK"/> <constraint firstItem="6Gd-xz-7Zj" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="T6Z-60-DLb"/> <constraint firstItem="mUB-hL-I8J" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="hNo-Qz-VVV"/> <constraint firstItem="6Gd-xz-7Zj" firstAttribute="top" secondItem="mUB-hL-I8J" secondAttribute="bottom" constant="35" id="jcu-n0-xem"/> <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="mUB-hL-I8J" secondAttribute="trailing" constant="40" id="xiw-wL-otm"/> </constraints> <connections> <outlet property="btn_close" destination="6Gd-xz-7Zj" id="Zmd-8i-CQO"/> <outlet property="btn_submit" destination="qty-pc-XqY" id="6Eh-cW-6iR"/> <outlet property="label_title" destination="FPB-J6-cs1" id="pDX-rq-3J8"/> <outlet property="textView" destination="mEd-rf-3JQ" id="Q8F-1q-JaP"/> <outlet property="view_content" destination="mUB-hL-I8J" id="66n-m6-5eY"/> </connections> <point key="canvasLocation" x="65" y="21"/> </view> </objects> <resources> <image name="btn_close_3" width="25.666666030883789" height="25.666666030883789"/> <systemColor name="labelColor"> <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> <systemColor name="systemBackgroundColor"> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </systemColor> </resources> </document> XQMuse/Root/Plans/View/PlanGuidePromptView.swift
New file @@ -0,0 +1,76 @@ // // PlanGuidePromptView.swift // XQMuse // // Created by 无故事王国 on 2024/8/30. // import UIKit import JQTools class PlanGuidePromptView: UIView,JQNibView{ @IBOutlet weak var label_title: UILabel! @IBOutlet weak var label_content: UILabel! @IBOutlet weak var label_info: UILabel! @IBOutlet weak var btn_handle1: UIButton! @IBOutlet weak var btn_handle2: UIButton! @IBOutlet weak var view_content: UIView! private var clouse:((PlanGuideType)->Void)? enum PlanGuideType { case seeOther case toSeting } override func awakeFromNib() { super.awakeFromNib() view_content.transform = .init(scaleX: 0.1, y: 0.1) alpha = 0 label_title.font = Def_FlyFlowerSong(fontSize: 30) label_content.attributedText = AttributedStringbuilder.build().add(string: "您的专属冥想空间。请选择您喜欢的背景音乐,您喜欢的背景颜色,可伴随进入冥想空间的第一时间呈现在您的面前。", withFont: Def_SourceHanSerifCN_Light(fontSize: 15), withColor: UIColor(hexStr: "#3E3E3E"), lineSpace: 8).mutableAttributedString label_info.attributedText = AttributedStringbuilder.build().add(string: "(可以选择并跟随心境调整)", withFont: Def_SourceHanSerifCN_Light(fontSize: 14), withColor: UIColor(hexStr: "#3E3E3E"), lineSpace: 8).mutableAttributedString btn_handle1.titleLabel?.font = Def_SourceHanSerif_Semibold(fontSize: 14) btn_handle2.titleLabel?.font = Def_SourceHanSerif_Semibold(fontSize: 14) layoutIfNeeded() } static func show(_ clouse:@escaping (PlanGuideType)->Void){ let planGuidePromptView = PlanGuidePromptView.jq_loadNibView() sceneDelegate?.window?.addSubview(planGuidePromptView) planGuidePromptView.frame = sceneDelegate?.window?.frame ?? .zero planGuidePromptView.clouse = clouse UIView.animate(withDuration: 0.5) { planGuidePromptView.view_content.transform = .init(scaleX: 1.0, y: 1.0) planGuidePromptView.alpha = 1 } } private func closeAction(){ UIView.animate(withDuration: 0.5) { self.view_content.transform = .init(scaleX: 0.1, y: 0.1) self.alpha = 0 }completion: { _ in self.removeFromSuperview() } } @IBAction func seeOtherAction(_ sender: UIButton) { clouse?(.seeOther) closeAction() } @IBAction func setingAction(_ sender: UIButton) { clouse?(.toSeting) closeAction() } } XQMuse/Root/Plans/View/PlanGuidePromptView.xib
New file @@ -0,0 +1,140 @@ <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <device id="retina6_12" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="PlanGuidePromptView" customModule="XQMuse" customModuleProvider="target"> <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pe1-Qw-ELp"> <rect key="frame" x="40" y="228.66666666666666" width="313" height="419.66666666666674"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_prompt" translatesAutoresizingMaskIntoConstraints="NO" id="ofy-9d-MT2"> <rect key="frame" x="0.0" y="0.0" width="313" height="419.66666666666669"/> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="心泉之约" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k1J-jo-vT3"> <rect key="frame" x="103.66666666666666" y="65.000000000000028" width="105.66666666666666" height="31.333333333333329"/> <fontDescription key="fontDescription" type="system" pointSize="26"/> <color key="textColor" red="0.20784313725490194" green="0.40000000000000002" blue="0.1764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您的专属冥想空间。请选择您喜欢的背景音乐,您喜欢的背景颜色,可伴随进入冥想空间的第一时间呈现在您的面前。" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2j3-qG-fbB"> <rect key="frame" x="35" y="116.33333333333334" width="243" height="81.333333333333343"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(可以选择并跟随心境调整)" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z1Y-Ly-LdG"> <rect key="frame" x="52.333333333333329" y="207.66666666666666" width="208.33333333333337" height="20.333333333333343"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> <stackView opaque="NO" contentMode="scaleToFill" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="wKE-xG-drg"> <rect key="frame" x="26.666666666666686" y="329.66666666666674" width="260" height="40"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IdX-xL-DYx"> <rect key="frame" x="0.0" y="0.0" width="120" height="40"/> <constraints> <constraint firstAttribute="width" constant="120" id="r7P-Rb-neT"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="16"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="先看看"> <color key="titleColor" red="0.20784313725490194" green="0.40000000000000002" blue="0.1764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="color" keyPath="ld_borderColorXIB"> <color key="value" red="0.20784313725490194" green="0.40000000000000002" blue="0.1764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="number" keyPath="ld_borderWidthXIB"> <real key="value" value="1"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="20"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="seeOtherAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Sce-Ub-yZ2"/> </connections> </button> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KwU-lj-HW5"> <rect key="frame" x="140" y="0.0" width="120" height="40"/> <color key="backgroundColor" red="0.36862745098039218" green="0.58039215686274503" blue="0.33725490196078434" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="width" constant="120" id="Tnn-k8-j2g"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="16"/> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> <state key="normal" title="去设置"> <color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </state> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="boolean" keyPath="ld_maskToBoundsXIB" value="YES"/> <userDefinedRuntimeAttribute type="color" keyPath="ld_borderColorXIB"> <color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> </userDefinedRuntimeAttribute> <userDefinedRuntimeAttribute type="number" keyPath="ld_cornerRadiusXIB"> <real key="value" value="20"/> </userDefinedRuntimeAttribute> </userDefinedRuntimeAttributes> <connections> <action selector="setingAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="G8V-Ug-GG4"/> </connections> </button> </subviews> <constraints> <constraint firstAttribute="height" constant="40" id="nOE-ZY-Ctg"/> </constraints> </stackView> </subviews> <constraints> <constraint firstItem="wKE-xG-drg" firstAttribute="centerX" secondItem="ofy-9d-MT2" secondAttribute="centerX" id="CSq-RB-eN3"/> <constraint firstAttribute="bottom" secondItem="ofy-9d-MT2" secondAttribute="bottom" id="FlR-DM-mOA"/> <constraint firstItem="Z1Y-Ly-LdG" firstAttribute="top" secondItem="2j3-qG-fbB" secondAttribute="bottom" constant="10" id="Q4d-E0-8oo"/> <constraint firstAttribute="width" secondItem="Pe1-Qw-ELp" secondAttribute="height" multiplier="1:1.34" id="QNp-eT-9sX"/> <constraint firstItem="ofy-9d-MT2" firstAttribute="top" secondItem="Pe1-Qw-ELp" secondAttribute="top" id="X7D-qI-1Ln"/> <constraint firstAttribute="bottom" secondItem="wKE-xG-drg" secondAttribute="bottom" constant="50" id="a9I-FO-f6b"/> <constraint firstAttribute="trailing" secondItem="ofy-9d-MT2" secondAttribute="trailing" id="co0-u4-qHU"/> <constraint firstAttribute="trailing" secondItem="2j3-qG-fbB" secondAttribute="trailing" constant="35" id="dml-7w-krQ"/> <constraint firstItem="2j3-qG-fbB" firstAttribute="top" secondItem="k1J-jo-vT3" secondAttribute="bottom" constant="20" id="fh3-F7-PVJ"/> <constraint firstItem="Z1Y-Ly-LdG" firstAttribute="centerX" secondItem="k1J-jo-vT3" secondAttribute="centerX" id="lhU-Ud-g9g"/> <constraint firstItem="k1J-jo-vT3" firstAttribute="centerX" secondItem="ofy-9d-MT2" secondAttribute="centerX" id="mbm-yp-ZEt"/> <constraint firstItem="k1J-jo-vT3" firstAttribute="top" secondItem="Pe1-Qw-ELp" secondAttribute="top" constant="65" id="pnq-PT-QIe"/> <constraint firstItem="2j3-qG-fbB" firstAttribute="leading" secondItem="Pe1-Qw-ELp" secondAttribute="leading" constant="35" id="xU4-6v-di8"/> <constraint firstItem="ofy-9d-MT2" firstAttribute="leading" secondItem="Pe1-Qw-ELp" secondAttribute="leading" id="ze4-IJ-lCT"/> </constraints> </view> </subviews> <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="Pe1-Qw-ELp" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="18R-Ve-8Lv"/> <constraint firstItem="Pe1-Qw-ELp" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="40" id="PzZ-fY-a5w"/> <constraint firstAttribute="trailing" secondItem="Pe1-Qw-ELp" secondAttribute="trailing" constant="40" id="XVS-HC-Ii6"/> <constraint firstItem="Pe1-Qw-ELp" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="mPs-oe-mrU"/> </constraints> <connections> <outlet property="btn_handle1" destination="IdX-xL-DYx" id="hhJ-eg-mkU"/> <outlet property="btn_handle2" destination="KwU-lj-HW5" id="AFB-iG-ozj"/> <outlet property="label_content" destination="2j3-qG-fbB" id="qAV-Ad-WOL"/> <outlet property="label_info" destination="Z1Y-Ly-LdG" id="0um-ai-MBB"/> <outlet property="label_title" destination="k1J-jo-vT3" id="dAs-1g-rkr"/> <outlet property="view_content" destination="Pe1-Qw-ELp" id="Gyl-Vo-PUA"/> </connections> <point key="canvasLocation" x="140" y="21"/> </view> </objects> <resources> <image name="bg_prompt" width="298.33334350585938" height="402"/> </resources> </document>