diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar.xcodeproj/project.pbxproj" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar.xcodeproj/project.pbxproj" new file mode 100644 index 0000000..887416e --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar.xcodeproj/project.pbxproj" @@ -0,0 +1,534 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + E2C5DBE41DC0CF4200B1DA6C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C5DBE31DC0CF4200B1DA6C /* main.m */; }; + E2C5DBE71DC0CF4200B1DA6C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C5DBE61DC0CF4200B1DA6C /* AppDelegate.m */; }; + E2C5DBEA1DC0CF4200B1DA6C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C5DBE91DC0CF4200B1DA6C /* ViewController.m */; }; + E2C5DBED1DC0CF4200B1DA6C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2C5DBEB1DC0CF4200B1DA6C /* Main.storyboard */; }; + E2C5DBEF1DC0CF4200B1DA6C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2C5DBEE1DC0CF4200B1DA6C /* Assets.xcassets */; }; + E2C5DBF21DC0CF4200B1DA6C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2C5DBF01DC0CF4200B1DA6C /* LaunchScreen.storyboard */; }; + E2C5DBFD1DC0CF4200B1DA6C /* CalendarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C5DBFC1DC0CF4200B1DA6C /* CalendarTests.m */; }; + E2C5DC081DC0CF4200B1DA6C /* CalendarUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C5DC071DC0CF4200B1DA6C /* CalendarUITests.m */; }; + E2C5DC1A1DC0D11200B1DA6C /* CalendarView.m in Sources */ = {isa = PBXBuildFile; fileRef = E2C5DC191DC0D11200B1DA6C /* CalendarView.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E2C5DBF91DC0CF4200B1DA6C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E2C5DBD71DC0CF4200B1DA6C /* Project object */; + proxyType = 1; + remoteGlobalIDString = E2C5DBDE1DC0CF4200B1DA6C; + remoteInfo = Calendar; + }; + E2C5DC041DC0CF4200B1DA6C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E2C5DBD71DC0CF4200B1DA6C /* Project object */; + proxyType = 1; + remoteGlobalIDString = E2C5DBDE1DC0CF4200B1DA6C; + remoteInfo = Calendar; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + E2C5DBDF1DC0CF4200B1DA6C /* Calendar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Calendar.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E2C5DBE31DC0CF4200B1DA6C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + E2C5DBE51DC0CF4200B1DA6C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + E2C5DBE61DC0CF4200B1DA6C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + E2C5DBE81DC0CF4200B1DA6C /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + E2C5DBE91DC0CF4200B1DA6C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + E2C5DBEC1DC0CF4200B1DA6C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + E2C5DBEE1DC0CF4200B1DA6C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E2C5DBF11DC0CF4200B1DA6C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E2C5DBF31DC0CF4200B1DA6C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2C5DBF81DC0CF4200B1DA6C /* CalendarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CalendarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E2C5DBFC1DC0CF4200B1DA6C /* CalendarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CalendarTests.m; sourceTree = ""; }; + E2C5DBFE1DC0CF4200B1DA6C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2C5DC031DC0CF4200B1DA6C /* CalendarUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CalendarUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E2C5DC071DC0CF4200B1DA6C /* CalendarUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CalendarUITests.m; sourceTree = ""; }; + E2C5DC091DC0CF4200B1DA6C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2C5DC181DC0D0E000B1DA6C /* CalendarView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CalendarView.h; sourceTree = ""; }; + E2C5DC191DC0D11200B1DA6C /* CalendarView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CalendarView.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E2C5DBDC1DC0CF4200B1DA6C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2C5DBF51DC0CF4200B1DA6C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2C5DC001DC0CF4200B1DA6C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E2C5DBD61DC0CF4200B1DA6C = { + isa = PBXGroup; + children = ( + E2C5DBE11DC0CF4200B1DA6C /* Calendar */, + E2C5DBFB1DC0CF4200B1DA6C /* CalendarTests */, + E2C5DC061DC0CF4200B1DA6C /* CalendarUITests */, + E2C5DBE01DC0CF4200B1DA6C /* Products */, + ); + sourceTree = ""; + }; + E2C5DBE01DC0CF4200B1DA6C /* Products */ = { + isa = PBXGroup; + children = ( + E2C5DBDF1DC0CF4200B1DA6C /* Calendar.app */, + E2C5DBF81DC0CF4200B1DA6C /* CalendarTests.xctest */, + E2C5DC031DC0CF4200B1DA6C /* CalendarUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + E2C5DBE11DC0CF4200B1DA6C /* Calendar */ = { + isa = PBXGroup; + children = ( + E2C5DBE51DC0CF4200B1DA6C /* AppDelegate.h */, + E2C5DBE61DC0CF4200B1DA6C /* AppDelegate.m */, + E2C5DBE81DC0CF4200B1DA6C /* ViewController.h */, + E2C5DBE91DC0CF4200B1DA6C /* ViewController.m */, + E2C5DC181DC0D0E000B1DA6C /* CalendarView.h */, + E2C5DC191DC0D11200B1DA6C /* CalendarView.m */, + E2C5DBEB1DC0CF4200B1DA6C /* Main.storyboard */, + E2C5DBEE1DC0CF4200B1DA6C /* Assets.xcassets */, + E2C5DBF01DC0CF4200B1DA6C /* LaunchScreen.storyboard */, + E2C5DBF31DC0CF4200B1DA6C /* Info.plist */, + E2C5DBE31DC0CF4200B1DA6C /* main.m */, + E2C5DBE21DC0CF4200B1DA6C /* Supporting Files */, + ); + path = Calendar; + sourceTree = ""; + }; + E2C5DBE21DC0CF4200B1DA6C /* Supporting Files */ = { + isa = PBXGroup; + children = ( + ); + name = "Supporting Files"; + sourceTree = ""; + }; + E2C5DBFB1DC0CF4200B1DA6C /* CalendarTests */ = { + isa = PBXGroup; + children = ( + E2C5DBFC1DC0CF4200B1DA6C /* CalendarTests.m */, + E2C5DBFE1DC0CF4200B1DA6C /* Info.plist */, + ); + path = CalendarTests; + sourceTree = ""; + }; + E2C5DC061DC0CF4200B1DA6C /* CalendarUITests */ = { + isa = PBXGroup; + children = ( + E2C5DC071DC0CF4200B1DA6C /* CalendarUITests.m */, + E2C5DC091DC0CF4200B1DA6C /* Info.plist */, + ); + path = CalendarUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E2C5DBDE1DC0CF4200B1DA6C /* Calendar */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2C5DC0C1DC0CF4200B1DA6C /* Build configuration list for PBXNativeTarget "Calendar" */; + buildPhases = ( + E2C5DBDB1DC0CF4200B1DA6C /* Sources */, + E2C5DBDC1DC0CF4200B1DA6C /* Frameworks */, + E2C5DBDD1DC0CF4200B1DA6C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Calendar; + productName = Calendar; + productReference = E2C5DBDF1DC0CF4200B1DA6C /* Calendar.app */; + productType = "com.apple.product-type.application"; + }; + E2C5DBF71DC0CF4200B1DA6C /* CalendarTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2C5DC0F1DC0CF4200B1DA6C /* Build configuration list for PBXNativeTarget "CalendarTests" */; + buildPhases = ( + E2C5DBF41DC0CF4200B1DA6C /* Sources */, + E2C5DBF51DC0CF4200B1DA6C /* Frameworks */, + E2C5DBF61DC0CF4200B1DA6C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E2C5DBFA1DC0CF4200B1DA6C /* PBXTargetDependency */, + ); + name = CalendarTests; + productName = CalendarTests; + productReference = E2C5DBF81DC0CF4200B1DA6C /* CalendarTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + E2C5DC021DC0CF4200B1DA6C /* CalendarUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2C5DC121DC0CF4200B1DA6C /* Build configuration list for PBXNativeTarget "CalendarUITests" */; + buildPhases = ( + E2C5DBFF1DC0CF4200B1DA6C /* Sources */, + E2C5DC001DC0CF4200B1DA6C /* Frameworks */, + E2C5DC011DC0CF4200B1DA6C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E2C5DC051DC0CF4200B1DA6C /* PBXTargetDependency */, + ); + name = CalendarUITests; + productName = CalendarUITests; + productReference = E2C5DC031DC0CF4200B1DA6C /* CalendarUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E2C5DBD71DC0CF4200B1DA6C /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = aixing; + TargetAttributes = { + E2C5DBDE1DC0CF4200B1DA6C = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + }; + E2C5DBF71DC0CF4200B1DA6C = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + TestTargetID = E2C5DBDE1DC0CF4200B1DA6C; + }; + E2C5DC021DC0CF4200B1DA6C = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + TestTargetID = E2C5DBDE1DC0CF4200B1DA6C; + }; + }; + }; + buildConfigurationList = E2C5DBDA1DC0CF4200B1DA6C /* Build configuration list for PBXProject "Calendar" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E2C5DBD61DC0CF4200B1DA6C; + productRefGroup = E2C5DBE01DC0CF4200B1DA6C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E2C5DBDE1DC0CF4200B1DA6C /* Calendar */, + E2C5DBF71DC0CF4200B1DA6C /* CalendarTests */, + E2C5DC021DC0CF4200B1DA6C /* CalendarUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E2C5DBDD1DC0CF4200B1DA6C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2C5DBF21DC0CF4200B1DA6C /* LaunchScreen.storyboard in Resources */, + E2C5DBEF1DC0CF4200B1DA6C /* Assets.xcassets in Resources */, + E2C5DBED1DC0CF4200B1DA6C /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2C5DBF61DC0CF4200B1DA6C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2C5DC011DC0CF4200B1DA6C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E2C5DBDB1DC0CF4200B1DA6C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2C5DBEA1DC0CF4200B1DA6C /* ViewController.m in Sources */, + E2C5DBE71DC0CF4200B1DA6C /* AppDelegate.m in Sources */, + E2C5DC1A1DC0D11200B1DA6C /* CalendarView.m in Sources */, + E2C5DBE41DC0CF4200B1DA6C /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2C5DBF41DC0CF4200B1DA6C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2C5DBFD1DC0CF4200B1DA6C /* CalendarTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2C5DBFF1DC0CF4200B1DA6C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2C5DC081DC0CF4200B1DA6C /* CalendarUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E2C5DBFA1DC0CF4200B1DA6C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E2C5DBDE1DC0CF4200B1DA6C /* Calendar */; + targetProxy = E2C5DBF91DC0CF4200B1DA6C /* PBXContainerItemProxy */; + }; + E2C5DC051DC0CF4200B1DA6C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E2C5DBDE1DC0CF4200B1DA6C /* Calendar */; + targetProxy = E2C5DC041DC0CF4200B1DA6C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + E2C5DBEB1DC0CF4200B1DA6C /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E2C5DBEC1DC0CF4200B1DA6C /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + E2C5DBF01DC0CF4200B1DA6C /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E2C5DBF11DC0CF4200B1DA6C /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E2C5DC0A1DC0CF4200B1DA6C /* 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; + }; + name = Debug; + }; + E2C5DC0B1DC0CF4200B1DA6C /* 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; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E2C5DC0D1DC0CF4200B1DA6C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Calendar/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.Calendar; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + E2C5DC0E1DC0CF4200B1DA6C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Calendar/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.Calendar; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + E2C5DC101DC0CF4200B1DA6C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = CalendarTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.CalendarTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Calendar.app/Calendar"; + }; + name = Debug; + }; + E2C5DC111DC0CF4200B1DA6C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = CalendarTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.CalendarTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Calendar.app/Calendar"; + }; + name = Release; + }; + E2C5DC131DC0CF4200B1DA6C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = CalendarUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.CalendarUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = Calendar; + }; + name = Debug; + }; + E2C5DC141DC0CF4200B1DA6C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = CalendarUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.CalendarUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = Calendar; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E2C5DBDA1DC0CF4200B1DA6C /* Build configuration list for PBXProject "Calendar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2C5DC0A1DC0CF4200B1DA6C /* Debug */, + E2C5DC0B1DC0CF4200B1DA6C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E2C5DC0C1DC0CF4200B1DA6C /* Build configuration list for PBXNativeTarget "Calendar" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2C5DC0D1DC0CF4200B1DA6C /* Debug */, + E2C5DC0E1DC0CF4200B1DA6C /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + E2C5DC0F1DC0CF4200B1DA6C /* Build configuration list for PBXNativeTarget "CalendarTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2C5DC101DC0CF4200B1DA6C /* Debug */, + E2C5DC111DC0CF4200B1DA6C /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + E2C5DC121DC0CF4200B1DA6C /* Build configuration list for PBXNativeTarget "CalendarUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2C5DC131DC0CF4200B1DA6C /* Debug */, + E2C5DC141DC0CF4200B1DA6C /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = E2C5DBD71DC0CF4200B1DA6C /* Project object */; +} diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._.DS_Store" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._AppDelegate.h" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._AppDelegate.h" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._AppDelegate.h" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._AppDelegate.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._AppDelegate.m" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._AppDelegate.m" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._CalendarView.h" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._CalendarView.h" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._CalendarView.h" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._CalendarView.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._CalendarView.m" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._CalendarView.m" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._ViewController.h" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._ViewController.h" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._ViewController.h" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._ViewController.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._ViewController.m" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._ViewController.m" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._main.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._main.m" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/._main.m" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/AppDelegate.h" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/AppDelegate.h" new file mode 100644 index 0000000..ef53b50 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/AppDelegate.h" @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// Calendar +// +// Created by ax on 16/10/20. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/AppDelegate.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/AppDelegate.m" new file mode 100644 index 0000000..2df9679 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/AppDelegate.m" @@ -0,0 +1,54 @@ +// +// AppDelegate.m +// Calendar +// +// Created by ax on 16/10/20. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import "AppDelegate.h" +#import "ViewController.h" +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + self.window.backgroundColor = [UIColor yellowColor]; + self.window.rootViewController = [[ViewController alloc] init]; + [self.window makeKeyAndVisible]; + 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/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/._.DS_Store" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/._.DS_Store" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/._Contents.json" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/._Contents.json" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/._Contents.json" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/Contents.json" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/Contents.json" new file mode 100644 index 0000000..118c98f --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Assets.xcassets/AppIcon.appiconset/Contents.json" @@ -0,0 +1,38 @@ +{ + "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/._.DS_Store" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/._LaunchScreen.storyboard" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/._LaunchScreen.storyboard" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/._LaunchScreen.storyboard" differ diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/LaunchScreen.storyboard" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/LaunchScreen.storyboard" new file mode 100644 index 0000000..fdf3f97 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Base.lproj/LaunchScreen.storyboard" @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/CalendarView.h" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/CalendarView.h" new file mode 100644 index 0000000..b9c8635 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/CalendarView.h" @@ -0,0 +1,13 @@ +// +// CalendarView.h +// Calendar +// +// Created by ax on 16/10/20. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import +#import +@interface CalendarView : UIView + +@end diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/CalendarView.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/CalendarView.m" new file mode 100644 index 0000000..0ecd923 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/CalendarView.m" @@ -0,0 +1,221 @@ +// +// CalendarView.m +// Calendar +// +// Created by ax on 16/10/20. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import "CalendarView.h" +#define ROW 6 + +@interface CalendarView() +@property (nonatomic, strong) NSCalendar *cal; +@property (nonatomic) NSInteger days; +@end + +@implementation CalendarView +{ + CGPoint calStart; + NSInteger monthCal[6][7]; +} +- (instancetype)initWithFrame:(CGRect)frame +{ + if(self = [super initWithFrame:frame]) + { + self.cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; + for(int i=0; i<6; i++) + { + for(int j=0;j<7;j++) + { + monthCal[i][j] = 0; + } + } + } + return self; +} + +- (void)drawRect:(CGRect)rect +{ + [self drawTitle]; + [self setMonthCal]; + UIFont *font = [UIFont systemFontOfSize:13 weight:12]; + NSDictionary* attributes = @{NSFontAttributeName : font}; + NSString *strToBeDraw = [[NSString alloc] init]; + CGSize spaceSize = [@" " sizeWithAttributes:attributes]; + CGFloat fixedX = calStart.x; + for(int i = 0; i < 6; i++) + { + for(int j = 0; j < 7; j++) + { + if(monthCal[i][j] != 0) + { + strToBeDraw = [self getDayString:monthCal[i][j]]; + } + else + { + strToBeDraw = @" "; + } + [strToBeDraw drawAtPoint:calStart withAttributes:attributes]; + calStart.x += spaceSize.width*2; + } + calStart.x = fixedX; + calStart.y += spaceSize.height; + } + +} + +- (void)setMonthCal +{ + NSInteger j = [self getFirstDate] - 1; + NSInteger days = 1; + for(NSInteger i=0;i<6;i++) + { + for(; j<7;j++) + { + if(days <=self.days) + { + monthCal[i][j] = days; + days++; + } + } + j = 0; + } +} + +- (NSString*)getDayString:(NSInteger)day +{ + if(day<10) + { + NSMutableString *str = [NSMutableString stringWithFormat:@" %ld",day]; + return [NSString stringWithString:str]; + } + else + { + return [NSString stringWithFormat:@" %ld",day]; + } +} + +- (void)drawTitle +{ + UIFont *font = [UIFont systemFontOfSize:18 weight:20]; + NSDictionary* attributes = @{NSFontAttributeName : font}; + CGSize textSize = [@"2016" sizeWithAttributes:attributes]; + + UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 0.25 * self.frame.size.height, self.frame.size.width, textSize.height)]; + title.backgroundColor = [UIColor clearColor]; + title.textColor = [UIColor blackColor]; + title.textAlignment = NSTextAlignmentCenter; + title.text = [self getTitle]; + [self addSubview:title]; + + CGSize calSize = [@"00 00 00 00 00 00 00" sizeWithAttributes:attributes]; + CGPoint startPoint = {(self.frame.size.width - calSize.width) / 2, title.frame.origin.y+title.frame.size.height + ROW}; + UILabel *weekTitle = [[UILabel alloc] initWithFrame:CGRectMake(startPoint.x, startPoint.y, calSize.width, calSize.height)]; + weekTitle.backgroundColor = [UIColor clearColor]; + weekTitle.textColor = [UIColor blackColor]; + weekTitle.textAlignment = NSTextAlignmentCenter; + weekTitle.text = @"日 一 二 三 四 五 六"; + [self addSubview:weekTitle]; + + CGFloat y = weekTitle.frame.origin.y; + CGFloat h = weekTitle.frame.size.height; + calStart.x = weekTitle.frame.origin.x+ROW*4; + calStart.y = y+h+ROW; +} + +- (NSInteger)getFirstDate +{ + NSDate *today = [NSDate date]; + NSInteger month = [self.cal component:NSCalendarUnitMonth fromDate:today]; + NSInteger year = [self.cal component:NSCalendarUnitYear fromDate:today]; + NSDateComponents *component = [[NSDateComponents alloc] init]; + [component setDay:1]; + [component setMonth:month]; + [component setYear:year]; + NSDate *firstDay = [self.cal dateFromComponents:component]; + self.days = [self.cal rangeOfUnit:NSCalendarUnitDay inUnit:NSCalendarUnitMonth forDate:firstDay].length; + NSInteger weekday = [self.cal component:NSCalendarUnitWeekday fromDate:firstDay]; + return weekday; +} + +- (NSString *)getTitle +{ + NSMutableString *title = [[NSMutableString alloc] init]; + NSDate *today = [NSDate date]; + NSInteger month = [self.cal component:NSCalendarUnitMonth fromDate:today]; + NSInteger year = [self.cal component:NSCalendarUnitYear fromDate:today]; + title = [NSMutableString stringWithString:[self convert:month]]; + [title appendString:@" "]; + [title appendString:[NSMutableString stringWithFormat:@"%ld",(long)year]]; + return title; +} + +-(NSString*)convert:(NSInteger) month +{ + NSString *m = [[NSString alloc] init]; + switch (month) { + case 1:{ + m = @"January"; + break;} + + case 2:{ + m = @"February"; + break;} + + case 3:{ + m = @"March"; + break; + } + + case 4:{ + m = @"April"; + break; + } + + case 5:{ + m = @"May"; + break; + } + + case 6:{ + m = @"June"; + break; + } + + case 7:{ + m = @"July"; + break; + } + + case 8:{ + m = @"August"; + break; + } + + case 9:{ + m = @"September"; + break; + } + + case 10:{ + m = @"October"; + break; + } + + case 11:{ + m = @"November"; + break; + } + + case 12:{ + m = @"December"; + break; + } + + default: + break; + } + return m; +} +@end diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Info.plist" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Info.plist" new file mode 100644 index 0000000..38e98af --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/Info.plist" @@ -0,0 +1,38 @@ + + + + + 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 + + + diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/ViewController.h" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/ViewController.h" new file mode 100644 index 0000000..519626d --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/ViewController.h" @@ -0,0 +1,15 @@ +// +// ViewController.h +// Calendar +// +// Created by ax on 16/10/20. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import +#import "CalendarView.h" +@interface ViewController : UIViewController + + +@end + diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/ViewController.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/ViewController.m" new file mode 100644 index 0000000..b89e32f --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/ViewController.m" @@ -0,0 +1,32 @@ +// +// ViewController.m +// Calendar +// +// Created by ax on 16/10/20. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import "ViewController.h" + +@interface ViewController () +@property (nonatomic, weak) CalendarView* calView; +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + CalendarView *view = [[CalendarView alloc] initWithFrame:CGRectMake(10, 10, [[UIScreen mainScreen] bounds].size.width-10, [[UIScreen mainScreen] bounds].size.height)]; + self.calView = view; + [self.calView setBackgroundColor:[UIColor yellowColor]]; + [self.view addSubview:self.calView]; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +@end diff --git "a/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/main.m" "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/main.m" new file mode 100644 index 0000000..b20ccb4 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project02/Calendar/Calendar/main.m" @@ -0,0 +1,16 @@ +// +// main.m +// Calendar +// +// Created by ax on 16/10/26. +// Copyright © 2016年 aixing. 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/21651076\350\211\276\345\205\264/project03/TaskList/TaskList.xcodeproj/project.pbxproj" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList.xcodeproj/project.pbxproj" new file mode 100644 index 0000000..a995517 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList.xcodeproj/project.pbxproj" @@ -0,0 +1,518 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + E2E0F3BF1DC0D59300A14B6F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = E2E0F3BE1DC0D59300A14B6F /* main.m */; }; + E2E0F3C21DC0D59300A14B6F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = E2E0F3C11DC0D59300A14B6F /* AppDelegate.m */; }; + E2E0F3CA1DC0D59300A14B6F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E2E0F3C91DC0D59300A14B6F /* Assets.xcassets */; }; + E2E0F3CD1DC0D59300A14B6F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E2E0F3CB1DC0D59300A14B6F /* LaunchScreen.storyboard */; }; + E2E0F3D81DC0D59300A14B6F /* TaskListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2E0F3D71DC0D59300A14B6F /* TaskListTests.m */; }; + E2E0F3E31DC0D59300A14B6F /* TaskListUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = E2E0F3E21DC0D59300A14B6F /* TaskListUITests.m */; }; + E2E0F3F51DC0DAAB00A14B6F /* TaskListTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2E0F3F41DC0DAAB00A14B6F /* TaskListTableViewController.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E2E0F3D41DC0D59300A14B6F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E2E0F3B21DC0D59300A14B6F /* Project object */; + proxyType = 1; + remoteGlobalIDString = E2E0F3B91DC0D59300A14B6F; + remoteInfo = TaskList; + }; + E2E0F3DF1DC0D59300A14B6F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E2E0F3B21DC0D59300A14B6F /* Project object */; + proxyType = 1; + remoteGlobalIDString = E2E0F3B91DC0D59300A14B6F; + remoteInfo = TaskList; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + E2E0F3BA1DC0D59300A14B6F /* TaskList.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TaskList.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E2E0F3BE1DC0D59300A14B6F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + E2E0F3C01DC0D59300A14B6F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + E2E0F3C11DC0D59300A14B6F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + E2E0F3C91DC0D59300A14B6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + E2E0F3CC1DC0D59300A14B6F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + E2E0F3CE1DC0D59300A14B6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2E0F3D31DC0D59300A14B6F /* TaskListTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TaskListTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E2E0F3D71DC0D59300A14B6F /* TaskListTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TaskListTests.m; sourceTree = ""; }; + E2E0F3D91DC0D59300A14B6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2E0F3DE1DC0D59300A14B6F /* TaskListUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TaskListUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E2E0F3E21DC0D59300A14B6F /* TaskListUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TaskListUITests.m; sourceTree = ""; }; + E2E0F3E41DC0D59300A14B6F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2E0F3F31DC0DAAB00A14B6F /* TaskListTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskListTableViewController.h; sourceTree = ""; }; + E2E0F3F41DC0DAAB00A14B6F /* TaskListTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskListTableViewController.m; sourceTree = ""; }; + E2E0F3F61DC0DC4000A14B6F /* d.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = d.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E2E0F3B71DC0D59300A14B6F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2E0F3D01DC0D59300A14B6F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2E0F3DB1DC0D59300A14B6F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E2E0F3B11DC0D59300A14B6F = { + isa = PBXGroup; + children = ( + E2E0F3BC1DC0D59300A14B6F /* TaskList */, + E2E0F3D61DC0D59300A14B6F /* TaskListTests */, + E2E0F3E11DC0D59300A14B6F /* TaskListUITests */, + E2E0F3BB1DC0D59300A14B6F /* Products */, + ); + sourceTree = ""; + }; + E2E0F3BB1DC0D59300A14B6F /* Products */ = { + isa = PBXGroup; + children = ( + E2E0F3BA1DC0D59300A14B6F /* TaskList.app */, + E2E0F3D31DC0D59300A14B6F /* TaskListTests.xctest */, + E2E0F3DE1DC0D59300A14B6F /* TaskListUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + E2E0F3BC1DC0D59300A14B6F /* TaskList */ = { + isa = PBXGroup; + children = ( + E2E0F3C01DC0D59300A14B6F /* AppDelegate.h */, + E2E0F3C11DC0D59300A14B6F /* AppDelegate.m */, + E2E0F3F31DC0DAAB00A14B6F /* TaskListTableViewController.h */, + E2E0F3F41DC0DAAB00A14B6F /* TaskListTableViewController.m */, + E2E0F3BE1DC0D59300A14B6F /* main.m */, + E2E0F3CE1DC0D59300A14B6F /* Info.plist */, + E2E0F3F61DC0DC4000A14B6F /* d.h */, + E2E0F3C91DC0D59300A14B6F /* Assets.xcassets */, + E2E0F3CB1DC0D59300A14B6F /* LaunchScreen.storyboard */, + E2E0F3BD1DC0D59300A14B6F /* Supporting Files */, + ); + path = TaskList; + sourceTree = ""; + }; + E2E0F3BD1DC0D59300A14B6F /* Supporting Files */ = { + isa = PBXGroup; + children = ( + ); + name = "Supporting Files"; + sourceTree = ""; + }; + E2E0F3D61DC0D59300A14B6F /* TaskListTests */ = { + isa = PBXGroup; + children = ( + E2E0F3D71DC0D59300A14B6F /* TaskListTests.m */, + E2E0F3D91DC0D59300A14B6F /* Info.plist */, + ); + path = TaskListTests; + sourceTree = ""; + }; + E2E0F3E11DC0D59300A14B6F /* TaskListUITests */ = { + isa = PBXGroup; + children = ( + E2E0F3E21DC0D59300A14B6F /* TaskListUITests.m */, + E2E0F3E41DC0D59300A14B6F /* Info.plist */, + ); + path = TaskListUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E2E0F3B91DC0D59300A14B6F /* TaskList */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2E0F3E71DC0D59300A14B6F /* Build configuration list for PBXNativeTarget "TaskList" */; + buildPhases = ( + E2E0F3B61DC0D59300A14B6F /* Sources */, + E2E0F3B71DC0D59300A14B6F /* Frameworks */, + E2E0F3B81DC0D59300A14B6F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TaskList; + productName = TaskList; + productReference = E2E0F3BA1DC0D59300A14B6F /* TaskList.app */; + productType = "com.apple.product-type.application"; + }; + E2E0F3D21DC0D59300A14B6F /* TaskListTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2E0F3EA1DC0D59300A14B6F /* Build configuration list for PBXNativeTarget "TaskListTests" */; + buildPhases = ( + E2E0F3CF1DC0D59300A14B6F /* Sources */, + E2E0F3D01DC0D59300A14B6F /* Frameworks */, + E2E0F3D11DC0D59300A14B6F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E2E0F3D51DC0D59300A14B6F /* PBXTargetDependency */, + ); + name = TaskListTests; + productName = TaskListTests; + productReference = E2E0F3D31DC0D59300A14B6F /* TaskListTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + E2E0F3DD1DC0D59300A14B6F /* TaskListUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E2E0F3ED1DC0D59300A14B6F /* Build configuration list for PBXNativeTarget "TaskListUITests" */; + buildPhases = ( + E2E0F3DA1DC0D59300A14B6F /* Sources */, + E2E0F3DB1DC0D59300A14B6F /* Frameworks */, + E2E0F3DC1DC0D59300A14B6F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E2E0F3E01DC0D59300A14B6F /* PBXTargetDependency */, + ); + name = TaskListUITests; + productName = TaskListUITests; + productReference = E2E0F3DE1DC0D59300A14B6F /* TaskListUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E2E0F3B21DC0D59300A14B6F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = aixing; + TargetAttributes = { + E2E0F3B91DC0D59300A14B6F = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + }; + E2E0F3D21DC0D59300A14B6F = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + TestTargetID = E2E0F3B91DC0D59300A14B6F; + }; + E2E0F3DD1DC0D59300A14B6F = { + CreatedOnToolsVersion = 8.0; + ProvisioningStyle = Automatic; + TestTargetID = E2E0F3B91DC0D59300A14B6F; + }; + }; + }; + buildConfigurationList = E2E0F3B51DC0D59300A14B6F /* Build configuration list for PBXProject "TaskList" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E2E0F3B11DC0D59300A14B6F; + productRefGroup = E2E0F3BB1DC0D59300A14B6F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E2E0F3B91DC0D59300A14B6F /* TaskList */, + E2E0F3D21DC0D59300A14B6F /* TaskListTests */, + E2E0F3DD1DC0D59300A14B6F /* TaskListUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E2E0F3B81DC0D59300A14B6F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2E0F3CD1DC0D59300A14B6F /* LaunchScreen.storyboard in Resources */, + E2E0F3CA1DC0D59300A14B6F /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2E0F3D11DC0D59300A14B6F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2E0F3DC1DC0D59300A14B6F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E2E0F3B61DC0D59300A14B6F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2E0F3C21DC0D59300A14B6F /* AppDelegate.m in Sources */, + E2E0F3BF1DC0D59300A14B6F /* main.m in Sources */, + E2E0F3F51DC0DAAB00A14B6F /* TaskListTableViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2E0F3CF1DC0D59300A14B6F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2E0F3D81DC0D59300A14B6F /* TaskListTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2E0F3DA1DC0D59300A14B6F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E2E0F3E31DC0D59300A14B6F /* TaskListUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E2E0F3D51DC0D59300A14B6F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E2E0F3B91DC0D59300A14B6F /* TaskList */; + targetProxy = E2E0F3D41DC0D59300A14B6F /* PBXContainerItemProxy */; + }; + E2E0F3E01DC0D59300A14B6F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E2E0F3B91DC0D59300A14B6F /* TaskList */; + targetProxy = E2E0F3DF1DC0D59300A14B6F /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + E2E0F3CB1DC0D59300A14B6F /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + E2E0F3CC1DC0D59300A14B6F /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + E2E0F3E51DC0D59300A14B6F /* 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; + }; + name = Debug; + }; + E2E0F3E61DC0D59300A14B6F /* 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; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + E2E0F3E81DC0D59300A14B6F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = TaskList/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.TaskList; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + E2E0F3E91DC0D59300A14B6F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = TaskList/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.TaskList; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + E2E0F3EB1DC0D59300A14B6F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = TaskListTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.TaskListTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TaskList.app/TaskList"; + }; + name = Debug; + }; + E2E0F3EC1DC0D59300A14B6F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = TaskListTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.TaskListTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TaskList.app/TaskList"; + }; + name = Release; + }; + E2E0F3EE1DC0D59300A14B6F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = TaskListUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.TaskListUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = TaskList; + }; + name = Debug; + }; + E2E0F3EF1DC0D59300A14B6F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = TaskListUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.aixing.TaskListUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = TaskList; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E2E0F3B51DC0D59300A14B6F /* Build configuration list for PBXProject "TaskList" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2E0F3E51DC0D59300A14B6F /* Debug */, + E2E0F3E61DC0D59300A14B6F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E2E0F3E71DC0D59300A14B6F /* Build configuration list for PBXNativeTarget "TaskList" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2E0F3E81DC0D59300A14B6F /* Debug */, + E2E0F3E91DC0D59300A14B6F /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + E2E0F3EA1DC0D59300A14B6F /* Build configuration list for PBXNativeTarget "TaskListTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2E0F3EB1DC0D59300A14B6F /* Debug */, + E2E0F3EC1DC0D59300A14B6F /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + E2E0F3ED1DC0D59300A14B6F /* Build configuration list for PBXNativeTarget "TaskListUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E2E0F3EE1DC0D59300A14B6F /* Debug */, + E2E0F3EF1DC0D59300A14B6F /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = E2E0F3B21DC0D59300A14B6F /* Project object */; +} diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._.DS_Store" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._AppDelegate.h" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._AppDelegate.h" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._AppDelegate.h" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._AppDelegate.m" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._AppDelegate.m" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._AppDelegate.m" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._Info.plist" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._Info.plist" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._Info.plist" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._TaskListTableViewController.h" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._TaskListTableViewController.h" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._TaskListTableViewController.h" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._TaskListTableViewController.m" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._TaskListTableViewController.m" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._TaskListTableViewController.m" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._d.h" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._d.h" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._d.h" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._main.m" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._main.m" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/._main.m" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/AppDelegate.h" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/AppDelegate.h" new file mode 100644 index 0000000..0245374 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/AppDelegate.h" @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// TaskList +// +// Created by ax on 16/10/22. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/AppDelegate.m" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/AppDelegate.m" new file mode 100644 index 0000000..29adb70 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/AppDelegate.m" @@ -0,0 +1,54 @@ +// +// AppDelegate.m +// TaskList +// +// Created by ax on 16/10/22. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import "AppDelegate.h" +#import "TaskListTableViewController.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + self.window.rootViewController = [[TaskListTableViewController alloc] init]; + [self.window makeKeyAndVisible]; + 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/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/._.DS_Store" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/._.DS_Store" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" new file mode 100644 index 0000000..b8236c6 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Assets.xcassets/AppIcon.appiconset/Contents.json" @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/._.DS_Store" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/._.DS_Store" new file mode 100644 index 0000000..8ac37fc Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/._.DS_Store" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/._LaunchScreen.storyboard" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/._LaunchScreen.storyboard" new file mode 100644 index 0000000..a322a67 Binary files /dev/null and "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/._LaunchScreen.storyboard" differ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/LaunchScreen.storyboard" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/LaunchScreen.storyboard" new file mode 100644 index 0000000..1666f43 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Base.lproj/LaunchScreen.storyboard" @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Info.plist" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Info.plist" new file mode 100644 index 0000000..d338c77 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/Info.plist" @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/TaskListTableViewController.h" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/TaskListTableViewController.h" new file mode 100644 index 0000000..b9497ec --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/TaskListTableViewController.h" @@ -0,0 +1,20 @@ +// +// TaskListTableViewController.h +// TaskList +// +// Created by ax on 16/10/22. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import +#import "d.h" + +@interface TaskListTableViewController : UITableViewController + + +@property (nonatomic, strong) NSMutableArray *taskList; + +@property (nonatomic, strong) UIButton *insertButton; + +@property (nonatomic, weak) UITextField *textField; +@end diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/TaskListTableViewController.m" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/TaskListTableViewController.m" new file mode 100644 index 0000000..6a55809 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/TaskListTableViewController.m" @@ -0,0 +1,217 @@ +// +// TaskListTableViewController.m +// TaskList +// +// Created by ax on 16/10/22. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import "TaskListTableViewController.h" + + +#define Width 0.52 +#define Height 0.45 + +@interface TaskListTableViewController () + +@end + +@implementation TaskListTableViewController +{ + sqlite3 *_database; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [super viewDidLoad]; + [self initlizeDataBase]; + [self setDataSource]; + [self initializeTableView]; + [self addTapGesture]; +} + +- (void)initlizeDataBase +{ + NSString *filename = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"taskList.sqlite"]; + + int res = sqlite3_open(filename.UTF8String, &_database); + if(SQLITE_OK == res) + { + char const *sql = "create table if not exists TABLE_task (id integer primary key autoincrement, task text);"; + char *errMsg = NULL; + int result = sqlite3_exec(_database,sql, NULL, NULL, &errMsg); + if(SQLITE_OK == result) + { + } + else + { + printf("%s\n",errMsg); + } + } + else + { + NSLog(@"打开数据库失败"); + } +} + +- (void)insertIntoDB:(NSString*)task +{ + NSString *insertSQL = [NSString stringWithFormat:@"insert into TABLE_task (task) values('%@');",task]; + char *errMsg = NULL; + int result = sqlite3_exec(_database, insertSQL.UTF8String, NULL, NULL, &errMsg); + if(result != SQLITE_OK) + { + printf("%s\n",errMsg); + } +} + +- (void)queryDB +{ + //char const *sql = "select * from TABLE_task;"; + //先取得编号,再取得内容 + char const *sql = "select id, task from TABLE_task;"; + + //定义一个stmt存放结果集 + sqlite3_stmt *stmt = NULL; + //检查SQL语句的合法性 + int res = sqlite3_prepare_v2(_database, sql, -1, &stmt,NULL); + if(SQLITE_OK == res) + { + //NSLog(@"查询合法"); + //执行SQL语句 + //int stepRes = sqlite3_step(stmt); + + //查到一行数据 + while(SQLITE_ROW == sqlite3_step(stmt)) + { + //获得对应这行数据 + //int idx = sqlite3_column_int(stmt, 0); + unsigned char const *uctask = sqlite3_column_text(stmt,1); + NSString *nstask = [NSString stringWithUTF8String:(char*)uctask]; + NSMutableString *task = [NSMutableString stringWithString:nstask]; + [self.taskList addObject:task]; + } + } +} + +- (void)setDataSource +{ + self.taskList = [[NSMutableArray alloc] init]; + [self.taskList addObject:@"practice programming"]; + // [self insertIntoDB:@"practice programming"]; + [self.taskList addObject:@"play the piano"]; + // [self insertIntoDB:@"play the piano"]; + [self.taskList addObject:@"read a book"]; + // [self insertIntoDB:@"read a book"]; + [self queryDB]; +} + +- (void)initializeTableView +{ + UITableView *tableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + + self.tableView = tableView; + self.tableView.delegate = self; +} +- (void)addTapGesture +{ + //解决tableView有textField时,点击tableView的空白界面,键盘不消失的问题 + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hitTableViewToHideKeyboard)]; + tap.cancelsTouchesInView = NO;//默认为YES,设置为NO后,点击事件不会停止,就会传递下去 + [self.tableView addGestureRecognizer:tap]; +} + +- (void)insertTask +{ + if(![self.textField.text isEqualToString:@""]) + { + NSInteger newIndex = [self.taskList count]; + [self.taskList addObject:self.textField.text]; + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:newIndex inSection:0]; + NSArray *indexpaths = @[indexPath]; + [self.tableView insertRowsAtIndexPaths:indexpaths withRowAnimation:UITableViewRowAnimationAutomatic]; + //插入到数据库中 + [self insertIntoDB:self.textField.text]; + } +} + +- (void)hitTableViewToHideKeyboard +{ + [self.textField resignFirstResponder]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.taskList.count; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *identifier = @"cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; + + if(nil == cell) + { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; + } + + cell.textLabel.backgroundColor = [UIColor clearColor]; + cell.textLabel.textColor = [UIColor blackColor]; + cell.textLabel.text = [self.taskList objectAtIndex:indexPath.row]; + cell.textLabel.font = [UIFont systemFontOfSize:18 weight:20]; + cell.textLabel.textAlignment = NSTextAlignmentCenter; + return cell; +} + +- (UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section +{ + //set tableHeaderView + UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 70)]; + [header setBackgroundColor:[UIColor redColor]]; + + [self initializeTextFieldAndInsertButton:header]; + + return header; +} + +- (void)initializeTextFieldAndInsertButton:(UIView*)header +{ + //set textfield + CGFloat textW = Width * self.view.frame.size.width; + CGFloat textH = Height * header.frame.size.height; + CGFloat textX = (self.view.frame.size.width - textW) / 2; + CGFloat textY = header.frame.size.height * 0.9 - textH; + UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(textX, textY, textW, textH)]; + textField.backgroundColor = [UIColor whiteColor]; + self.textField = textField; + self.textField.delegate = self; + [header addSubview:textField]; + + UIButton *insert = [UIButton buttonWithType:UIButtonTypeRoundedRect]; + insert.frame = CGRectMake(textX+textW+5, 30, 100, textH); + insert.backgroundColor = [UIColor clearColor]; + [insert setTitle:@"insert" forState:UIControlStateNormal]; + [insert setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + self.insertButton = insert; + [self.insertButton addTarget:self action:@selector(insertTask) forControlEvents:UIControlEventTouchUpInside]; + [header addSubview:insert]; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 70;//自定义高度 +} + +@end diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/d.h" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/d.h" new file mode 100644 index 0000000..38d0b87 --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/d.h" @@ -0,0 +1,14 @@ +// +// d.h +// TaskList +// +// Created by ax on 16/10/22. +// Copyright © 2016年 aixing. All rights reserved. +// + +#ifndef d_h +#define d_h + +#import + +#endif /* d_h */ diff --git "a/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/main.m" "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/main.m" new file mode 100644 index 0000000..8b5673d --- /dev/null +++ "b/21651076\350\211\276\345\205\264/project03/TaskList/TaskList/main.m" @@ -0,0 +1,16 @@ +// +// main.m +// TaskList +// +// Created by ax on 16/10/22. +// Copyright © 2016年 aixing. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +}