commit bf350882b4e01d6d776ae1802e47af22f1308748 Author: Ching Date: Tue May 2 02:55:13 2023 +0800 feat(view): 增加 profile page 和 feed page 增加 profile page 和 feed page Signed-off-by: Ching diff --git a/dudu-tweet/dudu-tweet.xcodeproj/project.pbxproj b/dudu-tweet/dudu-tweet.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c319e70 --- /dev/null +++ b/dudu-tweet/dudu-tweet.xcodeproj/project.pbxproj @@ -0,0 +1,519 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 2492CC0D2A000EB00086C525 /* dudu_tweetApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2492CC0C2A000EB00086C525 /* dudu_tweetApp.swift */; }; + 2492CC0F2A000EB00086C525 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2492CC0E2A000EB00086C525 /* ContentView.swift */; }; + 2492CC112A000EB10086C525 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2492CC102A000EB10086C525 /* Assets.xcassets */; }; + 2492CC152A000EB10086C525 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2492CC142A000EB10086C525 /* Preview Assets.xcassets */; }; + 2492CC252A0023220086C525 /* FeedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2492CC242A0023220086C525 /* FeedView.swift */; }; + 2492CC282A0025DD0086C525 /* TweetRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2492CC272A0025DD0086C525 /* TweetRowView.swift */; }; + 24A59AB42A002EB8009C9E3E /* MainTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A59AB32A002EB8009C9E3E /* MainTabView.swift */; }; + 24A59ABA2A0030CB009C9E3E /* ExploreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A59AB92A0030CB009C9E3E /* ExploreView.swift */; }; + 24A59ABC2A0030EC009C9E3E /* NotificationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A59ABB2A0030EC009C9E3E /* NotificationsView.swift */; }; + 24A59ABE2A003108009C9E3E /* MessagesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A59ABD2A003108009C9E3E /* MessagesView.swift */; }; + 24A59AC22A003249009C9E3E /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A59AC12A003249009C9E3E /* ProfileView.swift */; }; + 24A59AC42A003A52009C9E3E /* TwewtFilterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A59AC32A003A52009C9E3E /* TwewtFilterViewModel.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2492CC092A000EB00086C525 /* dudu-tweet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "dudu-tweet.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2492CC0C2A000EB00086C525 /* dudu_tweetApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = dudu_tweetApp.swift; sourceTree = ""; }; + 2492CC0E2A000EB00086C525 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 2492CC102A000EB10086C525 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2492CC122A000EB10086C525 /* dudu_tweet.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = dudu_tweet.entitlements; sourceTree = ""; }; + 2492CC142A000EB10086C525 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 2492CC242A0023220086C525 /* FeedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedView.swift; sourceTree = ""; }; + 2492CC272A0025DD0086C525 /* TweetRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TweetRowView.swift; sourceTree = ""; }; + 24A59AB32A002EB8009C9E3E /* MainTabView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabView.swift; sourceTree = ""; }; + 24A59AB92A0030CB009C9E3E /* ExploreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExploreView.swift; sourceTree = ""; }; + 24A59ABB2A0030EC009C9E3E /* NotificationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationsView.swift; sourceTree = ""; }; + 24A59ABD2A003108009C9E3E /* MessagesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesView.swift; sourceTree = ""; }; + 24A59AC12A003249009C9E3E /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = ""; }; + 24A59AC32A003A52009C9E3E /* TwewtFilterViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwewtFilterViewModel.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2492CC062A000EB00086C525 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2492CC002A000EB00086C525 = { + isa = PBXGroup; + children = ( + 2492CC0B2A000EB00086C525 /* dudu-tweet */, + 2492CC0A2A000EB00086C525 /* Products */, + ); + sourceTree = ""; + }; + 2492CC0A2A000EB00086C525 /* Products */ = { + isa = PBXGroup; + children = ( + 2492CC092A000EB00086C525 /* dudu-tweet.app */, + ); + name = Products; + sourceTree = ""; + }; + 2492CC0B2A000EB00086C525 /* dudu-tweet */ = { + isa = PBXGroup; + children = ( + 2492CC1F2A0022990086C525 /* Extensions */, + 2492CC1E2A0022970086C525 /* Model */, + 2492CC1D2A0022960086C525 /* Service */, + 2492CC1B2A00228F0086C525 /* Core */, + 2492CC0C2A000EB00086C525 /* dudu_tweetApp.swift */, + 2492CC0E2A000EB00086C525 /* ContentView.swift */, + 2492CC102A000EB10086C525 /* Assets.xcassets */, + 2492CC122A000EB10086C525 /* dudu_tweet.entitlements */, + 2492CC132A000EB10086C525 /* Preview Content */, + ); + path = "dudu-tweet"; + sourceTree = ""; + }; + 2492CC132A000EB10086C525 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 2492CC142A000EB10086C525 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 2492CC1B2A00228F0086C525 /* Core */ = { + isa = PBXGroup; + children = ( + 2492CC212A0022C30086C525 /* Components */, + 24A59AB82A00308E009C9E3E /* Profile */, + 24A59AB72A00305E009C9E3E /* Explore */, + 24A59AB62A00305C009C9E3E /* Notifications */, + 24A59AB52A00305A009C9E3E /* Messages */, + 24A59AB22A002E79009C9E3E /* MainTab */, + 2492CC202A0022BB0086C525 /* Feed */, + ); + path = Core; + sourceTree = ""; + }; + 2492CC1D2A0022960086C525 /* Service */ = { + isa = PBXGroup; + children = ( + ); + path = Service; + sourceTree = ""; + }; + 2492CC1E2A0022970086C525 /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 2492CC1F2A0022990086C525 /* Extensions */ = { + isa = PBXGroup; + children = ( + ); + path = Extensions; + sourceTree = ""; + }; + 2492CC202A0022BB0086C525 /* Feed */ = { + isa = PBXGroup; + children = ( + 2492CC232A0023020086C525 /* View */, + 2492CC222A0022F80086C525 /* ViewModels */, + ); + path = Feed; + sourceTree = ""; + }; + 2492CC212A0022C30086C525 /* Components */ = { + isa = PBXGroup; + children = ( + 2492CC262A0025A50086C525 /* Tweets */, + ); + path = Components; + sourceTree = ""; + }; + 2492CC222A0022F80086C525 /* ViewModels */ = { + isa = PBXGroup; + children = ( + ); + path = ViewModels; + sourceTree = ""; + }; + 2492CC232A0023020086C525 /* View */ = { + isa = PBXGroup; + children = ( + 2492CC242A0023220086C525 /* FeedView.swift */, + ); + path = View; + sourceTree = ""; + }; + 2492CC262A0025A50086C525 /* Tweets */ = { + isa = PBXGroup; + children = ( + 2492CC272A0025DD0086C525 /* TweetRowView.swift */, + ); + path = Tweets; + sourceTree = ""; + }; + 24A59AB22A002E79009C9E3E /* MainTab */ = { + isa = PBXGroup; + children = ( + 24A59AB32A002EB8009C9E3E /* MainTabView.swift */, + ); + path = MainTab; + sourceTree = ""; + }; + 24A59AB52A00305A009C9E3E /* Messages */ = { + isa = PBXGroup; + children = ( + 24A59ABD2A003108009C9E3E /* MessagesView.swift */, + ); + path = Messages; + sourceTree = ""; + }; + 24A59AB62A00305C009C9E3E /* Notifications */ = { + isa = PBXGroup; + children = ( + 24A59ABB2A0030EC009C9E3E /* NotificationsView.swift */, + ); + path = Notifications; + sourceTree = ""; + }; + 24A59AB72A00305E009C9E3E /* Explore */ = { + isa = PBXGroup; + children = ( + 24A59AB92A0030CB009C9E3E /* ExploreView.swift */, + ); + path = Explore; + sourceTree = ""; + }; + 24A59AB82A00308E009C9E3E /* Profile */ = { + isa = PBXGroup; + children = ( + 24A59AC02A003231009C9E3E /* ViewModels */, + 24A59ABF2A003221009C9E3E /* Views */, + ); + path = Profile; + sourceTree = ""; + }; + 24A59ABF2A003221009C9E3E /* Views */ = { + isa = PBXGroup; + children = ( + 24A59AC12A003249009C9E3E /* ProfileView.swift */, + ); + path = Views; + sourceTree = ""; + }; + 24A59AC02A003231009C9E3E /* ViewModels */ = { + isa = PBXGroup; + children = ( + 24A59AC32A003A52009C9E3E /* TwewtFilterViewModel.swift */, + ); + path = ViewModels; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2492CC082A000EB00086C525 /* dudu-tweet */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2492CC182A000EB10086C525 /* Build configuration list for PBXNativeTarget "dudu-tweet" */; + buildPhases = ( + 2492CC052A000EB00086C525 /* Sources */, + 2492CC062A000EB00086C525 /* Frameworks */, + 2492CC072A000EB00086C525 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "dudu-tweet"; + productName = "dudu-tweet"; + productReference = 2492CC092A000EB00086C525 /* dudu-tweet.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2492CC012A000EB00086C525 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + 2492CC082A000EB00086C525 = { + CreatedOnToolsVersion = 14.2; + }; + }; + }; + buildConfigurationList = 2492CC042A000EB00086C525 /* Build configuration list for PBXProject "dudu-tweet" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2492CC002A000EB00086C525; + productRefGroup = 2492CC0A2A000EB00086C525 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2492CC082A000EB00086C525 /* dudu-tweet */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2492CC072A000EB00086C525 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2492CC152A000EB10086C525 /* Preview Assets.xcassets in Resources */, + 2492CC112A000EB10086C525 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2492CC052A000EB00086C525 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24A59ABE2A003108009C9E3E /* MessagesView.swift in Sources */, + 24A59AC22A003249009C9E3E /* ProfileView.swift in Sources */, + 2492CC0F2A000EB00086C525 /* ContentView.swift in Sources */, + 2492CC282A0025DD0086C525 /* TweetRowView.swift in Sources */, + 24A59AC42A003A52009C9E3E /* TwewtFilterViewModel.swift in Sources */, + 2492CC252A0023220086C525 /* FeedView.swift in Sources */, + 2492CC0D2A000EB00086C525 /* dudu_tweetApp.swift in Sources */, + 24A59ABA2A0030CB009C9E3E /* ExploreView.swift in Sources */, + 24A59AB42A002EB8009C9E3E /* MainTabView.swift in Sources */, + 24A59ABC2A0030EC009C9E3E /* NotificationsView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 2492CC162A000EB10086C525 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 2492CC172A000EB10086C525 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + 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; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 2492CC192A000EB10086C525 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "dudu-tweet/dudu_tweet.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"dudu-tweet/Preview Content\""; + DEVELOPMENT_TEAM = JTQVB9KL4C; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 13.1; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.tunpok.ios.dudu-tweet"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2492CC1A2A000EB10086C525 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "dudu-tweet/dudu_tweet.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"dudu-tweet/Preview Content\""; + DEVELOPMENT_TEAM = JTQVB9KL4C; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 13.1; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.tunpok.ios.dudu-tweet"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = auto; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2492CC042A000EB00086C525 /* Build configuration list for PBXProject "dudu-tweet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2492CC162A000EB10086C525 /* Debug */, + 2492CC172A000EB10086C525 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2492CC182A000EB10086C525 /* Build configuration list for PBXNativeTarget "dudu-tweet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2492CC192A000EB10086C525 /* Debug */, + 2492CC1A2A000EB10086C525 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2492CC012A000EB00086C525 /* Project object */; +} diff --git a/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/xcuserdata/ching.xcuserdatad/UserInterfaceState.xcuserstate b/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/xcuserdata/ching.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..59eb79c Binary files /dev/null and b/dudu-tweet/dudu-tweet.xcodeproj/project.xcworkspace/xcuserdata/ching.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/dudu-tweet/dudu-tweet.xcodeproj/xcshareddata/xcschemes/dudu-tweet.xcscheme b/dudu-tweet/dudu-tweet.xcodeproj/xcshareddata/xcschemes/dudu-tweet.xcscheme new file mode 100644 index 0000000..0bf6645 --- /dev/null +++ b/dudu-tweet/dudu-tweet.xcodeproj/xcshareddata/xcschemes/dudu-tweet.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dudu-tweet/dudu-tweet.xcodeproj/xcuserdata/ching.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/dudu-tweet/dudu-tweet.xcodeproj/xcuserdata/ching.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..7721546 --- /dev/null +++ b/dudu-tweet/dudu-tweet.xcodeproj/xcuserdata/ching.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/dudu-tweet/dudu-tweet.xcodeproj/xcuserdata/ching.xcuserdatad/xcschemes/xcschememanagement.plist b/dudu-tweet/dudu-tweet.xcodeproj/xcuserdata/ching.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..202ac12 --- /dev/null +++ b/dudu-tweet/dudu-tweet.xcodeproj/xcuserdata/ching.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + dudu-tweet.xcscheme_^#shared#^_ + + orderHint + 0 + + + SuppressBuildableAutocreation + + 2492CC082A000EB00086C525 + + primary + + + + + diff --git a/dudu-tweet/dudu-tweet/Assets.xcassets/AccentColor.colorset/Contents.json b/dudu-tweet/dudu-tweet/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dudu-tweet/dudu-tweet/Assets.xcassets/AppIcon.appiconset/Contents.json b/dudu-tweet/dudu-tweet/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..532cd72 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,63 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dudu-tweet/dudu-tweet/Assets.xcassets/Contents.json b/dudu-tweet/dudu-tweet/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dudu-tweet/dudu-tweet/ContentView.swift b/dudu-tweet/dudu-tweet/ContentView.swift new file mode 100644 index 0000000..85e63e6 --- /dev/null +++ b/dudu-tweet/dudu-tweet/ContentView.swift @@ -0,0 +1,26 @@ +// +// ContentView.swift +// dudu-tweet +// +// Created by ching on 2023/5/1. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") + } + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/dudu-tweet/dudu-tweet/Core/Components/Tweets/TweetRowView.swift b/dudu-tweet/dudu-tweet/Core/Components/Tweets/TweetRowView.swift new file mode 100644 index 0000000..0458783 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/Components/Tweets/TweetRowView.swift @@ -0,0 +1,83 @@ +// +// TweetRowView.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import SwiftUI + +struct TweetRowView: View { + var body: some View { + VStack(alignment: .leading) { + // profile image + user info + tweet + HStack(alignment: .top, spacing: 12) { + // profile image + Circle() + .frame(width: 56, height: 56) + .foregroundColor(Color(.systemBlue)) + + // user info + tweet caption + VStack(alignment: .leading) { + // user info + HStack { + Text("Zhang San") + .font(.subheadline).bold() + Text("@zhang3") + .foregroundColor(.gray) + .font(.caption) + Text("2min") + .foregroundColor(.gray) + .font(.caption) + } + + // tweet caption + Text("全都不是我干的。") + .font(.subheadline) + .multilineTextAlignment(.leading) + } + } + // action buttons + HStack { + Button { + // action here + } label: { + Image(systemName: "bubble.left") + .font(.subheadline) + } + Spacer() + Button { + // action here + } label: { + Image(systemName: "arrow.2.squarepath") + .font(.subheadline) + } + Spacer() + Button { + // action here + } label: { + Image(systemName: "heart") + .font(.subheadline) + } + Spacer() + Button { + // action here + } label: { + Image(systemName: "bookmark") + .font(.subheadline) + } + } + .foregroundColor(.gray) + .padding() + Divider() + } + .padding() + } + +} + +struct TweetRowView_Previews: PreviewProvider { + static var previews: some View { + TweetRowView() + } +} diff --git a/dudu-tweet/dudu-tweet/Core/Explore/ExploreView.swift b/dudu-tweet/dudu-tweet/Core/Explore/ExploreView.swift new file mode 100644 index 0000000..55c5bd5 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/Explore/ExploreView.swift @@ -0,0 +1,20 @@ +// +// ExploreView.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import SwiftUI + +struct ExploreView: View { + var body: some View { + Text("Explore view") + } +} + +struct ExploreView_Previews: PreviewProvider { + static var previews: some View { + ExploreView() + } +} diff --git a/dudu-tweet/dudu-tweet/Core/Feed/View/FeedView.swift b/dudu-tweet/dudu-tweet/Core/Feed/View/FeedView.swift new file mode 100644 index 0000000..969a93b --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/Feed/View/FeedView.swift @@ -0,0 +1,26 @@ +// +// FeedView.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import SwiftUI + +struct FeedView: View { + var body: some View { + ScrollView { + LazyVStack { + ForEach(0 ... 20, id: \.self) { _ in + TweetRowView() + } + } + } + } +} + +struct FeedView_Previews: PreviewProvider { + static var previews: some View { + FeedView() + } +} diff --git a/dudu-tweet/dudu-tweet/Core/MainTab/MainTabView.swift b/dudu-tweet/dudu-tweet/Core/MainTab/MainTabView.swift new file mode 100644 index 0000000..f74f9a7 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/MainTab/MainTabView.swift @@ -0,0 +1,51 @@ +// +// MainTabView.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import SwiftUI + +struct MainTabView: View { + @State private var selectedIndex: Int = 0 + + var body: some View { + TabView(selection: $selectedIndex) { + FeedView() + .onTapGesture { + self.selectedIndex = 0 + } + .tabItem { + Image(systemName: "house") + }.tag(0) + ExploreView() + .onTapGesture { + self.selectedIndex = 1 + } + .tabItem { + Image(systemName: "magnifyingglass") + }.tag(1) + NotificationsView() + .onTapGesture { + self.selectedIndex = 2 + } + .tabItem { + Image(systemName: "bell") + }.tag(2) + MessagesView() + .onTapGesture { + self.selectedIndex = 3 + } + .tabItem { + Image(systemName: "envelope") + }.tag(3) + } + } +} + +struct MainTabView_Previews: PreviewProvider { + static var previews: some View { + MainTabView() + } +} diff --git a/dudu-tweet/dudu-tweet/Core/Messages/MessagesView.swift b/dudu-tweet/dudu-tweet/Core/Messages/MessagesView.swift new file mode 100644 index 0000000..f68f3c0 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/Messages/MessagesView.swift @@ -0,0 +1,20 @@ +// +// MessagesView.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import SwiftUI + +struct MessagesView: View { + var body: some View { + Text("Messages") + } +} + +struct MessagesView_Previews: PreviewProvider { + static var previews: some View { + MessagesView() + } +} diff --git a/dudu-tweet/dudu-tweet/Core/Notifications/NotificationsView.swift b/dudu-tweet/dudu-tweet/Core/Notifications/NotificationsView.swift new file mode 100644 index 0000000..4ec3e61 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/Notifications/NotificationsView.swift @@ -0,0 +1,20 @@ +// +// NotificationsView.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import SwiftUI + +struct NotificationsView: View { + var body: some View { + Text("Notifications") + } +} + +struct NotificationsView_Previews: PreviewProvider { + static var previews: some View { + NotificationsView() + } +} diff --git a/dudu-tweet/dudu-tweet/Core/Profile/ViewModels/TwewtFilterViewModel.swift b/dudu-tweet/dudu-tweet/Core/Profile/ViewModels/TwewtFilterViewModel.swift new file mode 100644 index 0000000..46c914a --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/Profile/ViewModels/TwewtFilterViewModel.swift @@ -0,0 +1,23 @@ +// +// TwewtFilterViewModel.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import Foundation + + +enum TweetFilterViewModel: Int, CaseIterable { + case tweets + case replies + case likes + + var title: String { + switch self { + case .tweets: return "Tweets" + case .replies: return "Replies" + case .likes: return "Likes" + } + } +} diff --git a/dudu-tweet/dudu-tweet/Core/Profile/Views/ProfileView.swift b/dudu-tweet/dudu-tweet/Core/Profile/Views/ProfileView.swift new file mode 100644 index 0000000..60d6a83 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Core/Profile/Views/ProfileView.swift @@ -0,0 +1,174 @@ +// +// ProfileView.swift +// dudu-tweet +// +// Created by ching on 2023/5/2. +// + +import SwiftUI + +struct ProfileView: View { + @State private var selectedFilter: TweetFilterViewModel = .tweets + @Namespace var animation + + var body: some View { + VStack(alignment: .leading) { + headerView + + actionButtons + + userInfoDetails + + tweetFilterBar + + tweetsView + + Spacer() + } + } +} + +struct ProfileView_Previews: PreviewProvider { + static var previews: some View { + ProfileView() + } +} + +extension ProfileView { + var headerView: some View { + ZStack(alignment: .bottomLeading) { + Color(.systemBlue) + .ignoresSafeArea() + VStack { + Button { + // action here + } label: { + Image(systemName: "arrow.left") + .resizable() + .frame(width: 20, height: 16) + .foregroundColor(.white) + .offset(x: 16, y: 12) + } + + Circle() + .frame(width: 72, height: 72) + .offset(x: 16, y: 24) + } + } + .frame(height: 96) + } + + var actionButtons: some View { + HStack(spacing: 12) { + Spacer() + Image(systemName: "bell.badge") + .font(.title3) + .padding(6) + .overlay(Circle().stroke(Color.gray, lineWidth: 0.75)) + + Button { + // action here + } label: { + Text("Edit Profile") + .font(.subheadline).bold() + .frame(width: 120, height: 32) + .foregroundColor(.black) + .overlay(RoundedRectangle(cornerRadius: 20).stroke(Color.gray, lineWidth: 0.75)) + } + } + .padding(.trailing) + } + + var userInfoDetails: some View { + VStack(alignment: .leading, spacing: 4) { + HStack { + Text("Zhang San") + .font(.title2).bold() + Image(systemName: "checkmark.seal.fill") + .foregroundColor(Color(.systemBlue)) + } + Text("@zhang3") + .font(.subheadline) + .foregroundColor(.gray) + Text("一个普通人") + .font(.subheadline) + .padding(.vertical) + + HStack(spacing: 24) { + HStack { + Image(systemName: "mappin.and.ellipse") + Text("中国") + } + HStack { + Image(systemName: "link") + Text("www.zhangsan.com") + } + } + .foregroundColor(.gray) + .font(.caption) + + HStack(spacing: 24) { + HStack(spacing: 4) { + Text("13214") + .bold() + .font(.subheadline) + Text("Following") + .font(.caption) + .foregroundColor(.gray) + } + HStack(spacing: 4) { + Text("995353") + .bold() + .font(.subheadline) + Text("Followers") + .font(.caption) + .foregroundColor(.gray) + } + } + .padding(.vertical) + } + .padding(.horizontal) + } + + var tweetFilterBar: some View { + HStack { + ForEach(TweetFilterViewModel.allCases, id: \.rawValue) { item in + VStack { + Text(item.title) + .font(.subheadline) + .fontWeight(selectedFilter == item ? .semibold : .regular) + .foregroundColor(selectedFilter == item ? .black : .gray) + + if selectedFilter == item { + Capsule() + .foregroundColor(Color(.systemBlue)) + .frame(height: 3) + .matchedGeometryEffect(id: "filter", in: animation) + } else { + Capsule() + .foregroundColor(Color(.clear)) + .frame(height: 3) + } + } + .onTapGesture { + withAnimation(.easeInOut) { + self.selectedFilter = item + } + } + } + } + .overlay(Divider().offset(x:0, y:16)) + + } + + var tweetsView: some View { + ScrollView { + LazyVStack { + ForEach(0...9, id: \.self) { _ in + TweetRowView() + } + } + } + + } +} diff --git a/dudu-tweet/dudu-tweet/Preview Content/Preview Assets.xcassets/Contents.json b/dudu-tweet/dudu-tweet/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/dudu-tweet/dudu-tweet/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/dudu-tweet/dudu-tweet/dudu_tweet.entitlements b/dudu-tweet/dudu-tweet/dudu_tweet.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/dudu-tweet/dudu-tweet/dudu_tweet.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/dudu-tweet/dudu-tweet/dudu_tweetApp.swift b/dudu-tweet/dudu-tweet/dudu_tweetApp.swift new file mode 100644 index 0000000..fb30812 --- /dev/null +++ b/dudu-tweet/dudu-tweet/dudu_tweetApp.swift @@ -0,0 +1,17 @@ +// +// dudu_tweetApp.swift +// dudu-tweet +// +// Created by ching on 2023/5/1. +// + +import SwiftUI + +@main +struct dudu_tweetApp: App { + var body: some Scene { + WindowGroup { + MainTabView() + } + } +}