diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar.xcodeproj/project.pbxproj" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar.xcodeproj/project.pbxproj" new file mode 100644 index 0000000..fa3410e --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar.xcodeproj/project.pbxproj" @@ -0,0 +1,467 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 089115011AAC0F9900A37F2D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 089115001AAC0F9900A37F2D /* main.m */; }; + 089115041AAC0F9900A37F2D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 089115031AAC0F9900A37F2D /* AppDelegate.m */; }; + 089115071AAC0F9900A37F2D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 089115061AAC0F9900A37F2D /* ViewController.m */; }; + 0891150A1AAC0F9900A37F2D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 089115081AAC0F9900A37F2D /* Main.storyboard */; }; + 0891150C1AAC0F9900A37F2D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0891150B1AAC0F9900A37F2D /* Images.xcassets */; }; + 0891150F1AAC0F9900A37F2D /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0891150D1AAC0F9900A37F2D /* LaunchScreen.xib */; }; + 0891151B1AAC0F9900A37F2D /* MyCalendarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0891151A1AAC0F9900A37F2D /* MyCalendarTests.m */; }; + 089115281AAC10A000A37F2D /* MyCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 089115271AAC10A000A37F2D /* MyCell.m */; }; + 0891152B1AAC128300A37F2D /* MyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0891152A1AAC128300A37F2D /* MyView.m */; }; + 0891152F1AAC12C700A37F2D /* Tool.m in Sources */ = {isa = PBXBuildFile; fileRef = 0891152E1AAC12C700A37F2D /* Tool.m */; }; + 089115321AAC268B00A37F2D /* MyHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 089115311AAC268B00A37F2D /* MyHeader.m */; }; + 089115351AAC7A4100A37F2D /* CellNil.m in Sources */ = {isa = PBXBuildFile; fileRef = 089115341AAC7A4100A37F2D /* CellNil.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 089115151AAC0F9900A37F2D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 089114F31AAC0F9900A37F2D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 089114FA1AAC0F9900A37F2D; + remoteInfo = MyCalendar; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 089114FB1AAC0F9900A37F2D /* MyCalendar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyCalendar.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 089114FF1AAC0F9900A37F2D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 089115001AAC0F9900A37F2D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 089115021AAC0F9900A37F2D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 089115031AAC0F9900A37F2D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 089115051AAC0F9900A37F2D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 089115061AAC0F9900A37F2D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 089115091AAC0F9900A37F2D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 0891150B1AAC0F9900A37F2D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 0891150E1AAC0F9900A37F2D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 089115141AAC0F9900A37F2D /* MyCalendarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyCalendarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 089115191AAC0F9900A37F2D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0891151A1AAC0F9900A37F2D /* MyCalendarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyCalendarTests.m; sourceTree = ""; }; + 089115261AAC10A000A37F2D /* MyCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyCell.h; path = ../MyCell.h; sourceTree = ""; }; + 089115271AAC10A000A37F2D /* MyCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MyCell.m; path = ../MyCell.m; sourceTree = ""; }; + 089115291AAC128300A37F2D /* MyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyView.h; sourceTree = ""; }; + 0891152A1AAC128300A37F2D /* MyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyView.m; sourceTree = ""; }; + 0891152D1AAC12C700A37F2D /* Tool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Tool.h; sourceTree = ""; }; + 0891152E1AAC12C700A37F2D /* Tool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Tool.m; sourceTree = ""; }; + 089115301AAC268B00A37F2D /* MyHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyHeader.h; sourceTree = ""; }; + 089115311AAC268B00A37F2D /* MyHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyHeader.m; sourceTree = ""; }; + 089115331AAC7A4100A37F2D /* CellNil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CellNil.h; sourceTree = ""; }; + 089115341AAC7A4100A37F2D /* CellNil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CellNil.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 089114F81AAC0F9900A37F2D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 089115111AAC0F9900A37F2D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089114F21AAC0F9900A37F2D = { + isa = PBXGroup; + children = ( + 089114FD1AAC0F9900A37F2D /* MyCalendar */, + 089115171AAC0F9900A37F2D /* MyCalendarTests */, + 089114FC1AAC0F9900A37F2D /* Products */, + ); + sourceTree = ""; + }; + 089114FC1AAC0F9900A37F2D /* Products */ = { + isa = PBXGroup; + children = ( + 089114FB1AAC0F9900A37F2D /* MyCalendar.app */, + 089115141AAC0F9900A37F2D /* MyCalendarTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 089114FD1AAC0F9900A37F2D /* MyCalendar */ = { + isa = PBXGroup; + children = ( + 0891152C1AAC12A700A37F2D /* Tools */, + 089115021AAC0F9900A37F2D /* AppDelegate.h */, + 089115031AAC0F9900A37F2D /* AppDelegate.m */, + 089115051AAC0F9900A37F2D /* ViewController.h */, + 089115061AAC0F9900A37F2D /* ViewController.m */, + 089115081AAC0F9900A37F2D /* Main.storyboard */, + 089115261AAC10A000A37F2D /* MyCell.h */, + 089115271AAC10A000A37F2D /* MyCell.m */, + 089115331AAC7A4100A37F2D /* CellNil.h */, + 089115341AAC7A4100A37F2D /* CellNil.m */, + 089115301AAC268B00A37F2D /* MyHeader.h */, + 089115311AAC268B00A37F2D /* MyHeader.m */, + 089115291AAC128300A37F2D /* MyView.h */, + 0891152A1AAC128300A37F2D /* MyView.m */, + 0891150B1AAC0F9900A37F2D /* Images.xcassets */, + 0891150D1AAC0F9900A37F2D /* LaunchScreen.xib */, + 089114FE1AAC0F9900A37F2D /* Supporting Files */, + ); + path = MyCalendar; + sourceTree = ""; + }; + 089114FE1AAC0F9900A37F2D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 089114FF1AAC0F9900A37F2D /* Info.plist */, + 089115001AAC0F9900A37F2D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 089115171AAC0F9900A37F2D /* MyCalendarTests */ = { + isa = PBXGroup; + children = ( + 0891151A1AAC0F9900A37F2D /* MyCalendarTests.m */, + 089115181AAC0F9900A37F2D /* Supporting Files */, + ); + path = MyCalendarTests; + sourceTree = ""; + }; + 089115181AAC0F9900A37F2D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 089115191AAC0F9900A37F2D /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 0891152C1AAC12A700A37F2D /* Tools */ = { + isa = PBXGroup; + children = ( + 0891152D1AAC12C700A37F2D /* Tool.h */, + 0891152E1AAC12C700A37F2D /* Tool.m */, + ); + name = Tools; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 089114FA1AAC0F9900A37F2D /* MyCalendar */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0891151E1AAC0F9900A37F2D /* Build configuration list for PBXNativeTarget "MyCalendar" */; + buildPhases = ( + 089114F71AAC0F9900A37F2D /* Sources */, + 089114F81AAC0F9900A37F2D /* Frameworks */, + 089114F91AAC0F9900A37F2D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MyCalendar; + productName = MyCalendar; + productReference = 089114FB1AAC0F9900A37F2D /* MyCalendar.app */; + productType = "com.apple.product-type.application"; + }; + 089115131AAC0F9900A37F2D /* MyCalendarTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 089115211AAC0F9900A37F2D /* Build configuration list for PBXNativeTarget "MyCalendarTests" */; + buildPhases = ( + 089115101AAC0F9900A37F2D /* Sources */, + 089115111AAC0F9900A37F2D /* Frameworks */, + 089115121AAC0F9900A37F2D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 089115161AAC0F9900A37F2D /* PBXTargetDependency */, + ); + name = MyCalendarTests; + productName = MyCalendarTests; + productReference = 089115141AAC0F9900A37F2D /* MyCalendarTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089114F31AAC0F9900A37F2D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0610; + ORGANIZATIONNAME = ly; + TargetAttributes = { + 089114FA1AAC0F9900A37F2D = { + CreatedOnToolsVersion = 6.1.1; + }; + 089115131AAC0F9900A37F2D = { + CreatedOnToolsVersion = 6.1.1; + TestTargetID = 089114FA1AAC0F9900A37F2D; + }; + }; + }; + buildConfigurationList = 089114F61AAC0F9900A37F2D /* Build configuration list for PBXProject "MyCalendar" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 089114F21AAC0F9900A37F2D; + productRefGroup = 089114FC1AAC0F9900A37F2D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 089114FA1AAC0F9900A37F2D /* MyCalendar */, + 089115131AAC0F9900A37F2D /* MyCalendarTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 089114F91AAC0F9900A37F2D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0891150A1AAC0F9900A37F2D /* Main.storyboard in Resources */, + 0891150F1AAC0F9900A37F2D /* LaunchScreen.xib in Resources */, + 0891150C1AAC0F9900A37F2D /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 089115121AAC0F9900A37F2D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 089114F71AAC0F9900A37F2D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 089115071AAC0F9900A37F2D /* ViewController.m in Sources */, + 089115281AAC10A000A37F2D /* MyCell.m in Sources */, + 089115321AAC268B00A37F2D /* MyHeader.m in Sources */, + 089115041AAC0F9900A37F2D /* AppDelegate.m in Sources */, + 0891152F1AAC12C700A37F2D /* Tool.m in Sources */, + 089115011AAC0F9900A37F2D /* main.m in Sources */, + 0891152B1AAC128300A37F2D /* MyView.m in Sources */, + 089115351AAC7A4100A37F2D /* CellNil.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 089115101AAC0F9900A37F2D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0891151B1AAC0F9900A37F2D /* MyCalendarTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 089115161AAC0F9900A37F2D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 089114FA1AAC0F9900A37F2D /* MyCalendar */; + targetProxy = 089115151AAC0F9900A37F2D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 089115081AAC0F9900A37F2D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 089115091AAC0F9900A37F2D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 0891150D1AAC0F9900A37F2D /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 0891150E1AAC0F9900A37F2D /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 0891151C1AAC0F9900A37F2D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + 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 = 8.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 0891151D1AAC0F9900A37F2D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 8.1; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0891151F1AAC0F9900A37F2D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MyCalendar/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 089115201AAC0F9900A37F2D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MyCalendar/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 089115221AAC0F9900A37F2D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = MyCalendarTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyCalendar.app/MyCalendar"; + }; + name = Debug; + }; + 089115231AAC0F9900A37F2D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = MyCalendarTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyCalendar.app/MyCalendar"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 089114F61AAC0F9900A37F2D /* Build configuration list for PBXProject "MyCalendar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0891151C1AAC0F9900A37F2D /* Debug */, + 0891151D1AAC0F9900A37F2D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0891151E1AAC0F9900A37F2D /* Build configuration list for PBXNativeTarget "MyCalendar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0891151F1AAC0F9900A37F2D /* Debug */, + 089115201AAC0F9900A37F2D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 089115211AAC0F9900A37F2D /* Build configuration list for PBXNativeTarget "MyCalendarTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 089115221AAC0F9900A37F2D /* Debug */, + 089115231AAC0F9900A37F2D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089114F31AAC0F9900A37F2D /* Project object */; +} diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/AppDelegate.h" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/AppDelegate.h" new file mode 100644 index 0000000..027b869 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/AppDelegate.h" @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// MyCalendar +// +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/AppDelegate.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/AppDelegate.m" new file mode 100644 index 0000000..6590787 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/AppDelegate.m" @@ -0,0 +1,43 @@ +// +// AppDelegate.m +// MyCalendar +// +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Base.lproj/LaunchScreen.xib" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Base.lproj/LaunchScreen.xib" new file mode 100644 index 0000000..de35ebd --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Base.lproj/LaunchScreen.xib" @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Base.lproj/Main.storyboard" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Base.lproj/Main.storyboard" new file mode 100644 index 0000000..2fa7409 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Base.lproj/Main.storyboard" @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/CellNil.h" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/CellNil.h" new file mode 100644 index 0000000..b16694f --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/CellNil.h" @@ -0,0 +1,11 @@ +// +// CellNil.h +// MyCalendar +// +// + +#import + +@interface CellNil : UICollectionViewCell + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/CellNil.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/CellNil.m" new file mode 100644 index 0000000..c093e49 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/CellNil.m" @@ -0,0 +1,16 @@ +// +// CellNil.m +// MyCalendar +// +// + +#import "CellNil.h" + +@implementation CellNil + +-(id)initWithCoder:(NSCoder *)aDecoder{ + self = [super initWithCoder:aDecoder]; + return self; +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Images.xcassets/AppIcon.appiconset/Contents.json" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Images.xcassets/AppIcon.appiconset/Contents.json" new file mode 100644 index 0000000..b8236c6 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Images.xcassets/AppIcon.appiconset/Contents.json" @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Info.plist" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Info.plist" new file mode 100644 index 0000000..be6118c --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Info.plist" @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + ly.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyHeader.h" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyHeader.h" new file mode 100644 index 0000000..039767f --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyHeader.h" @@ -0,0 +1,12 @@ +// +// MyHeader.h +// MyCalendar +// +// + +#import + +@interface MyHeader : UICollectionReusableView +@property (strong, nonatomic) IBOutlet UILabel *myTitle; + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyHeader.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyHeader.m" new file mode 100644 index 0000000..dac8d1c --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyHeader.m" @@ -0,0 +1,16 @@ +// +// MyHeader.m +// MyCalendar +// +// + +#import "MyHeader.h" +#import "MyView.h" + +@implementation MyHeader +- (IBAction)MyRightButton:(id)sender { + NSLog(@"点击啦做按钮"); +} + + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyView.h" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyView.h" new file mode 100644 index 0000000..3538827 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyView.h" @@ -0,0 +1,14 @@ +// +// MyView.h +// MyCalendar +// +// + +#import + +@interface MyView : UICollectionViewController + +-(void)dosome; +@property (strong, nonatomic) IBOutlet UICollectionView *myCollectionView; + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyView.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyView.m" new file mode 100644 index 0000000..76eed02 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/MyView.m" @@ -0,0 +1,190 @@ +// +// MyView.m +// MyCalendar +// +// + +#import "MyView.h" +#import "Tool.h" +#import "MyCell.h" +#import "MyHeader.h" + + +NSString *mycell = @"cell2"; + +@interface MyView () + +@end +static CGFloat const CellMargin = 1.0f; +static NSUInteger const DaysPerWeek = 7; +static int number = 1; +static int year = 2016; +static int month = 10; + + + +@implementation MyView + + +- (void)viewDidLoad { + [super viewDidLoad]; + + + // Uncomment the following line to preserve selection between presentations + // self.clearsSelectionOnViewWillAppear = NO; + + // Register cell classes +// [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:reuseIdentifier]; + + // Do any additional setup after loading the view. +// NSLog([[NSString alloc] initWithFormat:@"%d",[Tool getYear]]); +// NSLog([[NSString alloc] initWithFormat:@"%d",[Tool getMonth]]); +// NSLog([[NSString alloc] initWithFormat:@"%d",[Tool getDay]]); +// NSLog([[NSString alloc] initWithFormat:@"%d",[Tool getDaysOfMonth:[Tool getYear] withMonth:[Tool getMonth]]]); +// NSLog([[NSString alloc] initWithFormat:@"%d",[Tool getWeekOfFirstDayOfMonth:[Tool getYear] withMonth:[Tool getMonth]]]); + [self.view reloadInputViews]; +} + +- (IBAction)next:(id)sender { + if (month < 12) { + month += 1; + }else{ + month = 1; + year = year + 1; + } + NSLog(@"%d年%d月",year,month); + [self.myCollectionView reloadData]; +} + +- (IBAction)last:(id)sender { + if (month > 1) { + month -= 1; + }else{ + month = 12; + year -= 1; + } + [self.myCollectionView reloadData]; + +} + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +#pragma mark + +//返回section的个数 +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { +#warning Incomplete method implementation -- Return the number of sections + return 1; +} + +//返回section中的cell个数 +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { +#warning Incomplete method implementation -- Return the number of items in the section + return [Tool getDaysOfMonth:year withMonth:month] + [Tool getWeekOfFirstDayOfMonth:year withMonth:month]; +} + +//返回cell +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + MyCell *cell ; + +// Configure the cell + if (indexPath.row < [Tool getWeekOfFirstDayOfMonth:year withMonth:month]) { +// cell.myText.text = @""; +// cell.backgroundColor = [UIColor clearColor]; +// cell.myText.backgroundColor = [UIColor clearColor]; + + cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cellNil" forIndexPath:indexPath]; + }else{ + cell = [collectionView dequeueReusableCellWithReuseIdentifier:mycell forIndexPath:indexPath]; + cell.myText.text = [[NSString alloc] initWithFormat:@"%d",indexPath.row - [Tool getWeekOfFirstDayOfMonth:year withMonth:month] + 1]; + cell.layer.masksToBounds = YES; + cell.layer.cornerRadius = 22; + + cell.myText.layer.masksToBounds = YES; + cell.myText.layer.cornerRadius = 13; + } + +// cell.mLabel.text = @"!!"; +// cell.backgroundColor = [UIColor redColor]; +// [cell setText:@"!!!"]; + + + return cell; +} + +#pragma mark +//返回cell的宽和高 +-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewFlowLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ + NSInteger numberOfMaigin = 9; + CGFloat with = floorf((collectionView.frame.size.width - CellMargin * numberOfMaigin) / DaysPerWeek); + CGFloat height = with; + + return CGSizeMake(with, height); +} + +//每行cell之间的间隔 +- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section +{ + return CellMargin; +} + + +//返回头尾 +-(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{ + if (kind == UICollectionElementKindSectionHeader) { + MyHeader *myHeader = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:@"myheader" forIndexPath:indexPath]; + +//// myHeader.myTitle.text = [[[NSString alloc] initWithFormat:@"%d",year] +// stringByAppendingString:[NSString stringWithFormat:@"年%d月",month]]; + myHeader.myTitle.text = [[NSString alloc] initWithFormat:@"%d年%d月",year,month]; + + return myHeader; + } + else + return nil; +} +/* +// Uncomment this method to specify if the specified item should be highlighted during tracking +- (BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath { + return YES; +} +*/ + +/* +// Uncomment this method to specify if the specified item should be selected +- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath { + return YES; +} +*/ + +/* +// Uncomment these methods to specify if an action menu should be displayed for the specified item, and react to actions performed on the item +- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath { + return NO; +} + +- (BOOL)collectionView:(UICollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender { + return NO; +} + +- (void)collectionView:(UICollectionView *)collectionView performAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender { + +} +*/ + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Tool.h" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Tool.h" new file mode 100644 index 0000000..9578000 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Tool.h" @@ -0,0 +1,18 @@ +// +// Tool.h +// MyCalendar +// +// + +#import + +@interface Tool : NSObject + ++(int)getWeekOfFirstDayOfMonth:(int)year withMonth:(int)month; ++(int)getDaysOfMonth:(int)year withMonth:(int)month; ++(int)getYear; ++(int)getMonth; ++(int)getDay; + + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Tool.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Tool.m" new file mode 100644 index 0000000..f74b559 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/Tool.m" @@ -0,0 +1,112 @@ +// +// Tool.m +// MyCalendar +// +// + +#import "Tool.h" + +#import "Tool.h" + +@interface Tool(){ + + + +} ++(BOOL)isLoopYear:(NSInteger)year; + +@end + + +@implementation Tool + +//返回当前年 ++(int)getYear{ + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + + NSDate *nowDate = [NSDate date]; + NSDateComponents *nowDateComps = [[NSDateComponents alloc] init]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"yyyy-MM-dd"]; + nowDateComps = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:nowDate]; + + return [nowDateComps year]; +} + +//返回当前月 ++(int)getMonth{ + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + + NSDate *nowDate = [NSDate date]; + NSDateComponents *nowDateComps = [[NSDateComponents alloc] init]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"yyyy-MM-dd"]; + nowDateComps = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:nowDate]; + + return [nowDateComps month]; +} + +//返回当前日 ++(int)getDay{ + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + + NSDate *nowDate = [NSDate date]; + NSDateComponents *nowDateComps = [[NSDateComponents alloc] init]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"yyyy-MM-dd"]; + nowDateComps = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay fromDate:nowDate]; + + return [nowDateComps day]; +} + +//获得某个月的第一天是星期几 ++(int)getWeekOfFirstDayOfMonth:(int)year withMonth:(int)month{ + + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + + NSString *firstWeekDayMonth = [[NSString alloc] initWithFormat:@"%d",year]; + firstWeekDayMonth = [firstWeekDayMonth stringByAppendingString:[[NSString alloc]initWithFormat:@"%s","-"]]; + firstWeekDayMonth = [firstWeekDayMonth stringByAppendingString:[[NSString alloc]initWithFormat:@"%d",month]]; + firstWeekDayMonth = [firstWeekDayMonth stringByAppendingString:[[NSString alloc]initWithFormat:@"%s","-"]]; + firstWeekDayMonth = [firstWeekDayMonth stringByAppendingString:[[NSString alloc]initWithFormat:@"%d",1]]; + + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"yyyy-MM-dd"]; + NSDate *weekOfFirstDayOfMonth = [dateFormatter dateFromString:firstWeekDayMonth]; + + NSDateComponents *newCom = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitWeekday fromDate:weekOfFirstDayOfMonth]; + + return [newCom weekday] - 1; +} + +//返回一个月有多少天 ++(int)getDaysOfMonth:(int)year withMonth:(int)month{ + + NSInteger days = 0; + //1,3,5,7,8,10,12 + NSArray *bigMoth = [[NSArray alloc] initWithObjects:@"1",@"3",@"5",@"7",@"8",@"10",@"12", nil]; + //4,6,9,11 + NSArray *milMoth = [[NSArray alloc] initWithObjects:@"4",@"6",@"9",@"11", nil]; + + if ([bigMoth containsObject:[[NSString alloc] initWithFormat:@"%ld",(long)month]]) { + days = 31; + }else if([milMoth containsObject:[[NSString alloc] initWithFormat:@"%ld",(long)month]]){ + days = 30; + }else{ + if ([self isLoopYear:year]) { + days = 29; + }else + days = 28; + } + return days; +} + +//判断是否是闰年 ++(BOOL)isLoopYear:(NSInteger)year{ + if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) { + return true; + }else + return NO; +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/ViewController.h" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/ViewController.h" new file mode 100644 index 0000000..f4b34c1 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/ViewController.h" @@ -0,0 +1,13 @@ +// +// ViewController.h +// MyCalendar +// +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/ViewController.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/ViewController.m" new file mode 100644 index 0000000..0c75907 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/ViewController.m" @@ -0,0 +1,25 @@ +// +// ViewController.m +// MyCalendar +// +// + +#import "ViewController.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/main.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/main.m" new file mode 100644 index 0000000..fcd258b --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendar/main.m" @@ -0,0 +1,14 @@ +// +// main.m +// MyCalendar +// +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendarTests/Info.plist" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendarTests/Info.plist" new file mode 100644 index 0000000..9ff37a0 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendarTests/Info.plist" @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + ly.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendarTests/MyCalendarTests.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendarTests/MyCalendarTests.m" new file mode 100644 index 0000000..44320a9 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCalendarTests/MyCalendarTests.m" @@ -0,0 +1,38 @@ +// +// MyCalendarTests.m +// MyCalendarTests +// +// + +#import +#import + +@interface MyCalendarTests : XCTestCase + +@end + +@implementation MyCalendarTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCell.h" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCell.h" new file mode 100644 index 0000000..4586e6a --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCell.h" @@ -0,0 +1,14 @@ +// +// MyCell.h +// MyCalendar +// +// + +#import + +@interface MyCell : UICollectionViewCell +@property (strong, nonatomic) IBOutlet UILabel *myText; + +-(void)setText:(NSString *)srt; + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project02/MyCell.m" "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCell.m" new file mode 100644 index 0000000..cfa08cf --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project02/MyCell.m" @@ -0,0 +1,18 @@ +// +// MyCell.m +// MyCalendar +// +// + +#import "MyCell.h" + +@implementation MyCell +-(id)initWithCoder:(NSCoder *)aDecoder{ + self = [super initWithCoder:aDecoder]; + return self; +} + +-(void)setText:(NSString *)srt{ + self.myText.text = srt; +} +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList.xcodeproj/project.pbxproj" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList.xcodeproj/project.pbxproj" new file mode 100755 index 0000000..da4f6b2 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList.xcodeproj/project.pbxproj" @@ -0,0 +1,541 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 71DEABCA1BE5AF8B0007758B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DEABC91BE5AF8B0007758B /* main.m */; }; + 71DEABCD1BE5AF8B0007758B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DEABCC1BE5AF8B0007758B /* AppDelegate.m */; }; + 71DEABD01BE5AF8B0007758B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DEABCF1BE5AF8B0007758B /* ViewController.m */; }; + 71DEABD31BE5AF8B0007758B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71DEABD11BE5AF8B0007758B /* Main.storyboard */; }; + 71DEABD61BE5AF8B0007758B /* TaskList.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 71DEABD41BE5AF8B0007758B /* TaskList.xcdatamodeld */; }; + 71DEABD81BE5AF8B0007758B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 71DEABD71BE5AF8B0007758B /* Assets.xcassets */; }; + 71DEABDB1BE5AF8B0007758B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71DEABD91BE5AF8B0007758B /* LaunchScreen.storyboard */; }; + 71DEABE61BE5AF8B0007758B /* TaskListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DEABE51BE5AF8B0007758B /* TaskListTests.m */; }; + 71DEABF11BE5AF8B0007758B /* TaskListUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 71DEABF01BE5AF8B0007758B /* TaskListUITests.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 71DEABE21BE5AF8B0007758B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71DEABBD1BE5AF8A0007758B /* Project object */; + proxyType = 1; + remoteGlobalIDString = 71DEABC41BE5AF8A0007758B; + remoteInfo = TaskList; + }; + 71DEABED1BE5AF8B0007758B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 71DEABBD1BE5AF8A0007758B /* Project object */; + proxyType = 1; + remoteGlobalIDString = 71DEABC41BE5AF8A0007758B; + remoteInfo = TaskList; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 71DEABC51BE5AF8B0007758B /* TaskList.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TaskList.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 71DEABC91BE5AF8B0007758B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 71DEABCB1BE5AF8B0007758B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 71DEABCC1BE5AF8B0007758B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 71DEABCE1BE5AF8B0007758B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 71DEABCF1BE5AF8B0007758B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 71DEABD21BE5AF8B0007758B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 71DEABD51BE5AF8B0007758B /* TaskList.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = TaskList.xcdatamodel; sourceTree = ""; }; + 71DEABD71BE5AF8B0007758B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 71DEABDA1BE5AF8B0007758B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 71DEABDC1BE5AF8B0007758B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 71DEABE11BE5AF8B0007758B /* TaskListTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TaskListTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 71DEABE51BE5AF8B0007758B /* TaskListTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TaskListTests.m; sourceTree = ""; }; + 71DEABE71BE5AF8B0007758B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 71DEABEC1BE5AF8B0007758B /* TaskListUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TaskListUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 71DEABF01BE5AF8B0007758B /* TaskListUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TaskListUITests.m; sourceTree = ""; }; + 71DEABF21BE5AF8B0007758B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 71DEABC21BE5AF8A0007758B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71DEABDE1BE5AF8B0007758B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71DEABE91BE5AF8B0007758B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 71DEABBC1BE5AF8A0007758B = { + isa = PBXGroup; + children = ( + 71DEABC71BE5AF8B0007758B /* TaskList */, + 71DEABE41BE5AF8B0007758B /* TaskListTests */, + 71DEABEF1BE5AF8B0007758B /* TaskListUITests */, + 71DEABC61BE5AF8B0007758B /* Products */, + ); + sourceTree = ""; + }; + 71DEABC61BE5AF8B0007758B /* Products */ = { + isa = PBXGroup; + children = ( + 71DEABC51BE5AF8B0007758B /* TaskList.app */, + 71DEABE11BE5AF8B0007758B /* TaskListTests.xctest */, + 71DEABEC1BE5AF8B0007758B /* TaskListUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 71DEABC71BE5AF8B0007758B /* TaskList */ = { + isa = PBXGroup; + children = ( + 71DEABCB1BE5AF8B0007758B /* AppDelegate.h */, + 71DEABCC1BE5AF8B0007758B /* AppDelegate.m */, + 71DEABCE1BE5AF8B0007758B /* ViewController.h */, + 71DEABCF1BE5AF8B0007758B /* ViewController.m */, + 71DEABD11BE5AF8B0007758B /* Main.storyboard */, + 71DEABD71BE5AF8B0007758B /* Assets.xcassets */, + 71DEABD91BE5AF8B0007758B /* LaunchScreen.storyboard */, + 71DEABDC1BE5AF8B0007758B /* Info.plist */, + 71DEABD41BE5AF8B0007758B /* TaskList.xcdatamodeld */, + 71DEABC81BE5AF8B0007758B /* Supporting Files */, + ); + path = TaskList; + sourceTree = ""; + }; + 71DEABC81BE5AF8B0007758B /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 71DEABC91BE5AF8B0007758B /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 71DEABE41BE5AF8B0007758B /* TaskListTests */ = { + isa = PBXGroup; + children = ( + 71DEABE51BE5AF8B0007758B /* TaskListTests.m */, + 71DEABE71BE5AF8B0007758B /* Info.plist */, + ); + path = TaskListTests; + sourceTree = ""; + }; + 71DEABEF1BE5AF8B0007758B /* TaskListUITests */ = { + isa = PBXGroup; + children = ( + 71DEABF01BE5AF8B0007758B /* TaskListUITests.m */, + 71DEABF21BE5AF8B0007758B /* Info.plist */, + ); + path = TaskListUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 71DEABC41BE5AF8A0007758B /* TaskList */ = { + isa = PBXNativeTarget; + buildConfigurationList = 71DEABF51BE5AF8B0007758B /* Build configuration list for PBXNativeTarget "TaskList" */; + buildPhases = ( + 71DEABC11BE5AF8A0007758B /* Sources */, + 71DEABC21BE5AF8A0007758B /* Frameworks */, + 71DEABC31BE5AF8A0007758B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TaskList; + productName = TaskList; + productReference = 71DEABC51BE5AF8B0007758B /* TaskList.app */; + productType = "com.apple.product-type.application"; + }; + 71DEABE01BE5AF8B0007758B /* TaskListTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 71DEABF81BE5AF8B0007758B /* Build configuration list for PBXNativeTarget "TaskListTests" */; + buildPhases = ( + 71DEABDD1BE5AF8B0007758B /* Sources */, + 71DEABDE1BE5AF8B0007758B /* Frameworks */, + 71DEABDF1BE5AF8B0007758B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 71DEABE31BE5AF8B0007758B /* PBXTargetDependency */, + ); + name = TaskListTests; + productName = TaskListTests; + productReference = 71DEABE11BE5AF8B0007758B /* TaskListTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 71DEABEB1BE5AF8B0007758B /* TaskListUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 71DEABFB1BE5AF8B0007758B /* Build configuration list for PBXNativeTarget "TaskListUITests" */; + buildPhases = ( + 71DEABE81BE5AF8B0007758B /* Sources */, + 71DEABE91BE5AF8B0007758B /* Frameworks */, + 71DEABEA1BE5AF8B0007758B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 71DEABEE1BE5AF8B0007758B /* PBXTargetDependency */, + ); + name = TaskListUITests; + productName = TaskListUITests; + productReference = 71DEABEC1BE5AF8B0007758B /* TaskListUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 71DEABBD1BE5AF8A0007758B /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = chenyufengweb; + TargetAttributes = { + 71DEABC41BE5AF8A0007758B = { + CreatedOnToolsVersion = 7.0.1; + DevelopmentTeam = FA2863D27N; + }; + 71DEABE01BE5AF8B0007758B = { + CreatedOnToolsVersion = 7.0.1; + DevelopmentTeam = FA2863D27N; + TestTargetID = 71DEABC41BE5AF8A0007758B; + }; + 71DEABEB1BE5AF8B0007758B = { + CreatedOnToolsVersion = 7.0.1; + DevelopmentTeam = FA2863D27N; + TestTargetID = 71DEABC41BE5AF8A0007758B; + }; + }; + }; + buildConfigurationList = 71DEABC01BE5AF8A0007758B /* Build configuration list for PBXProject "TaskList" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 71DEABBC1BE5AF8A0007758B; + productRefGroup = 71DEABC61BE5AF8B0007758B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 71DEABC41BE5AF8A0007758B /* TaskList */, + 71DEABE01BE5AF8B0007758B /* TaskListTests */, + 71DEABEB1BE5AF8B0007758B /* TaskListUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 71DEABC31BE5AF8A0007758B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 71DEABDB1BE5AF8B0007758B /* LaunchScreen.storyboard in Resources */, + 71DEABD81BE5AF8B0007758B /* Assets.xcassets in Resources */, + 71DEABD31BE5AF8B0007758B /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71DEABDF1BE5AF8B0007758B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71DEABEA1BE5AF8B0007758B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 71DEABC11BE5AF8A0007758B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 71DEABD61BE5AF8B0007758B /* TaskList.xcdatamodeld in Sources */, + 71DEABD01BE5AF8B0007758B /* ViewController.m in Sources */, + 71DEABCD1BE5AF8B0007758B /* AppDelegate.m in Sources */, + 71DEABCA1BE5AF8B0007758B /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71DEABDD1BE5AF8B0007758B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 71DEABE61BE5AF8B0007758B /* TaskListTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 71DEABE81BE5AF8B0007758B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 71DEABF11BE5AF8B0007758B /* TaskListUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 71DEABE31BE5AF8B0007758B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 71DEABC41BE5AF8A0007758B /* TaskList */; + targetProxy = 71DEABE21BE5AF8B0007758B /* PBXContainerItemProxy */; + }; + 71DEABEE1BE5AF8B0007758B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 71DEABC41BE5AF8A0007758B /* TaskList */; + targetProxy = 71DEABED1BE5AF8B0007758B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 71DEABD11BE5AF8B0007758B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 71DEABD21BE5AF8B0007758B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 71DEABD91BE5AF8B0007758B /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 71DEABDA1BE5AF8B0007758B /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 71DEABF31BE5AF8B0007758B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 71DEABF41BE5AF8B0007758B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 71DEABF61BE5AF8B0007758B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = TaskList/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.chenyufengweb.TaskList; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 71DEABF71BE5AF8B0007758B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = TaskList/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.chenyufengweb.TaskList; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 71DEABF91BE5AF8B0007758B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = TaskListTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.chenyufengweb.TaskListTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TaskList.app/TaskList"; + }; + name = Debug; + }; + 71DEABFA1BE5AF8B0007758B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = TaskListTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.chenyufengweb.TaskListTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TaskList.app/TaskList"; + }; + name = Release; + }; + 71DEABFC1BE5AF8B0007758B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = TaskListUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.chenyufengweb.TaskListUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = TaskList; + USES_XCTRUNNER = YES; + }; + name = Debug; + }; + 71DEABFD1BE5AF8B0007758B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = TaskListUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.chenyufengweb.TaskListUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = TaskList; + USES_XCTRUNNER = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 71DEABC01BE5AF8A0007758B /* Build configuration list for PBXProject "TaskList" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71DEABF31BE5AF8B0007758B /* Debug */, + 71DEABF41BE5AF8B0007758B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 71DEABF51BE5AF8B0007758B /* Build configuration list for PBXNativeTarget "TaskList" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71DEABF61BE5AF8B0007758B /* Debug */, + 71DEABF71BE5AF8B0007758B /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 71DEABF81BE5AF8B0007758B /* Build configuration list for PBXNativeTarget "TaskListTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71DEABF91BE5AF8B0007758B /* Debug */, + 71DEABFA1BE5AF8B0007758B /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 71DEABFB1BE5AF8B0007758B /* Build configuration list for PBXNativeTarget "TaskListUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 71DEABFC1BE5AF8B0007758B /* Debug */, + 71DEABFD1BE5AF8B0007758B /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 71DEABD41BE5AF8B0007758B /* TaskList.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 71DEABD51BE5AF8B0007758B /* TaskList.xcdatamodel */, + ); + currentVersion = 71DEABD51BE5AF8B0007758B /* TaskList.xcdatamodel */; + path = TaskList.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 71DEABBD1BE5AF8A0007758B /* Project object */; +} diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/AppDelegate.h" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/AppDelegate.h" new file mode 100755 index 0000000..cdacd57 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/AppDelegate.h" @@ -0,0 +1,21 @@ +// +// AppDelegate.h +// TaskList +// +// + +#import +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; +@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; +@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; +@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; + +- (void)saveContext; +- (NSURL *)applicationDocumentsDirectory; + +@end + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/AppDelegate.m" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/AppDelegate.m" new file mode 100755 index 0000000..eadc2d8 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/AppDelegate.m" @@ -0,0 +1,115 @@ +// +// AppDelegate.m +// TaskList +// +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + // Saves changes in the application's managed object context before the application terminates. + [self saveContext]; +} + +#pragma mark - Core Data stack + +@synthesize managedObjectContext = _managedObjectContext; +@synthesize managedObjectModel = _managedObjectModel; +@synthesize persistentStoreCoordinator = _persistentStoreCoordinator; + +- (NSURL *)applicationDocumentsDirectory { + // The directory the application uses to store the Core Data store file. This code uses a directory named "com.chenyufengweb.TaskList" in the application's documents directory. + return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; +} + +- (NSManagedObjectModel *)managedObjectModel { + + if (_managedObjectModel != nil) { + return _managedObjectModel; + } + NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"TaskList" withExtension:@"momd"]; + _managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; + return _managedObjectModel; +} + +- (NSPersistentStoreCoordinator *)persistentStoreCoordinator { + if (_persistentStoreCoordinator != nil) { + return _persistentStoreCoordinator; + } + _persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]]; + NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"TaskList.sqlite"]; + NSLog(@"数据库文件位置:%@",storeURL); + + NSError *error = nil; + NSString *failureReason = @"There was an error creating or loading the application's saved data."; + if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) { + + NSMutableDictionary *dict = [NSMutableDictionary dictionary]; + dict[NSLocalizedDescriptionKey] = @"Failed to initialize the application's saved data"; + dict[NSLocalizedFailureReasonErrorKey] = failureReason; + dict[NSUnderlyingErrorKey] = error; + error = [NSError errorWithDomain:@"YOUR_ERROR_DOMAIN" code:9999 userInfo:dict]; + NSLog(@"Unresolved error %@, %@", error, [error userInfo]); + abort(); + } + return _persistentStoreCoordinator; +} + +- (NSManagedObjectContext *)managedObjectContext { + if (_managedObjectContext != nil) { + return _managedObjectContext; + } + NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; + if (!coordinator) { + return nil; + } + _managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; + [_managedObjectContext setPersistentStoreCoordinator:coordinator]; + return _managedObjectContext; +} + +#pragma mark - Core Data Saving support +- (void)saveContext { + + NSManagedObjectContext *managedObjectContext = self.managedObjectContext; + if (managedObjectContext != nil) { + + NSError *error = nil; + if ([managedObjectContext hasChanges] && ![managedObjectContext save:&error]) { + NSLog(@"Unresolved error %@, %@", error, [error userInfo]); + abort(); + } + } +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" new file mode 100755 index 0000000..1d060ed --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" @@ -0,0 +1,93 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Base.lproj/LaunchScreen.storyboard" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Base.lproj/LaunchScreen.storyboard" new file mode 100755 index 0000000..84ad19e --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Base.lproj/LaunchScreen.storyboard" @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Base.lproj/Main.storyboard" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Base.lproj/Main.storyboard" new file mode 100755 index 0000000..c700ae5 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Base.lproj/Main.storyboard" @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Info.plist" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Info.plist" new file mode 100755 index 0000000..40c6215 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/Info.plist" @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/TaskList.xcdatamodeld/.xccurrentversion" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/TaskList.xcdatamodeld/.xccurrentversion" new file mode 100755 index 0000000..b7ada02 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/TaskList.xcdatamodeld/.xccurrentversion" @@ -0,0 +1,8 @@ + + + + + _XCCurrentVersionName + TaskList.xcdatamodel + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/TaskList.xcdatamodeld/TaskList.xcdatamodel/contents" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/TaskList.xcdatamodeld/TaskList.xcdatamodel/contents" new file mode 100755 index 0000000..4b9a8bd --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/TaskList.xcdatamodeld/TaskList.xcdatamodel/contents" @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/ViewController.h" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/ViewController.h" new file mode 100755 index 0000000..212ad0e --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/ViewController.h" @@ -0,0 +1,12 @@ +// +// ViewController.h +// TaskList +// +// + +#import + +@interface ViewController : UIViewController + +@end + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/ViewController.m" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/ViewController.m" new file mode 100755 index 0000000..cc02f6a --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/ViewController.m" @@ -0,0 +1,88 @@ +// +// ViewController.m +// TaskList +// +// + +#import "ViewController.h" +#import "AppDelegate.h" +#import + + +@interface ViewController () + +@property (weak, nonatomic) IBOutlet UITextField *inputTextField; +@property (weak, nonatomic) IBOutlet UITableView *taskTableView; +@property(strong,nonatomic) NSMutableArray *taskArray; +@property(strong,nonatomic) NSArray *arr; + +@end + +@implementation ViewController + +- (void)viewDidLoad { + + [super viewDidLoad]; + //应用启动的时候加载数据库文件; + NSManagedObjectContext *context = [(AppDelegate*)[[UIApplication sharedApplication] delegate] managedObjectContext]; + NSFetchRequest *fetchData = [[NSFetchRequest alloc] initWithEntityName:@"Task"]; + self.arr = [context executeFetchRequest:fetchData error:nil]; + self.taskArray = [[NSMutableArray alloc] initWithArray:[self.arr valueForKey:@"taskname"]]; +} + +#pragma mark - UITableViewDataSource +//每一个section有几个cell; +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + return self.taskArray.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyCell" forIndexPath:indexPath]; + cell.textLabel.text = [self.taskArray objectAtIndex:indexPath.row]; + return cell; +} + +#pragma mark - 点击增加按钮 +- (IBAction)addTaskButtonClick:(id)sender { + + NSString *inputStr = [[NSMutableString alloc] initWithFormat:@"%@",self.inputTextField.text]; + inputStr = [inputStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + + //判断如果输入的为空,则不添加; + if ([inputStr isEqual: @""]) { + + UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"输入的内容不能为空" preferredStyle:UIAlertControllerStyleAlert]; + [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:nil]]; + [self presentViewController:alert animated:true completion:nil]; + } else { + + //每点击一次“确定”按钮后,就把该数据存储到CoreData中; + [self saveToCoreData:inputStr]; + //把一个文本存储到taskArray数组中; + [self.taskArray insertObject:self.inputTextField.text atIndex:self.taskArray.count]; + [self.taskTableView reloadData]; + //清空输入框; + self.inputTextField.text = nil; + //点击确定后消失软键盘; + [self.inputTextField resignFirstResponder]; + } +} + +#pragma mark - 保存数据到CoreData; +- (void) saveToCoreData:(NSString *)taskName{ + + NSManagedObjectContext *context = [(AppDelegate*)[[UIApplication sharedApplication] delegate] managedObjectContext]; + NSManagedObject *row = [NSEntityDescription insertNewObjectForEntityForName:@"Task" inManagedObjectContext:context]; + [row setValue:taskName forKey:@"taskname"]; + [context save:nil]; + NSLog(@"已保存到数据库"); +} + +#pragma mark - UIScrollViewDelegate +//滚动TableView的时候隐藏软键盘; +- (void)scrollViewDidScroll:(UIScrollView *)scrollView{ + [self.inputTextField resignFirstResponder]; +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/main.m" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/main.m" new file mode 100755 index 0000000..9c67356 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskList/main.m" @@ -0,0 +1,13 @@ +// +// main.m +// TaskList +// +// +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListTests/Info.plist" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListTests/Info.plist" new file mode 100755 index 0000000..ba72822 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListTests/Info.plist" @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListTests/TaskListTests.m" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListTests/TaskListTests.m" new file mode 100755 index 0000000..16b7457 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListTests/TaskListTests.m" @@ -0,0 +1,37 @@ +// +// TaskListTests.m +// TaskListTests +// +// + +#import + +@interface TaskListTests : XCTestCase + +@end + +@implementation TaskListTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListUITests/Info.plist" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListUITests/Info.plist" new file mode 100755 index 0000000..ba72822 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListUITests/Info.plist" @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git "a/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListUITests/TaskListUITests.m" "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListUITests/TaskListUITests.m" new file mode 100755 index 0000000..4e52f62 --- /dev/null +++ "b/21651135\346\235\216\346\275\207\351\242\226/project03/TaskListUITests/TaskListUITests.m" @@ -0,0 +1,38 @@ +// +// TaskListUITests.m +// TaskListUITests +// +// + +#import + +@interface TaskListUITests : XCTestCase + +@end + +@implementation TaskListUITests + +- (void)setUp { + [super setUp]; + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + [[[XCUIApplication alloc] init] launch]; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +@end