commit c10f0dd29d96418e5f664ccdc1aeb3e9d0b4f13b Author: Jason Date: Tue Jan 23 18:00:59 2024 +0800 init diff --git a/demo.xcodeproj/project.pbxproj b/demo.xcodeproj/project.pbxproj new file mode 100644 index 0000000..1a40a95 --- /dev/null +++ b/demo.xcodeproj/project.pbxproj @@ -0,0 +1,545 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 968A6F642B5F4C99008609EE /* demoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F632B5F4C99008609EE /* demoApp.swift */; }; + 968A6F6A2B5F4C9B008609EE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 968A6F692B5F4C9B008609EE /* Assets.xcassets */; }; + 968A6F6D2B5F4C9B008609EE /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 968A6F6C2B5F4C9B008609EE /* Preview Assets.xcassets */; }; + 968A6F792B5F4E28008609EE /* TabBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F782B5F4E28008609EE /* TabBarView.swift */; }; + 968A6F7C2B5F4E63008609EE /* TabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F7B2B5F4E63008609EE /* TabBar.swift */; }; + 968A6F7F2B5F4E91008609EE /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F7E2B5F4E91008609EE /* HomeView.swift */; }; + 968A6F822B5F4EA1008609EE /* MallView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F812B5F4EA1008609EE /* MallView.swift */; }; + 968A6F852B5F4EB2008609EE /* MessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F842B5F4EB2008609EE /* MessageView.swift */; }; + 968A6F882B5F4EC4008609EE /* UserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F872B5F4EC4008609EE /* UserView.swift */; }; + 968A6F8A2B5F6421008609EE /* GoodsDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F892B5F6421008609EE /* GoodsDetailView.swift */; }; + 968A6F8C2B5F67ED008609EE /* OrdersView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F8B2B5F67ED008609EE /* OrdersView.swift */; }; + 968A6F8E2B5F67F8008609EE /* OrderDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F8D2B5F67F8008609EE /* OrderDetailView.swift */; }; + 968A6F922B5F681C008609EE /* AccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F912B5F681C008609EE /* AccountView.swift */; }; + 968A6F952B5F6836008609EE /* BalanceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F942B5F6836008609EE /* BalanceView.swift */; }; + 968A6F972B5F683E008609EE /* CouponView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F962B5F683E008609EE /* CouponView.swift */; }; + 968A6F992B5F6860008609EE /* NoticeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F982B5F6860008609EE /* NoticeView.swift */; }; + 968A6F9B2B5F686D008609EE /* NoticeListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F9A2B5F686D008609EE /* NoticeListView.swift */; }; + 968A6F9E2B5F688A008609EE /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F9D2B5F688A008609EE /* LoginView.swift */; }; + 968A6FA02B5F6893008609EE /* RegisterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6F9F2B5F6893008609EE /* RegisterView.swift */; }; + 968A6FA22B5F68AA008609EE /* ForgotView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FA12B5F68AA008609EE /* ForgotView.swift */; }; + 968A6FA42B5F68B8008609EE /* LicenceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FA32B5F68B8008609EE /* LicenceView.swift */; }; + 968A6FA62B5F6ADC008609EE /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FA52B5F6ADC008609EE /* SearchView.swift */; }; + 968A6FA82B5F6AF3008609EE /* CartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FA72B5F6AF3008609EE /* CartView.swift */; }; + 968A6FAA2B5F6B07008609EE /* CategoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FA92B5F6B07008609EE /* CategoryView.swift */; }; + 968A6FAC2B5F6B1C008609EE /* GoodsCommentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FAB2B5F6B1C008609EE /* GoodsCommentsView.swift */; }; + 968A6FAE2B5FA329008609EE /* CamelPrice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FAD2B5FA329008609EE /* CamelPrice.swift */; }; + 968A6FB02B5FBB86008609EE /* GoodsCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FAF2B5FBB86008609EE /* GoodsCard.swift */; }; + 968A6FB22B5FC3A2008609EE /* ShowMore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968A6FB12B5FC3A2008609EE /* ShowMore.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 968A6F602B5F4C99008609EE /* demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 968A6F632B5F4C99008609EE /* demoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = demoApp.swift; sourceTree = ""; }; + 968A6F692B5F4C9B008609EE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 968A6F6C2B5F4C9B008609EE /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 968A6F782B5F4E28008609EE /* TabBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarView.swift; sourceTree = ""; }; + 968A6F7B2B5F4E63008609EE /* TabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBar.swift; sourceTree = ""; }; + 968A6F7E2B5F4E91008609EE /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; + 968A6F812B5F4EA1008609EE /* MallView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MallView.swift; sourceTree = ""; }; + 968A6F842B5F4EB2008609EE /* MessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageView.swift; sourceTree = ""; }; + 968A6F872B5F4EC4008609EE /* UserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserView.swift; sourceTree = ""; }; + 968A6F892B5F6421008609EE /* GoodsDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsDetailView.swift; sourceTree = ""; }; + 968A6F8B2B5F67ED008609EE /* OrdersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrdersView.swift; sourceTree = ""; }; + 968A6F8D2B5F67F8008609EE /* OrderDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderDetailView.swift; sourceTree = ""; }; + 968A6F912B5F681C008609EE /* AccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountView.swift; sourceTree = ""; }; + 968A6F942B5F6836008609EE /* BalanceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BalanceView.swift; sourceTree = ""; }; + 968A6F962B5F683E008609EE /* CouponView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponView.swift; sourceTree = ""; }; + 968A6F982B5F6860008609EE /* NoticeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeView.swift; sourceTree = ""; }; + 968A6F9A2B5F686D008609EE /* NoticeListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoticeListView.swift; sourceTree = ""; }; + 968A6F9D2B5F688A008609EE /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; + 968A6F9F2B5F6893008609EE /* RegisterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterView.swift; sourceTree = ""; }; + 968A6FA12B5F68AA008609EE /* ForgotView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ForgotView.swift; sourceTree = ""; }; + 968A6FA32B5F68B8008609EE /* LicenceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LicenceView.swift; sourceTree = ""; }; + 968A6FA52B5F6ADC008609EE /* SearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchView.swift; sourceTree = ""; }; + 968A6FA72B5F6AF3008609EE /* CartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartView.swift; sourceTree = ""; }; + 968A6FA92B5F6B07008609EE /* CategoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryView.swift; sourceTree = ""; }; + 968A6FAB2B5F6B1C008609EE /* GoodsCommentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsCommentsView.swift; sourceTree = ""; }; + 968A6FAD2B5FA329008609EE /* CamelPrice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CamelPrice.swift; sourceTree = ""; }; + 968A6FAF2B5FBB86008609EE /* GoodsCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GoodsCard.swift; sourceTree = ""; }; + 968A6FB12B5FC3A2008609EE /* ShowMore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowMore.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 968A6F5D2B5F4C99008609EE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 968A6F572B5F4C99008609EE = { + isa = PBXGroup; + children = ( + 968A6F622B5F4C99008609EE /* demo */, + 968A6F612B5F4C99008609EE /* Products */, + ); + sourceTree = ""; + }; + 968A6F612B5F4C99008609EE /* Products */ = { + isa = PBXGroup; + children = ( + 968A6F602B5F4C99008609EE /* demo.app */, + ); + name = Products; + sourceTree = ""; + }; + 968A6F622B5F4C99008609EE /* demo */ = { + isa = PBXGroup; + children = ( + 968A6F762B5F4E0D008609EE /* Components */, + 968A6F752B5F4DFD008609EE /* Views */, + 968A6F742B5F4DF9008609EE /* Models */, + 968A6F732B5F4DF3008609EE /* Controllers */, + 968A6F632B5F4C99008609EE /* demoApp.swift */, + 968A6F692B5F4C9B008609EE /* Assets.xcassets */, + 968A6F6B2B5F4C9B008609EE /* Preview Content */, + ); + path = demo; + sourceTree = ""; + }; + 968A6F6B2B5F4C9B008609EE /* Preview Content */ = { + isa = PBXGroup; + children = ( + 968A6F6C2B5F4C9B008609EE /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 968A6F732B5F4DF3008609EE /* Controllers */ = { + isa = PBXGroup; + children = ( + ); + path = Controllers; + sourceTree = ""; + }; + 968A6F742B5F4DF9008609EE /* Models */ = { + isa = PBXGroup; + children = ( + 968A6F7B2B5F4E63008609EE /* TabBar.swift */, + ); + path = Models; + sourceTree = ""; + }; + 968A6F752B5F4DFD008609EE /* Views */ = { + isa = PBXGroup; + children = ( + 968A6F9C2B5F687E008609EE /* Auth */, + 968A6F862B5F4EB6008609EE /* User */, + 968A6F832B5F4EAA008609EE /* Message */, + 968A6F802B5F4E97008609EE /* Mall */, + 968A6F7D2B5F4E88008609EE /* Home */, + 968A6F772B5F4E19008609EE /* Layouts */, + ); + path = Views; + sourceTree = ""; + }; + 968A6F762B5F4E0D008609EE /* Components */ = { + isa = PBXGroup; + children = ( + 968A6FAD2B5FA329008609EE /* CamelPrice.swift */, + 968A6FAF2B5FBB86008609EE /* GoodsCard.swift */, + 968A6FB12B5FC3A2008609EE /* ShowMore.swift */, + ); + path = Components; + sourceTree = ""; + }; + 968A6F772B5F4E19008609EE /* Layouts */ = { + isa = PBXGroup; + children = ( + 968A6F782B5F4E28008609EE /* TabBarView.swift */, + ); + path = Layouts; + sourceTree = ""; + }; + 968A6F7D2B5F4E88008609EE /* Home */ = { + isa = PBXGroup; + children = ( + 968A6F7E2B5F4E91008609EE /* HomeView.swift */, + 968A6F982B5F6860008609EE /* NoticeView.swift */, + 968A6F9A2B5F686D008609EE /* NoticeListView.swift */, + 968A6FA52B5F6ADC008609EE /* SearchView.swift */, + ); + path = Home; + sourceTree = ""; + }; + 968A6F802B5F4E97008609EE /* Mall */ = { + isa = PBXGroup; + children = ( + 968A6F812B5F4EA1008609EE /* MallView.swift */, + 968A6F892B5F6421008609EE /* GoodsDetailView.swift */, + 968A6FA72B5F6AF3008609EE /* CartView.swift */, + 968A6FA92B5F6B07008609EE /* CategoryView.swift */, + 968A6FAB2B5F6B1C008609EE /* GoodsCommentsView.swift */, + ); + path = Mall; + sourceTree = ""; + }; + 968A6F832B5F4EAA008609EE /* Message */ = { + isa = PBXGroup; + children = ( + 968A6F842B5F4EB2008609EE /* MessageView.swift */, + ); + path = Message; + sourceTree = ""; + }; + 968A6F862B5F4EB6008609EE /* User */ = { + isa = PBXGroup; + children = ( + 968A6F902B5F6810008609EE /* Account */, + 968A6F872B5F4EC4008609EE /* UserView.swift */, + 968A6F8F2B5F67FE008609EE /* Order */, + ); + path = User; + sourceTree = ""; + }; + 968A6F8F2B5F67FE008609EE /* Order */ = { + isa = PBXGroup; + children = ( + 968A6F8B2B5F67ED008609EE /* OrdersView.swift */, + 968A6F8D2B5F67F8008609EE /* OrderDetailView.swift */, + ); + path = Order; + sourceTree = ""; + }; + 968A6F902B5F6810008609EE /* Account */ = { + isa = PBXGroup; + children = ( + 968A6F912B5F681C008609EE /* AccountView.swift */, + 968A6F942B5F6836008609EE /* BalanceView.swift */, + 968A6F962B5F683E008609EE /* CouponView.swift */, + ); + path = Account; + sourceTree = ""; + }; + 968A6F9C2B5F687E008609EE /* Auth */ = { + isa = PBXGroup; + children = ( + 968A6F9D2B5F688A008609EE /* LoginView.swift */, + 968A6F9F2B5F6893008609EE /* RegisterView.swift */, + 968A6FA12B5F68AA008609EE /* ForgotView.swift */, + 968A6FA32B5F68B8008609EE /* LicenceView.swift */, + ); + path = Auth; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 968A6F5F2B5F4C99008609EE /* demo */ = { + isa = PBXNativeTarget; + buildConfigurationList = 968A6F702B5F4C9B008609EE /* Build configuration list for PBXNativeTarget "demo" */; + buildPhases = ( + 968A6F5C2B5F4C99008609EE /* Sources */, + 968A6F5D2B5F4C99008609EE /* Frameworks */, + 968A6F5E2B5F4C99008609EE /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = demo; + productName = demo; + productReference = 968A6F602B5F4C99008609EE /* demo.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 968A6F582B5F4C99008609EE /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1520; + LastUpgradeCheck = 1520; + TargetAttributes = { + 968A6F5F2B5F4C99008609EE = { + CreatedOnToolsVersion = 15.2; + }; + }; + }; + buildConfigurationList = 968A6F5B2B5F4C99008609EE /* Build configuration list for PBXProject "demo" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 968A6F572B5F4C99008609EE; + productRefGroup = 968A6F612B5F4C99008609EE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 968A6F5F2B5F4C99008609EE /* demo */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 968A6F5E2B5F4C99008609EE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 968A6F6D2B5F4C9B008609EE /* Preview Assets.xcassets in Resources */, + 968A6F6A2B5F4C9B008609EE /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 968A6F5C2B5F4C99008609EE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 968A6FA62B5F6ADC008609EE /* SearchView.swift in Sources */, + 968A6F852B5F4EB2008609EE /* MessageView.swift in Sources */, + 968A6FA02B5F6893008609EE /* RegisterView.swift in Sources */, + 968A6FB22B5FC3A2008609EE /* ShowMore.swift in Sources */, + 968A6F822B5F4EA1008609EE /* MallView.swift in Sources */, + 968A6F972B5F683E008609EE /* CouponView.swift in Sources */, + 968A6F7C2B5F4E63008609EE /* TabBar.swift in Sources */, + 968A6F8A2B5F6421008609EE /* GoodsDetailView.swift in Sources */, + 968A6F922B5F681C008609EE /* AccountView.swift in Sources */, + 968A6FAE2B5FA329008609EE /* CamelPrice.swift in Sources */, + 968A6FAC2B5F6B1C008609EE /* GoodsCommentsView.swift in Sources */, + 968A6FA42B5F68B8008609EE /* LicenceView.swift in Sources */, + 968A6FB02B5FBB86008609EE /* GoodsCard.swift in Sources */, + 968A6F9B2B5F686D008609EE /* NoticeListView.swift in Sources */, + 968A6F992B5F6860008609EE /* NoticeView.swift in Sources */, + 968A6F8E2B5F67F8008609EE /* OrderDetailView.swift in Sources */, + 968A6F7F2B5F4E91008609EE /* HomeView.swift in Sources */, + 968A6FA22B5F68AA008609EE /* ForgotView.swift in Sources */, + 968A6F792B5F4E28008609EE /* TabBarView.swift in Sources */, + 968A6FA82B5F6AF3008609EE /* CartView.swift in Sources */, + 968A6FAA2B5F6B07008609EE /* CategoryView.swift in Sources */, + 968A6F642B5F4C99008609EE /* demoApp.swift in Sources */, + 968A6F952B5F6836008609EE /* BalanceView.swift in Sources */, + 968A6F882B5F4EC4008609EE /* UserView.swift in Sources */, + 968A6F9E2B5F688A008609EE /* LoginView.swift in Sources */, + 968A6F8C2B5F67ED008609EE /* OrdersView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 968A6F6E2B5F4C9B008609EE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 968A6F6F2B5F4C9B008609EE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 968A6F712B5F4C9B008609EE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"demo/Preview Content\""; + DEVELOPMENT_TEAM = X6G557VKB9; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "大道至简"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = tech.uzchain.demo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 968A6F722B5F4C9B008609EE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"demo/Preview Content\""; + DEVELOPMENT_TEAM = X6G557VKB9; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "大道至简"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = tech.uzchain.demo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 968A6F5B2B5F4C99008609EE /* Build configuration list for PBXProject "demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 968A6F6E2B5F4C9B008609EE /* Debug */, + 968A6F6F2B5F4C9B008609EE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 968A6F702B5F4C9B008609EE /* Build configuration list for PBXNativeTarget "demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 968A6F712B5F4C9B008609EE /* Debug */, + 968A6F722B5F4C9B008609EE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 968A6F582B5F4C99008609EE /* Project object */; +} diff --git a/demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/demo.xcodeproj/project.xcworkspace/xcuserdata/jason.xcuserdatad/UserInterfaceState.xcuserstate b/demo.xcodeproj/project.xcworkspace/xcuserdata/jason.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..bf29ec7 Binary files /dev/null and b/demo.xcodeproj/project.xcworkspace/xcuserdata/jason.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/demo.xcodeproj/xcuserdata/jason.xcuserdatad/xcschemes/xcschememanagement.plist b/demo.xcodeproj/xcuserdata/jason.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..e8f3bb4 --- /dev/null +++ b/demo.xcodeproj/xcuserdata/jason.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + demo.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/demo/.DS_Store b/demo/.DS_Store new file mode 100644 index 0000000..70c6a9f Binary files /dev/null and b/demo/.DS_Store differ diff --git a/demo/Assets.xcassets/.DS_Store b/demo/Assets.xcassets/.DS_Store new file mode 100644 index 0000000..0e5468f Binary files /dev/null and b/demo/Assets.xcassets/.DS_Store differ diff --git a/demo/Assets.xcassets/AccentColor.colorset/Contents.json b/demo/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/demo/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/AppIcon.appiconset/Contents.json b/demo/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..aa39517 --- /dev/null +++ b/demo/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "logo.jpg", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/AppIcon.appiconset/logo.jpg b/demo/Assets.xcassets/AppIcon.appiconset/logo.jpg new file mode 100644 index 0000000..9c0e750 Binary files /dev/null and b/demo/Assets.xcassets/AppIcon.appiconset/logo.jpg differ diff --git a/demo/Assets.xcassets/Colors/Background.colorset/Contents.json b/demo/Assets.xcassets/Colors/Background.colorset/Contents.json new file mode 100644 index 0000000..2536dc2 --- /dev/null +++ b/demo/Assets.xcassets/Colors/Background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Colors/Contents.json b/demo/Assets.xcassets/Colors/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/demo/Assets.xcassets/Colors/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Colors/MainText.colorset/Contents.json b/demo/Assets.xcassets/Colors/MainText.colorset/Contents.json new file mode 100644 index 0000000..f1c903f --- /dev/null +++ b/demo/Assets.xcassets/Colors/MainText.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x23", + "green" : "0x23", + "red" : "0x23" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEF", + "green" : "0xEF", + "red" : "0xEF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Colors/ReversColor.colorset/Contents.json b/demo/Assets.xcassets/Colors/ReversColor.colorset/Contents.json new file mode 100644 index 0000000..9c0e331 --- /dev/null +++ b/demo/Assets.xcassets/Colors/ReversColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Colors/TabBarColor.colorset/Contents.json b/demo/Assets.xcassets/Colors/TabBarColor.colorset/Contents.json new file mode 100644 index 0000000..9c0e331 --- /dev/null +++ b/demo/Assets.xcassets/Colors/TabBarColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0x00", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Contents.json b/demo/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/demo/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Images/Contents.json b/demo/Assets.xcassets/Images/Contents.json new file mode 100644 index 0000000..6e96565 --- /dev/null +++ b/demo/Assets.xcassets/Images/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "provides-namespace" : true + } +} diff --git a/demo/Assets.xcassets/Images/LaunchScreen.imageset/Contents.json b/demo/Assets.xcassets/Images/LaunchScreen.imageset/Contents.json new file mode 100644 index 0000000..6130e6a --- /dev/null +++ b/demo/Assets.xcassets/Images/LaunchScreen.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "sunset-675847_1920.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Images/LaunchScreen.imageset/sunset-675847_1920.jpg b/demo/Assets.xcassets/Images/LaunchScreen.imageset/sunset-675847_1920.jpg new file mode 100644 index 0000000..e0a4f7e Binary files /dev/null and b/demo/Assets.xcassets/Images/LaunchScreen.imageset/sunset-675847_1920.jpg differ diff --git a/demo/Assets.xcassets/Images/banner1.imageset/413.jpg b/demo/Assets.xcassets/Images/banner1.imageset/413.jpg new file mode 100644 index 0000000..12cbd4f Binary files /dev/null and b/demo/Assets.xcassets/Images/banner1.imageset/413.jpg differ diff --git a/demo/Assets.xcassets/Images/banner1.imageset/Contents.json b/demo/Assets.xcassets/Images/banner1.imageset/Contents.json new file mode 100644 index 0000000..e205d13 --- /dev/null +++ b/demo/Assets.xcassets/Images/banner1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "413.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Images/banner2.imageset/420.jpg b/demo/Assets.xcassets/Images/banner2.imageset/420.jpg new file mode 100644 index 0000000..07c0923 Binary files /dev/null and b/demo/Assets.xcassets/Images/banner2.imageset/420.jpg differ diff --git a/demo/Assets.xcassets/Images/banner2.imageset/Contents.json b/demo/Assets.xcassets/Images/banner2.imageset/Contents.json new file mode 100644 index 0000000..a2fed07 --- /dev/null +++ b/demo/Assets.xcassets/Images/banner2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "420.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Images/banner3.imageset/476.jpg b/demo/Assets.xcassets/Images/banner3.imageset/476.jpg new file mode 100644 index 0000000..40f7ff7 Binary files /dev/null and b/demo/Assets.xcassets/Images/banner3.imageset/476.jpg differ diff --git a/demo/Assets.xcassets/Images/banner3.imageset/Contents.json b/demo/Assets.xcassets/Images/banner3.imageset/Contents.json new file mode 100644 index 0000000..3307120 --- /dev/null +++ b/demo/Assets.xcassets/Images/banner3.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "476.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Assets.xcassets/Images/logo.imageset/3 1.jpg b/demo/Assets.xcassets/Images/logo.imageset/3 1.jpg new file mode 100644 index 0000000..5e20603 Binary files /dev/null and b/demo/Assets.xcassets/Images/logo.imageset/3 1.jpg differ diff --git a/demo/Assets.xcassets/Images/logo.imageset/3ac79f3df8dcd10010dddf20758b4710b9122f69.jpg b/demo/Assets.xcassets/Images/logo.imageset/3ac79f3df8dcd10010dddf20758b4710b9122f69.jpg new file mode 100644 index 0000000..ff6c748 Binary files /dev/null and b/demo/Assets.xcassets/Images/logo.imageset/3ac79f3df8dcd10010dddf20758b4710b9122f69.jpg differ diff --git a/demo/Assets.xcassets/Images/logo.imageset/Contents.json b/demo/Assets.xcassets/Images/logo.imageset/Contents.json new file mode 100644 index 0000000..c3138ad --- /dev/null +++ b/demo/Assets.xcassets/Images/logo.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "filename" : "3 1.jpg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "3ac79f3df8dcd10010dddf20758b4710b9122f69.jpg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Components/CamelPrice.swift b/demo/Components/CamelPrice.swift new file mode 100644 index 0000000..a4c3dd8 --- /dev/null +++ b/demo/Components/CamelPrice.swift @@ -0,0 +1,49 @@ +// +// CamelPrice.swift +// 驼峰价格显示组件 +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct CamelPrice: View { + @State public var amount: Double + @State public var size = 16.0 + @State public var color = Color.red + + func getInt(amount: Double) -> String { + return String(Int(amount.rounded(.down))) + } + + func getDecimal(amount: Double) -> String { + var decimal = String(amount.truncatingRemainder(dividingBy: 1)) + + let range = decimal.range(of: "0.")! + decimal.replaceSubrange(range, with: ".") + + if decimal.count < 3 { + decimal.append("0") + } else { + decimal = String(decimal[.. CGFloat { + (UIScreen.main.bounds.width - 24 - 12) / 2 * 1.2 + } + + var body: some View { + VStack { + Image("Images/LaunchScreen") + .resizable() + .frame(maxWidth: .infinity) + .frame(maxHeight: getHeight()) + VStack(spacing: 4) { + Text("苏东坡专辑,谁谁会注解的内容哦") + .font(.subheadline) + .lineLimit(1) + HStack(alignment: .bottom) { + CamelPrice(amount: 125.9229, size: 16) + Spacer() + Text("100+付款") + .foregroundColor(Color.gray) + .font(.caption) + .baselineOffset(2) + } + } + .padding(4) + } + .background(Color.white) + .cornerRadius(8) + } +} diff --git a/demo/Components/ShowMore.swift b/demo/Components/ShowMore.swift new file mode 100644 index 0000000..5bd9c87 --- /dev/null +++ b/demo/Components/ShowMore.swift @@ -0,0 +1,23 @@ +// +// ShowMore.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct ShowMore: View { + var title = "查看全部" + var body: some View { + HStack(spacing: 4) { + Text(title) + .font(.system(size: 14)) + .foregroundColor(Color.gray) + Image(systemName: "chevron.forward") + .resizable() + .frame(width: 6, height: 10) + .foregroundColor(Color.gray) + } + } +} diff --git a/demo/Models/TabBar.swift b/demo/Models/TabBar.swift new file mode 100644 index 0000000..4e529ba --- /dev/null +++ b/demo/Models/TabBar.swift @@ -0,0 +1,29 @@ +// +// TabBar.swift +// jason +// +// Created by Jason on 2024/1/19. +// + +import SwiftUI + +struct TabItem: Identifiable { + var id = UUID() + var icon: String + var text: String + var tab: Tab +} + +var tabItems = [ + TabItem(icon: "book", text: "图书馆", tab: .home), + TabItem(icon: "bag", text: "生活馆", tab: .explore), + TabItem(icon: "cart", text: "购物车", tab: .message), + TabItem(icon: "person", text: "个人中心", tab: .account) +] + +enum Tab: String { + case home + case explore + case message + case account +} diff --git a/demo/Preview Content/Preview Assets.xcassets/Contents.json b/demo/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/demo/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/Views/Auth/ForgotView.swift b/demo/Views/Auth/ForgotView.swift new file mode 100644 index 0000000..d3d7e6d --- /dev/null +++ b/demo/Views/Auth/ForgotView.swift @@ -0,0 +1,18 @@ +// +// ForgotView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct ForgotView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + ForgotView() +} diff --git a/demo/Views/Auth/LicenceView.swift b/demo/Views/Auth/LicenceView.swift new file mode 100644 index 0000000..f0e96d6 --- /dev/null +++ b/demo/Views/Auth/LicenceView.swift @@ -0,0 +1,18 @@ +// +// Licence.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct LicenceView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + LicenceView() +} diff --git a/demo/Views/Auth/LoginView.swift b/demo/Views/Auth/LoginView.swift new file mode 100644 index 0000000..113116c --- /dev/null +++ b/demo/Views/Auth/LoginView.swift @@ -0,0 +1,18 @@ +// +// LoginView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct LoginView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + LoginView() +} diff --git a/demo/Views/Auth/RegisterView.swift b/demo/Views/Auth/RegisterView.swift new file mode 100644 index 0000000..d845a2e --- /dev/null +++ b/demo/Views/Auth/RegisterView.swift @@ -0,0 +1,18 @@ +// +// Register.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct RegisterView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + RegisterView() +} diff --git a/demo/Views/Home/HomeView.swift b/demo/Views/Home/HomeView.swift new file mode 100644 index 0000000..8fdf21e --- /dev/null +++ b/demo/Views/Home/HomeView.swift @@ -0,0 +1,293 @@ +// +// HomeView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct HomeView: View { + @State private var selectedTab = 0 + + var body: some View { + ScrollView { + VStack(spacing: 12) { +// Search +// Banner +// Navigation +// TodayKill +// Living +// Bestselling + PartyReading +// NewBooks +// Categories + } + } + .frame(maxWidth: .infinity) + .padding(.horizontal, 12) + .background(Color.gray.opacity(0.2)) + } + + let columns = [GridItem(.flexible()), GridItem(.flexible())] + + var Categories: some View { + VStack { + ScrollView(.horizontal) { + HStack { + Text("推荐") + Text("竞品书单") + Text("少儿") + Text("武侠") + Text("文创") + Text("历史") + Text("专辑") + Text("世纪难题") + Text("个性推荐") + } + } + + LazyVGrid(columns: columns, alignment: .center) { + ForEach(0 ..< 20, id: \.self) { _ in + GoodsCard() + } + } + } + } + + var NewBooks: some View { + VStack(alignment: .leading) { + HStack { + Text("新书上架") + Spacer() + + Image(systemName: "chevron.forward") + } + + HStack(alignment: .top) { + ForEach(0 ..< 4) { _ in + VStack { + Image("Images/LaunchScreen") + .resizable() + .frame(maxHeight: 120) + .cornerRadius(4) + Text("唐伯虎的故事,成就的是谁") + .lineLimit(1) + } + .frame(maxWidth: 100) + } + } + } + .padding(12) + .background(Color.white) + .cornerRadius(12) + } + + var PartyReading: some View { + VStack(alignment: .leading) { + HStack { + Text("党政读物预订专区") + .font(.title3) + .foregroundColor(Color.white) + Spacer() + ShowMore(title: "全部") + } + Text("阅读这10本书,让你深度学习党政相关知识,思想提升") + .foregroundColor(Color.red) + Text("治国必先治党,治党才能国强,进入新时代,以习近平通知为核心的党中央以前所未有的勇气和定理推进全面从严治党,") + .font(.caption) + .foregroundColor(Color.gray) + .lineLimit(2) + ScrollView(.horizontal) { + HStack(alignment: .top) { + ForEach(/*@START_MENU_TOKEN@*/0 ..< 5/*@END_MENU_TOKEN@*/) { _ in + VStack { + Image("Images/LaunchScreen") + .resizable() + .frame(maxWidth: 120, maxHeight: 150) + .cornerRadius(4) + Text("唐伯虎的故事,成就的是谁") + .lineLimit(1) + } + .frame(maxWidth: 100) + } + } + } + } + .padding(12) + .background(LinearGradient(colors: [Color.red, Color.white], startPoint: UnitPoint.top, endPoint: UnitPoint.bottom)) + .cornerRadius(12) + } + + var Bestselling: some View { + VStack(alignment: .leading) { + HStack { + Text("畅销图书") + Spacer() + Text("全部") + Image(systemName: "chevron.forward") + } + ScrollView(.horizontal) { + HStack(alignment: .top) { + ForEach(/*@START_MENU_TOKEN@*/0 ..< 5/*@END_MENU_TOKEN@*/) { _ in + VStack { + Image("Images/LaunchScreen") + .resizable() + .frame(maxWidth: 120, maxHeight: 150) + .cornerRadius(4) + Text("唐伯虎的故事,成就的是谁") + .lineLimit(1) + HStack { + Image(systemName: "eye") + Text("299万") + } + } + .frame(maxWidth: 100) + } + } + } + } + .padding(12) + .background(Color.white) + .cornerRadius(12) + } + + var Living: some View { + HStack { + ForEach(0 ..< 3) { _ in + VStack { + HStack { + Text("正在直播") + Image(systemName: "livephoto") + } + Image("Images/LaunchScreen") + .resizable(resizingMode: /*@START_MENU_TOKEN@*/ .stretch/*@END_MENU_TOKEN@*/) + .aspectRatio(contentMode: .fit) + .frame(maxWidth: 120) + .cornerRadius(12) + } + .background(Color.pink.opacity(0.5)) + .cornerRadius(12) + } + } + } + + var TodayKill: some View { + VStack(alignment: .leading) { + HStack { + Text("今日秒杀") + Text("00:00:00") + } + HStack { + Image("Images/LaunchScreen") + .resizable(resizingMode: /*@START_MENU_TOKEN@*/ .stretch/*@END_MENU_TOKEN@*/) + .aspectRatio(contentMode: .fit) + .frame(maxWidth: 120) + VStack { + Text("石床垫:阿特伍德黑暗就故事(有的人说啥就是啥呢有的人说啥就是啥呢有的人说啥就是啥呢)") + .multilineTextAlignment(/*@START_MENU_TOKEN@*/ .leading/*@END_MENU_TOKEN@*/) + .lineLimit(/*@START_MENU_TOKEN@*/2/*@END_MENU_TOKEN@*/) + .foregroundColor(Color.white) + Text("¥19.99") + .foregroundColor(Color.red) + .padding(12) + .cornerRadius(12) + .background(Color.white) + HStack { + Text("抢购") + Image(systemName: "chevron.forward") + } + .foregroundColor(Color.white) + } + } + HStack { + ForEach(0 ..< 5) { _ in + VStack { + Image("Images/LaunchScreen") + .resizable(resizingMode: /*@START_MENU_TOKEN@*/ .stretch/*@END_MENU_TOKEN@*/) + .aspectRatio(contentMode: .fit) + .frame(maxWidth: 120) + Text("是石床垫:阿特伍德黑暗就故事") + .lineLimit(1) + Text("¥19.99") + .foregroundColor(Color.red) + } + .frame(maxWidth: 110) + .background(Color.white) + } + } + .padding(12) + .background(Color.white.opacity(0.3)) + } + .frame(maxWidth: /*@START_MENU_TOKEN@*/ .infinity/*@END_MENU_TOKEN@*/) + .background(Color.pink) + .cornerRadius(12) + } + + var Navigation: some View { + HStack(spacing: 32) { + ForEach(/*@START_MENU_TOKEN@*/0 ..< 5/*@END_MENU_TOKEN@*/) { _ in + VStack { + Image("Images/logo") + .resizable(resizingMode: /*@START_MENU_TOKEN@*/ .stretch/*@END_MENU_TOKEN@*/) + .aspectRatio(contentMode: .fit) + .background(Color.white) + .cornerRadius(64) + + Text("图书") + } + } + } + } + + var Banner: some View { + HStack { + Image("Images/banner1") + .resizable(resizingMode: .stretch) + .aspectRatio(contentMode: .fit) + Image("Images/banner2") + .resizable(resizingMode: .stretch) + .aspectRatio(contentMode: .fit) + Image("Images/banner3") + .resizable(resizingMode: .stretch) + .aspectRatio(contentMode: .fit) + } + + .frame(maxWidth: /*@START_MENU_TOKEN@*/ .infinity/*@END_MENU_TOKEN@*/) + } + + var Search: some View { + HStack(alignment: .center, spacing: 16) { + HStack { + Image(systemName: "magnifyingglass") + .resizable() + .frame(width: 18, height: 18) + .foregroundColor(Color.gray) + Text("搜索书籍") + .foregroundColor(Color.gray) + Spacer() + } + .frame(maxWidth: /*@START_MENU_TOKEN@*/ .infinity/*@END_MENU_TOKEN@*/) + .padding(12) + .background(Color.white) + .cornerRadius(32) + ZStack { + Image(systemName: "bell").resizable().frame(width: 24, height: 24) + Text("9") + .font(.system(size: 12)) + .padding(4) + .frame(minWidth: 24) + .background(Color.red) + .foregroundColor(Color.white) + .cornerRadius(99) + .offset(x: 10, y: -10) + } + .padding(.trailing, 12) + } + } +} + +// +// #Preview { +// HomeView() +// } diff --git a/demo/Views/Home/NoticeListView.swift b/demo/Views/Home/NoticeListView.swift new file mode 100644 index 0000000..aaa1e1e --- /dev/null +++ b/demo/Views/Home/NoticeListView.swift @@ -0,0 +1,18 @@ +// +// NoticeListView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct NoticeListView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + NoticeListView() +} diff --git a/demo/Views/Home/NoticeView.swift b/demo/Views/Home/NoticeView.swift new file mode 100644 index 0000000..2fc1680 --- /dev/null +++ b/demo/Views/Home/NoticeView.swift @@ -0,0 +1,18 @@ +// +// NoticeView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct NoticeView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + NoticeView() +} diff --git a/demo/Views/Home/SearchView.swift b/demo/Views/Home/SearchView.swift new file mode 100644 index 0000000..1811509 --- /dev/null +++ b/demo/Views/Home/SearchView.swift @@ -0,0 +1,18 @@ +// +// SearchView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct SearchView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + SearchView() +} diff --git a/demo/Views/Layouts/TabBarView.swift b/demo/Views/Layouts/TabBarView.swift new file mode 100644 index 0000000..a2c552a --- /dev/null +++ b/demo/Views/Layouts/TabBarView.swift @@ -0,0 +1,64 @@ +// +// TabBarView.swift +// jason +// +// Created by Jason on 2024/1/19. +// + +import SwiftUI + +struct TabBarView: View { + @AppStorage("selectedTab") var selectedTab: Tab = .home + + var body: some View { + ZStack(alignment: .leading) { + Group { + switch selectedTab { + case .home: + HomeView() + case .explore: + MallView() + case .message: + MessageView() + case .account: + UserView() + } + } +// .offset(y: -64) +// .safeAreaInset(edge: .top) { +// Color.clear.frame(height: 32) +// } + + HStack { + ForEach(tabItems) { item in + Button(action: { + selectedTab = item.tab + }, label: { + VStack(spacing: 6) { + Image(systemName: item.icon).resizable().frame(width: 18, height: 18) + Text(item.text) + .font(.caption) + .fontWeight(.regular) + .multilineTextAlignment(.center) + .lineLimit(1) + } + .frame(maxWidth: .infinity) + }) + .foregroundColor(selectedTab == item.tab ? Color("MainText") : Color.secondary) + .shadow(color: selectedTab == item.tab ? Color.orange : Color.blue, radius: 15) + } + } + .padding(.top, 12.0) + .padding(.bottom, 32) + .background(Color("TabBarColor")) + .frame(maxHeight: .infinity, alignment: .bottom) + .shadow(color: Color.gray.opacity(0.5), radius: 6, x: 0, y: 6) + .ignoresSafeArea() + } + .statusBarHidden(false) + } +} + +#Preview { + TabBarView() +} diff --git a/demo/Views/Mall/CartView.swift b/demo/Views/Mall/CartView.swift new file mode 100644 index 0000000..2c22ea8 --- /dev/null +++ b/demo/Views/Mall/CartView.swift @@ -0,0 +1,18 @@ +// +// CartView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct CartView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + CartView() +} diff --git a/demo/Views/Mall/CategoryView.swift b/demo/Views/Mall/CategoryView.swift new file mode 100644 index 0000000..d7832f6 --- /dev/null +++ b/demo/Views/Mall/CategoryView.swift @@ -0,0 +1,18 @@ +// +// CategoryView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct CategoryView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + CategoryView() +} diff --git a/demo/Views/Mall/GoodsCommentsView.swift b/demo/Views/Mall/GoodsCommentsView.swift new file mode 100644 index 0000000..0d03b6d --- /dev/null +++ b/demo/Views/Mall/GoodsCommentsView.swift @@ -0,0 +1,18 @@ +// +// GoodsCommentsView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct GoodsCommentsView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + GoodsCommentsView() +} diff --git a/demo/Views/Mall/GoodsDetailView.swift b/demo/Views/Mall/GoodsDetailView.swift new file mode 100644 index 0000000..0834c6b --- /dev/null +++ b/demo/Views/Mall/GoodsDetailView.swift @@ -0,0 +1,18 @@ +// +// GoodsDetail.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct GoodsDetailView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + GoodsDetailView() +} diff --git a/demo/Views/Mall/MallView.swift b/demo/Views/Mall/MallView.swift new file mode 100644 index 0000000..e024e74 --- /dev/null +++ b/demo/Views/Mall/MallView.swift @@ -0,0 +1,18 @@ +// +// MallView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct MallView: View { + var body: some View { + Text("Mall Page") + } +} + +#Preview { + MallView() +} diff --git a/demo/Views/Message/MessageView.swift b/demo/Views/Message/MessageView.swift new file mode 100644 index 0000000..3051e4f --- /dev/null +++ b/demo/Views/Message/MessageView.swift @@ -0,0 +1,18 @@ +// +// MessageView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct MessageView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + MessageView() +} diff --git a/demo/Views/User/Account/AccountView.swift b/demo/Views/User/Account/AccountView.swift new file mode 100644 index 0000000..9ddc3fa --- /dev/null +++ b/demo/Views/User/Account/AccountView.swift @@ -0,0 +1,18 @@ +// +// AccountView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct AccountView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + AccountView() +} diff --git a/demo/Views/User/Account/BalanceView.swift b/demo/Views/User/Account/BalanceView.swift new file mode 100644 index 0000000..a2a791e --- /dev/null +++ b/demo/Views/User/Account/BalanceView.swift @@ -0,0 +1,18 @@ +// +// BalanceView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct BalanceView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + BalanceView() +} diff --git a/demo/Views/User/Account/CouponView.swift b/demo/Views/User/Account/CouponView.swift new file mode 100644 index 0000000..f22420b --- /dev/null +++ b/demo/Views/User/Account/CouponView.swift @@ -0,0 +1,18 @@ +// +// CouponView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct CouponView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + CouponView() +} diff --git a/demo/Views/User/Order/OrderDetailView.swift b/demo/Views/User/Order/OrderDetailView.swift new file mode 100644 index 0000000..839a92a --- /dev/null +++ b/demo/Views/User/Order/OrderDetailView.swift @@ -0,0 +1,18 @@ +// +// OrderDetailView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct OrderDetailView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + OrderDetailView() +} diff --git a/demo/Views/User/Order/OrdersView.swift b/demo/Views/User/Order/OrdersView.swift new file mode 100644 index 0000000..cbcaf4d --- /dev/null +++ b/demo/Views/User/Order/OrdersView.swift @@ -0,0 +1,18 @@ +// +// OrdersView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct OrdersView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + OrdersView() +} diff --git a/demo/Views/User/UserView.swift b/demo/Views/User/UserView.swift new file mode 100644 index 0000000..127c344 --- /dev/null +++ b/demo/Views/User/UserView.swift @@ -0,0 +1,183 @@ +// +// UserView.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI + +struct UserView: View { + var body: some View { + ScrollView { + Header + ToVip + + VStack(spacing: 16) { + InfoList + Notice + OrderShow + Coupons + tj + } + .padding(16) + .background(LinearGradient(colors: [Color.orange, Color.gray], startPoint: .top, endPoint: UnitPoint(x: 0, y: 0.5))) + .cornerRadius(12) + .offset(y: -76) + } + } + + var Header: some View { + HStack { + Image("Images/logo") + .resizable() + .frame(width: 64, height: 64) + .cornerRadius(32) + .overlay( + RoundedRectangle(cornerRadius: 32, style: .continuous) + .stroke(Color.red, lineWidth: 2) + ) + + VStack(alignment: .leading, spacing: 12, content: { + Text("用户名称") + .font(.title2) + .fontWeight(.regular) + Text("我的用户简介,超出部分需要隐藏,隐藏需要自动设置,这个文字长度也要有约束") + .font(.caption) + .foregroundColor(Color.gray) + .lineLimit(1) + }) + + Image(systemName: "gearshape") + .foregroundColor(Color.gray) + } + .padding(.horizontal, 16) + } + + var ToVip: some View { + HStack(spacing: /*@START_MENU_TOKEN@*/nil/*@END_MENU_TOKEN@*/, content: { + Spacer() + Button("立即开通") {} + .foregroundColor(Color.red) + .font(.subheadline) + .padding(.vertical, 8) + .padding(.horizontal, 16) + .background(Color.gray) + .cornerRadius(32) + }) + .padding(16) + .padding(.bottom, 64) + .frame(maxWidth: .infinity) + .background( + Image("Images/banner3").resizable(resizingMode: .tile) +// .overlay( +// UnevenRoundedRectangle(cornerRadii: RectangleCornerRadii(topLeading: 12, topTrailing: 12)) +// ) + ) + .cornerRadius(12) + .padding(.horizontal, 16) + } + + var InfoList: some View { + ScrollView(.horizontal) { + HStack(spacing: 16) { + ForEach(/*@START_MENU_TOKEN@*/0 ..< 5/*@END_MENU_TOKEN@*/) { _ in + VStack { + HStack { + Image(systemName: "star") + Text("我的积分") + } + Text("共8888分") + .font(.caption) + } + .padding(12) + .background(Color.white) + .cornerRadius(8) + } + } + } + } + + var Notice: some View { + HStack { + Text("资讯") + .padding(4) + .background(Color.red) + .foregroundColor(Color.white) + Text("平台与2024年1余额开始更新,敬请期待@@@") + .foregroundColor(Color.gray) + .frame(maxWidth: .infinity) + .multilineTextAlignment(/*@START_MENU_TOKEN@*/ .leading/*@END_MENU_TOKEN@*/) + .lineLimit(1) + Text("更多") + .foregroundColor(Color.secondary) + } + .frame(maxWidth: .infinity) + .padding(8) + .background(Color.white) + .cornerRadius(8) + } + + var OrderShow: some View { + VStack(spacing: 16) { + HStack { + Text("订单中心") + Spacer() + ShowMore() + } + .padding(8) + HStack { + Spacer() + ForEach(/*@START_MENU_TOKEN@*/0 ..< 5/*@END_MENU_TOKEN@*/) { _ in + VStack { + Image(systemName: "wallet.pass") + Text("待付款") + .font(.system(size: 12)) + } + Spacer() + } + } + } + .background(Color.white) + .cornerRadius(6) + } + + var Coupons: some View { + VStack(spacing: 16) { + HStack { + Spacer() + ForEach(/*@START_MENU_TOKEN@*/0 ..< 5/*@END_MENU_TOKEN@*/) { _ in + VStack { + Image(systemName: "wallet.pass") + Text("优惠券") + .font(.system(size: 12)) + } + Spacer() + } + } + } + .padding(12) + .background(Color.white) + .cornerRadius(6) + } + + let columns = [GridItem(.flexible()), GridItem(.flexible())] + + var tj: some View { + LazyVGrid(columns: columns, alignment: .center) { + Section { + ForEach(0 ..< 20, id: \.self) { _ in + GoodsCard() + } + } + header: { + Text("推荐广场") + } + } + } +} + +// +// #Preview { +// UserView() +// } diff --git a/demo/demoApp.swift b/demo/demoApp.swift new file mode 100644 index 0000000..f08e05c --- /dev/null +++ b/demo/demoApp.swift @@ -0,0 +1,18 @@ +// +// demoApp.swift +// demo +// +// Created by Jason on 2024/1/23. +// + +import SwiftUI +import SwiftData + +@main +struct demoApp: App { + var body: some Scene { + WindowGroup { + TabBarView() + } + } +}