diff --git a/Basic-Exercise/Podfile b/Basic-Exercise/Podfile new file mode 100644 index 0000000..01ef73f --- /dev/null +++ b/Basic-Exercise/Podfile @@ -0,0 +1,13 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'Rx' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for Rx + +pod 'RxSwift', '6.2.0' +pod 'RxCocoa', '6.2.0' + +end diff --git a/Basic-Exercise/Podfile.lock b/Basic-Exercise/Podfile.lock new file mode 100644 index 0000000..0a24ec0 --- /dev/null +++ b/Basic-Exercise/Podfile.lock @@ -0,0 +1,26 @@ +PODS: + - RxCocoa (6.2.0): + - RxRelay (= 6.2.0) + - RxSwift (= 6.2.0) + - RxRelay (6.2.0): + - RxSwift (= 6.2.0) + - RxSwift (6.2.0) + +DEPENDENCIES: + - RxCocoa (= 6.2.0) + - RxSwift (= 6.2.0) + +SPEC REPOS: + trunk: + - RxCocoa + - RxRelay + - RxSwift + +SPEC CHECKSUMS: + RxCocoa: 4baf94bb35f2c0ab31bc0cb9f1900155f646ba42 + RxRelay: e72dbfd157807478401ef1982e1c61c945c94b2f + RxSwift: d356ab7bee873611322f134c5f9ef379fa183d8f + +PODFILE CHECKSUM: 053d610d7d4fd271e23645ceb3d2ebd8801b4d1a + +COCOAPODS: 1.10.2 diff --git a/Basic-Exercise/Rx.xcodeproj/project.pbxproj b/Basic-Exercise/Rx.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c95bcd0 --- /dev/null +++ b/Basic-Exercise/Rx.xcodeproj/project.pbxproj @@ -0,0 +1,424 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXBuildFile section */ + 07FCF453FC7D2861779F14AF /* Pods_Rx.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88BFFA772BE8C60A9911DBC0 /* Pods_Rx.framework */; }; + 7007CD8126D5916700104F3C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7007CD8026D5916700104F3C /* AppDelegate.swift */; }; + 7007CD8326D5916700104F3C /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7007CD8226D5916700104F3C /* SceneDelegate.swift */; }; + 7007CD8526D5916700104F3C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7007CD8426D5916700104F3C /* ViewController.swift */; }; + 7007CD8826D5916700104F3C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7007CD8626D5916700104F3C /* Main.storyboard */; }; + 7007CD8A26D5916900104F3C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7007CD8926D5916900104F3C /* Assets.xcassets */; }; + 7007CD8D26D5916900104F3C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7007CD8B26D5916900104F3C /* LaunchScreen.storyboard */; }; + 7007CD9526D5947300104F3C /* ObservableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7007CD9426D5947300104F3C /* ObservableViewController.swift */; }; + 7007CD9726D5A76900104F3C /* TransfomationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7007CD9626D5A76900104F3C /* TransfomationViewController.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 7007CD7D26D5916700104F3C /* Rx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rx.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7007CD8026D5916700104F3C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7007CD8226D5916700104F3C /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 7007CD8426D5916700104F3C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7007CD8726D5916700104F3C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7007CD8926D5916900104F3C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7007CD8C26D5916900104F3C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 7007CD8E26D5916900104F3C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7007CD9426D5947300104F3C /* ObservableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ObservableViewController.swift; sourceTree = ""; }; + 7007CD9626D5A76900104F3C /* TransfomationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransfomationViewController.swift; sourceTree = ""; }; + 88BFFA772BE8C60A9911DBC0 /* Pods_Rx.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Rx.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9E8E3D444892F95106E46429 /* Pods-Rx.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rx.release.xcconfig"; path = "Target Support Files/Pods-Rx/Pods-Rx.release.xcconfig"; sourceTree = ""; }; + E2ECCA8A156648394D363D77 /* Pods-Rx.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Rx.debug.xcconfig"; path = "Target Support Files/Pods-Rx/Pods-Rx.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7007CD7A26D5916700104F3C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 07FCF453FC7D2861779F14AF /* Pods_Rx.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7007CD7426D5916700104F3C = { + isa = PBXGroup; + children = ( + 7007CD9626D5A76900104F3C /* TransfomationViewController.swift */, + 7007CD7F26D5916700104F3C /* Rx */, + 7007CD7E26D5916700104F3C /* Products */, + 84BDC7C35E9E2822681E6B30 /* Pods */, + 9B1552C481B2C9B08F6636EF /* Frameworks */, + ); + sourceTree = ""; + }; + 7007CD7E26D5916700104F3C /* Products */ = { + isa = PBXGroup; + children = ( + 7007CD7D26D5916700104F3C /* Rx.app */, + ); + name = Products; + sourceTree = ""; + }; + 7007CD7F26D5916700104F3C /* Rx */ = { + isa = PBXGroup; + children = ( + 7007CD8026D5916700104F3C /* AppDelegate.swift */, + 7007CD8226D5916700104F3C /* SceneDelegate.swift */, + 7007CD8426D5916700104F3C /* ViewController.swift */, + 7007CD8626D5916700104F3C /* Main.storyboard */, + 7007CD8926D5916900104F3C /* Assets.xcassets */, + 7007CD8B26D5916900104F3C /* LaunchScreen.storyboard */, + 7007CD8E26D5916900104F3C /* Info.plist */, + 7007CD9426D5947300104F3C /* ObservableViewController.swift */, + ); + path = Rx; + sourceTree = ""; + }; + 84BDC7C35E9E2822681E6B30 /* Pods */ = { + isa = PBXGroup; + children = ( + E2ECCA8A156648394D363D77 /* Pods-Rx.debug.xcconfig */, + 9E8E3D444892F95106E46429 /* Pods-Rx.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 9B1552C481B2C9B08F6636EF /* Frameworks */ = { + isa = PBXGroup; + children = ( + 88BFFA772BE8C60A9911DBC0 /* Pods_Rx.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7007CD7C26D5916700104F3C /* Rx */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7007CD9126D5916900104F3C /* Build configuration list for PBXNativeTarget "Rx" */; + buildPhases = ( + 3A14D5DBC54CF3252690A97D /* [CP] Check Pods Manifest.lock */, + 7007CD7926D5916700104F3C /* Sources */, + 7007CD7A26D5916700104F3C /* Frameworks */, + 7007CD7B26D5916700104F3C /* Resources */, + 09A68408C0BDE00A3A552B0C /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Rx; + productName = Rx; + productReference = 7007CD7D26D5916700104F3C /* Rx.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7007CD7526D5916700104F3C /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 7007CD7C26D5916700104F3C = { + CreatedOnToolsVersion = 12.5.1; + }; + }; + }; + buildConfigurationList = 7007CD7826D5916700104F3C /* Build configuration list for PBXProject "Rx" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7007CD7426D5916700104F3C; + productRefGroup = 7007CD7E26D5916700104F3C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7007CD7C26D5916700104F3C /* Rx */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7007CD7B26D5916700104F3C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7007CD8D26D5916900104F3C /* LaunchScreen.storyboard in Resources */, + 7007CD8A26D5916900104F3C /* Assets.xcassets in Resources */, + 7007CD8826D5916700104F3C /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 09A68408C0BDE00A3A552B0C /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Rx/Pods-Rx-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Rx/Pods-Rx-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Rx/Pods-Rx-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 3A14D5DBC54CF3252690A97D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Rx-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7007CD7926D5916700104F3C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7007CD8526D5916700104F3C /* ViewController.swift in Sources */, + 7007CD9526D5947300104F3C /* ObservableViewController.swift in Sources */, + 7007CD9726D5A76900104F3C /* TransfomationViewController.swift in Sources */, + 7007CD8126D5916700104F3C /* AppDelegate.swift in Sources */, + 7007CD8326D5916700104F3C /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 7007CD8626D5916700104F3C /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7007CD8726D5916700104F3C /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 7007CD8B26D5916900104F3C /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7007CD8C26D5916900104F3C /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7007CD8F26D5916900104F3C /* 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++14"; + CLANG_CXX_LIBRARY = "libc++"; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 7007CD9026D5916900104F3C /* 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++14"; + CLANG_CXX_LIBRARY = "libc++"; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7007CD9226D5916900104F3C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E2ECCA8A156648394D363D77 /* Pods-Rx.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 6925UVH9D7; + INFOPLIST_FILE = Rx/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jenny.Rx; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7007CD9326D5916900104F3C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9E8E3D444892F95106E46429 /* Pods-Rx.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 6925UVH9D7; + INFOPLIST_FILE = Rx/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.jenny.Rx; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7007CD7826D5916700104F3C /* Build configuration list for PBXProject "Rx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7007CD8F26D5916900104F3C /* Debug */, + 7007CD9026D5916900104F3C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7007CD9126D5916900104F3C /* Build configuration list for PBXNativeTarget "Rx" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7007CD9226D5916900104F3C /* Debug */, + 7007CD9326D5916900104F3C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7007CD7526D5916700104F3C /* Project object */; +} diff --git a/Basic-Exercise/Rx.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Basic-Exercise/Rx.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Basic-Exercise/Rx.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Basic-Exercise/Rx.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Basic-Exercise/Rx.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Basic-Exercise/Rx.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Basic-Exercise/Rx.xcworkspace/contents.xcworkspacedata b/Basic-Exercise/Rx.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ac3eeb8 --- /dev/null +++ b/Basic-Exercise/Rx.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Basic-Exercise/Rx.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Basic-Exercise/Rx.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Basic-Exercise/Rx.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Basic-Exercise/Rx/AppDelegate.swift b/Basic-Exercise/Rx/AppDelegate.swift new file mode 100644 index 0000000..8ca16ec --- /dev/null +++ b/Basic-Exercise/Rx/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// Rx +// +// Created by JEN Lee on 2021/08/25. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/Basic-Exercise/Rx/Assets.xcassets/AccentColor.colorset/Contents.json b/Basic-Exercise/Rx/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Basic-Exercise/Rx/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Basic-Exercise/Rx/Assets.xcassets/AppIcon.appiconset/Contents.json b/Basic-Exercise/Rx/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/Basic-Exercise/Rx/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Basic-Exercise/Rx/Assets.xcassets/Contents.json b/Basic-Exercise/Rx/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Basic-Exercise/Rx/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Basic-Exercise/Rx/Base.lproj/LaunchScreen.storyboard b/Basic-Exercise/Rx/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Basic-Exercise/Rx/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Basic-Exercise/Rx/Base.lproj/Main.storyboard b/Basic-Exercise/Rx/Base.lproj/Main.storyboard new file mode 100644 index 0000000..c81cc83 --- /dev/null +++ b/Basic-Exercise/Rx/Base.lproj/Main.storyboard @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Basic-Exercise/Rx/Info.plist b/Basic-Exercise/Rx/Info.plist new file mode 100644 index 0000000..5b531f7 --- /dev/null +++ b/Basic-Exercise/Rx/Info.plist @@ -0,0 +1,66 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UIApplicationSupportsIndirectInputEvents + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Basic-Exercise/Rx/ObservableViewController.swift b/Basic-Exercise/Rx/ObservableViewController.swift new file mode 100644 index 0000000..f9b105a --- /dev/null +++ b/Basic-Exercise/Rx/ObservableViewController.swift @@ -0,0 +1,83 @@ +// +// ObservableViewController.swift +// Rx +// +// Created by JEN Lee on 2021/08/25. +// + +import UIKit +import RxSwift + +class ObservableViewController: UIViewController { + + let disposeBag = DisposeBag() + + override func viewDidLoad() { + super.viewDidLoad() + + } + + + @IBAction func ofClicked(_ sender: Any) { + //ㅈㅅ 함수이름 바뀜,,,just임 + + let observable1 = Observable.just(1) + //let observable2 = Observable.just([1,2,3]) + observable1.subscribe { event in + print(event) + }.disposed(by: disposeBag) + + } + + @IBAction func justClicked(_ sender: Any) { + //함수이름은 just지만 of랍니다? + + let observable2 = Observable.of(1, 2, 3) + + observable2.subscribe { event in + print(event) + }.disposed(by: disposeBag) + + let observable3 = Observable.of([1, 2, 3]) + + observable3.subscribe { event in + print(event) + }.dispose() + + } + + + @IBAction func fromClicked(_ sender: Any) { + + //of 랑 차이점 보기 + + let observable4 = Observable.from([1, 2, 3, 4, 5]) + + observable4.subscribe { event in + print(event) + } + + observable4.subscribe { event in + if let element = event.element { + print(element) + } + } + + } + + + @IBAction func rangeClicked(_ sender: Any) { + + let _ = Observable.range(start: 3, count: 6).subscribe { event in + print(event) + } + + } + + + + + + + +} diff --git a/Basic-Exercise/Rx/SceneDelegate.swift b/Basic-Exercise/Rx/SceneDelegate.swift new file mode 100644 index 0000000..f2ede95 --- /dev/null +++ b/Basic-Exercise/Rx/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// Rx +// +// Created by JEN Lee on 2021/08/25. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/Basic-Exercise/Rx/TransfomationViewController.swift b/Basic-Exercise/Rx/TransfomationViewController.swift new file mode 100644 index 0000000..f7311cb --- /dev/null +++ b/Basic-Exercise/Rx/TransfomationViewController.swift @@ -0,0 +1,186 @@ +// +// TransfomationViewController.swift +// Rx +// +// Created by JEN Lee on 2021/08/25. +// + +import UIKit +import RxSwift +import RxCocoa + +class TransfomationViewController: UIViewController { + + let disposeBag = DisposeBag() + @IBOutlet var myButton: UIButton! + + override func viewDidLoad() { + super.viewDidLoad() + + } + + @IBAction func toArray(_ sender: Any) { + Observable + .of(1,2,3) + .toArray() + .subscribe({ + print($0) + }) + .disposed(by: disposeBag) + + } + + @IBAction func map(_ sender: Any) { + Observable + .of(1,2,3) + .map{ + $0 * 2 + } + .subscribe(onNext: { + print($0) + }) + .disposed(by: disposeBag) + +// let skills = ["Swift", "SwiftUI", "RxSwift"] +// Observable.from(skills) +// .map { $0.count } +// .subscribe{ print($0) } +// .disposed(by: disposeBag) + + } + + @IBAction func flatMap(_ sender: Any) { + + struct Student { + var score: BehaviorSubject + } + + let ryan = Student(score: BehaviorSubject(value: 80)) + let charlotte = Student(score: BehaviorSubject(value: 90)) + + let student = PublishSubject() + + student + .flatMap{ + $0.score + } + + .subscribe(onNext: { + print($0) + }) + .disposed(by: disposeBag) + + + print("flatMap") + + student.onNext(ryan) // Printed: 80 + + ryan.score.onNext(85) // Printed: 80 85 + + student.onNext(charlotte) // Printed: 80 85 90 + + ryan.score.onNext(95) // Printed: 80 85 90 95 + + charlotte.score.onNext(100) // Printed: 80 85 90 95 100 + + //1. 두 학생 객체 생성, 각 score를 갖는 BehaviorSubject객체로 초기화 + + //2. 바로 전의 두 학생 객체의 score에 대한 이벤트를 처리하기 위해 PublishSubject객체 생성 + + //3. student시퀀스를 score값을 기준으로 flatMap 변환 + + //4. 변환된 시퀀스에 구독 요청 및 이벤트 print() + } + + + @IBAction func flatMapLatest(_ sender: Any) { + + struct Student { + var score: BehaviorSubject + } + + let laura = Student(score: BehaviorSubject(value: 80)) + let charlotte = Student(score: BehaviorSubject(value: 90)) + + let student = PublishSubject() + + student + .flatMapLatest { + $0.score + } + .subscribe(onNext: { + print($0) + }) + .disposed(by: disposeBag) + + print("flatMapLatest") + + student.onNext(laura) // print : 80 + laura.score.onNext(85) // print : 85 + student.onNext(charlotte) // print : 90 + + laura.score.onNext(95) // print : none + charlotte.score.onNext(100) // print : 100 + } + + @IBAction func buffer(_ sender: Any) { + + Observable.interval(.seconds(1), scheduler: MainScheduler.instance) + .buffer(timeSpan: .seconds(2), count: 3, scheduler: MainScheduler.instance) + .take(5) + .subscribe{ print($0) } + .disposed(by: disposeBag) + + } + + @IBAction func windo(_ sender: Any) { + + Observable.interval(.seconds(1), scheduler: MainScheduler.instance) + .window(timeSpan: .seconds(2), count: 3, scheduler: MainScheduler.instance) + .take(5) + .subscribe{ + print($0) + + if let observable = $0.element { + observable.subscribe { print("inner : \($0)") } + } + } + .disposed(by: disposeBag) + + } + + @IBAction func groupBy(_ sender: Any) { + + let words = ["Apple","Banana","Orange","Book","City","Axe"] + + // 첫번째 문자로 그룹핑 + Observable.from(words) + .groupBy { $0.first } + .flatMap{ $0.toArray() } + .subscribe{ print($0) } + .disposed(by: disposeBag) + + //홀수 짝수로 그룹핑 +// Observable.range(start: 1, count: 10) +// .groupBy{ $0.isMultiple(of: 2) } +// .flatMap{ $0.toArray() } +// .subscribe{ print($0) } +// .disposed(by: disposeBag) +// + + } + + + @IBAction func scan(_ sender: Any) { + Observable.range(start: 1, count: 10) + .scan(0, accumulator: +) + .subscribe{ print($0) } + .disposed(by: disposeBag) + + + } + + + +} + diff --git a/Basic-Exercise/Rx/ViewController.swift b/Basic-Exercise/Rx/ViewController.swift new file mode 100644 index 0000000..19cd4e7 --- /dev/null +++ b/Basic-Exercise/Rx/ViewController.swift @@ -0,0 +1,19 @@ +// +// ViewController.swift +// Rx +// +// Created by JEN Lee on 2021/08/25. +// + +import UIKit +import RxSwift + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + } + + +} +