diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker.xcodeproj/project.pbxproj" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker.xcodeproj/project.pbxproj" new file mode 100644 index 0000000..ab58d9c --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker.xcodeproj/project.pbxproj" @@ -0,0 +1,577 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4444D5A01DC10CB000142D72 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D59F1DC10CB000142D72 /* main.m */; }; + 4444D5A31DC10CB000142D72 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D5A21DC10CB000142D72 /* AppDelegate.m */; }; + 4444D5A91DC10CB000142D72 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4444D5A71DC10CB000142D72 /* Main.storyboard */; }; + 4444D5AB1DC10CB000142D72 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4444D5AA1DC10CB000142D72 /* Assets.xcassets */; }; + 4444D5AE1DC10CB000142D72 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4444D5AC1DC10CB000142D72 /* LaunchScreen.storyboard */; }; + 4444D5B91DC10CB100142D72 /* CalenderPickerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D5B81DC10CB100142D72 /* CalenderPickerTests.m */; }; + 4444D5C41DC10CB100142D72 /* CalenderPickerUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D5C31DC10CB100142D72 /* CalenderPickerUITests.m */; }; + 4444D5D81DC10CDF00142D72 /* calendar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D5D21DC10CDF00142D72 /* calendar.m */; }; + 4444D5D91DC10CDF00142D72 /* CalendarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D5D41DC10CDF00142D72 /* CalendarCell.m */; }; + 4444D5DA1DC10CDF00142D72 /* CalendarPicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D5D61DC10CDF00142D72 /* CalendarPicker.m */; }; + 4444D5DB1DC10CDF00142D72 /* CalendarPicker.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4444D5D71DC10CDF00142D72 /* CalendarPicker.xib */; }; + 4444D5DE1DC10CF100142D72 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4444D5DD1DC10CF100142D72 /* ViewController.m */; }; + 4444D5E11DC10E6F00142D72 /* left_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 4444D5DF1DC10E6F00142D72 /* left_arrow.png */; }; + 4444D5E21DC10E6F00142D72 /* right_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 4444D5E01DC10E6F00142D72 /* right_arrow.png */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 4444D5B51DC10CB100142D72 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4444D5931DC10CB000142D72 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4444D59A1DC10CB000142D72; + remoteInfo = CalenderPicker; + }; + 4444D5C01DC10CB100142D72 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4444D5931DC10CB000142D72 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4444D59A1DC10CB000142D72; + remoteInfo = CalenderPicker; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 4444D59B1DC10CB000142D72 /* CalenderPicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CalenderPicker.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4444D59F1DC10CB000142D72 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 4444D5A11DC10CB000142D72 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 4444D5A21DC10CB000142D72 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 4444D5A81DC10CB000142D72 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 4444D5AA1DC10CB000142D72 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 4444D5AD1DC10CB000142D72 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 4444D5AF1DC10CB100142D72 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4444D5B41DC10CB100142D72 /* CalenderPickerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CalenderPickerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4444D5B81DC10CB100142D72 /* CalenderPickerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CalenderPickerTests.m; sourceTree = ""; }; + 4444D5BA1DC10CB100142D72 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4444D5BF1DC10CB100142D72 /* CalenderPickerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CalenderPickerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 4444D5C31DC10CB100142D72 /* CalenderPickerUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CalenderPickerUITests.m; sourceTree = ""; }; + 4444D5C51DC10CB100142D72 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4444D5D11DC10CDF00142D72 /* calendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = calendar.h; sourceTree = ""; }; + 4444D5D21DC10CDF00142D72 /* calendar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = calendar.m; sourceTree = ""; }; + 4444D5D31DC10CDF00142D72 /* CalendarCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalendarCell.h; sourceTree = ""; }; + 4444D5D41DC10CDF00142D72 /* CalendarCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalendarCell.m; sourceTree = ""; }; + 4444D5D51DC10CDF00142D72 /* CalendarPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalendarPicker.h; sourceTree = ""; }; + 4444D5D61DC10CDF00142D72 /* CalendarPicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalendarPicker.m; sourceTree = ""; }; + 4444D5D71DC10CDF00142D72 /* CalendarPicker.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CalendarPicker.xib; sourceTree = ""; }; + 4444D5DC1DC10CF100142D72 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 4444D5DD1DC10CF100142D72 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 4444D5DF1DC10E6F00142D72 /* left_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = left_arrow.png; sourceTree = ""; }; + 4444D5E01DC10E6F00142D72 /* right_arrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = right_arrow.png; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4444D5981DC10CB000142D72 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4444D5B11DC10CB100142D72 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4444D5BC1DC10CB100142D72 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4444D5921DC10CB000142D72 = { + isa = PBXGroup; + children = ( + 4444D59D1DC10CB000142D72 /* CalenderPicker */, + 4444D5B71DC10CB100142D72 /* CalenderPickerTests */, + 4444D5C21DC10CB100142D72 /* CalenderPickerUITests */, + 4444D59C1DC10CB000142D72 /* Products */, + ); + sourceTree = ""; + }; + 4444D59C1DC10CB000142D72 /* Products */ = { + isa = PBXGroup; + children = ( + 4444D59B1DC10CB000142D72 /* CalenderPicker.app */, + 4444D5B41DC10CB100142D72 /* CalenderPickerTests.xctest */, + 4444D5BF1DC10CB100142D72 /* CalenderPickerUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 4444D59D1DC10CB000142D72 /* CalenderPicker */ = { + isa = PBXGroup; + children = ( + 4444D5E31DC10E7900142D72 /* images */, + 4444D5DC1DC10CF100142D72 /* ViewController.h */, + 4444D5DD1DC10CF100142D72 /* ViewController.m */, + 4444D5D11DC10CDF00142D72 /* calendar.h */, + 4444D5D21DC10CDF00142D72 /* calendar.m */, + 4444D5D31DC10CDF00142D72 /* CalendarCell.h */, + 4444D5D41DC10CDF00142D72 /* CalendarCell.m */, + 4444D5D51DC10CDF00142D72 /* CalendarPicker.h */, + 4444D5D61DC10CDF00142D72 /* CalendarPicker.m */, + 4444D5D71DC10CDF00142D72 /* CalendarPicker.xib */, + 4444D5A11DC10CB000142D72 /* AppDelegate.h */, + 4444D5A21DC10CB000142D72 /* AppDelegate.m */, + 4444D5A71DC10CB000142D72 /* Main.storyboard */, + 4444D5AA1DC10CB000142D72 /* Assets.xcassets */, + 4444D5AC1DC10CB000142D72 /* LaunchScreen.storyboard */, + 4444D5AF1DC10CB100142D72 /* Info.plist */, + 4444D59E1DC10CB000142D72 /* Supporting Files */, + ); + path = CalenderPicker; + sourceTree = ""; + }; + 4444D59E1DC10CB000142D72 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 4444D59F1DC10CB000142D72 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 4444D5B71DC10CB100142D72 /* CalenderPickerTests */ = { + isa = PBXGroup; + children = ( + 4444D5B81DC10CB100142D72 /* CalenderPickerTests.m */, + 4444D5BA1DC10CB100142D72 /* Info.plist */, + ); + path = CalenderPickerTests; + sourceTree = ""; + }; + 4444D5C21DC10CB100142D72 /* CalenderPickerUITests */ = { + isa = PBXGroup; + children = ( + 4444D5C31DC10CB100142D72 /* CalenderPickerUITests.m */, + 4444D5C51DC10CB100142D72 /* Info.plist */, + ); + path = CalenderPickerUITests; + sourceTree = ""; + }; + 4444D5E31DC10E7900142D72 /* images */ = { + isa = PBXGroup; + children = ( + 4444D5DF1DC10E6F00142D72 /* left_arrow.png */, + 4444D5E01DC10E6F00142D72 /* right_arrow.png */, + ); + name = images; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 4444D59A1DC10CB000142D72 /* CalenderPicker */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4444D5C81DC10CB100142D72 /* Build configuration list for PBXNativeTarget "CalenderPicker" */; + buildPhases = ( + 4444D5971DC10CB000142D72 /* Sources */, + 4444D5981DC10CB000142D72 /* Frameworks */, + 4444D5991DC10CB000142D72 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CalenderPicker; + productName = CalenderPicker; + productReference = 4444D59B1DC10CB000142D72 /* CalenderPicker.app */; + productType = "com.apple.product-type.application"; + }; + 4444D5B31DC10CB100142D72 /* CalenderPickerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4444D5CB1DC10CB100142D72 /* Build configuration list for PBXNativeTarget "CalenderPickerTests" */; + buildPhases = ( + 4444D5B01DC10CB100142D72 /* Sources */, + 4444D5B11DC10CB100142D72 /* Frameworks */, + 4444D5B21DC10CB100142D72 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 4444D5B61DC10CB100142D72 /* PBXTargetDependency */, + ); + name = CalenderPickerTests; + productName = CalenderPickerTests; + productReference = 4444D5B41DC10CB100142D72 /* CalenderPickerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 4444D5BE1DC10CB100142D72 /* CalenderPickerUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4444D5CE1DC10CB100142D72 /* Build configuration list for PBXNativeTarget "CalenderPickerUITests" */; + buildPhases = ( + 4444D5BB1DC10CB100142D72 /* Sources */, + 4444D5BC1DC10CB100142D72 /* Frameworks */, + 4444D5BD1DC10CB100142D72 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 4444D5C11DC10CB100142D72 /* PBXTargetDependency */, + ); + name = CalenderPickerUITests; + productName = CalenderPickerUITests; + productReference = 4444D5BF1DC10CB100142D72 /* CalenderPickerUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 4444D5931DC10CB000142D72 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = "li xiaowen"; + TargetAttributes = { + 4444D59A1DC10CB000142D72 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = FDSVMX6CDK; + ProvisioningStyle = Automatic; + }; + 4444D5B31DC10CB100142D72 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = FDSVMX6CDK; + ProvisioningStyle = Automatic; + TestTargetID = 4444D59A1DC10CB000142D72; + }; + 4444D5BE1DC10CB100142D72 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = FDSVMX6CDK; + ProvisioningStyle = Automatic; + TestTargetID = 4444D59A1DC10CB000142D72; + }; + }; + }; + buildConfigurationList = 4444D5961DC10CB000142D72 /* Build configuration list for PBXProject "CalenderPicker" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 4444D5921DC10CB000142D72; + productRefGroup = 4444D59C1DC10CB000142D72 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4444D59A1DC10CB000142D72 /* CalenderPicker */, + 4444D5B31DC10CB100142D72 /* CalenderPickerTests */, + 4444D5BE1DC10CB100142D72 /* CalenderPickerUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4444D5991DC10CB000142D72 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4444D5AE1DC10CB000142D72 /* LaunchScreen.storyboard in Resources */, + 4444D5AB1DC10CB000142D72 /* Assets.xcassets in Resources */, + 4444D5E21DC10E6F00142D72 /* right_arrow.png in Resources */, + 4444D5A91DC10CB000142D72 /* Main.storyboard in Resources */, + 4444D5E11DC10E6F00142D72 /* left_arrow.png in Resources */, + 4444D5DB1DC10CDF00142D72 /* CalendarPicker.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4444D5B21DC10CB100142D72 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4444D5BD1DC10CB100142D72 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4444D5971DC10CB000142D72 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4444D5DE1DC10CF100142D72 /* ViewController.m in Sources */, + 4444D5A31DC10CB000142D72 /* AppDelegate.m in Sources */, + 4444D5A01DC10CB000142D72 /* main.m in Sources */, + 4444D5DA1DC10CDF00142D72 /* CalendarPicker.m in Sources */, + 4444D5D81DC10CDF00142D72 /* calendar.m in Sources */, + 4444D5D91DC10CDF00142D72 /* CalendarCell.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4444D5B01DC10CB100142D72 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4444D5B91DC10CB100142D72 /* CalenderPickerTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4444D5BB1DC10CB100142D72 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4444D5C41DC10CB100142D72 /* CalenderPickerUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 4444D5B61DC10CB100142D72 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4444D59A1DC10CB000142D72 /* CalenderPicker */; + targetProxy = 4444D5B51DC10CB100142D72 /* PBXContainerItemProxy */; + }; + 4444D5C11DC10CB100142D72 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4444D59A1DC10CB000142D72 /* CalenderPicker */; + targetProxy = 4444D5C01DC10CB100142D72 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 4444D5A71DC10CB000142D72 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 4444D5A81DC10CB000142D72 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 4444D5AC1DC10CB000142D72 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 4444D5AD1DC10CB000142D72 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 4444D5C61DC10CB100142D72 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + 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 = 10.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 4444D5C71DC10CB100142D72 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + 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 = 10.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 4444D5C91DC10CB100142D72 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = CalenderPicker/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.xw.CalenderPicker; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 4444D5CA1DC10CB100142D72 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = CalenderPicker/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.xw.CalenderPicker; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 4444D5CC1DC10CB100142D72 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = CalenderPickerTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.CalenderPickerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CalenderPicker.app/CalenderPicker"; + }; + name = Debug; + }; + 4444D5CD1DC10CB100142D72 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = CalenderPickerTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.CalenderPickerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CalenderPicker.app/CalenderPicker"; + }; + name = Release; + }; + 4444D5CF1DC10CB100142D72 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = CalenderPickerUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.CalenderPickerUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = CalenderPicker; + }; + name = Debug; + }; + 4444D5D01DC10CB100142D72 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = CalenderPickerUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.CalenderPickerUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = CalenderPicker; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4444D5961DC10CB000142D72 /* Build configuration list for PBXProject "CalenderPicker" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4444D5C61DC10CB100142D72 /* Debug */, + 4444D5C71DC10CB100142D72 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4444D5C81DC10CB100142D72 /* Build configuration list for PBXNativeTarget "CalenderPicker" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4444D5C91DC10CB100142D72 /* Debug */, + 4444D5CA1DC10CB100142D72 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 4444D5CB1DC10CB100142D72 /* Build configuration list for PBXNativeTarget "CalenderPickerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4444D5CC1DC10CB100142D72 /* Debug */, + 4444D5CD1DC10CB100142D72 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 4444D5CE1DC10CB100142D72 /* Build configuration list for PBXNativeTarget "CalenderPickerUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4444D5CF1DC10CB100142D72 /* Debug */, + 4444D5D01DC10CB100142D72 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 4444D5931DC10CB000142D72 /* Project object */; +} diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/AppDelegate.h" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/AppDelegate.h" new file mode 100644 index 0000000..c5ba0ad --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/AppDelegate.h" @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// CalenderPicker +// +// Created by MrYu on 2016/10/27. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/AppDelegate.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/AppDelegate.m" new file mode 100644 index 0000000..574be77 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/AppDelegate.m" @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// CalenderPicker +// +// Created by MrYu on 2016/10/27. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#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 invalidate graphics rendering callbacks. 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 active 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/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Assets.xcassets/AppIcon.appiconset/Contents.json" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Assets.xcassets/AppIcon.appiconset/Contents.json" new file mode 100644 index 0000000..36d2c80 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Assets.xcassets/AppIcon.appiconset/Contents.json" @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "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" : "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Base.lproj/LaunchScreen.storyboard" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Base.lproj/LaunchScreen.storyboard" new file mode 100644 index 0000000..fdf3f97 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Base.lproj/LaunchScreen.storyboard" @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Base.lproj/Main.storyboard" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Base.lproj/Main.storyboard" new file mode 100644 index 0000000..4529698 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Base.lproj/Main.storyboard" @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarCell.h" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarCell.h" new file mode 100644 index 0000000..b7dd01b --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarCell.h" @@ -0,0 +1,13 @@ +// +// CalendarCell.h +// CalendarPicker +// +// Created by li xiaowen on 16/10/19. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface CalendarCell : UICollectionViewCell +@property (nonatomic , strong) UILabel *dateLabel; +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarCell.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarCell.m" new file mode 100644 index 0000000..80c1463 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarCell.m" @@ -0,0 +1,24 @@ +// +// CalendarCell.m +// CalendarPicker +// +// Created by li xiaowen on 16/10/19. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import "CalendarCell.h" + +@implementation CalendarCell +- (UILabel *)dateLabel +{ + if (!_dateLabel) { + _dateLabel = [[UILabel alloc] initWithFrame:self.bounds]; + + //[_dateLabel setTextAlignment:NSTextAlignmentCenter]; + //[_dateLabel setFont:[UIFont systemFontOfSize:17]]; + _dateLabel.font = [UIFont fontWithName:@"Courier" size:17]; + [self addSubview:_dateLabel]; + } + return _dateLabel; +} +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.h" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.h" new file mode 100644 index 0000000..dada00a --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.h" @@ -0,0 +1,16 @@ +// +// CalendarPicker.h +// CalendarPicker +// +// Created by li xiaowen on 16/10/19. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface CalendarPicker : UIView +@property (nonatomic , strong) NSDate *date; +@property (nonatomic , strong) NSDate *today; + ++ (instancetype)showOnView:(UIView *)view; +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.m" new file mode 100644 index 0000000..ef0afed --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.m" @@ -0,0 +1,115 @@ +// +// CalendarPicker.m +// CalendarPicker +// +// Created by li xiaowen on 16/10/19. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import "CalendarPicker.h" +#import "CalendarCell.h" +#import "calendar.h" +NSString *const CalendarCellIdentifier = @"cell"; + +@interface CalendarPicker () +@property (nonatomic , weak) IBOutlet UICollectionView *collectionView; +@property (nonatomic , weak) IBOutlet UILabel *monthLabel; +@property (nonatomic , weak) IBOutlet UIButton *previousButton; +@property (nonatomic , weak) IBOutlet UIButton *nextButton; +@property (weak, nonatomic) IBOutlet UIView *view; +@end + +@implementation CalendarPicker ++ (instancetype)showOnView:(UIView *)view{ + CalendarPicker *calendarPicker = [[[NSBundle mainBundle] loadNibNamed:@"CalendarPicker" owner:self options:nil] firstObject]; + [view addSubview:calendarPicker]; + return calendarPicker; +} + +- (void)awakeFromNib{ + [super awakeFromNib]; + [_previousButton setTitle:@"" forState:UIControlStateNormal]; + [_nextButton setTitle:@"" forState:UIControlStateNormal]; + + _previousButton.frame = CGRectMake(_previousButton.frame.origin.x + 5, _previousButton.frame.origin.y, _previousButton.bounds.size.width, _previousButton.bounds.size.height - 10); + [_previousButton setBackgroundImage:[UIImage imageNamed:@"left_arrow"] forState:UIControlStateNormal]; + [_nextButton setBackgroundImage:[UIImage imageNamed:@"right_arrow"] forState:UIControlStateNormal]; + + _view.backgroundColor = [UIColor lightGrayColor]; + _collectionView.backgroundColor = [UIColor lightGrayColor]; + [_collectionView registerClass:[CalendarCell class] forCellWithReuseIdentifier:CalendarCellIdentifier]; +} + +- (void)setDate:(NSDate *)date{ + _date = date; + [_monthLabel setText:[NSString stringWithFormat:@"%.2ld-%li",(long)[self month:date],(long)[self year:date]]]; + [_collectionView reloadData]; +} + +#pragma mark - date +- (NSInteger)month:(NSDate *)date{ + NSDateComponents *components = [[NSCalendar currentCalendar] components:(NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay) fromDate:date]; + return [components month]; +} + +- (NSInteger)year:(NSDate *)date{ + NSDateComponents *components = [[NSCalendar currentCalendar] components:(NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay) fromDate:date]; + return [components year]; +} + +- (NSDate *)previousMonth:(NSDate *)date{ + NSDateComponents *dateComponents = [[NSDateComponents alloc] init]; + dateComponents.month = -1; + NSDate *newDate = [[NSCalendar currentCalendar] dateByAddingComponents:dateComponents toDate:date options:0]; + return newDate; +} + +- (NSDate*)nextMonth:(NSDate *)date{ + NSDateComponents *dateComponents = [[NSDateComponents alloc] init]; + dateComponents.month = +1; + NSDate *newDate = [[NSCalendar currentCalendar] dateByAddingComponents:dateComponents toDate:date options:0]; + return newDate; +} + +#pragma mark - +//有几行 +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView +{ + return 7; +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ + return 1; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ + CalendarCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CalendarCellIdentifier forIndexPath:indexPath]; + calendar *aCalender = [[calendar alloc]init]; + NSArray *contentArray = [NSArray array]; + contentArray = [aCalender outputCalendarWithMonth:[self month:_date] year:[self year:_date]]; + if (indexPath.section < contentArray.count) { + cell.dateLabel.text = @" "; + cell.dateLabel.text = [cell.dateLabel.text stringByAppendingString:contentArray[indexPath.section]]; + } else{ + cell.dateLabel.text = nil; + } + return cell; +} + + +#pragma mark - buttonEvents +- (IBAction)previouseAction:(UIButton *)sender{ + [UIView transitionWithView:self duration:0.5 options:UIViewAnimationOptionTransitionCurlDown animations:^(void) { + self.date = [self previousMonth:self.date]; + } completion:nil]; +} + +- (IBAction)nexAction:(UIButton *)sender{ + [UIView transitionWithView:self duration:0.5 options:UIViewAnimationOptionTransitionCurlUp animations:^(void) { + self.date = [self nextMonth:self.date]; + } completion:nil]; +} + + + +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.xib" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.xib" new file mode 100644 index 0000000..8638f29 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/CalendarPicker.xib" @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Info.plist" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Info.plist" new file mode 100644 index 0000000..d052473 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/Info.plist" @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/ViewController.h" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/ViewController.h" new file mode 100644 index 0000000..81f568a --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/ViewController.h" @@ -0,0 +1,14 @@ +// +// ViewController.h +// CalendarPicker +// +// Created by li xiaowen on 16/10/19. +// Copyright © 2016年 li xiaowen. All rights reserved. +// +#import + +@interface ViewController : UIViewController + + +@end + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/ViewController.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/ViewController.m" new file mode 100644 index 0000000..e28e1fd --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/ViewController.m" @@ -0,0 +1,36 @@ +// +// ViewController.m +// CalendarPicker +// +// Created by li xiaowen on 16/10/19. +// Copyright © 2016年 li xiaowen. All rights reserved. +/// + +#import "ViewController.h" +#import "CalendarPicker.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.view.backgroundColor = [UIColor lightGrayColor]; + + CalendarPicker *calendarPicker = [CalendarPicker showOnView:self.view]; + calendarPicker.today = [NSDate date]; + calendarPicker.date = calendarPicker.today; + calendarPicker.frame = CGRectMake(0, 100, self.view.frame.size.width, 352); + calendarPicker.center = self.view.center; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/calendar.h" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/calendar.h" new file mode 100644 index 0000000..fb82a06 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/calendar.h" @@ -0,0 +1,17 @@ +// +// calendar.h +// calendar +// +// Created by li xiaowen on 16/9/29. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface calendar : NSObject + +- (void)outputCurrentCalendar;//输出当前的日历 +- (void)anotherOutputCalendarWithYear:(NSInteger)year;//输出某一年的日历 +- (NSArray *)outputCalendarWithMonth:(NSInteger)month year:(NSInteger)year;//输出某年某月的日历 +//- (NSArray *)outputCalendarWithMonth:(NSInteger)month year:(NSInteger)year; +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/calendar.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/calendar.m" new file mode 100644 index 0000000..39258ea --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/calendar.m" @@ -0,0 +1,225 @@ +// +// calendar.m +// calendar +// +// Created by li xiaowen on 16/9/29. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import "calendar.h" + +@implementation calendar + +- (void)outputCurrentCalendar{ + //获取当前的年月,调用outputCalendarWithMonth:year: 即可 + NSDate *date = [NSDate date]; + NSCalendar *cal = [NSCalendar currentCalendar]; + unsigned int unitFlags = NSCalendarUnitYear|NSCalendarUnitMonth; + //这句是说你要获取日期的元素有哪些。获取年就要写NSYearCalendarUnit,获取小时就要写NSHourCalendarUnit,中间用|隔开 + NSDateComponents *d = [cal components:unitFlags fromDate:date]; + NSInteger year = [d year]; + NSInteger month = [d month]; + [self outputCalendarWithMonth:month year:year]; +} + +- (NSArray *)outputCalendarWithMonth:(NSInteger)month year:(NSInteger)year{ + NSArray *result = [NSArray array]; + NSArray *monthInChinese = [NSArray arrayWithObjects:@" 零月",@" 一月",@" 二月",@" 三月",@" 四月",@" 五月",@" 六月",@" 七月",@" 八月",@" 九月",@" 十月",@" 十一月",@" 十二月", nil];//每个月对应的中文 + NSString *weekInChinese = @" 日 一 二 三 四 五 六"; + NSArray *dayInChinese = [NSArray arrayWithObjects:@" ",@" 1",@" 2",@" 3",@" 4",@" 5",@" 6",@" 7",@" 8",@" 9",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31", nil];//一个月的每天的日期,第一个元素用不到 + NSArray *numberOfDaysOfMonth = [NSArray arrayWithObjects:@"0",@"31",@"28",@"31", @"30",@"31",@"30",@"31",@"31",@"30",@"31",@"30",@"31",nil];//每个月的天数 + //判断是否为闰年,如果是就把二月天数换成29 + if(year%400==0||(year%4==0&&year%100!=0)) + numberOfDaysOfMonth = [NSArray arrayWithObjects:@"0",@"31",@"29",@"31", @"30",@"31",@"30",@"31",@"31",@"30",@"31",@"30",@"31",nil]; + //要知道这个月的第一天是周几,通过这个月的第一天和1.1差的天数来计算 + NSInteger date = 0;//记录时间差 + for (NSInteger index = 1; index < month; index++) { + NSString *str = [numberOfDaysOfMonth objectAtIndex:index]; + date += str.intValue; + } + NSInteger firstDayInMonth = (((year-1)+ (year-1)/4-(year-1)/100+(year-1)/400+1)+date)%7; + //开始输出,每一句输出,对应的就是存入数组 + //NSLog(@"%@ %li",[monthInChinese objectAtIndex:month],year); + printf("%s %li\n",[[monthInChinese objectAtIndex:month] UTF8String],year); + //result = [result arrayByAddingObject:<#(nonnull id)#>] + //NSLog(@"%@",weekInChinese); + printf("%s\n",[weekInChinese UTF8String]); + result = [result arrayByAddingObject:weekInChinese]; + NSInteger dayOfBeginning = 7 - firstDayInMonth;//第一行的最后一天的日期 + NSString *totalDaysOfMonth = [numberOfDaysOfMonth objectAtIndex:month]; + NSString *aLineOutput = [NSString string]; + NSString *beginningBlank = [NSString string]; + while (firstDayInMonth != 0) { + firstDayInMonth --; + beginningBlank = [beginningBlank stringByAppendingString:@" "];//每次空3格 + + } + aLineOutput = beginningBlank; + //把剩下的第一行补全 + for(NSInteger index = 1; index <= dayOfBeginning; index++){ + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:index]]; + if(index!=dayOfBeginning) + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + //NSLog(@"%@",aLineOutput); + printf("%s\n",[aLineOutput UTF8String]); + result = [result arrayByAddingObject:aLineOutput]; + + aLineOutput = [NSString string]; + dayOfBeginning++;//剩下的开始的日期 + NSInteger nextLineFlag = 0; + while (dayOfBeginning <= totalDaysOfMonth.intValue) { + if(nextLineFlag != 7 ){ + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:dayOfBeginning]]; + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + nextLineFlag++; + dayOfBeginning++; + } else{ + //NSLog(@"%@",aLineOutput); + printf("%s\n",[aLineOutput UTF8String]); + result = [result arrayByAddingObject:aLineOutput]; + aLineOutput = [NSString string]; + nextLineFlag = 0; + } + } + //NSLog(@"%@",aLineOutput); + //aLineOutput = [aLineOutput stringByAppendingString:@" "]; + printf("%s\n",[aLineOutput UTF8String]); + result = [result arrayByAddingObject:aLineOutput]; + NSLog(@"测试月历输出"); + NSLog(@"%@",result); + return result; +} +- (void)anotherOutputCalendarWithYear:(NSInteger)year{ + NSArray *seasonInChinese = [NSArray arrayWithObjects:@" 零月 零月 零月",@" 一月 二月 三月",@" 四月 五月 六月",@" 七月 八月 九月",@" 十月 十一月 十二月", nil];//每个季度对应的中文 + NSArray *dayInChinese = [NSArray arrayWithObjects:@" ",@" 1",@" 2",@" 3",@" 4",@" 5",@" 6",@" 7",@" 8",@" 9",@"10",@"11",@"12",@"13",@"14",@"15",@"16",@"17",@"18",@"19",@"20",@"21",@"22",@"23",@"24",@"25",@"26",@"27",@"28",@"29",@"30",@"31", nil];//一个月的每天的日期,第一个元素用不到 + NSArray *numberOfDaysOfMonth = [NSArray arrayWithObjects:@"0",@"31",@"28",@"31", @"30",@"31",@"30",@"31",@"31",@"30",@"31",@"30",@"31",nil];//每个月的天数 + //判断是否为闰年,如果是就把二月天数换成29 + if(year%400==0||(year%4==0&&year%100!=0)) + numberOfDaysOfMonth = [NSArray arrayWithObjects:@"0",@"31",@"29",@"31", @"30",@"31",@"30",@"31",@"31",@"30",@"31",@"30",@"31",nil]; + //首先输出查看的年份 + //NSLog(@" %li",(long)year); + printf(" %li\n\n",(long)year); + //NSLog(@" "); + //开始输出 + NSInteger firstDayInMonth1 = ((year-1)+ (year-1)/4-(year-1)/100+(year-1)/400+1)%7;//得到一年第一个月第一天是星期几 + NSInteger firstDayInMonth2 = (firstDayInMonth1 + [[numberOfDaysOfMonth objectAtIndex:1] intValue])%7;//第二个月的第一天是星期几 + NSInteger firstDayInMonth3 = (firstDayInMonth2 + [[numberOfDaysOfMonth objectAtIndex:2] intValue])%7;//第三个月的第一天是星期几 + NSInteger dayOfBeginning1 = 7 - firstDayInMonth1;//第一行第一个月剩下的天数 + NSInteger dayOfBeginning2 = 7 - firstDayInMonth2;//第一行第二个月剩下的天数 + NSInteger dayOfBeginning3 = 7 - firstDayInMonth3;//第一行第三个月剩下的天数 + NSInteger season;//记录当前输出的季度 + NSString *beginningBlank1 = [NSString string];//第一个月空格的字符串 + NSString *beginningBlank2 = [NSString string];//第二个月空格的字符串 + NSString *beginningBlank3 = [NSString string];//第三个月空格的字符串 + NSString *aLineOutput = [NSString string]; + //从一月开始输出 + for (season = 1; season < 5; season++) { + //NSLog(@"%@",[seasonInChinese objectAtIndex:season]); + printf("%s\n",[[seasonInChinese objectAtIndex:season] UTF8String]); + //NSLog(@"日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六"); + printf("日 一 二 三 四 五 六 日 一 二 三 四 五 六 日 一 二 三 四 五 六\n"); + //第一个月的第一行 + while (firstDayInMonth1 != 0) { + firstDayInMonth1 --; + beginningBlank1 = [beginningBlank1 stringByAppendingString:@" "];//每次空3格 + + } + aLineOutput = beginningBlank1;//先把需要的空白补上 + //把剩下的第一行补全 + + for(NSInteger index1 = 1; index1 <= dayOfBeginning1; index1++){ + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:index1]]; + if(index1!=dayOfBeginning1) + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } + aLineOutput = [aLineOutput stringByAppendingString:@" "];//月与月之间要空2格 + //第二个月的第一行 + while (firstDayInMonth2 != 0) { + firstDayInMonth2 --; + beginningBlank2 = [beginningBlank2 stringByAppendingString:@" "];//每次空3格 + } + aLineOutput = [aLineOutput stringByAppendingString:beginningBlank2]; + for(NSInteger index2 = 1; index2 <= dayOfBeginning2; index2++){ + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:index2]]; + if(index2!=dayOfBeginning2) + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + //第三个月的第一行 + while (firstDayInMonth3 != 0) { + firstDayInMonth3 --; + beginningBlank3 = [beginningBlank3 stringByAppendingString:@" "];//每次空3格 + } + aLineOutput = [aLineOutput stringByAppendingString:beginningBlank3]; + for(NSInteger index3 = 1; index3 <= dayOfBeginning3; index3++){ + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:index3]]; + if(index3 != dayOfBeginning3) + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } + //以上为补全第一行 + //NSLog(@"%@",aLineOutput); + printf("%s\n",[aLineOutput UTF8String]); + //开始输出剩下的天数,7天往上加, + dayOfBeginning1++;//第一个月剩下的开始的日期 + dayOfBeginning2++;//第二个月剩下的开始的日期 + dayOfBeginning3++;//第三个月剩下的开始的日期 + NSString *totalDaysOfMonth1 = [numberOfDaysOfMonth objectAtIndex:(season -1)*3+1];//第一个月的总天数 + NSString *totalDaysOfMonth2 = [numberOfDaysOfMonth objectAtIndex:(season -1)*3+2];//第二个月的总天数 + NSString *totalDaysOfMonth3 = [numberOfDaysOfMonth objectAtIndex:season*3];//第三个月的总天数 + aLineOutput = [NSString string];//清空之前的内容 + NSInteger nextAppear = dayOfBeginning3;//下一个出现的位置是星期几(0-6) + for (NSInteger blankNumber = 0; blankNumber < 5; blankNumber ++) { + //第一个月的一个7天 + for (NSInteger index = 0; index < 7; index ++){ + if (blankNumber*7+index+dayOfBeginning1 <= totalDaysOfMonth1.intValue) { + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:blankNumber*7+index+dayOfBeginning1]]; + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } else{ + //超过了最大日期,直接补3个空格 + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } + } + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + //第二个月的一个7天 + for (NSInteger index = 0; index < 7; index ++){ + if (blankNumber*7+index+dayOfBeginning2 <= totalDaysOfMonth2.intValue) { + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:blankNumber*7+index+dayOfBeginning2]]; + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } else{ + //超过了最大日期,直接补3个空格 + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } + } + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + //第三个月的一个7天 + for (NSInteger index = 0; index < 7; index ++){ + if (blankNumber*7+index+dayOfBeginning3 <= totalDaysOfMonth3.intValue) { + aLineOutput = [aLineOutput stringByAppendingString:[dayInChinese objectAtIndex:(blankNumber*7+index+dayOfBeginning3)]]; + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + nextAppear = (index+1)%7; + } else{ + //超过了最大日期,直接补3个空格 + aLineOutput = [aLineOutput stringByAppendingString:@" "]; + } + } + //NSLog(@"%@",aLineOutput); + printf("%s\n",[aLineOutput UTF8String]); + aLineOutput = [NSString string]; + } + beginningBlank1 = [NSString string];//第一个月空格的字符串 + beginningBlank2 = [NSString string];//第二个月空格的字符串 + beginningBlank3 = [NSString string];//第三个月空格的字符串 + // aLineOutput = [NSString string]; + firstDayInMonth1 = nextAppear; + //对13求余只是防止出现错误,没有第五季度 + firstDayInMonth2 = (nextAppear + [[numberOfDaysOfMonth objectAtIndex:(season*3+1)%13] intValue])%7;//第二个月的第一天是星期几 + firstDayInMonth3 = (nextAppear + [[numberOfDaysOfMonth objectAtIndex:(season*3+1)%13] intValue] +[[numberOfDaysOfMonth objectAtIndex:(season*3+2)%13] intValue])%7; + dayOfBeginning1 = 7 - firstDayInMonth1; + dayOfBeginning2 = 7 - firstDayInMonth2; + dayOfBeginning3 = 7 - firstDayInMonth3; + } + +} +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/left_arrow.png" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/left_arrow.png" new file mode 100644 index 0000000..7da93dc Binary files /dev/null and "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/left_arrow.png" differ diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/main.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/main.m" new file mode 100644 index 0000000..b480ae8 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/main.m" @@ -0,0 +1,16 @@ +// +// main.m +// CalenderPicker +// +// Created by MrYu on 2016/10/27. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/right_arrow.png" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/right_arrow.png" new file mode 100644 index 0000000..1e6823c Binary files /dev/null and "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPicker/right_arrow.png" differ diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerTests/CalenderPickerTests.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerTests/CalenderPickerTests.m" new file mode 100644 index 0000000..02e6d58 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerTests/CalenderPickerTests.m" @@ -0,0 +1,39 @@ +// +// CalenderPickerTests.m +// CalenderPickerTests +// +// Created by MrYu on 2016/10/27. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface CalenderPickerTests : XCTestCase + +@end + +@implementation CalenderPickerTests + +- (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/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerTests/Info.plist" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerTests/Info.plist" new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerTests/Info.plist" @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerUITests/CalenderPickerUITests.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerUITests/CalenderPickerUITests.m" new file mode 100644 index 0000000..4aef2c9 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerUITests/CalenderPickerUITests.m" @@ -0,0 +1,40 @@ +// +// CalenderPickerUITests.m +// CalenderPickerUITests +// +// Created by MrYu on 2016/10/27. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface CalenderPickerUITests : XCTestCase + +@end + +@implementation CalenderPickerUITests + +- (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 diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerUITests/Info.plist" "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerUITests/Info.plist" new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework02/CalenderPicker/CalenderPickerUITests/Info.plist" @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList.xcodeproj/project.pbxproj" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList.xcodeproj/project.pbxproj" new file mode 100644 index 0000000..0272286 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList.xcodeproj/project.pbxproj" @@ -0,0 +1,542 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 44175C071DC0C5F300987F9D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 44175C061DC0C5F300987F9D /* main.m */; }; + 44175C0A1DC0C5F300987F9D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 44175C091DC0C5F300987F9D /* AppDelegate.m */; }; + 44175C0D1DC0C5F300987F9D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 44175C0C1DC0C5F300987F9D /* ViewController.m */; }; + 44175C101DC0C5F300987F9D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 44175C0E1DC0C5F300987F9D /* Main.storyboard */; }; + 44175C121DC0C5F300987F9D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 44175C111DC0C5F300987F9D /* Assets.xcassets */; }; + 44175C151DC0C5F300987F9D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 44175C131DC0C5F300987F9D /* LaunchScreen.storyboard */; }; + 44175C201DC0C5F300987F9D /* TaskListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 44175C1F1DC0C5F300987F9D /* TaskListTests.m */; }; + 44175C2B1DC0C5F300987F9D /* TaskListUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 44175C2A1DC0C5F300987F9D /* TaskListUITests.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 44175C1C1DC0C5F300987F9D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 44175BFA1DC0C5F300987F9D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 44175C011DC0C5F300987F9D; + remoteInfo = TaskList; + }; + 44175C271DC0C5F300987F9D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 44175BFA1DC0C5F300987F9D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 44175C011DC0C5F300987F9D; + remoteInfo = TaskList; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 44175C021DC0C5F300987F9D /* TaskList.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TaskList.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 44175C061DC0C5F300987F9D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 44175C081DC0C5F300987F9D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 44175C091DC0C5F300987F9D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 44175C0B1DC0C5F300987F9D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 44175C0C1DC0C5F300987F9D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 44175C0F1DC0C5F300987F9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 44175C111DC0C5F300987F9D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 44175C141DC0C5F300987F9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 44175C161DC0C5F300987F9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 44175C1B1DC0C5F300987F9D /* TaskListTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TaskListTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 44175C1F1DC0C5F300987F9D /* TaskListTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TaskListTests.m; sourceTree = ""; }; + 44175C211DC0C5F300987F9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 44175C261DC0C5F300987F9D /* TaskListUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TaskListUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 44175C2A1DC0C5F300987F9D /* TaskListUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TaskListUITests.m; sourceTree = ""; }; + 44175C2C1DC0C5F300987F9D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 44175BFF1DC0C5F300987F9D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 44175C181DC0C5F300987F9D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 44175C231DC0C5F300987F9D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 44175BF91DC0C5F300987F9D = { + isa = PBXGroup; + children = ( + 44175C041DC0C5F300987F9D /* TaskList */, + 44175C1E1DC0C5F300987F9D /* TaskListTests */, + 44175C291DC0C5F300987F9D /* TaskListUITests */, + 44175C031DC0C5F300987F9D /* Products */, + ); + sourceTree = ""; + }; + 44175C031DC0C5F300987F9D /* Products */ = { + isa = PBXGroup; + children = ( + 44175C021DC0C5F300987F9D /* TaskList.app */, + 44175C1B1DC0C5F300987F9D /* TaskListTests.xctest */, + 44175C261DC0C5F300987F9D /* TaskListUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 44175C041DC0C5F300987F9D /* TaskList */ = { + isa = PBXGroup; + children = ( + 44175C081DC0C5F300987F9D /* AppDelegate.h */, + 44175C091DC0C5F300987F9D /* AppDelegate.m */, + 44175C0B1DC0C5F300987F9D /* ViewController.h */, + 44175C0C1DC0C5F300987F9D /* ViewController.m */, + 44175C0E1DC0C5F300987F9D /* Main.storyboard */, + 44175C111DC0C5F300987F9D /* Assets.xcassets */, + 44175C131DC0C5F300987F9D /* LaunchScreen.storyboard */, + 44175C161DC0C5F300987F9D /* Info.plist */, + 44175C051DC0C5F300987F9D /* Supporting Files */, + ); + path = TaskList; + sourceTree = ""; + }; + 44175C051DC0C5F300987F9D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 44175C061DC0C5F300987F9D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 44175C1E1DC0C5F300987F9D /* TaskListTests */ = { + isa = PBXGroup; + children = ( + 44175C1F1DC0C5F300987F9D /* TaskListTests.m */, + 44175C211DC0C5F300987F9D /* Info.plist */, + ); + path = TaskListTests; + sourceTree = ""; + }; + 44175C291DC0C5F300987F9D /* TaskListUITests */ = { + isa = PBXGroup; + children = ( + 44175C2A1DC0C5F300987F9D /* TaskListUITests.m */, + 44175C2C1DC0C5F300987F9D /* Info.plist */, + ); + path = TaskListUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 44175C011DC0C5F300987F9D /* TaskList */ = { + isa = PBXNativeTarget; + buildConfigurationList = 44175C2F1DC0C5F300987F9D /* Build configuration list for PBXNativeTarget "TaskList" */; + buildPhases = ( + 44175BFE1DC0C5F300987F9D /* Sources */, + 44175BFF1DC0C5F300987F9D /* Frameworks */, + 44175C001DC0C5F300987F9D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TaskList; + productName = TaskList; + productReference = 44175C021DC0C5F300987F9D /* TaskList.app */; + productType = "com.apple.product-type.application"; + }; + 44175C1A1DC0C5F300987F9D /* TaskListTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 44175C321DC0C5F300987F9D /* Build configuration list for PBXNativeTarget "TaskListTests" */; + buildPhases = ( + 44175C171DC0C5F300987F9D /* Sources */, + 44175C181DC0C5F300987F9D /* Frameworks */, + 44175C191DC0C5F300987F9D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 44175C1D1DC0C5F300987F9D /* PBXTargetDependency */, + ); + name = TaskListTests; + productName = TaskListTests; + productReference = 44175C1B1DC0C5F300987F9D /* TaskListTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 44175C251DC0C5F300987F9D /* TaskListUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 44175C351DC0C5F300987F9D /* Build configuration list for PBXNativeTarget "TaskListUITests" */; + buildPhases = ( + 44175C221DC0C5F300987F9D /* Sources */, + 44175C231DC0C5F300987F9D /* Frameworks */, + 44175C241DC0C5F300987F9D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 44175C281DC0C5F300987F9D /* PBXTargetDependency */, + ); + name = TaskListUITests; + productName = TaskListUITests; + productReference = 44175C261DC0C5F300987F9D /* TaskListUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 44175BFA1DC0C5F300987F9D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = "yu qingzhu"; + TargetAttributes = { + 44175C011DC0C5F300987F9D = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = FDSVMX6CDK; + ProvisioningStyle = Automatic; + }; + 44175C1A1DC0C5F300987F9D = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = FDSVMX6CDK; + ProvisioningStyle = Automatic; + TestTargetID = 44175C011DC0C5F300987F9D; + }; + 44175C251DC0C5F300987F9D = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = FDSVMX6CDK; + ProvisioningStyle = Automatic; + TestTargetID = 44175C011DC0C5F300987F9D; + }; + }; + }; + buildConfigurationList = 44175BFD1DC0C5F300987F9D /* Build configuration list for PBXProject "TaskList" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 44175BF91DC0C5F300987F9D; + productRefGroup = 44175C031DC0C5F300987F9D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 44175C011DC0C5F300987F9D /* TaskList */, + 44175C1A1DC0C5F300987F9D /* TaskListTests */, + 44175C251DC0C5F300987F9D /* TaskListUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 44175C001DC0C5F300987F9D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 44175C151DC0C5F300987F9D /* LaunchScreen.storyboard in Resources */, + 44175C121DC0C5F300987F9D /* Assets.xcassets in Resources */, + 44175C101DC0C5F300987F9D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 44175C191DC0C5F300987F9D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 44175C241DC0C5F300987F9D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 44175BFE1DC0C5F300987F9D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 44175C0D1DC0C5F300987F9D /* ViewController.m in Sources */, + 44175C0A1DC0C5F300987F9D /* AppDelegate.m in Sources */, + 44175C071DC0C5F300987F9D /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 44175C171DC0C5F300987F9D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 44175C201DC0C5F300987F9D /* TaskListTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 44175C221DC0C5F300987F9D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 44175C2B1DC0C5F300987F9D /* TaskListUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 44175C1D1DC0C5F300987F9D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 44175C011DC0C5F300987F9D /* TaskList */; + targetProxy = 44175C1C1DC0C5F300987F9D /* PBXContainerItemProxy */; + }; + 44175C281DC0C5F300987F9D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 44175C011DC0C5F300987F9D /* TaskList */; + targetProxy = 44175C271DC0C5F300987F9D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 44175C0E1DC0C5F300987F9D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 44175C0F1DC0C5F300987F9D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 44175C131DC0C5F300987F9D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 44175C141DC0C5F300987F9D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 44175C2D1DC0C5F300987F9D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + 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 = 10.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 44175C2E1DC0C5F300987F9D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + 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 = 10.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 44175C301DC0C5F300987F9D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = TaskList/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.xw.TaskList; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 44175C311DC0C5F300987F9D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = TaskList/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.xw.TaskList; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 44175C331DC0C5F300987F9D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = TaskListTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.TaskListTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TaskList.app/TaskList"; + }; + name = Debug; + }; + 44175C341DC0C5F300987F9D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = TaskListTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.TaskListTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TaskList.app/TaskList"; + }; + name = Release; + }; + 44175C361DC0C5F300987F9D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = TaskListUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.TaskListUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = TaskList; + }; + name = Debug; + }; + 44175C371DC0C5F300987F9D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEVELOPMENT_TEAM = FDSVMX6CDK; + INFOPLIST_FILE = TaskListUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qz.TaskListUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = TaskList; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 44175BFD1DC0C5F300987F9D /* Build configuration list for PBXProject "TaskList" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 44175C2D1DC0C5F300987F9D /* Debug */, + 44175C2E1DC0C5F300987F9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 44175C2F1DC0C5F300987F9D /* Build configuration list for PBXNativeTarget "TaskList" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 44175C301DC0C5F300987F9D /* Debug */, + 44175C311DC0C5F300987F9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 44175C321DC0C5F300987F9D /* Build configuration list for PBXNativeTarget "TaskListTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 44175C331DC0C5F300987F9D /* Debug */, + 44175C341DC0C5F300987F9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 44175C351DC0C5F300987F9D /* Build configuration list for PBXNativeTarget "TaskListUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 44175C361DC0C5F300987F9D /* Debug */, + 44175C371DC0C5F300987F9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 44175BFA1DC0C5F300987F9D /* Project object */; +} diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/AppDelegate.h" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/AppDelegate.h" new file mode 100644 index 0000000..3f40638 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/AppDelegate.h" @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// TaskList +// +// Created by 李晓雯 on 2016/10/26. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/AppDelegate.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/AppDelegate.m" new file mode 100644 index 0000000..1e27786 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/AppDelegate.m" @@ -0,0 +1,51 @@ +// +// AppDelegate.m +// TaskList +// +// Created by 李晓雯 on 2016/10/26. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#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 invalidate graphics rendering callbacks. 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 active 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/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" new file mode 100644 index 0000000..36d2c80 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "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" : "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Base.lproj/LaunchScreen.storyboard" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Base.lproj/LaunchScreen.storyboard" new file mode 100644 index 0000000..fdf3f97 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Base.lproj/LaunchScreen.storyboard" @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Base.lproj/Main.storyboard" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Base.lproj/Main.storyboard" new file mode 100644 index 0000000..4529698 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Base.lproj/Main.storyboard" @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Info.plist" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Info.plist" new file mode 100644 index 0000000..d052473 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/Info.plist" @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/ViewController.h" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/ViewController.h" new file mode 100644 index 0000000..e38aa90 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/ViewController.h" @@ -0,0 +1,15 @@ +// +// ViewController.h +// TaskList +// +// Created by 李晓雯 on 2016/10/26. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/ViewController.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/ViewController.m" new file mode 100644 index 0000000..422cf66 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/ViewController.m" @@ -0,0 +1,92 @@ +// +// ViewController.m +// TaskList +// +// Created by 李晓雯 on 2016/10/26. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () +{ + UITableView *_tableView; + UIButton *_addBtn; + UITextField *_textField; + NSMutableArray *_dataArray; +} +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. + self.view.backgroundColor = [UIColor whiteColor]; + + _dataArray = [NSMutableArray array]; + + _textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 40, self.view.bounds.size.width - 20 - 50 - 10, 30)]; + _textField.layer.borderWidth = 0.5; + _textField.layer.cornerRadius = 2; + _textField.clipsToBounds = YES; + _textField.placeholder = @"请输入"; + _textField.layer.borderColor = [UIColor lightGrayColor].CGColor; + [self.view addSubview:_textField]; + + _addBtn = [[UIButton alloc] initWithFrame:CGRectMake(10 + _textField.bounds.size.width + 10, 40, 50, 30)]; + _addBtn.layer.cornerRadius = 2; + _addBtn.clipsToBounds = YES; + _addBtn.layer.borderWidth = 0.5; + _addBtn.layer.borderColor = [UIColor lightGrayColor].CGColor; + [_addBtn setTitle:@"add" forState:UIControlStateNormal]; + [_addBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; + [self.view addSubview:_addBtn]; + [_addBtn addTarget:self action:@selector(btnClicked) forControlEvents:UIControlEventTouchUpInside]; + + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 80, self.view.bounds.size.width, self.view.bounds.size.height - 80)]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"]; + [self.view addSubview:_tableView]; + +} + +- (void)btnClicked +{ + NSString *str = _textField.text; + if (![_textField.text isEqualToString:@""]) { + [_dataArray addObject:str]; + [_tableView reloadData]; + } + _textField.text = @""; + +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 60; +} +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return _dataArray.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; + if (cell == nil) { + cell = [[UITableViewCell alloc] init]; + } + cell.textLabel.text = _dataArray[indexPath.row]; + cell.textLabel.font = [UIFont boldSystemFontOfSize:20]; + return cell; +} +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/main.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/main.m" new file mode 100644 index 0000000..02e0e87 --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskList/main.m" @@ -0,0 +1,16 @@ +// +// main.m +// TaskList +// +// Created by 李晓雯 on 2016/10/26. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListTests/Info.plist" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListTests/Info.plist" new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListTests/Info.plist" @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListTests/TaskListTests.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListTests/TaskListTests.m" new file mode 100644 index 0000000..7888bbc --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListTests/TaskListTests.m" @@ -0,0 +1,39 @@ +// +// TaskListTests.m +// TaskListTests +// +// Created by 李晓雯 on 2016/10/26. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#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/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListUITests/Info.plist" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListUITests/Info.plist" new file mode 100644 index 0000000..6c6c23c --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListUITests/Info.plist" @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git "a/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListUITests/TaskListUITests.m" "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListUITests/TaskListUITests.m" new file mode 100644 index 0000000..4ab76df --- /dev/null +++ "b/21651112\346\235\216\346\231\223\351\233\257/homework03/TaskList/TaskListUITests/TaskListUITests.m" @@ -0,0 +1,40 @@ +// +// TaskListUITests.m +// TaskListUITests +// +// Created by 李晓雯 on 2016/10/26. +// Copyright © 2016年 li xiaowen. All rights reserved. +// + +#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