diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS.xcodeproj/project.pbxproj" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS.xcodeproj/project.pbxproj" new file mode 100644 index 00000000..4bc366f4 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS.xcodeproj/project.pbxproj" @@ -0,0 +1,487 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 5E6EF7D41C2C33E1007CF79B /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E6EF7D31C2C33E1007CF79B /* CoreLocation.framework */; }; + 5E6EF7D61C2C345A007CF79B /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E6EF7D51C2C345A007CF79B /* MapKit.framework */; }; + F8CA34AF1B96FFC50034D6FA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F8CA34AE1B96FFC50034D6FA /* main.m */; }; + F8CA34B21B96FFC50034D6FA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F8CA34B11B96FFC50034D6FA /* AppDelegate.m */; }; + F8CA34B51B96FFC50034D6FA /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8CA34B41B96FFC50034D6FA /* ViewController.m */; }; + F8CA34BA1B96FFC50034D6FA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34B91B96FFC50034D6FA /* Images.xcassets */; }; + F8CA34BD1B96FFC50034D6FA /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34BB1B96FFC50034D6FA /* LaunchScreen.xib */; }; + F8CA34C91B96FFC50034D6FA /* MyLBSTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F8CA34C81B96FFC50034D6FA /* MyLBSTests.m */; }; + F8CA34D41B9708B70034D6FA /* ShowDataTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8CA34D31B9708B70034D6FA /* ShowDataTableViewController.m */; }; + F8CA34DF1B97096B0034D6FA /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34D61B97096B0034D6FA /* 1.png */; }; + F8CA34E01B97096B0034D6FA /* 2.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34D71B97096B0034D6FA /* 2.png */; }; + F8CA34E11B97096B0034D6FA /* 3.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34D81B97096B0034D6FA /* 3.png */; }; + F8CA34E21B97096B0034D6FA /* 4.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34D91B97096B0034D6FA /* 4.png */; }; + F8CA34E31B97096B0034D6FA /* 5.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34DA1B97096B0034D6FA /* 5.png */; }; + F8CA34E41B97096B0034D6FA /* 6.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34DB1B97096B0034D6FA /* 6.png */; }; + F8CA34E51B97096B0034D6FA /* 7.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34DC1B97096B0034D6FA /* 7.png */; }; + F8CA34E61B97096B0034D6FA /* 8.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34DD1B97096B0034D6FA /* 8.png */; }; + F8CA34E71B97096B0034D6FA /* 9.png in Resources */ = {isa = PBXBuildFile; fileRef = F8CA34DE1B97096B0034D6FA /* 9.png */; }; + F8CA34EA1B9739380034D6FA /* MapViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F8CA34E91B9739380034D6FA /* MapViewController.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + F8CA34C31B96FFC50034D6FA /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F8CA34A11B96FFC50034D6FA /* Project object */; + proxyType = 1; + remoteGlobalIDString = F8CA34A81B96FFC50034D6FA; + remoteInfo = MyLBS; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 5E6EF7D31C2C33E1007CF79B /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 5E6EF7D51C2C345A007CF79B /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + F8CA34A91B96FFC50034D6FA /* MyLBS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyLBS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + F8CA34AD1B96FFC50034D6FA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F8CA34AE1B96FFC50034D6FA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + F8CA34B01B96FFC50034D6FA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + F8CA34B11B96FFC50034D6FA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + F8CA34B31B96FFC50034D6FA /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + F8CA34B41B96FFC50034D6FA /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + F8CA34B91B96FFC50034D6FA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + F8CA34BC1B96FFC50034D6FA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + F8CA34C21B96FFC50034D6FA /* MyLBSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyLBSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + F8CA34C71B96FFC50034D6FA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F8CA34C81B96FFC50034D6FA /* MyLBSTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyLBSTests.m; sourceTree = ""; }; + F8CA34D21B9708B70034D6FA /* ShowDataTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShowDataTableViewController.h; sourceTree = ""; }; + F8CA34D31B9708B70034D6FA /* ShowDataTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShowDataTableViewController.m; sourceTree = ""; }; + F8CA34D61B97096B0034D6FA /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; }; + F8CA34D71B97096B0034D6FA /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2.png; sourceTree = ""; }; + F8CA34D81B97096B0034D6FA /* 3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3.png; sourceTree = ""; }; + F8CA34D91B97096B0034D6FA /* 4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 4.png; sourceTree = ""; }; + F8CA34DA1B97096B0034D6FA /* 5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 5.png; sourceTree = ""; }; + F8CA34DB1B97096B0034D6FA /* 6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 6.png; sourceTree = ""; }; + F8CA34DC1B97096B0034D6FA /* 7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 7.png; sourceTree = ""; }; + F8CA34DD1B97096B0034D6FA /* 8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 8.png; sourceTree = ""; }; + F8CA34DE1B97096B0034D6FA /* 9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 9.png; sourceTree = ""; }; + F8CA34E81B9739380034D6FA /* MapViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapViewController.h; sourceTree = ""; }; + F8CA34E91B9739380034D6FA /* MapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapViewController.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + F8CA34A61B96FFC50034D6FA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E6EF7D61C2C345A007CF79B /* MapKit.framework in Frameworks */, + 5E6EF7D41C2C33E1007CF79B /* CoreLocation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F8CA34BF1B96FFC50034D6FA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + F8CA34A01B96FFC50034D6FA = { + isa = PBXGroup; + children = ( + 5E6EF7D51C2C345A007CF79B /* MapKit.framework */, + 5E6EF7D31C2C33E1007CF79B /* CoreLocation.framework */, + F8CA34AB1B96FFC50034D6FA /* MyLBS */, + F8CA34C51B96FFC50034D6FA /* MyLBSTests */, + F8CA34AA1B96FFC50034D6FA /* Products */, + ); + sourceTree = ""; + }; + F8CA34AA1B96FFC50034D6FA /* Products */ = { + isa = PBXGroup; + children = ( + F8CA34A91B96FFC50034D6FA /* MyLBS.app */, + F8CA34C21B96FFC50034D6FA /* MyLBSTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + F8CA34AB1B96FFC50034D6FA /* MyLBS */ = { + isa = PBXGroup; + children = ( + F8CA34D51B97096B0034D6FA /* images */, + F8CA34B01B96FFC50034D6FA /* AppDelegate.h */, + F8CA34B11B96FFC50034D6FA /* AppDelegate.m */, + F8CA34B31B96FFC50034D6FA /* ViewController.h */, + F8CA34B41B96FFC50034D6FA /* ViewController.m */, + F8CA34D21B9708B70034D6FA /* ShowDataTableViewController.h */, + F8CA34D31B9708B70034D6FA /* ShowDataTableViewController.m */, + F8CA34E81B9739380034D6FA /* MapViewController.h */, + F8CA34E91B9739380034D6FA /* MapViewController.m */, + F8CA34B91B96FFC50034D6FA /* Images.xcassets */, + F8CA34BB1B96FFC50034D6FA /* LaunchScreen.xib */, + F8CA34AC1B96FFC50034D6FA /* Supporting Files */, + ); + path = MyLBS; + sourceTree = ""; + }; + F8CA34AC1B96FFC50034D6FA /* Supporting Files */ = { + isa = PBXGroup; + children = ( + F8CA34AD1B96FFC50034D6FA /* Info.plist */, + F8CA34AE1B96FFC50034D6FA /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + F8CA34C51B96FFC50034D6FA /* MyLBSTests */ = { + isa = PBXGroup; + children = ( + F8CA34C81B96FFC50034D6FA /* MyLBSTests.m */, + F8CA34C61B96FFC50034D6FA /* Supporting Files */, + ); + path = MyLBSTests; + sourceTree = ""; + }; + F8CA34C61B96FFC50034D6FA /* Supporting Files */ = { + isa = PBXGroup; + children = ( + F8CA34C71B96FFC50034D6FA /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + F8CA34D51B97096B0034D6FA /* images */ = { + isa = PBXGroup; + children = ( + F8CA34D61B97096B0034D6FA /* 1.png */, + F8CA34D71B97096B0034D6FA /* 2.png */, + F8CA34D81B97096B0034D6FA /* 3.png */, + F8CA34D91B97096B0034D6FA /* 4.png */, + F8CA34DA1B97096B0034D6FA /* 5.png */, + F8CA34DB1B97096B0034D6FA /* 6.png */, + F8CA34DC1B97096B0034D6FA /* 7.png */, + F8CA34DD1B97096B0034D6FA /* 8.png */, + F8CA34DE1B97096B0034D6FA /* 9.png */, + ); + path = images; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + F8CA34A81B96FFC50034D6FA /* MyLBS */ = { + isa = PBXNativeTarget; + buildConfigurationList = F8CA34CC1B96FFC50034D6FA /* Build configuration list for PBXNativeTarget "MyLBS" */; + buildPhases = ( + F8CA34A51B96FFC50034D6FA /* Sources */, + F8CA34A61B96FFC50034D6FA /* Frameworks */, + F8CA34A71B96FFC50034D6FA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = MyLBS; + productName = MyLBS; + productReference = F8CA34A91B96FFC50034D6FA /* MyLBS.app */; + productType = "com.apple.product-type.application"; + }; + F8CA34C11B96FFC50034D6FA /* MyLBSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = F8CA34CF1B96FFC50034D6FA /* Build configuration list for PBXNativeTarget "MyLBSTests" */; + buildPhases = ( + F8CA34BE1B96FFC50034D6FA /* Sources */, + F8CA34BF1B96FFC50034D6FA /* Frameworks */, + F8CA34C01B96FFC50034D6FA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + F8CA34C41B96FFC50034D6FA /* PBXTargetDependency */, + ); + name = MyLBSTests; + productName = MyLBSTests; + productReference = F8CA34C21B96FFC50034D6FA /* MyLBSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + F8CA34A11B96FFC50034D6FA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0640; + ORGANIZATIONNAME = helmsmanmac; + TargetAttributes = { + F8CA34A81B96FFC50034D6FA = { + CreatedOnToolsVersion = 6.4; + }; + F8CA34C11B96FFC50034D6FA = { + CreatedOnToolsVersion = 6.4; + TestTargetID = F8CA34A81B96FFC50034D6FA; + }; + }; + }; + buildConfigurationList = F8CA34A41B96FFC50034D6FA /* Build configuration list for PBXProject "MyLBS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = F8CA34A01B96FFC50034D6FA; + productRefGroup = F8CA34AA1B96FFC50034D6FA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + F8CA34A81B96FFC50034D6FA /* MyLBS */, + F8CA34C11B96FFC50034D6FA /* MyLBSTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + F8CA34A71B96FFC50034D6FA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F8CA34E71B97096B0034D6FA /* 9.png in Resources */, + F8CA34E61B97096B0034D6FA /* 8.png in Resources */, + F8CA34E51B97096B0034D6FA /* 7.png in Resources */, + F8CA34E21B97096B0034D6FA /* 4.png in Resources */, + F8CA34E11B97096B0034D6FA /* 3.png in Resources */, + F8CA34DF1B97096B0034D6FA /* 1.png in Resources */, + F8CA34BD1B96FFC50034D6FA /* LaunchScreen.xib in Resources */, + F8CA34E31B97096B0034D6FA /* 5.png in Resources */, + F8CA34E01B97096B0034D6FA /* 2.png in Resources */, + F8CA34E41B97096B0034D6FA /* 6.png in Resources */, + F8CA34BA1B96FFC50034D6FA /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F8CA34C01B96FFC50034D6FA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + F8CA34A51B96FFC50034D6FA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F8CA34B51B96FFC50034D6FA /* ViewController.m in Sources */, + F8CA34B21B96FFC50034D6FA /* AppDelegate.m in Sources */, + F8CA34EA1B9739380034D6FA /* MapViewController.m in Sources */, + F8CA34D41B9708B70034D6FA /* ShowDataTableViewController.m in Sources */, + F8CA34AF1B96FFC50034D6FA /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F8CA34BE1B96FFC50034D6FA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F8CA34C91B96FFC50034D6FA /* MyLBSTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + F8CA34C41B96FFC50034D6FA /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = F8CA34A81B96FFC50034D6FA /* MyLBS */; + targetProxy = F8CA34C31B96FFC50034D6FA /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + F8CA34BB1B96FFC50034D6FA /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + F8CA34BC1B96FFC50034D6FA /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + F8CA34CA1B96FFC50034D6FA /* 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-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = 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_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.4; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + F8CA34CB1B96FFC50034D6FA /* 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 = 8.4; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + F8CA34CD1B96FFC50034D6FA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MyLBS/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + F8CA34CE1B96FFC50034D6FA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = MyLBS/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + F8CA34D01B96FFC50034D6FA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = MyLBSTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyLBS.app/MyLBS"; + }; + name = Debug; + }; + F8CA34D11B96FFC50034D6FA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = MyLBSTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyLBS.app/MyLBS"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + F8CA34A41B96FFC50034D6FA /* Build configuration list for PBXProject "MyLBS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F8CA34CA1B96FFC50034D6FA /* Debug */, + F8CA34CB1B96FFC50034D6FA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F8CA34CC1B96FFC50034D6FA /* Build configuration list for PBXNativeTarget "MyLBS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F8CA34CD1B96FFC50034D6FA /* Debug */, + F8CA34CE1B96FFC50034D6FA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + F8CA34CF1B96FFC50034D6FA /* Build configuration list for PBXNativeTarget "MyLBSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F8CA34D01B96FFC50034D6FA /* Debug */, + F8CA34D11B96FFC50034D6FA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = F8CA34A11B96FFC50034D6FA /* Project object */; +} diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS.xcodeproj/project.xcworkspace/contents.xcworkspacedata" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS.xcodeproj/project.xcworkspace/contents.xcworkspacedata" new file mode 100644 index 00000000..86f8bc30 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS.xcodeproj/project.xcworkspace/contents.xcworkspacedata" @@ -0,0 +1,7 @@ + + + + + diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/AppDelegate.h" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/AppDelegate.h" new file mode 100644 index 00000000..bb1939fb --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/AppDelegate.h" @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/AppDelegate.m" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/AppDelegate.m" new file mode 100644 index 00000000..118da471 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/AppDelegate.m" @@ -0,0 +1,52 @@ +// +// AppDelegate.m +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import "AppDelegate.h" +#import "ViewController.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + + _window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + ViewController * viewController = [[ViewController alloc] init]; + UINavigationController * navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; + [_window setRootViewController:navigationController]; + [_window makeKeyAndVisible]; + + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and 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/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Base.lproj/LaunchScreen.xib" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Base.lproj/LaunchScreen.xib" new file mode 100644 index 00000000..562a59a7 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Base.lproj/LaunchScreen.xib" @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Images.xcassets/AppIcon.appiconset/Contents.json" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Images.xcassets/AppIcon.appiconset/Contents.json" new file mode 100644 index 00000000..118c98f7 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/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/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Info.plist" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Info.plist" new file mode 100644 index 00000000..be1ff2a7 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/Info.plist" @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + Code.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/MapViewController.h" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/MapViewController.h" new file mode 100644 index 00000000..aeffd94f --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/MapViewController.h" @@ -0,0 +1,17 @@ +// +// MapViewController.h +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import +#import + +@interface MapViewController : UIViewController + +@property (nonatomic, strong) MKMapItem * mapItem; +@property (nonatomic) MKCoordinateRegion region; + +@end diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/MapViewController.m" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/MapViewController.m" new file mode 100644 index 00000000..a7a22d23 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/MapViewController.m" @@ -0,0 +1,109 @@ +// +// MapViewController.m +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import "MapViewController.h" + +@interface MapViewController () + +@property (nonatomic, strong) MKMapView * mapView; +@property (nonatomic, strong) CLLocationManager * locationManager; + +@end + +@implementation MapViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor whiteColor]; + // Do any additional setup after loading the view. + [self setTitle:@"线路导航"]; + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" + style:UIBarButtonItemStylePlain + target:self + action:@selector(returnPre)]; + + _mapView = [[MKMapView alloc] initWithFrame:self.view.frame]; + [_mapView setShowsUserLocation:YES]; + [_mapView setDelegate:self]; + [self.view addSubview:_mapView]; + + MKPointAnnotation * annotation = [[MKPointAnnotation alloc] init]; + annotation.coordinate = self.mapItem.placemark.location.coordinate; + [annotation setTitle:self.mapItem.name]; + [_mapView addAnnotation:annotation]; + [_mapView setRegion:[_mapView regionThatFits:self.region] animated:YES]; + + if(_locationManager == nil){ + _locationManager = [[CLLocationManager alloc] init]; + + if([_locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]){ + [_locationManager requestWhenInUseAuthorization]; + } + } + +// 确定自己的位置,并绘制一条路径到目的地 + [self createLineFromCurrentSite:[MKMapItem mapItemForCurrentLocation] to:self.mapItem]; +} + +- (void)createLineFromCurrentSite:(MKMapItem *)fromItem to:(MKMapItem *)toItem { + + MKDirectionsRequest * request = [[MKDirectionsRequest alloc] init]; +// no表示只显示一条路径 + [request setRequestsAlternateRoutes:NO]; + [request setSource:fromItem]; + [request setDestination:toItem]; + MKDirections * directions = [[MKDirections alloc] initWithRequest:request]; + +// if(directions.calculating){ +// [directions cancel]; +// } + + [directions calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse *response, NSError *error) { + if(error || response.routes == 0){ + NSLog(@"error:%@",error); + }else{ + for(MKRoute * rote in response.routes){ + [_mapView addOverlay:rote.polyline level:MKOverlayLevelAboveRoads]; + for(MKRouteStep * step in rote.steps){ + NSLog(@"step:%@",step.instructions); + } + } + } + }]; +} + +- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id)overlay { + if([overlay isKindOfClass:[MKPolyline class]]){ + MKPolylineRenderer * render = [[MKPolylineRenderer alloc] initWithPolyline:overlay]; + [render setLineWidth:5.0]; + [render setStrokeColor:[UIColor redColor]]; + return render; + }else return nil; +} + + +- (void)returnPre { + [self.navigationController popViewControllerAnimated:YES]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ShowDataTableViewController.h" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ShowDataTableViewController.h" new file mode 100644 index 00000000..a62af650 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ShowDataTableViewController.h" @@ -0,0 +1,15 @@ +// +// ShowDataTableViewController.h +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import + +@interface ShowDataTableViewController : UITableViewController + +@property (nonatomic, strong) NSString * searchString; + +@end diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ShowDataTableViewController.m" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ShowDataTableViewController.m" new file mode 100644 index 00000000..983aff18 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ShowDataTableViewController.m" @@ -0,0 +1,211 @@ +// +// ShowDataTableViewController.m +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import "ShowDataTableViewController.h" +#import "MapViewController.h" +#import + +@interface ShowDataTableViewController () + +@property (nonatomic, strong) NSMutableArray * talbeViewArray; +@property (nonatomic, strong) MKLocalSearch * localSearch; +@property (nonatomic) MKCoordinateRegion currentRegion; + +//@property (nonatomic,retain) CLLocationManager * locationManager; +//@property (strong, nonatomic) CLLocation *checkinLocation; +//@property (strong, nonatomic) NSString *currentLatitude; //纬度 +//@property (strong, nonatomic) NSString *currentLongitude; //经度 + + + +@end + +static NSString * tableViewKey = @"key"; + +@implementation ShowDataTableViewController + +- (instancetype)initWithStyle:(UITableViewStyle)style { + self = [super initWithStyle:style]; + if(self){ + _talbeViewArray = [[NSMutableArray alloc] init]; + } + + return self; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.navigationController setNavigationBarHidden:NO]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [self setTitle:@"地点选择"]; + [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:tableViewKey]; +// [_talbeViewArray addObject:@{@"siteName":@"地点一", +// @"siteLocation":@"", +// }]; + +// 116.500855,39.930871 + +// if(_localSearch.searching){ +// [_localSearch cancel]; +// } +// +// if ([CLLocationManager locationServicesEnabled]) { +// self.locationManager = [[CLLocationManager alloc] init]; +// self.locationManager.delegate = self; +// }else{ +// UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"警告" message:@"无法进行定位操作" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil]; +// [alert show]; +// } +// [self.locationManager startUpdatingLocation]; + + + if(_localSearch != nil){ + _localSearch = nil; + } + +// 添加一个标签控件,用于显示 "查找中..." + UILabel * loadingLabel = [[UILabel alloc] initWithFrame:CGRectMake((self.view.frame.size.width-100)/2, (self.view.frame.size.height-20)/2 -44, 100, 20)]; + [loadingLabel setText:@"查找中..."]; + [self.view addSubview:loadingLabel]; + [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; + + MKLocalSearchRequest * searchRequest = [[MKLocalSearchRequest alloc] init]; + searchRequest.naturalLanguageQuery = self.searchString; +// 围绕39.930871, 116.500855这个中心点上下左右2000米的地域 +// NSLog(@" 去你妹的%lf %lf",self.currentLatitude.doubleValue,self.currentLongitude.doubleValue); +// NSLog(@" 去你妹的%@ %@",self.currentLatitude,self.currentLongitude); +// 29.888556,121.64045 + MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(CLLocationCoordinate2DMake(29.888556,121.64045), 2000, 2000); + searchRequest.region = region; + + _localSearch = [[MKLocalSearch alloc] initWithRequest:searchRequest]; + [_localSearch startWithCompletionHandler:^(MKLocalSearchResponse *response, NSError *error) { + + [loadingLabel removeFromSuperview]; + + if(response.mapItems.count == 0 || error){ + NSLog(@"error:%@",error); + }else{ + [_talbeViewArray addObjectsFromArray:response.mapItems]; + self.currentRegion = response.boundingRegion; + [self.tableView setBounces:YES]; + [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine]; + [self.tableView reloadData]; + } + }]; + + // Uncomment the following line to preserve selection between presentations. + // self.clearsSelectionOnViewWillAppear = NO; + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(returnPre)]; +} + + + + +//-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations{ +// self.checkinLocation = [locations lastObject]; +// CLLocationCoordinate2D cool = self.checkinLocation.coordinate; +// self.currentLatitude = [NSString stringWithFormat:@"%.5f",cool.latitude]; +// self.currentLongitude = [NSString stringWithFormat:@"%.5f",cool.longitude]; +// +// NSLog(@"%@,%@",self.currentLatitude,self.currentLongitude); +//} + + + + +- (void)returnPre { + [self.navigationController popViewControllerAnimated:YES]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - Table view data source + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { +#warning Potentially incomplete method implementation. + // Return the number of sections. + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { +#warning Incomplete method implementation. + // Return the number of rows in the section. + return _talbeViewArray.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:tableViewKey forIndexPath:indexPath]; + + MKMapItem * item = _talbeViewArray[indexPath.row]; + + [cell.textLabel setText:item.name]; + + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + MapViewController * mapViewController = [[MapViewController alloc] init]; + mapViewController.mapItem = _talbeViewArray[indexPath.row]; + mapViewController.region = self.currentRegion; + [self.navigationController pushViewController:mapViewController animated:YES]; +} + +/* +// Override to support conditional editing of the table view. +- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return YES; +} +*/ + +/* +// Override to support editing the table view. +- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + if (editingStyle == UITableViewCellEditingStyleDelete) { + // Delete the row from the data source + [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; + } else if (editingStyle == UITableViewCellEditingStyleInsert) { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } +} +*/ + +/* +// Override to support rearranging the table view. +- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { +} +*/ + +/* +// Override to support conditional rearranging of the table view. +- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { + // Return NO if you do not want the item to be re-orderable. + return YES; +} +*/ + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ViewController.h" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ViewController.h" new file mode 100644 index 00000000..c3ddf21b --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ViewController.h" @@ -0,0 +1,15 @@ +// +// ViewController.h +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import + +@interface ViewController : UIViewController + + +@end + diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ViewController.m" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ViewController.m" new file mode 100644 index 00000000..5c2f73c2 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/ViewController.m" @@ -0,0 +1,168 @@ +// +// ViewController.m +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import "ViewController.h" +#import "ShowDataTableViewController.h" + + +typedef NS_ENUM(NSUInteger, FunctionSelet) { + LBS_GAME = 0, + LBS_EAT, + LBS_REST, + LBSE_BUSSION, + LBS_PURCHASE, + LBS_OTHER1, + LBS_OTHER2, + LBS_OTHER3, + LBS_OTHER4, +}; + +@interface ViewController () + +@property (nonatomic, strong) UISearchBar * searchBar; + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.view.backgroundColor = [UIColor orangeColor]; + _searchBar = [[UISearchBar alloc] init]; + [_searchBar setDelegate:self]; + [_searchBar setPlaceholder:@"请输入您要查找的内容"]; + [_searchBar setBackgroundImage:[self createImageFromColor:[UIColor orangeColor] imageSize:CGSizeMake(self.view.frame.size.width, 50)]]; +// 设置成不可自动布局 + [_searchBar setTranslatesAutoresizingMaskIntoConstraints:NO]; + [self.view addSubview:_searchBar]; +// [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_searchBar]|" +// options:0 +// metrics:nil +// views:NSDictionaryOfVariableBindings(_searchBar)]]; +// +// [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-20-[_searchBar]|" +// options:0 +// metrics:nil +// views:NSDictionaryOfVariableBindings(_searchBar)]]; +// + NSUInteger dataArr[] = {LBS_GAME,LBS_EAT,LBS_REST,LBSE_BUSSION,LBS_PURCHASE,LBS_OTHER1,LBS_OTHER2,LBS_OTHER3,LBS_OTHER4}; + + + + CGFloat btnSize = 80.0; + CGFloat spacing = (self.view.frame.size.width - 3*btnSize) / 4; + + for(int i = 0; i < 9; i++){ + UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom]; + [btn setTag:dataArr[i]]; + [btn setTranslatesAutoresizingMaskIntoConstraints:NO]; + [btn setBackgroundImage:[UIImage imageNamed:[NSString stringWithFormat:@"%d",i+1]] forState:UIControlStateNormal]; + [btn addTarget:self action:@selector(theBtnPressed:) forControlEvents:UIControlEventTouchUpInside]; + [self.view addSubview:btn]; + + [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-btnH-[btn(btnW)]" + options:0 + metrics:@{@"btnH":@(i%3*(btnSize+spacing)+spacing), + @"btnW":@(btnSize)} + views:NSDictionaryOfVariableBindings(btn)]]; + [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-btnV-[btn(btnH)]" + options:0 + metrics:@{@"btnV":@(80+i/3*(btnSize+spacing)+spacing), + @"btnH":@(btnSize)} + views:NSDictionaryOfVariableBindings(btn)]]; + } + + [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_searchBar]|" + options:0 + metrics:nil + views:NSDictionaryOfVariableBindings(_searchBar)]]; + [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-20-[_searchBar]" + options:0 + metrics:nil + views:NSDictionaryOfVariableBindings(_searchBar)]]; +} + +- (void)theBtnPressed:(id)sender { + + UIButton * btn = (UIButton *)sender; + NSString * userSelectString = nil; + switch(btn.tag){ + case LBS_GAME: + userSelectString = @"休闲娱乐"; + NSLog(@"游戏"); + break; + case LBS_EAT: + userSelectString = @"餐饮"; + NSLog(@"吃喝"); + break; + case LBS_REST: + userSelectString = @"电影院"; + NSLog(@"休息"); + break; + case LBSE_BUSSION: + userSelectString = @"逛街"; + NSLog(@"逛街"); + break; + case LBS_PURCHASE: + userSelectString = @"购物"; + NSLog(@"购物"); + break; + default: + userSelectString = @"other"; + break; + } + + [self gotoShowDataView:userSelectString]; +} + +- (UIImage *)createImageFromColor:(UIColor *)color imageSize:(CGSize)size { + CGRect frame = CGRectMake(0, 0, size.width, size.height); + UIGraphicsBeginImageContext(size); + CGContextRef context = UIGraphicsGetCurrentContext(); + CGContextSetFillColorWithColor(context, [color CGColor]); + CGContextFillRect(context, frame); + UIImage * image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return image; +} + +- (void)gotoShowDataView:(NSString *)str { + ShowDataTableViewController * showDataController = [[ShowDataTableViewController alloc] initWithStyle:UITableViewStylePlain]; + showDataController.searchString = str; + [self.navigationController pushViewController:showDataController animated:YES]; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.navigationController setNavigationBarHidden:YES]; +} + +#pragma mark -SearchBarDelegate +- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { + [_searchBar resignFirstResponder]; + + NSString * newString = [searchBar.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + + if(newString.length == 0){ + return; + } + + [self gotoShowDataView:newString]; +} + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { + [_searchBar resignFirstResponder]; +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +@end diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/1.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/1.png" new file mode 100755 index 00000000..adc531cf Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/1.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/2.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/2.png" new file mode 100755 index 00000000..2e37ee1b Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/2.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/3.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/3.png" new file mode 100755 index 00000000..311a6d0c Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/3.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/4.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/4.png" new file mode 100755 index 00000000..a1a9929e Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/4.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/5.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/5.png" new file mode 100755 index 00000000..5f6a7ce1 Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/5.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/6.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/6.png" new file mode 100755 index 00000000..f204be9a Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/6.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/7.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/7.png" new file mode 100755 index 00000000..13fa45a8 Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/7.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/8.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/8.png" new file mode 100755 index 00000000..bbcd136b Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/8.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/9.png" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/9.png" new file mode 100755 index 00000000..40caae68 Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/images/9.png" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/main.m" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/main.m" new file mode 100644 index 00000000..59de7d3c --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBS/main.m" @@ -0,0 +1,16 @@ +// +// main.m +// MyLBS +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. 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/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBSTests/Info.plist" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBSTests/Info.plist" new file mode 100644 index 00000000..43334158 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBSTests/Info.plist" @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + Code.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBSTests/MyLBSTests.m" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBSTests/MyLBSTests.m" new file mode 100644 index 00000000..1e5b14f5 --- /dev/null +++ "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/MyLBS/MyLBSTests/MyLBSTests.m" @@ -0,0 +1,40 @@ +// +// MyLBSTests.m +// MyLBSTests +// +// Created by helmsmanmac on 15/9/2. +// Copyright (c) 2015年 helmsmanmac. All rights reserved. +// + +#import +#import + +@interface MyLBSTests : XCTestCase + +@end + +@implementation MyLBSTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testExample { + // This is an example of a functional test case. + XCTAssert(YES, @"Pass"); +} + +- (void)testPerformanceExample { + // This is an example of a performance test case. + [self measureBlock:^{ + // Put the code you want to measure the time of here. + }]; +} + +@end diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/iOS\345\244\247\344\275\234\344\270\232.ppt" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/iOS\345\244\247\344\275\234\344\270\232.ppt" new file mode 100644 index 00000000..ab273250 Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/iOS\345\244\247\344\275\234\344\270\232.ppt" differ diff --git "a/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/\350\257\264\346\230\216\346\226\207\346\241\243.doc" "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/\350\257\264\346\230\216\346\226\207\346\241\243.doc" new file mode 100644 index 00000000..fb45b5fc Binary files /dev/null and "b/21551125\346\236\227\346\263\242/ios\345\244\247\344\275\234\344\270\232/\350\257\264\346\230\216\346\226\207\346\241\243.doc" differ