diff --git a/.DS_Store b/.DS_Store index fad2191e..d57e8584 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/.DS_Store" "b/21551017\350\265\226\346\272\242\346\264\262/.DS_Store" new file mode 100644 index 00000000..1f91e3fb Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/.DS_Store" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/.DS_Store" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/.DS_Store" new file mode 100644 index 00000000..ac0ff302 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/.DS_Store" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/.DS_Store" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/.DS_Store" new file mode 100644 index 00000000..a1c83a10 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/.DS_Store" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi.xcodeproj/project.pbxproj" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi.xcodeproj/project.pbxproj" new file mode 100755 index 00000000..19f75c5a --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi.xcodeproj/project.pbxproj" @@ -0,0 +1,527 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 044F55FD1B7551EE0085436A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 044F55FC1B7551EE0085436A /* Foundation.framework */; }; + 044F55FF1B7551EE0085436A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 044F55FE1B7551EE0085436A /* CoreGraphics.framework */; }; + 044F56011B7551EE0085436A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 044F56001B7551EE0085436A /* UIKit.framework */; }; + 044F56091B7551EE0085436A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 044F56081B7551EE0085436A /* main.m */; }; + 044F560D1B7551EE0085436A /* ZYAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 044F560C1B7551EE0085436A /* ZYAppDelegate.m */; }; + 044F560F1B7551EE0085436A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 044F560E1B7551EE0085436A /* Images.xcassets */; }; + 044F56161B7551EE0085436A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 044F56151B7551EE0085436A /* XCTest.framework */; }; + 044F56171B7551EE0085436A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 044F55FC1B7551EE0085436A /* Foundation.framework */; }; + 044F56181B7551EE0085436A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 044F56001B7551EE0085436A /* UIKit.framework */; }; + 044F56201B7551EE0085436A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 044F561E1B7551EE0085436A /* InfoPlist.strings */; }; + 044F56221B7551EE0085436A /* DaFeiJiTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 044F56211B7551EE0085436A /* DaFeiJiTests.m */; }; + 044F562E1B75522C0085436A /* WelcomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 044F562C1B75522C0085436A /* WelcomeViewController.m */; }; + 044F562F1B75522C0085436A /* WelcomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 044F562D1B75522C0085436A /* WelcomeViewController.xib */; }; + 044F56481B7556490085436A /* WarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 044F56461B7556490085436A /* WarViewController.m */; }; + 044F56491B7556490085436A /* WarViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 044F56471B7556490085436A /* WarViewController.xib */; }; + 044F564C1B755E9F0085436A /* MyUIImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 044F564B1B755E9F0085436A /* MyUIImageView.m */; }; + C7247E7B1C3431240009D801 /* bg.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E711C3431240009D801 /* bg.png */; }; + C7247E7C1C3431240009D801 /* bz2.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E721C3431240009D801 /* bz2.png */; }; + C7247E7D1C3431240009D801 /* diji.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E731C3431240009D801 /* diji.png */; }; + C7247E7E1C3431240009D801 /* zidan.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E741C3431240009D801 /* zidan.png */; }; + C7247E7F1C3431240009D801 /* bz1.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E751C3431240009D801 /* bz1.png */; }; + C7247E801C3431240009D801 /* plane2.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E761C3431240009D801 /* plane2.png */; }; + C7247E811C3431240009D801 /* bz3.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E771C3431240009D801 /* bz3.png */; }; + C7247E821C3431240009D801 /* bz4.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E781C3431240009D801 /* bz4.png */; }; + C7247E831C3431240009D801 /* plane1.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E791C3431240009D801 /* plane1.png */; }; + C7247E841C3431240009D801 /* bz5.png in Resources */ = {isa = PBXBuildFile; fileRef = C7247E7A1C3431240009D801 /* bz5.png */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 044F56191B7551EE0085436A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 044F55F11B7551EE0085436A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 044F55F81B7551EE0085436A; + remoteInfo = DaFeiJi; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 044F55F91B7551EE0085436A /* DaFeiJi.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DaFeiJi.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 044F55FC1B7551EE0085436A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 044F55FE1B7551EE0085436A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 044F56001B7551EE0085436A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 044F56041B7551EE0085436A /* DaFeiJi-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DaFeiJi-Info.plist"; sourceTree = ""; }; + 044F56061B7551EE0085436A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 044F56081B7551EE0085436A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 044F560A1B7551EE0085436A /* DaFeiJi-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DaFeiJi-Prefix.pch"; sourceTree = ""; }; + 044F560B1B7551EE0085436A /* ZYAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZYAppDelegate.h; sourceTree = ""; }; + 044F560C1B7551EE0085436A /* ZYAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZYAppDelegate.m; sourceTree = ""; }; + 044F560E1B7551EE0085436A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 044F56141B7551EE0085436A /* DaFeiJiTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DaFeiJiTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 044F56151B7551EE0085436A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 044F561D1B7551EE0085436A /* DaFeiJiTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DaFeiJiTests-Info.plist"; sourceTree = ""; }; + 044F561F1B7551EE0085436A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 044F56211B7551EE0085436A /* DaFeiJiTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DaFeiJiTests.m; sourceTree = ""; }; + 044F562B1B75522C0085436A /* WelcomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelcomeViewController.h; sourceTree = ""; }; + 044F562C1B75522C0085436A /* WelcomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WelcomeViewController.m; sourceTree = ""; }; + 044F562D1B75522C0085436A /* WelcomeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WelcomeViewController.xib; sourceTree = ""; }; + 044F56451B7556490085436A /* WarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WarViewController.h; sourceTree = ""; }; + 044F56461B7556490085436A /* WarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WarViewController.m; sourceTree = ""; }; + 044F56471B7556490085436A /* WarViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WarViewController.xib; sourceTree = ""; }; + 044F564A1B755E9F0085436A /* MyUIImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyUIImageView.h; sourceTree = ""; }; + 044F564B1B755E9F0085436A /* MyUIImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyUIImageView.m; sourceTree = ""; }; + C7247E711C3431240009D801 /* bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bg.png; sourceTree = ""; }; + C7247E721C3431240009D801 /* bz2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bz2.png; sourceTree = ""; }; + C7247E731C3431240009D801 /* diji.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = diji.png; sourceTree = ""; }; + C7247E741C3431240009D801 /* zidan.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = zidan.png; sourceTree = ""; }; + C7247E751C3431240009D801 /* bz1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bz1.png; sourceTree = ""; }; + C7247E761C3431240009D801 /* plane2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plane2.png; sourceTree = ""; }; + C7247E771C3431240009D801 /* bz3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bz3.png; sourceTree = ""; }; + C7247E781C3431240009D801 /* bz4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bz4.png; sourceTree = ""; }; + C7247E791C3431240009D801 /* plane1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = plane1.png; sourceTree = ""; }; + C7247E7A1C3431240009D801 /* bz5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bz5.png; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 044F55F61B7551EE0085436A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 044F55FF1B7551EE0085436A /* CoreGraphics.framework in Frameworks */, + 044F56011B7551EE0085436A /* UIKit.framework in Frameworks */, + 044F55FD1B7551EE0085436A /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 044F56111B7551EE0085436A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 044F56161B7551EE0085436A /* XCTest.framework in Frameworks */, + 044F56181B7551EE0085436A /* UIKit.framework in Frameworks */, + 044F56171B7551EE0085436A /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 044F55F01B7551EE0085436A = { + isa = PBXGroup; + children = ( + 044F56021B7551EE0085436A /* DaFeiJi */, + 044F561B1B7551EE0085436A /* DaFeiJiTests */, + 044F55FB1B7551EE0085436A /* Frameworks */, + 044F55FA1B7551EE0085436A /* Products */, + ); + sourceTree = ""; + }; + 044F55FA1B7551EE0085436A /* Products */ = { + isa = PBXGroup; + children = ( + 044F55F91B7551EE0085436A /* DaFeiJi.app */, + 044F56141B7551EE0085436A /* DaFeiJiTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 044F55FB1B7551EE0085436A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 044F55FC1B7551EE0085436A /* Foundation.framework */, + 044F55FE1B7551EE0085436A /* CoreGraphics.framework */, + 044F56001B7551EE0085436A /* UIKit.framework */, + 044F56151B7551EE0085436A /* XCTest.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 044F56021B7551EE0085436A /* DaFeiJi */ = { + isa = PBXGroup; + children = ( + C7247E701C3431140009D801 /* Image */, + 044F560B1B7551EE0085436A /* ZYAppDelegate.h */, + 044F560C1B7551EE0085436A /* ZYAppDelegate.m */, + 044F562B1B75522C0085436A /* WelcomeViewController.h */, + 044F562C1B75522C0085436A /* WelcomeViewController.m */, + 044F562D1B75522C0085436A /* WelcomeViewController.xib */, + 044F56451B7556490085436A /* WarViewController.h */, + 044F56461B7556490085436A /* WarViewController.m */, + 044F56471B7556490085436A /* WarViewController.xib */, + 044F564A1B755E9F0085436A /* MyUIImageView.h */, + 044F564B1B755E9F0085436A /* MyUIImageView.m */, + 044F560E1B7551EE0085436A /* Images.xcassets */, + 044F56031B7551EE0085436A /* Supporting Files */, + ); + path = DaFeiJi; + sourceTree = ""; + }; + 044F56031B7551EE0085436A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 044F56041B7551EE0085436A /* DaFeiJi-Info.plist */, + 044F56051B7551EE0085436A /* InfoPlist.strings */, + 044F56081B7551EE0085436A /* main.m */, + 044F560A1B7551EE0085436A /* DaFeiJi-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 044F561B1B7551EE0085436A /* DaFeiJiTests */ = { + isa = PBXGroup; + children = ( + 044F56211B7551EE0085436A /* DaFeiJiTests.m */, + 044F561C1B7551EE0085436A /* Supporting Files */, + ); + path = DaFeiJiTests; + sourceTree = ""; + }; + 044F561C1B7551EE0085436A /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 044F561D1B7551EE0085436A /* DaFeiJiTests-Info.plist */, + 044F561E1B7551EE0085436A /* InfoPlist.strings */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + C7247E701C3431140009D801 /* Image */ = { + isa = PBXGroup; + children = ( + C7247E711C3431240009D801 /* bg.png */, + C7247E721C3431240009D801 /* bz2.png */, + C7247E731C3431240009D801 /* diji.png */, + C7247E741C3431240009D801 /* zidan.png */, + C7247E751C3431240009D801 /* bz1.png */, + C7247E761C3431240009D801 /* plane2.png */, + C7247E771C3431240009D801 /* bz3.png */, + C7247E781C3431240009D801 /* bz4.png */, + C7247E791C3431240009D801 /* plane1.png */, + C7247E7A1C3431240009D801 /* bz5.png */, + ); + name = Image; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 044F55F81B7551EE0085436A /* DaFeiJi */ = { + isa = PBXNativeTarget; + buildConfigurationList = 044F56251B7551EE0085436A /* Build configuration list for PBXNativeTarget "DaFeiJi" */; + buildPhases = ( + 044F55F51B7551EE0085436A /* Sources */, + 044F55F61B7551EE0085436A /* Frameworks */, + 044F55F71B7551EE0085436A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DaFeiJi; + productName = DaFeiJi; + productReference = 044F55F91B7551EE0085436A /* DaFeiJi.app */; + productType = "com.apple.product-type.application"; + }; + 044F56131B7551EE0085436A /* DaFeiJiTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 044F56281B7551EE0085436A /* Build configuration list for PBXNativeTarget "DaFeiJiTests" */; + buildPhases = ( + 044F56101B7551EE0085436A /* Sources */, + 044F56111B7551EE0085436A /* Frameworks */, + 044F56121B7551EE0085436A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 044F561A1B7551EE0085436A /* PBXTargetDependency */, + ); + name = DaFeiJiTests; + productName = DaFeiJiTests; + productReference = 044F56141B7551EE0085436A /* DaFeiJiTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 044F55F11B7551EE0085436A /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = ZY; + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = zhiyou; + TargetAttributes = { + 044F56131B7551EE0085436A = { + TestTargetID = 044F55F81B7551EE0085436A; + }; + }; + }; + buildConfigurationList = 044F55F41B7551EE0085436A /* Build configuration list for PBXProject "DaFeiJi" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 044F55F01B7551EE0085436A; + productRefGroup = 044F55FA1B7551EE0085436A /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 044F55F81B7551EE0085436A /* DaFeiJi */, + 044F56131B7551EE0085436A /* DaFeiJiTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 044F55F71B7551EE0085436A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C7247E7C1C3431240009D801 /* bz2.png in Resources */, + 044F560F1B7551EE0085436A /* Images.xcassets in Resources */, + 044F562F1B75522C0085436A /* WelcomeViewController.xib in Resources */, + C7247E7B1C3431240009D801 /* bg.png in Resources */, + C7247E7E1C3431240009D801 /* zidan.png in Resources */, + 044F56491B7556490085436A /* WarViewController.xib in Resources */, + C7247E801C3431240009D801 /* plane2.png in Resources */, + C7247E7D1C3431240009D801 /* diji.png in Resources */, + C7247E821C3431240009D801 /* bz4.png in Resources */, + C7247E7F1C3431240009D801 /* bz1.png in Resources */, + C7247E831C3431240009D801 /* plane1.png in Resources */, + C7247E811C3431240009D801 /* bz3.png in Resources */, + C7247E841C3431240009D801 /* bz5.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 044F56121B7551EE0085436A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 044F56201B7551EE0085436A /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 044F55F51B7551EE0085436A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 044F564C1B755E9F0085436A /* MyUIImageView.m in Sources */, + 044F56091B7551EE0085436A /* main.m in Sources */, + 044F560D1B7551EE0085436A /* ZYAppDelegate.m in Sources */, + 044F562E1B75522C0085436A /* WelcomeViewController.m in Sources */, + 044F56481B7556490085436A /* WarViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 044F56101B7551EE0085436A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 044F56221B7551EE0085436A /* DaFeiJiTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 044F561A1B7551EE0085436A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 044F55F81B7551EE0085436A /* DaFeiJi */; + targetProxy = 044F56191B7551EE0085436A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 044F56051B7551EE0085436A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 044F56061B7551EE0085436A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 044F561E1B7551EE0085436A /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 044F561F1B7551EE0085436A /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 044F56231B7551EE0085436A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 044F56241B7551EE0085436A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 044F56261B7551EE0085436A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "DaFeiJi/DaFeiJi-Prefix.pch"; + INFOPLIST_FILE = "DaFeiJi/DaFeiJi-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 044F56271B7551EE0085436A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "DaFeiJi/DaFeiJi-Prefix.pch"; + INFOPLIST_FILE = "DaFeiJi/DaFeiJi-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 044F56291B7551EE0085436A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/DaFeiJi.app/DaFeiJi"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "DaFeiJi/DaFeiJi-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = "DaFeiJiTests/DaFeiJiTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + 044F562A1B7551EE0085436A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/DaFeiJi.app/DaFeiJi"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "DaFeiJi/DaFeiJi-Prefix.pch"; + INFOPLIST_FILE = "DaFeiJiTests/DaFeiJiTests-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 044F55F41B7551EE0085436A /* Build configuration list for PBXProject "DaFeiJi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 044F56231B7551EE0085436A /* Debug */, + 044F56241B7551EE0085436A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 044F56251B7551EE0085436A /* Build configuration list for PBXNativeTarget "DaFeiJi" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 044F56261B7551EE0085436A /* Debug */, + 044F56271B7551EE0085436A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 044F56281B7551EE0085436A /* Build configuration list for PBXNativeTarget "DaFeiJiTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 044F56291B7551EE0085436A /* Debug */, + 044F562A1B7551EE0085436A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 044F55F11B7551EE0085436A /* Project object */; +} diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi.xcodeproj/project.xcworkspace/contents.xcworkspacedata" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi.xcodeproj/project.xcworkspace/contents.xcworkspacedata" new file mode 100755 index 00000000..16eb2219 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi.xcodeproj/project.xcworkspace/contents.xcworkspacedata" @@ -0,0 +1,7 @@ + + + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/DaFeiJi-Info.plist" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/DaFeiJi-Info.plist" new file mode 100755 index 00000000..96b66d39 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/DaFeiJi-Info.plist" @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.zhiyou.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/DaFeiJi-Prefix.pch" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/DaFeiJi-Prefix.pch" new file mode 100755 index 00000000..743435c9 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/DaFeiJi-Prefix.pch" @@ -0,0 +1,16 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#import + +#ifndef __IPHONE_3_0 +#warning "This project uses features only available in iOS SDK 3.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/Images.xcassets/AppIcon.appiconset/Contents.json" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/Images.xcassets/AppIcon.appiconset/Contents.json" new file mode 100755 index 00000000..118c98f7 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/Images.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/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/Images.xcassets/LaunchImage.launchimage/Contents.json" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/Images.xcassets/LaunchImage.launchimage/Contents.json" new file mode 100755 index 00000000..c79ebd3a --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/Images.xcassets/LaunchImage.launchimage/Contents.json" @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "subtype" : "retina4", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/MyUIImageView.h" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/MyUIImageView.h" new file mode 100755 index 00000000..9b5d0c3d --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/MyUIImageView.h" @@ -0,0 +1,16 @@ +// +// MyUIImageView.h +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import + +@interface MyUIImageView : UIImageView + + + +@property BOOL isUsed; +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/MyUIImageView.m" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/MyUIImageView.m" new file mode 100755 index 00000000..35ec9591 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/MyUIImageView.m" @@ -0,0 +1,31 @@ +// +// MyUIImageView.m +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import "MyUIImageView.h" + +@implementation MyUIImageView + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code + } + return self; +} + +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect +{ + // Drawing code +} +*/ + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WarViewController.h" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WarViewController.h" new file mode 100755 index 00000000..8cecdad5 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WarViewController.h" @@ -0,0 +1,26 @@ +// +// WarViewController.h +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import +#import "MyUIImageView.h" +@interface WarViewController : UIViewController +{ + + + UIImageView *topImageView; + UIImageView *BottomImageView; + UIImageView *heroImageView; + NSMutableArray *enemyArray; + + NSMutableArray *zidanArray; + UITouch *touch; + CGPoint point; + MyUIImageView *enemyImageView; + MyUIImageView *zidanImageView; +} +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WarViewController.m" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WarViewController.m" new file mode 100755 index 00000000..6ab8d54b --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WarViewController.m" @@ -0,0 +1,258 @@ +// +// WarViewController.m +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import "WarViewController.h" +#import "MyUIImageView.h" +@interface WarViewController () + +@end + +@implementation WarViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + topImageView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg.png"]]; + + topImageView.frame=CGRectMake(0, -480, 320, 480); + [self.view addSubview:topImageView]; + + + + BottomImageView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg.png"]]; + + BottomImageView.frame=CGRectMake(0, 0, 320, 480); + [self.view addSubview:BottomImageView]; + + [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(bgMove) userInfo:nil repeats:YES]; + + +// 战机 + + heroImageView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"plane1.png"]]; + heroImageView.frame=CGRectMake(120, 400, 60, 60); + [self.view addSubview:heroImageView]; + + + NSArray *array=[[NSArray alloc]initWithObjects:[UIImage imageNamed:@"plane1.png"],[UIImage imageNamed:@"plane2.png"], nil]; + +// 战机帧动画 + heroImageView.animationImages=array; + heroImageView.animationDuration=0.2; + heroImageView.animationRepeatCount=0; + [heroImageView startAnimating]; + +// 创建敌机 + + + + enemyArray=[[NSMutableArray alloc] initWithCapacity:0]; + for (int i=0; i<20; i++) { + enemyImageView=[[MyUIImageView alloc] initWithImage:[UIImage imageNamed:@"diji.png"]]; + enemyImageView.frame=CGRectMake(0, -50, 50, 50); + enemyImageView.isUsed=NO; + [enemyArray addObject:enemyImageView]; + [self.view addSubview:enemyImageView]; + } + +// 敌机下落 + + [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(dijiDown) userInfo:nil repeats:YES]; + +// 创建子弹 + zidanArray=[[NSMutableArray alloc] initWithCapacity:0]; + for (int i=0; i<30; i++) { + zidanImageView=[[MyUIImageView alloc] initWithImage:[UIImage imageNamed:@"zidan.png"]]; + zidanImageView.frame=CGRectMake(-30, -30, 5, 5); + zidanImageView.isUsed=NO; + [zidanArray addObject:zidanImageView]; + [self.view addSubview:zidanImageView]; + + } + + +// 子弹下落 + + [NSTimer scheduledTimerWithTimeInterval:0.02 target:self selector:@selector(zidanDown) userInfo:nil repeats:YES]; + + +// 碰撞 + + + +} + +-(void)bgMove +{ + topImageView.frame=CGRectMake(0, topImageView.frame.origin.y+5, 320, 480); + BottomImageView.frame=CGRectMake(0, BottomImageView.frame.origin.y+5, 320, 480); + + if (topImageView.frame.origin.y>=480) { + topImageView.frame=CGRectMake(0, -480, 320, 480); + } + if (BottomImageView.frame.origin.y>=480) { + BottomImageView.frame=CGRectMake(0, -480, 320, 480); + } + +} + + +-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event +{ + +} + +-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event +{ + touch=[touches anyObject]; + point=[touch locationInView:self.view]; + heroImageView.center=point; + + + +} + +-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event +{ + +} + + +-(void)dijiDown +{ + + static int count=0; + + if (count%10==0) { + for (int i=0; i480) { + enemyImageView1.isUsed=NO; + } + + } + } + + + +} + +-(void)zidanDown +{ + static int count=0; + if (count%10==0) { + for (int i=0; i + + + + + + + + + + + + + + + + + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.h" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.h" new file mode 100755 index 00000000..6d7457ff --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.h" @@ -0,0 +1,23 @@ +// +// WelcomeViewController.h +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import + +@interface WelcomeViewController : UIViewController + + + +{ + __weak IBOutlet UILabel *label1; + + +} + +- (IBAction)Start:(id)sender; + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.m" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.m" new file mode 100755 index 00000000..c2c0910e --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.m" @@ -0,0 +1,64 @@ +// +// WelcomeViewController.m +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import "WelcomeViewController.h" +#import "WarViewController.h" +@interface WelcomeViewController () + +@end + +@implementation WelcomeViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + + [self performSelector:@selector(Welcome) withObject:nil afterDelay:0.2]; + +} + + +-(void)Welcome +{ + + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:2]; + label1.frame=CGRectMake(83, 105, 160, 80); + [UIView commitAnimations]; + +} + + + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (IBAction)Start:(id)sender { + +// UIWindow *window=[[UIApplication sharedApplication].delegate window]; + WarViewController *controller=[[WarViewController alloc] init]; + + UIWindow *window=[UIApplication sharedApplication].keyWindow; + + window.rootViewController=controller; + +} +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.xib" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.xib" new file mode 100755 index 00000000..34ea22dc --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/WelcomeViewController.xib" @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/ZYAppDelegate.h" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/ZYAppDelegate.h" new file mode 100755 index 00000000..3bcf2780 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/ZYAppDelegate.h" @@ -0,0 +1,15 @@ +// +// ZYAppDelegate.h +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import + +@interface ZYAppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/ZYAppDelegate.m" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/ZYAppDelegate.m" new file mode 100755 index 00000000..18a4b49d --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/ZYAppDelegate.m" @@ -0,0 +1,53 @@ +// +// ZYAppDelegate.m +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import "ZYAppDelegate.h" +#import "WelcomeViewController.h" +@implementation ZYAppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. + self.window.backgroundColor = [UIColor whiteColor]; + [self.window makeKeyAndVisible]; + + + WelcomeViewController *controller=[[WelcomeViewController alloc] init]; + self.window.rootViewController=controller; + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bg.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bg.png" new file mode 100755 index 00000000..bcd545e4 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bg.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz1.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz1.png" new file mode 100755 index 00000000..7fbdea96 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz1.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz2.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz2.png" new file mode 100755 index 00000000..78c1d743 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz2.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz3.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz3.png" new file mode 100755 index 00000000..3b4c2b0a Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz3.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz4.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz4.png" new file mode 100755 index 00000000..70b271bd Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz4.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz5.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz5.png" new file mode 100755 index 00000000..d9e87a3b Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/bz5.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/diji.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/diji.png" new file mode 100755 index 00000000..52ea3114 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/diji.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/en.lproj/InfoPlist.strings" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/en.lproj/InfoPlist.strings" new file mode 100755 index 00000000..477b28ff --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/en.lproj/InfoPlist.strings" @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/main.m" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/main.m" new file mode 100755 index 00000000..54903726 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/main.m" @@ -0,0 +1,18 @@ +// +// main.m +// DaFeiJi +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import + +#import "ZYAppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([ZYAppDelegate class])); + } +} diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/plane1.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/plane1.png" new file mode 100755 index 00000000..582d71a7 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/plane1.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/plane2.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/plane2.png" new file mode 100755 index 00000000..15865501 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/plane2.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/zidan.png" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/zidan.png" new file mode 100755 index 00000000..86c8da1d Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJi/zidan.png" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/DaFeiJiTests-Info.plist" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/DaFeiJiTests-Info.plist" new file mode 100755 index 00000000..5d0a88ce --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/DaFeiJiTests-Info.plist" @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.zhiyou.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/DaFeiJiTests.m" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/DaFeiJiTests.m" new file mode 100755 index 00000000..89d87190 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/DaFeiJiTests.m" @@ -0,0 +1,34 @@ +// +// DaFeiJiTests.m +// DaFeiJiTests +// +// Created by mac on 15-8-7. +// Copyright (c) 2015年 zhiyou. All rights reserved. +// + +#import + +@interface DaFeiJiTests : XCTestCase + +@end + +@implementation DaFeiJiTests + +- (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 +{ + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); +} + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/en.lproj/InfoPlist.strings" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/en.lproj/InfoPlist.strings" new file mode 100755 index 00000000..477b28ff --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/DaFeiJi/DaFeiJiTests/en.lproj/InfoPlist.strings" @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/\346\211\223\351\243\236\346\234\272_\350\265\226\346\272\242\346\264\262_21551017.doc" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/\346\211\223\351\243\236\346\234\272_\350\265\226\346\272\242\346\264\262_21551017.doc" new file mode 100755 index 00000000..9c13efa6 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/\346\211\223\351\243\236\346\234\272_\350\265\226\346\272\242\346\264\262_21551017.doc" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/\346\211\223\351\243\236\346\234\272_\350\265\226\346\272\242\346\264\262_21551017.pdf" "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/\346\211\223\351\243\236\346\234\272_\350\265\226\346\272\242\346\264\262_21551017.pdf" new file mode 100755 index 00000000..656974f1 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/21551017_\350\265\226\346\272\242\346\264\262_iOS\345\244\247\344\275\234\344\270\232/\346\211\223\351\243\236\346\234\272_\350\265\226\346\272\242\346\264\262_21551017.pdf" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/.DS_Store" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/.DS_Store" new file mode 100644 index 00000000..31174fa6 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/.DS_Store" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01.xcodeproj/project.pbxproj" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01.xcodeproj/project.pbxproj" new file mode 100644 index 00000000..5cf023e0 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01.xcodeproj/project.pbxproj" @@ -0,0 +1,248 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + C7D3890D1BD2461100889FEE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C7D3890C1BD2461100889FEE /* main.m */; }; + C7D389151BD24ADF00889FEE /* Cal.m in Sources */ = {isa = PBXBuildFile; fileRef = C7D389141BD24ADF00889FEE /* Cal.m */; settings = {ASSET_TAGS = (); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + C7D389071BD2461100889FEE /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + C7D389091BD2461100889FEE /* pro01 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = pro01; sourceTree = BUILT_PRODUCTS_DIR; }; + C7D3890C1BD2461100889FEE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + C7D389131BD24A4000889FEE /* Cal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Cal.h; sourceTree = ""; }; + C7D389141BD24ADF00889FEE /* Cal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cal.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C7D389061BD2461100889FEE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + C7D389001BD2461100889FEE = { + isa = PBXGroup; + children = ( + C7D3890B1BD2461100889FEE /* pro01 */, + C7D3890A1BD2461100889FEE /* Products */, + ); + sourceTree = ""; + }; + C7D3890A1BD2461100889FEE /* Products */ = { + isa = PBXGroup; + children = ( + C7D389091BD2461100889FEE /* pro01 */, + ); + name = Products; + sourceTree = ""; + }; + C7D3890B1BD2461100889FEE /* pro01 */ = { + isa = PBXGroup; + children = ( + C7D3890C1BD2461100889FEE /* main.m */, + C7D389131BD24A4000889FEE /* Cal.h */, + C7D389141BD24ADF00889FEE /* Cal.m */, + ); + path = pro01; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C7D389081BD2461100889FEE /* pro01 */ = { + isa = PBXNativeTarget; + buildConfigurationList = C7D389101BD2461100889FEE /* Build configuration list for PBXNativeTarget "pro01" */; + buildPhases = ( + C7D389051BD2461100889FEE /* Sources */, + C7D389061BD2461100889FEE /* Frameworks */, + C7D389071BD2461100889FEE /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = pro01; + productName = pro01; + productReference = C7D389091BD2461100889FEE /* pro01 */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C7D389011BD2461100889FEE /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = "赖溢洲"; + TargetAttributes = { + C7D389081BD2461100889FEE = { + CreatedOnToolsVersion = 7.0.1; + }; + }; + }; + buildConfigurationList = C7D389041BD2461100889FEE /* Build configuration list for PBXProject "pro01" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = C7D389001BD2461100889FEE; + productRefGroup = C7D3890A1BD2461100889FEE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C7D389081BD2461100889FEE /* pro01 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + C7D389051BD2461100889FEE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C7D389151BD24ADF00889FEE /* Cal.m in Sources */, + C7D3890D1BD2461100889FEE /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + C7D3890E1BD2461100889FEE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + 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; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + C7D3890F1BD2461100889FEE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + 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; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + }; + name = Release; + }; + C7D389111BD2461100889FEE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + C7D389121BD2461100889FEE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C7D389041BD2461100889FEE /* Build configuration list for PBXProject "pro01" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C7D3890E1BD2461100889FEE /* Debug */, + C7D3890F1BD2461100889FEE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C7D389101BD2461100889FEE /* Build configuration list for PBXNativeTarget "pro01" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C7D389111BD2461100889FEE /* Debug */, + C7D389121BD2461100889FEE /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = C7D389011BD2461100889FEE /* Project object */; +} diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01.xcodeproj/project.xcworkspace/contents.xcworkspacedata" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01.xcodeproj/project.xcworkspace/contents.xcworkspacedata" new file mode 100644 index 00000000..a15d91d1 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01.xcodeproj/project.xcworkspace/contents.xcworkspacedata" @@ -0,0 +1,7 @@ + + + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/Cal.h" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/Cal.h" new file mode 100644 index 00000000..0ef7a225 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/Cal.h" @@ -0,0 +1,22 @@ +// +// Cal.h +// pro01 +// +// Created by 赖溢洲 on 15/10/17. +// Copyright © 2015年 赖溢洲. All rights reserved. +// + +#ifndef Cal_h +#define Cal_h + + +#endif /* Cal_h */ + +#import + +@interface Cal : NSObject + +- (instancetype)initWithArray: (NSArray *)argv; +- (void)Print; + +@end \ No newline at end of file diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/Cal.m" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/Cal.m" new file mode 100644 index 00000000..a5ab6a04 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/Cal.m" @@ -0,0 +1,278 @@ +// +// Cal.m +// pro01 +// +// Created by 赖溢洲 on 15/10/17. +// Copyright © 2015年 赖溢洲. All rights reserved. +// + +#import +#import "Cal.h" + +typedef NS_ENUM(NSUInteger, ErrorType) +{ + ErrorTypeNone, + ErrorTypeUncertain, + ErrorTypeIllegalOption, +}; + +@interface Cal () + +@property (copy, nonatomic) NSArray *argvArray; +@property (strong, nonatomic) NSArray *numberArray; + +@end + +@implementation Cal + +- (instancetype)initWithArray:(NSArray *)argv +{ + if (self = [super init]) + { + + _argvArray = [argv copy]; + _numberArray = @[@"Jan",@"Feb",@"Mar",@"Apr",@"May",@"Jun",@"Jul",@"Aug",@"Sep",@"Oct",@"Nov",@"Dec"]; + } + + return self; +} + +- (void)Print{ + + if (self.argvArray.count == 1) + { + [self printCalendarMonth:[self currentMonth] year:[self currentYear]]; + + } + else if (self.argvArray.count == 2) + { + + NSInteger year; + ErrorType type = [self isLegalM:self.argvArray[1]]; + NSString *str; + + switch (type) + { + case ErrorTypeIllegalOption: + str = self.argvArray[1]; + printf("Cal: illegal option -- %s\n",str.UTF8String); + + break; + case ErrorTypeNone: + printf("Cal: option requires an argument -- m\n"); + printf("usage: Cal -m month\n"); + break; + + case ErrorTypeUncertain: + year = [self isLegalYear:self.argvArray[1]]; + if (year) { + [self printCalendarYear:year]; + } + break; + } + + } + else if (self.argvArray.count == 3){ + + ErrorType type = [self isLegalM:self.argvArray[1]]; + NSInteger month; + NSInteger year; + NSString *str; + + switch (type) + { + case ErrorTypeIllegalOption: + str = self.argvArray[1]; + printf("Cal: illegal option -- %s\n",str.UTF8String); + break; + case ErrorTypeNone: + month = [self isLegalMonth:self.argvArray[2]]; + if (month) { + [self printCalendarMonth:month year:[self currentYear]]; + } + break; + case ErrorTypeUncertain: + month = [self isLegalMonth:self.argvArray[1]]; + year = [self isLegalYear:self.argvArray[2]]; + if (year && month) { + [self printCalendarMonth:month year:year]; + } + break; + } + } +} + +- (ErrorType)isLegalM:(NSString *)string +{ + ErrorType type; + NSString *firstChar = [string substringToIndex:1]; + if ([firstChar isEqualToString:@"-"]) { + NSString *secondChar = [string substringFromIndex:1]; + if ([secondChar isEqualToString:@"m"]) { + type = ErrorTypeNone; + }else{ + type = ErrorTypeIllegalOption; + } + }else{ + type = ErrorTypeUncertain; + } + return type; +} + +- (NSInteger)isLegalYear:(NSString *)yearString +{ + NSInteger year = [yearString integerValue]; + if (year <= 0 || year > 9999) { + printf("Cal: year %s not in range 1..9999\n",yearString.UTF8String); + return 0; + }else + return year; +} + +- (NSInteger)isLegalMonth:(NSString *)monthString +{ + NSInteger month = [monthString integerValue]; + if (month <= 0 || month > 12) { + printf("Cal: %s is neither a month number (1..12) nor a name\n",monthString.UTF8String); + return 0; + }else + return month; +} + +- (NSInteger)currentMonth +{ + NSCalendar *calendar = [NSCalendar currentCalendar]; + NSDate *currentDate = [NSDate date]; + NSDateComponents *comp = [calendar components:NSCalendarUnitMonth fromDate:currentDate]; + return comp.month; +} + +- (NSInteger)currentYear +{ + NSCalendar *calendar = [NSCalendar currentCalendar]; + NSDate *currentDate = [NSDate date]; + NSDateComponents *comp = [calendar components:NSCalendarUnitYear fromDate:currentDate]; + return comp.year; +} + +- (void)printCalendarYear:(NSInteger)year +{ + NSMutableArray *monthArray = [NSMutableArray arrayWithCapacity:12]; + for (int i = 0; i < 12; i++) + { + NSArray *daysArray = [self createDaysArrayWithMonth:i+1 year:year]; + [monthArray addObject:daysArray]; + } + + printf(" %ld\n",year); + printf("\n"); + + for (int i = 0; i < 4; i++) + { + NSString *str1 = self.numberArray[i * 3]; + NSString *str2 = self.numberArray[i * 3 + 1]; + NSString *str3 = self.numberArray[i * 3 + 2]; + if (i == 3) + { + printf(" %s %s %s\n",str1.UTF8String,str2.UTF8String,str3.UTF8String); + }else{ + printf(" %s %s %s \n",str1.UTF8String,str2.UTF8String,str3.UTF8String); + } + + printf("S M T W T F S S M T W T F S S M T W T F S\n"); + for (int j = 0; j < 6; j++) { + + for (int m = 0; m < 3; m ++) { + NSArray *dayArray = monthArray[i * 3 + m]; + NSArray *lineArray = dayArray[j]; + for (NSString *str in lineArray) { + printf("%s ",str.UTF8String); + } + printf(" "); + } + printf("\n"); + } + } +} + +- (void)printCalendarMonth:(NSInteger)month year:(NSInteger)year +{ + NSArray *daysArray = [self createDaysArrayWithMonth:month year:year]; + NSString *monthString = self.numberArray[month-1]; + printf(" %s %ld\n",monthString.UTF8String,year); + printf("S M T W T F S\n"); + for (int i = 0; i < daysArray.count; i++) { + NSArray *lineArray = daysArray[i]; + for (int j = 0; j < lineArray.count; j++) { + NSString *str = lineArray[j]; + printf("%s ",str.UTF8String); + } + printf("\n"); + } +} + +- (NSInteger)daysNumberInMonth:(NSInteger)month year:(NSInteger)year +{ + NSCalendar *calendar = [NSCalendar currentCalendar]; + NSDateComponents *specifyComponents= [[NSDateComponents alloc] init]; + [specifyComponents setYear:year]; + [specifyComponents setMonth:month+1]; + [specifyComponents setDay:0]; + [specifyComponents setHour:8]; + + NSDate *date = [calendar dateFromComponents:specifyComponents]; + + NSInteger flags = NSCalendarUnitDay; + + NSDateComponents *comp = [calendar components:flags fromDate:date]; + return comp.day; +} + +- (NSArray *)createDaysArrayWithMonth:(NSInteger)month year:(NSInteger)year +{ + NSMutableArray *daysArray = [NSMutableArray arrayWithCapacity:6]; + + NSCalendar *calendar = [NSCalendar currentCalendar]; + NSDateComponents *specifyComponents= [[NSDateComponents alloc] init]; + [specifyComponents setYear:year]; + [specifyComponents setMonth:month]; + [specifyComponents setDay:1]; + [specifyComponents setHour:8]; + + NSDate *date = [calendar dateFromComponents:specifyComponents]; + + NSInteger flags = NSCalendarUnitWeekday; + + NSDateComponents *comp = [calendar components:flags fromDate:date]; + + NSInteger daysNumber = [self daysNumberInMonth:month year:year]; + + int number = 1; + for (int i = 0; i < 6; i++) { + NSMutableArray *lineArray = [NSMutableArray arrayWithCapacity:7]; + for (int j = 0; j < 7; j++) { + NSString *numberString; + if (number > daysNumber) { + numberString = @" "; + }else{ + if (i == 0) { + if (j < comp.weekday - 1) { + numberString = @" "; + }else{ + numberString = [NSString stringWithFormat:@" %d",number]; + number ++; + } + }else{ + numberString = number<10? [NSString stringWithFormat:@" %d",number] : [NSString stringWithFormat:@"%d",number]; + number ++; + } + } + [lineArray addObject:numberString]; + } + [daysArray addObject:lineArray]; + } + + return daysArray; +} + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/main.m" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/main.m" new file mode 100644 index 00000000..f3679779 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework02/pro01/main.m" @@ -0,0 +1,30 @@ +// +// main.m +// pro01 +// +// Created by 赖溢洲 on 15/10/17. +// Copyright © 2015年 赖溢洲. All rights reserved. +// + +#import + +#import "Cal.h" + +int main(int argc, const char * argv[]) { + @autoreleasepool { + // insert code here... + + NSMutableArray *array = [NSMutableArray arrayWithCapacity:argc]; + for (int i = 0; i < argc; i++) { + NSString *str = [NSString stringWithUTF8String:argv[i]]; + [array addObject:str]; + } + + Cal *cal = [[Cal alloc] initWithArray:array]; + [cal Print]; + + } + return 0; +} + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/.DS_Store" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/.DS_Store" new file mode 100644 index 00000000..a7b84f9d Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/.DS_Store" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03.xcodeproj/project.pbxproj" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03.xcodeproj/project.pbxproj" new file mode 100644 index 00000000..e98eb55b --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03.xcodeproj/project.pbxproj" @@ -0,0 +1,321 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + ED9B5E691BE36AD500DFD16B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ED9B5E681BE36AD500DFD16B /* main.m */; }; + ED9B5E6C1BE36AD500DFD16B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ED9B5E6B1BE36AD500DFD16B /* AppDelegate.m */; }; + ED9B5E6F1BE36AD500DFD16B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ED9B5E6E1BE36AD500DFD16B /* ViewController.m */; }; + ED9B5E721BE36AD500DFD16B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ED9B5E701BE36AD500DFD16B /* Main.storyboard */; }; + ED9B5E741BE36AD500DFD16B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ED9B5E731BE36AD500DFD16B /* Assets.xcassets */; }; + ED9B5E771BE36AD500DFD16B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ED9B5E751BE36AD500DFD16B /* LaunchScreen.storyboard */; }; + ED9B5E831BE3978100DFD16B /* IP3ListInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = ED9B5E821BE3978100DFD16B /* IP3ListInfo.m */; }; + ED9B5E8C1BE4532C00DFD16B /* Schedule.m in Sources */ = {isa = PBXBuildFile; fileRef = ED9B5E8B1BE4532C00DFD16B /* Schedule.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + ED9B5E641BE36AD500DFD16B /* iPhone-Homework03.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iPhone-Homework03.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + ED9B5E681BE36AD500DFD16B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + ED9B5E6A1BE36AD500DFD16B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + ED9B5E6B1BE36AD500DFD16B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + ED9B5E6D1BE36AD500DFD16B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + ED9B5E6E1BE36AD500DFD16B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + ED9B5E711BE36AD500DFD16B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + ED9B5E731BE36AD500DFD16B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + ED9B5E761BE36AD500DFD16B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + ED9B5E781BE36AD500DFD16B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + ED9B5E811BE3978100DFD16B /* IP3ListInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IP3ListInfo.h; sourceTree = ""; }; + ED9B5E821BE3978100DFD16B /* IP3ListInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IP3ListInfo.m; sourceTree = ""; }; + ED9B5E8A1BE4532C00DFD16B /* Schedule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Schedule.h; sourceTree = ""; }; + ED9B5E8B1BE4532C00DFD16B /* Schedule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Schedule.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + ED9B5E611BE36AD500DFD16B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + ED9B5E5B1BE36AD500DFD16B = { + isa = PBXGroup; + children = ( + ED9B5E661BE36AD500DFD16B /* iPhone-Homework03 */, + ED9B5E651BE36AD500DFD16B /* Products */, + ); + sourceTree = ""; + }; + ED9B5E651BE36AD500DFD16B /* Products */ = { + isa = PBXGroup; + children = ( + ED9B5E641BE36AD500DFD16B /* iPhone-Homework03.app */, + ); + name = Products; + sourceTree = ""; + }; + ED9B5E661BE36AD500DFD16B /* iPhone-Homework03 */ = { + isa = PBXGroup; + children = ( + ED9B5E6A1BE36AD500DFD16B /* AppDelegate.h */, + ED9B5E6B1BE36AD500DFD16B /* AppDelegate.m */, + ED9B5E6D1BE36AD500DFD16B /* ViewController.h */, + ED9B5E6E1BE36AD500DFD16B /* ViewController.m */, + ED9B5E811BE3978100DFD16B /* IP3ListInfo.h */, + ED9B5E821BE3978100DFD16B /* IP3ListInfo.m */, + ED9B5E8A1BE4532C00DFD16B /* Schedule.h */, + ED9B5E8B1BE4532C00DFD16B /* Schedule.m */, + ED9B5E701BE36AD500DFD16B /* Main.storyboard */, + ED9B5E731BE36AD500DFD16B /* Assets.xcassets */, + ED9B5E751BE36AD500DFD16B /* LaunchScreen.storyboard */, + ED9B5E781BE36AD500DFD16B /* Info.plist */, + ED9B5E671BE36AD500DFD16B /* Supporting Files */, + ); + path = "iPhone-Homework03"; + sourceTree = ""; + }; + ED9B5E671BE36AD500DFD16B /* Supporting Files */ = { + isa = PBXGroup; + children = ( + ED9B5E681BE36AD500DFD16B /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + ED9B5E631BE36AD500DFD16B /* iPhone-Homework03 */ = { + isa = PBXNativeTarget; + buildConfigurationList = ED9B5E7B1BE36AD500DFD16B /* Build configuration list for PBXNativeTarget "iPhone-Homework03" */; + buildPhases = ( + ED9B5E601BE36AD500DFD16B /* Sources */, + ED9B5E611BE36AD500DFD16B /* Frameworks */, + ED9B5E621BE36AD500DFD16B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "iPhone-Homework03"; + productName = "iPhone-Homework03"; + productReference = ED9B5E641BE36AD500DFD16B /* iPhone-Homework03.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + ED9B5E5C1BE36AD500DFD16B /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0710; + ORGANIZATIONNAME = alezai; + TargetAttributes = { + ED9B5E631BE36AD500DFD16B = { + CreatedOnToolsVersion = 7.1; + }; + }; + }; + buildConfigurationList = ED9B5E5F1BE36AD500DFD16B /* Build configuration list for PBXProject "iPhone-Homework03" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = ED9B5E5B1BE36AD500DFD16B; + productRefGroup = ED9B5E651BE36AD500DFD16B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + ED9B5E631BE36AD500DFD16B /* iPhone-Homework03 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + ED9B5E621BE36AD500DFD16B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ED9B5E771BE36AD500DFD16B /* LaunchScreen.storyboard in Resources */, + ED9B5E741BE36AD500DFD16B /* Assets.xcassets in Resources */, + ED9B5E721BE36AD500DFD16B /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + ED9B5E601BE36AD500DFD16B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ED9B5E8C1BE4532C00DFD16B /* Schedule.m in Sources */, + ED9B5E831BE3978100DFD16B /* IP3ListInfo.m in Sources */, + ED9B5E6F1BE36AD500DFD16B /* ViewController.m in Sources */, + ED9B5E6C1BE36AD500DFD16B /* AppDelegate.m in Sources */, + ED9B5E691BE36AD500DFD16B /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + ED9B5E701BE36AD500DFD16B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + ED9B5E711BE36AD500DFD16B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + ED9B5E751BE36AD500DFD16B /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + ED9B5E761BE36AD500DFD16B /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + ED9B5E791BE36AD500DFD16B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + ED9B5E7A1BE36AD500DFD16B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + ED9B5E7C1BE36AD500DFD16B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = "iPhone-Homework03/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "alezai.iPhone-Homework03"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + ED9B5E7D1BE36AD500DFD16B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; + INFOPLIST_FILE = "iPhone-Homework03/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "alezai.iPhone-Homework03"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + ED9B5E5F1BE36AD500DFD16B /* Build configuration list for PBXProject "iPhone-Homework03" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + ED9B5E791BE36AD500DFD16B /* Debug */, + ED9B5E7A1BE36AD500DFD16B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + ED9B5E7B1BE36AD500DFD16B /* Build configuration list for PBXNativeTarget "iPhone-Homework03" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + ED9B5E7C1BE36AD500DFD16B /* Debug */, + ED9B5E7D1BE36AD500DFD16B /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = ED9B5E5C1BE36AD500DFD16B /* Project object */; +} diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03.xcodeproj/project.xcworkspace/contents.xcworkspacedata" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03.xcodeproj/project.xcworkspace/contents.xcworkspacedata" new file mode 100644 index 00000000..19edf38b --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03.xcodeproj/project.xcworkspace/contents.xcworkspacedata" @@ -0,0 +1,7 @@ + + + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/.DS_Store" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/.DS_Store" new file mode 100644 index 00000000..5fd34c78 Binary files /dev/null and "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/.DS_Store" differ diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/AppDelegate.h" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/AppDelegate.h" new file mode 100644 index 00000000..f1cec6aa --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/AppDelegate.h" @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/30. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/AppDelegate.m" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/AppDelegate.m" new file mode 100644 index 00000000..c7e4662a --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/AppDelegate.m" @@ -0,0 +1,45 @@ +// +// AppDelegate.m +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/30. +// Copyright © 2015年 alezai. 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 throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Assets.xcassets/AppIcon.appiconset/Contents.json" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Assets.xcassets/AppIcon.appiconset/Contents.json" new file mode 100644 index 00000000..36d2c80d --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/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/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Base.lproj/LaunchScreen.storyboard" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Base.lproj/LaunchScreen.storyboard" new file mode 100644 index 00000000..1447b3cb --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Base.lproj/LaunchScreen.storyboard" @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Base.lproj/Main.storyboard" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Base.lproj/Main.storyboard" new file mode 100644 index 00000000..c8807b60 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Base.lproj/Main.storyboard" @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/IP3ListInfo.h" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/IP3ListInfo.h" new file mode 100644 index 00000000..9be3ea42 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/IP3ListInfo.h" @@ -0,0 +1,15 @@ +// +// IP3ListInfo.h +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/30. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import + +@interface IP3ListInfo : NSObject + +@property (strong, nonatomic) NSArray *listArray; + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/IP3ListInfo.m" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/IP3ListInfo.m" new file mode 100644 index 00000000..2ad4beb3 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/IP3ListInfo.m" @@ -0,0 +1,28 @@ +// +// IP3ListInfo.m +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/30. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import "IP3ListInfo.h" + +static NSString * const kListKey = @"kListKey"; + +@implementation IP3ListInfo + +- (instancetype)initWithCoder:(NSCoder *)coder +{ + self = [super init]; + if (self) { + _listArray = [coder decodeObjectForKey:kListKey]; + } + return self; +} + +- (void)encodeWithCoder:(NSCoder *)aCoder{ + [aCoder encodeObject:self.listArray forKey:kListKey]; +} + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Info.plist" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Info.plist" new file mode 100644 index 00000000..40c6215d --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Info.plist" @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Schedule.h" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Schedule.h" new file mode 100644 index 00000000..1b6c4294 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Schedule.h" @@ -0,0 +1,18 @@ +// +// Schedule.h +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/31. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import + +@interface Schedule : NSObject + +- (NSString *)scheduleTextAtIndex:(NSUInteger)index; +- (NSUInteger)schedulesCount; +- (void)insertScheduleWithString:(NSString *)str; +- (void)deleteScheduleAtIndex:(NSUInteger)index; + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Schedule.m" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Schedule.m" new file mode 100644 index 00000000..63f2f3c3 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/Schedule.m" @@ -0,0 +1,70 @@ +// +// Schedule.m +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/31. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import "Schedule.h" +#import "IP3ListInfo.h" + +static NSString * const kRootKey = @"kRootKey"; + +@interface Schedule () + +@property (strong, nonatomic) NSMutableArray *listArray; + +@end + +@implementation Schedule + +- (instancetype)init +{ + self = [super init]; + if (self) { + NSData *data = [NSData dataWithContentsOfFile:[self dataPath]]; + NSKeyedUnarchiver *unArchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; + IP3ListInfo *ip3List = [unArchiver decodeObjectForKey:kRootKey]; + [unArchiver finishDecoding]; + _listArray = [ip3List.listArray mutableCopy]; + } + return self; +} + +- (NSUInteger)schedulesCount{ + return self.listArray.count; +} + +- (NSString *)scheduleTextAtIndex:(NSUInteger)index{ + NSString *str = self.listArray[index]; + return str; +} + +- (void)insertScheduleWithString:(NSString *)str{ + [self.listArray addObject:str]; + [self updateArchive]; +} + +- (void)deleteScheduleAtIndex:(NSUInteger)index{ + [self.listArray removeObjectAtIndex:index]; + [self updateArchive]; +} + +- (void)updateArchive{ + IP3ListInfo *ip3List = [[IP3ListInfo alloc] init]; + ip3List.listArray = [self.listArray copy]; + NSMutableData *data = [[NSMutableData alloc] init]; + NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; + [archiver encodeObject:ip3List forKey:kRootKey]; + [archiver finishEncoding]; + [data writeToFile:[self dataPath] atomically:YES]; +} + +- (NSString *)dataPath{ + NSArray *array = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *path = array[0]; + return [path stringByAppendingPathComponent:@"data.archive"]; +} + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/ViewController.h" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/ViewController.h" new file mode 100644 index 00000000..ee755ae0 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/ViewController.h" @@ -0,0 +1,15 @@ +// +// ViewController.h +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/30. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/ViewController.m" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/ViewController.m" new file mode 100644 index 00000000..4e34e83a --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/ViewController.m" @@ -0,0 +1,134 @@ +// +// ViewController.m +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/30. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import "ViewController.h" +#import "Schedule.h" + +@interface ViewController () +@property (weak, nonatomic) IBOutlet UITextField *textField; +@property (weak, nonatomic) IBOutlet UIButton *submitButton; +@property (weak, nonatomic) IBOutlet UITableView *tableView; + +@property (strong, nonatomic) Schedule *schedule; + +@end + +@implementation ViewController + +#pragma mark - Life cycle +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view, typically from a nib. + self.schedule = [[Schedule alloc] init]; + self.submitButton.enabled = NO; + + UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapTableview:)]; + tapGesture.cancelsTouchesInView = NO; + [self.tableView addGestureRecognizer:tapGesture]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - Event Response + +- (IBAction)handleButtonTap:(UIButton *)sender { + [self insertText]; +} + +#pragma mark - Private Methods + +- (void)tapTableview:(UITapGestureRecognizer *)sender{ + if ([self.textField isFirstResponder]) { + [self.textField resignFirstResponder]; + } +} + +- (void)insertText{ + if (self.textField.text.length == 0) { + UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"ERROR" message:@"please input words" preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; + [alertVC addAction:okAction]; + [self presentViewController:alertVC animated:YES completion:nil]; + }else{ + NSString *str = self.textField.text; + [self.schedule insertScheduleWithString:str]; + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:([self.schedule schedulesCount] - 1) inSection:0]; + [self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; + + self.textField.text = nil; + [self.textField resignFirstResponder]; + } +} + +- (void)deleteAtIndex:(NSIndexPath *)indexPath{ + [self.schedule deleteScheduleAtIndex:indexPath.row]; + [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; +} + +#pragma mark - Delegate +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return [self.schedule schedulesCount]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath]; + + // Configure the cell... + cell.textLabel.text = [self.schedule scheduleTextAtIndex:indexPath.row]; + + return cell; +} + +#pragma mark - Table view delegate +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ + return YES; +} + +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ + if (editingStyle == UITableViewCellEditingStyleDelete) { + [self deleteAtIndex:indexPath]; + } +} + +- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView +{ + if ([self.textField isFirstResponder]) { + [self.textField resignFirstResponder]; + } +} + +#pragma mark - TextField delegate +- (void)textFieldDidBeginEditing:(UITextField *)textField{ + self.submitButton.enabled = YES; +} + +- (void)textFieldDidEndEditing:(UITextField *)textField{ + self.submitButton.enabled = NO; +} + +- (BOOL)textFieldShouldReturn:(UITextField *)textField{ + [self insertText]; + return YES; +} + + + +@end diff --git "a/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/main.m" "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/main.m" new file mode 100644 index 00000000..187fc940 --- /dev/null +++ "b/21551017\350\265\226\346\272\242\346\264\262/iPhone-Homework03/iPhone-Homework03/main.m" @@ -0,0 +1,16 @@ +// +// main.m +// iPhone-Homework03 +// +// Created by 赖溢洲 on 15/10/30. +// Copyright © 2015年 alezai. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +}