commit 1cacf83c0710332537980dc1637b2127ad6b0087 Author: MengLiMing <920459250@qq.com> Date: Wed May 18 16:26:09 2016 +0800 验证码输入框 帮朋友封装的验证码输入 diff --git a/CodeView.xcodeproj/project.pbxproj b/CodeView.xcodeproj/project.pbxproj new file mode 100644 index 0000000..399e76f --- /dev/null +++ b/CodeView.xcodeproj/project.pbxproj @@ -0,0 +1,541 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0F1D1DD01CEC5D3E008FC24B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D1DCF1CEC5D3E008FC24B /* main.m */; }; + 0F1D1DD31CEC5D3E008FC24B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D1DD21CEC5D3E008FC24B /* AppDelegate.m */; }; + 0F1D1DD61CEC5D3E008FC24B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D1DD51CEC5D3E008FC24B /* ViewController.m */; }; + 0F1D1DD91CEC5D3E008FC24B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F1D1DD71CEC5D3E008FC24B /* Main.storyboard */; }; + 0F1D1DDB1CEC5D3E008FC24B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0F1D1DDA1CEC5D3E008FC24B /* Assets.xcassets */; }; + 0F1D1DDE1CEC5D3E008FC24B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F1D1DDC1CEC5D3E008FC24B /* LaunchScreen.storyboard */; }; + 0F1D1DE91CEC5D3E008FC24B /* CodeViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D1DE81CEC5D3E008FC24B /* CodeViewTests.m */; }; + 0F1D1DF41CEC5D3E008FC24B /* CodeViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D1DF31CEC5D3E008FC24B /* CodeViewUITests.m */; }; + 0F1D1E041CEC5D71008FC24B /* CodeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D1E031CEC5D71008FC24B /* CodeView.m */; }; + 0F1D1E071CEC5DD9008FC24B /* UIView+Category.m in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D1E061CEC5DD9008FC24B /* UIView+Category.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 0F1D1DE51CEC5D3E008FC24B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0F1D1DC31CEC5D3E008FC24B /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0F1D1DCA1CEC5D3E008FC24B; + remoteInfo = CodeView; + }; + 0F1D1DF01CEC5D3E008FC24B /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0F1D1DC31CEC5D3E008FC24B /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0F1D1DCA1CEC5D3E008FC24B; + remoteInfo = CodeView; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0F1D1DCB1CEC5D3E008FC24B /* CodeView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CodeView.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0F1D1DCF1CEC5D3E008FC24B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 0F1D1DD11CEC5D3E008FC24B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 0F1D1DD21CEC5D3E008FC24B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 0F1D1DD41CEC5D3E008FC24B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 0F1D1DD51CEC5D3E008FC24B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 0F1D1DD81CEC5D3E008FC24B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 0F1D1DDA1CEC5D3E008FC24B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 0F1D1DDD1CEC5D3E008FC24B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 0F1D1DDF1CEC5D3E008FC24B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0F1D1DE41CEC5D3E008FC24B /* CodeViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CodeViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0F1D1DE81CEC5D3E008FC24B /* CodeViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CodeViewTests.m; sourceTree = ""; }; + 0F1D1DEA1CEC5D3E008FC24B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0F1D1DEF1CEC5D3E008FC24B /* CodeViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CodeViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 0F1D1DF31CEC5D3E008FC24B /* CodeViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CodeViewUITests.m; sourceTree = ""; }; + 0F1D1DF51CEC5D3E008FC24B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 0F1D1E021CEC5D71008FC24B /* CodeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeView.h; sourceTree = ""; }; + 0F1D1E031CEC5D71008FC24B /* CodeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CodeView.m; sourceTree = ""; }; + 0F1D1E051CEC5DD9008FC24B /* UIView+Category.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Category.h"; sourceTree = ""; }; + 0F1D1E061CEC5DD9008FC24B /* UIView+Category.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Category.m"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0F1D1DC81CEC5D3E008FC24B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0F1D1DE11CEC5D3E008FC24B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0F1D1DEC1CEC5D3E008FC24B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0F1D1DC21CEC5D3E008FC24B = { + isa = PBXGroup; + children = ( + 0F1D1DCD1CEC5D3E008FC24B /* CodeView */, + 0F1D1DE71CEC5D3E008FC24B /* CodeViewTests */, + 0F1D1DF21CEC5D3E008FC24B /* CodeViewUITests */, + 0F1D1DCC1CEC5D3E008FC24B /* Products */, + ); + sourceTree = ""; + }; + 0F1D1DCC1CEC5D3E008FC24B /* Products */ = { + isa = PBXGroup; + children = ( + 0F1D1DCB1CEC5D3E008FC24B /* CodeView.app */, + 0F1D1DE41CEC5D3E008FC24B /* CodeViewTests.xctest */, + 0F1D1DEF1CEC5D3E008FC24B /* CodeViewUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 0F1D1DCD1CEC5D3E008FC24B /* CodeView */ = { + isa = PBXGroup; + children = ( + 0F1D1E011CEC5D71008FC24B /* CodeView */, + 0F1D1DD11CEC5D3E008FC24B /* AppDelegate.h */, + 0F1D1DD21CEC5D3E008FC24B /* AppDelegate.m */, + 0F1D1DD41CEC5D3E008FC24B /* ViewController.h */, + 0F1D1DD51CEC5D3E008FC24B /* ViewController.m */, + 0F1D1DD71CEC5D3E008FC24B /* Main.storyboard */, + 0F1D1DDA1CEC5D3E008FC24B /* Assets.xcassets */, + 0F1D1DDC1CEC5D3E008FC24B /* LaunchScreen.storyboard */, + 0F1D1DDF1CEC5D3E008FC24B /* Info.plist */, + 0F1D1DCE1CEC5D3E008FC24B /* Supporting Files */, + ); + path = CodeView; + sourceTree = ""; + }; + 0F1D1DCE1CEC5D3E008FC24B /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 0F1D1DCF1CEC5D3E008FC24B /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 0F1D1DE71CEC5D3E008FC24B /* CodeViewTests */ = { + isa = PBXGroup; + children = ( + 0F1D1DE81CEC5D3E008FC24B /* CodeViewTests.m */, + 0F1D1DEA1CEC5D3E008FC24B /* Info.plist */, + ); + path = CodeViewTests; + sourceTree = ""; + }; + 0F1D1DF21CEC5D3E008FC24B /* CodeViewUITests */ = { + isa = PBXGroup; + children = ( + 0F1D1DF31CEC5D3E008FC24B /* CodeViewUITests.m */, + 0F1D1DF51CEC5D3E008FC24B /* Info.plist */, + ); + path = CodeViewUITests; + sourceTree = ""; + }; + 0F1D1E011CEC5D71008FC24B /* CodeView */ = { + isa = PBXGroup; + children = ( + 0F1D1E051CEC5DD9008FC24B /* UIView+Category.h */, + 0F1D1E061CEC5DD9008FC24B /* UIView+Category.m */, + 0F1D1E021CEC5D71008FC24B /* CodeView.h */, + 0F1D1E031CEC5D71008FC24B /* CodeView.m */, + ); + path = CodeView; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0F1D1DCA1CEC5D3E008FC24B /* CodeView */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0F1D1DF81CEC5D3E008FC24B /* Build configuration list for PBXNativeTarget "CodeView" */; + buildPhases = ( + 0F1D1DC71CEC5D3E008FC24B /* Sources */, + 0F1D1DC81CEC5D3E008FC24B /* Frameworks */, + 0F1D1DC91CEC5D3E008FC24B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CodeView; + productName = CodeView; + productReference = 0F1D1DCB1CEC5D3E008FC24B /* CodeView.app */; + productType = "com.apple.product-type.application"; + }; + 0F1D1DE31CEC5D3E008FC24B /* CodeViewTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0F1D1DFB1CEC5D3E008FC24B /* Build configuration list for PBXNativeTarget "CodeViewTests" */; + buildPhases = ( + 0F1D1DE01CEC5D3E008FC24B /* Sources */, + 0F1D1DE11CEC5D3E008FC24B /* Frameworks */, + 0F1D1DE21CEC5D3E008FC24B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0F1D1DE61CEC5D3E008FC24B /* PBXTargetDependency */, + ); + name = CodeViewTests; + productName = CodeViewTests; + productReference = 0F1D1DE41CEC5D3E008FC24B /* CodeViewTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 0F1D1DEE1CEC5D3E008FC24B /* CodeViewUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0F1D1DFE1CEC5D3E008FC24B /* Build configuration list for PBXNativeTarget "CodeViewUITests" */; + buildPhases = ( + 0F1D1DEB1CEC5D3E008FC24B /* Sources */, + 0F1D1DEC1CEC5D3E008FC24B /* Frameworks */, + 0F1D1DED1CEC5D3E008FC24B /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 0F1D1DF11CEC5D3E008FC24B /* PBXTargetDependency */, + ); + name = CodeViewUITests; + productName = CodeViewUITests; + productReference = 0F1D1DEF1CEC5D3E008FC24B /* CodeViewUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0F1D1DC31CEC5D3E008FC24B /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = MS; + TargetAttributes = { + 0F1D1DCA1CEC5D3E008FC24B = { + CreatedOnToolsVersion = 7.2.1; + }; + 0F1D1DE31CEC5D3E008FC24B = { + CreatedOnToolsVersion = 7.2.1; + TestTargetID = 0F1D1DCA1CEC5D3E008FC24B; + }; + 0F1D1DEE1CEC5D3E008FC24B = { + CreatedOnToolsVersion = 7.2.1; + TestTargetID = 0F1D1DCA1CEC5D3E008FC24B; + }; + }; + }; + buildConfigurationList = 0F1D1DC61CEC5D3E008FC24B /* Build configuration list for PBXProject "CodeView" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 0F1D1DC21CEC5D3E008FC24B; + productRefGroup = 0F1D1DCC1CEC5D3E008FC24B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0F1D1DCA1CEC5D3E008FC24B /* CodeView */, + 0F1D1DE31CEC5D3E008FC24B /* CodeViewTests */, + 0F1D1DEE1CEC5D3E008FC24B /* CodeViewUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 0F1D1DC91CEC5D3E008FC24B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F1D1DDE1CEC5D3E008FC24B /* LaunchScreen.storyboard in Resources */, + 0F1D1DDB1CEC5D3E008FC24B /* Assets.xcassets in Resources */, + 0F1D1DD91CEC5D3E008FC24B /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0F1D1DE21CEC5D3E008FC24B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0F1D1DED1CEC5D3E008FC24B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0F1D1DC71CEC5D3E008FC24B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F1D1DD61CEC5D3E008FC24B /* ViewController.m in Sources */, + 0F1D1DD31CEC5D3E008FC24B /* AppDelegate.m in Sources */, + 0F1D1DD01CEC5D3E008FC24B /* main.m in Sources */, + 0F1D1E071CEC5DD9008FC24B /* UIView+Category.m in Sources */, + 0F1D1E041CEC5D71008FC24B /* CodeView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0F1D1DE01CEC5D3E008FC24B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F1D1DE91CEC5D3E008FC24B /* CodeViewTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 0F1D1DEB1CEC5D3E008FC24B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F1D1DF41CEC5D3E008FC24B /* CodeViewUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0F1D1DE61CEC5D3E008FC24B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0F1D1DCA1CEC5D3E008FC24B /* CodeView */; + targetProxy = 0F1D1DE51CEC5D3E008FC24B /* PBXContainerItemProxy */; + }; + 0F1D1DF11CEC5D3E008FC24B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0F1D1DCA1CEC5D3E008FC24B /* CodeView */; + targetProxy = 0F1D1DF01CEC5D3E008FC24B /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 0F1D1DD71CEC5D3E008FC24B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0F1D1DD81CEC5D3E008FC24B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 0F1D1DDC1CEC5D3E008FC24B /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 0F1D1DDD1CEC5D3E008FC24B /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 0F1D1DF61CEC5D3E008FC24B /* 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.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 0F1D1DF71CEC5D3E008FC24B /* 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.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 0F1D1DF91CEC5D3E008FC24B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = CodeView/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.MLM.CodeView; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 0F1D1DFA1CEC5D3E008FC24B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = CodeView/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.MLM.CodeView; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 0F1D1DFC1CEC5D3E008FC24B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = CodeViewTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.MLM.CodeViewTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CodeView.app/CodeView"; + }; + name = Debug; + }; + 0F1D1DFD1CEC5D3E008FC24B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = CodeViewTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.MLM.CodeViewTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CodeView.app/CodeView"; + }; + name = Release; + }; + 0F1D1DFF1CEC5D3E008FC24B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = CodeViewUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.MLM.CodeViewUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = CodeView; + USES_XCTRUNNER = YES; + }; + name = Debug; + }; + 0F1D1E001CEC5D3E008FC24B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = CodeViewUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.MLM.CodeViewUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = CodeView; + USES_XCTRUNNER = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0F1D1DC61CEC5D3E008FC24B /* Build configuration list for PBXProject "CodeView" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0F1D1DF61CEC5D3E008FC24B /* Debug */, + 0F1D1DF71CEC5D3E008FC24B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0F1D1DF81CEC5D3E008FC24B /* Build configuration list for PBXNativeTarget "CodeView" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0F1D1DF91CEC5D3E008FC24B /* Debug */, + 0F1D1DFA1CEC5D3E008FC24B /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 0F1D1DFB1CEC5D3E008FC24B /* Build configuration list for PBXNativeTarget "CodeViewTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0F1D1DFC1CEC5D3E008FC24B /* Debug */, + 0F1D1DFD1CEC5D3E008FC24B /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 0F1D1DFE1CEC5D3E008FC24B /* Build configuration list for PBXNativeTarget "CodeViewUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0F1D1DFF1CEC5D3E008FC24B /* Debug */, + 0F1D1E001CEC5D3E008FC24B /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0F1D1DC31CEC5D3E008FC24B /* Project object */; +} diff --git a/CodeView.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/CodeView.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..34dcef9 --- /dev/null +++ b/CodeView.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/CodeView.xcodeproj/project.xcworkspace/xcuserdata/my.xcuserdatad/UserInterfaceState.xcuserstate b/CodeView.xcodeproj/project.xcworkspace/xcuserdata/my.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..34808c9 Binary files /dev/null and b/CodeView.xcodeproj/project.xcworkspace/xcuserdata/my.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/CodeView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/CodeView.xcscheme b/CodeView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/CodeView.xcscheme new file mode 100644 index 0000000..277da50 --- /dev/null +++ b/CodeView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/CodeView.xcscheme @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/xcschememanagement.plist b/CodeView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..8ee6bb6 --- /dev/null +++ b/CodeView.xcodeproj/xcuserdata/my.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + CodeView.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 0F1D1DCA1CEC5D3E008FC24B + + primary + + + 0F1D1DE31CEC5D3E008FC24B + + primary + + + 0F1D1DEE1CEC5D3E008FC24B + + primary + + + + + diff --git a/CodeView/AppDelegate.h b/CodeView/AppDelegate.h new file mode 100644 index 0000000..af7407a --- /dev/null +++ b/CodeView/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// CodeView +// +// Created by my on 16/5/18. +// Copyright © 2016年 MS. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/CodeView/AppDelegate.m b/CodeView/AppDelegate.m new file mode 100644 index 0000000..a9f2963 --- /dev/null +++ b/CodeView/AppDelegate.m @@ -0,0 +1,45 @@ +// +// AppDelegate.m +// CodeView +// +// Created by my on 16/5/18. +// Copyright © 2016年 MS. 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/CodeView/Assets.xcassets/AppIcon.appiconset/Contents.json b/CodeView/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..36d2c80 --- /dev/null +++ b/CodeView/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/CodeView/Base.lproj/LaunchScreen.storyboard b/CodeView/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/CodeView/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeView/Base.lproj/Main.storyboard b/CodeView/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f56d2f3 --- /dev/null +++ b/CodeView/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CodeView/CodeView/CodeView.h b/CodeView/CodeView/CodeView.h new file mode 100644 index 0000000..30cda9f --- /dev/null +++ b/CodeView/CodeView/CodeView.h @@ -0,0 +1,26 @@ +// +// CodeView.h +// BaseProject +// +// Created by my on 16/3/24. +// Copyright © 2016年 base. All rights reserved. +// + +#import + +@interface CodeView : UIView + +//输入完成回调 +@property (nonatomic,copy) void(^EndEditBlcok)(NSString *text); + +- (instancetype)initWithFrame:(CGRect)frame + num:(NSInteger)num + lineWith:(CGFloat)width + lineColor:(UIColor *)lColor + textColor:(UIColor *)tColor + textFont:(CGFloat)font; + +- (void)beginEdit; +- (void)endEdit; + +@end diff --git a/CodeView/CodeView/CodeView.m b/CodeView/CodeView/CodeView.m new file mode 100644 index 0000000..39094f2 --- /dev/null +++ b/CodeView/CodeView/CodeView.m @@ -0,0 +1,142 @@ +// +// CodeView.m +// BaseProject +// +// Created by my on 16/3/24. +// Copyright © 2016年 base. All rights reserved. +// + +#import "CodeView.h" + +@interface CodeView () +{ + NSMutableArray *textArray; + + //线的条数 + NSInteger lineNum; + CGFloat lineWidth; + UIColor *linecolor; + UIColor *textcolor; + CGFloat fontSize; + +} +@property (nonatomic,strong) UITextField *textField; +@property (nonatomic, strong) NSMutableArray *lineArr; +@end + +@implementation CodeView + +- (instancetype)initWithFrame:(CGRect)frame + num:(NSInteger)num + lineWith:(CGFloat)width + lineColor:(UIColor *)lColor + textColor:(UIColor *)tColor + textFont:(CGFloat)font { + self = [super initWithFrame:frame]; + if (self) { + self.frame = frame; + self.backgroundColor = [UIColor whiteColor]; + textArray = [NSMutableArray arrayWithCapacity:num]; + + lineNum = num; + lineWidth = width; + linecolor = lColor; + textcolor = tColor; + fontSize = font; + + [self addLine]; + [self addNotification]; + } + + return self; +} + +#pragma mark - 添加通知 +- (void)addNotification { + [[NSNotificationCenter defaultCenter] addObserverForName:UITextFieldTextDidChangeNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) { + NSInteger length = _textField.text.length; + if (length == lineNum && self.EndEditBlcok) { + [_textField resignFirstResponder]; + self.EndEditBlcok(_textField.text); + } + if (length > lineNum) { + [_textField resignFirstResponder]; + _textField.text = [_textField.text substringToIndex:lineNum]; + } + + //改变数组,存储需要画的字符 + //通过判断textfield的长度和数组中的长度比较,选择删除还是添加 + if (length<=lineNum) { + if (length > textArray.count) { + [textArray addObject:[_textField.text substringWithRange:NSMakeRange(length - 1, 1)]]; + } else { + [textArray removeLastObject]; + } + //标记为需要重绘 + [self setNeedsDisplay]; + } + + //判断底部的view隐藏还是显示 + for (NSInteger i = 0; i < lineNum; i ++) { + CAShapeLayer *obj = [_lineArr objectAtIndex:i]; + if (i < _textField.text.length) { + obj.hidden = YES; + } else { + obj.hidden = NO; + } + } + }]; +} + +//键盘弹出 +- (void)beginEdit { + if (_textField == nil) { + _textField = [[UITextField alloc] init]; + _textField.keyboardType = UIKeyboardTypeNumberPad; + _textField.hidden = YES; + [self addSubview:_textField]; + } + [self.textField becomeFirstResponder];} + +- (void)endEdit { + [self.textField resignFirstResponder]; +} + +- (void)addLine { + //创建下标线 + CGFloat line_sep = (self.frame.size.width - lineNum * lineWidth)/(lineNum + 1); + for (NSInteger i = 0; i < lineNum; i ++) { + CAShapeLayer *line = [CAShapeLayer layer]; + line.fillColor = linecolor.CGColor; + UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(line_sep * (i + 1) + i * lineWidth, self.frame.size.height - 10, lineWidth, 3)]; + line.path = path.CGPath; + line.hidden = NO; + [self.layer addSublayer:line]; + [self.lineArr addObject:line]; + } +} + +#pragma mark - 懒加载 +- (NSMutableArray *)lineArr{ + if (_lineArr == nil) { + _lineArr = [NSMutableArray array]; + } + return _lineArr; +} +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. + +- (void)drawRect:(CGRect)rect { + // Drawing code + //画字 + CGFloat line_sep = (self.frame.size.width - lineNum * lineWidth)/(lineNum + 1); + CGContextRef context = UIGraphicsGetCurrentContext(); + UIFont *font = [UIFont boldSystemFontOfSize:fontSize]; + for (NSInteger i = 0; i < textArray.count; i ++) { + [textArray[i] drawInRect:CGRectMake(line_sep * (i + 1) + i * lineWidth, self.frame.size.height - (fontSize + 15), lineWidth, fontSize + 5) withAttributes:@{NSFontAttributeName:font,NSForegroundColorAttributeName:textcolor}]; + } + CGContextDrawPath(context, kCGPathFill); +} + + +@end diff --git a/CodeView/CodeView/UIView+Category.h b/CodeView/CodeView/UIView+Category.h new file mode 100644 index 0000000..1bb2602 --- /dev/null +++ b/CodeView/CodeView/UIView+Category.h @@ -0,0 +1,19 @@ +// +// UIView+Category.h +// BaseProject +// +// Created by my on 16/3/24. +// Copyright © 2016年 base. All rights reserved. +// + +#import + +typedef void (^TapAction)(); + +@interface UIView (Category) + +- (void)tapHandle:(TapAction)block; +- (void)shakeView; +- (void)shakeRotation:(CGFloat)rotation; + +@end diff --git a/CodeView/CodeView/UIView+Category.m b/CodeView/CodeView/UIView+Category.m new file mode 100644 index 0000000..e604735 --- /dev/null +++ b/CodeView/CodeView/UIView+Category.m @@ -0,0 +1,68 @@ +// +// UIView+Category.m +// BaseProject +// +// Created by my on 16/3/24. +// Copyright © 2016年 base. All rights reserved. +// + +#import "UIView+Category.h" +#import + +static char tapKey; + +@implementation UIView (Category) + + +#pragma mark - 添加单击手势 +- (void)tapHandle:(TapAction)block { + self.userInteractionEnabled = YES; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)]; + [self addGestureRecognizer:tap]; + objc_setAssociatedObject(self, &tapKey, block, OBJC_ASSOCIATION_COPY_NONATOMIC); +} + +- (void)tapAction:(UITapGestureRecognizer *)tap { + TapAction blcok = objc_getAssociatedObject(self, &tapKey); + if (blcok) { + blcok(); + } +} + +#pragma mark 抖动 +- (void)shakeView +{ +// CGFloat t =4.0; +// CGAffineTransform translateRight =CGAffineTransformTranslate(CGAffineTransformIdentity, t,0.0); +// CGAffineTransform translateLeft =CGAffineTransformTranslate(CGAffineTransformIdentity,-t,0.0); +// self.transform = translateLeft; +// [UIView animateWithDuration:0.07 delay:0.0 options:UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat animations:^{ +// [UIView setAnimationRepeatCount:2.0]; +// self.transform = translateRight; +// } completion:^(BOOL finished){ +// if(finished){ +// [UIView animateWithDuration:0.05 delay:0.0 options:UIViewAnimationOptionBeginFromCurrentState animations:^{ +// self.transform =CGAffineTransformIdentity; +// } completion:NULL]; +// } +// }]; + + //view抖动 + CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"transform.translation.x"]; + anim.repeatCount = 1; + anim.values = @[@-4,@4,@-4,@4]; + [self.layer addAnimation:anim forKey:nil]; + + + + +} + +- (void)shakeRotation:(CGFloat)rotation { + CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation.z"]; + anim.repeatCount = 2; + anim.duration = .2; + anim.values = @[@0,@(rotation),@0,@(-rotation),@0]; + [self.layer addAnimation:anim forKey:nil]; +} +@end diff --git a/CodeView/Info.plist b/CodeView/Info.plist new file mode 100644 index 0000000..40c6215 --- /dev/null +++ b/CodeView/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/CodeView/ViewController.h b/CodeView/ViewController.h new file mode 100644 index 0000000..0aa6025 --- /dev/null +++ b/CodeView/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// CodeView +// +// Created by my on 16/5/18. +// Copyright © 2016年 MS. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/CodeView/ViewController.m b/CodeView/ViewController.m new file mode 100644 index 0000000..688b612 --- /dev/null +++ b/CodeView/ViewController.m @@ -0,0 +1,48 @@ +// +// ViewController.m +// CodeView +// +// Created by my on 16/5/18. +// Copyright © 2016年 MS. All rights reserved. +// + +#import "ViewController.h" +#import "CodeView.h" +#import "UIView+Category.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + + + CodeView *v = [[CodeView alloc] initWithFrame:CGRectMake(0, 0, 200, 80) + num:4 + lineWith:30 + lineColor:[UIColor redColor] + textColor:[UIColor redColor] + textFont:50]; + v.center = self.view.center; + v.layer.borderWidth = 1; + v.layer.borderColor = [UIColor redColor].CGColor; + [v tapHandle:^{ + [v beginEdit]; + }]; + v.EndEditBlcok = ^(NSString *str) { + NSLog(@"%@",str); + }; + [self.view addSubview:v]; + +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git a/CodeView/main.m b/CodeView/main.m new file mode 100644 index 0000000..bffcb9a --- /dev/null +++ b/CodeView/main.m @@ -0,0 +1,16 @@ +// +// main.m +// CodeView +// +// Created by my on 16/5/18. +// Copyright © 2016年 MS. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/CodeViewTests/CodeViewTests.m b/CodeViewTests/CodeViewTests.m new file mode 100644 index 0000000..806571e --- /dev/null +++ b/CodeViewTests/CodeViewTests.m @@ -0,0 +1,39 @@ +// +// CodeViewTests.m +// CodeViewTests +// +// Created by my on 16/5/18. +// Copyright © 2016年 MS. All rights reserved. +// + +#import + +@interface CodeViewTests : XCTestCase + +@end + +@implementation CodeViewTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git a/CodeViewTests/Info.plist b/CodeViewTests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/CodeViewTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/CodeViewUITests/CodeViewUITests.m b/CodeViewUITests/CodeViewUITests.m new file mode 100644 index 0000000..2992456 --- /dev/null +++ b/CodeViewUITests/CodeViewUITests.m @@ -0,0 +1,40 @@ +// +// CodeViewUITests.m +// CodeViewUITests +// +// Created by my on 16/5/18. +// Copyright © 2016年 MS. All rights reserved. +// + +#import + +@interface CodeViewUITests : XCTestCase + +@end + +@implementation CodeViewUITests + +- (void)setUp { + [super setUp]; + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + [[[XCUIApplication alloc] init] launch]; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. +} + +@end diff --git a/CodeViewUITests/Info.plist b/CodeViewUITests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/CodeViewUITests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + +