├── LICENSE ├── README.md ├── changeLocation ├── Podfile ├── changeLocation.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── liusong.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── liusong.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── changeLocation.xcscheme │ │ └── xcschememanagement.plist ├── changeLocation │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── NSString+Extension.h │ ├── NSString+Extension.m │ ├── Toast(吐司) │ │ ├── .svn │ │ │ ├── all-wcprops │ │ │ ├── entries │ │ │ ├── prop-base │ │ │ │ ├── UIToast.h.svn-base │ │ │ │ └── UIToast.m.svn-base │ │ │ └── text-base │ │ │ │ ├── UIToast.h.svn-base │ │ │ │ └── UIToast.m.svn-base │ │ ├── UIToast.h │ │ └── UIToast.m │ ├── UploadImageView.h │ ├── UploadImageView.m │ ├── ViewController.h │ ├── ViewController.m │ ├── main.m │ └── 分类 │ │ ├── CLLocation+GPSDictionary.h │ │ ├── CLLocation+GPSDictionary.m │ │ ├── NSDictionary+CLLocation.h │ │ └── NSDictionary+CLLocation.m ├── changeLocationTests │ ├── Info.plist │ └── changeLocationTests.m └── changeLocationUITests │ ├── Info.plist │ └── changeLocationUITests.m └── images ├── IMG_0093.PNG └── IMG_0094.PNG /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LSChangeLocation 2 | 仅适用于修改iOS微信朋友圈,空间照片的位置,经纬度可以自己随便写 3 | ![image](https://github.com/lsmakethebest/LSChangeLocation/blob/master/images/IMG_0093.PNG) 4 | ![image](https://github.com/lsmakethebest/LSChangeLocation/blob/master/images/IMG_0094.PNG) -------------------------------------------------------------------------------- /changeLocation/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'changeLocation' do 5 | # Uncomment this line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | # Pods for changeLocation 9 | source 'https://github.com/CocoaPods/Specs.git' 10 | platform :ios, '8.1' 11 | pod 'GoogleMaps' 12 | 13 | 14 | target 'changeLocationTests' do 15 | inherit! :search_paths 16 | # Pods for testing 17 | end 18 | 19 | target 'changeLocationUITests' do 20 | inherit! :search_paths 21 | # Pods for testing 22 | end 23 | 24 | end 25 | -------------------------------------------------------------------------------- /changeLocation/changeLocation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 284A19611DC6E3F0003ECEA8 /* changeLocationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 284A19601DC6E3F0003ECEA8 /* changeLocationTests.m */; }; 11 | 284A196C1DC6E3F1003ECEA8 /* changeLocationUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 284A196B1DC6E3F1003ECEA8 /* changeLocationUITests.m */; }; 12 | 284A197E1DC6E8A1003ECEA8 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A197D1DC6E8A1003ECEA8 /* AssetsLibrary.framework */; }; 13 | 284A19801DC6F13F003ECEA8 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A197F1DC6F13F003ECEA8 /* ImageIO.framework */; }; 14 | 284A1ABD1DC7323C003ECEA8 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ABC1DC7323C003ECEA8 /* Accelerate.framework */; }; 15 | 284A1ABF1DC73245003ECEA8 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ABE1DC73245003ECEA8 /* CoreBluetooth.framework */; }; 16 | 284A1AC11DC7324C003ECEA8 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AC01DC7324C003ECEA8 /* Security.framework */; }; 17 | 284A1AC31DC73252003ECEA8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AC21DC73252003ECEA8 /* UIKit.framework */; }; 18 | 284A1AC51DC7325B003ECEA8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AC41DC7325B003ECEA8 /* CoreGraphics.framework */; }; 19 | 284A1AC71DC73261003ECEA8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AC61DC73261003ECEA8 /* Foundation.framework */; }; 20 | 284A1AC91DC7326C003ECEA8 /* libobjc.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AC81DC7326C003ECEA8 /* libobjc.tbd */; }; 21 | 284A1ACB1DC73274003ECEA8 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ACA1DC73274003ECEA8 /* SystemConfiguration.framework */; }; 22 | 284A1ACD1DC7327A003ECEA8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ACC1DC7327A003ECEA8 /* QuartzCore.framework */; }; 23 | 284A1ACF1DC73286003ECEA8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ACE1DC73286003ECEA8 /* OpenGLES.framework */; }; 24 | 284A1AD11DC7328D003ECEA8 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AD01DC7328D003ECEA8 /* libz.tbd */; }; 25 | 284A1AD31DC732AF003ECEA8 /* libicucore.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AD21DC732AF003ECEA8 /* libicucore.tbd */; }; 26 | 284A1AD51DC732B7003ECEA8 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AD41DC732B7003ECEA8 /* libc++.tbd */; }; 27 | 284A1AD71DC732BD003ECEA8 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AD61DC732BD003ECEA8 /* GLKit.framework */; }; 28 | 284A1AD91DC732C3003ECEA8 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1AD81DC732C3003ECEA8 /* CoreText.framework */; }; 29 | 284A1ADB1DC732CA003ECEA8 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ADA1DC732CA003ECEA8 /* CoreLocation.framework */; }; 30 | 284A1ADD1DC732D0003ECEA8 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ADC1DC732D0003ECEA8 /* CoreData.framework */; }; 31 | 284A1ADF1DC732D5003ECEA8 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 284A1ADE1DC732D5003ECEA8 /* AVFoundation.framework */; }; 32 | 284A1C231DC73460003ECEA8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 284A1BA51DC73460003ECEA8 /* AppDelegate.m */; }; 33 | 284A1C241DC73460003ECEA8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 284A1BA61DC73460003ECEA8 /* Assets.xcassets */; }; 34 | 284A1C251DC73460003ECEA8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 284A1BA71DC73460003ECEA8 /* LaunchScreen.storyboard */; }; 35 | 284A1C261DC73460003ECEA8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 284A1BA91DC73460003ECEA8 /* Main.storyboard */; }; 36 | 284A1C281DC73460003ECEA8 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 284A1BAD1DC73460003ECEA8 /* Info.plist */; }; 37 | 284A1C291DC73460003ECEA8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 284A1BAE1DC73460003ECEA8 /* main.m */; }; 38 | 284A1C2B1DC73460003ECEA8 /* UIToast.m in Sources */ = {isa = PBXBuildFile; fileRef = 284A1BB31DC73460003ECEA8 /* UIToast.m */; }; 39 | 284A1C2C1DC73460003ECEA8 /* UploadImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 284A1BB51DC73460003ECEA8 /* UploadImageView.m */; }; 40 | 284A1C2D1DC73460003ECEA8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 284A1BB71DC73460003ECEA8 /* ViewController.m */; }; 41 | 288970BE1DE28DC800170684 /* CLLocation+GPSDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 288970BB1DE28DC800170684 /* CLLocation+GPSDictionary.m */; }; 42 | 288970BF1DE28DC800170684 /* NSDictionary+CLLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 288970BD1DE28DC800170684 /* NSDictionary+CLLocation.m */; }; 43 | 28E57ED21DC7480A007246DE /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28E57ED11DC7480A007246DE /* CoreTelephony.framework */; }; 44 | 28E57ED81DC74B0F007246DE /* NSString+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 28E57ED71DC74B0F007246DE /* NSString+Extension.m */; }; 45 | /* End PBXBuildFile section */ 46 | 47 | /* Begin PBXContainerItemProxy section */ 48 | 284A195D1DC6E3F0003ECEA8 /* PBXContainerItemProxy */ = { 49 | isa = PBXContainerItemProxy; 50 | containerPortal = 284A193B1DC6E3EE003ECEA8 /* Project object */; 51 | proxyType = 1; 52 | remoteGlobalIDString = 284A19421DC6E3EE003ECEA8; 53 | remoteInfo = changeLocation; 54 | }; 55 | 284A19681DC6E3F1003ECEA8 /* PBXContainerItemProxy */ = { 56 | isa = PBXContainerItemProxy; 57 | containerPortal = 284A193B1DC6E3EE003ECEA8 /* Project object */; 58 | proxyType = 1; 59 | remoteGlobalIDString = 284A19421DC6E3EE003ECEA8; 60 | remoteInfo = changeLocation; 61 | }; 62 | /* End PBXContainerItemProxy section */ 63 | 64 | /* Begin PBXFileReference section */ 65 | 284A19431DC6E3EF003ECEA8 /* changeLocation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = changeLocation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | 284A195C1DC6E3F0003ECEA8 /* changeLocationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = changeLocationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 67 | 284A19601DC6E3F0003ECEA8 /* changeLocationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = changeLocationTests.m; sourceTree = ""; }; 68 | 284A19621DC6E3F1003ECEA8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | 284A19671DC6E3F1003ECEA8 /* changeLocationUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = changeLocationUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 284A196B1DC6E3F1003ECEA8 /* changeLocationUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = changeLocationUITests.m; sourceTree = ""; }; 71 | 284A196D1DC6E3F1003ECEA8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 72 | 284A197D1DC6E8A1003ECEA8 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; 73 | 284A197F1DC6F13F003ECEA8 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 74 | 284A1ABC1DC7323C003ECEA8 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 75 | 284A1ABE1DC73245003ECEA8 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; }; 76 | 284A1AC01DC7324C003ECEA8 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 77 | 284A1AC21DC73252003ECEA8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 78 | 284A1AC41DC7325B003ECEA8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 79 | 284A1AC61DC73261003ECEA8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 80 | 284A1AC81DC7326C003ECEA8 /* libobjc.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libobjc.tbd; path = usr/lib/libobjc.tbd; sourceTree = SDKROOT; }; 81 | 284A1ACA1DC73274003ECEA8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 82 | 284A1ACC1DC7327A003ECEA8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 83 | 284A1ACE1DC73286003ECEA8 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; 84 | 284A1AD01DC7328D003ECEA8 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 85 | 284A1AD21DC732AF003ECEA8 /* libicucore.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libicucore.tbd; path = usr/lib/libicucore.tbd; sourceTree = SDKROOT; }; 86 | 284A1AD41DC732B7003ECEA8 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; 87 | 284A1AD61DC732BD003ECEA8 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; 88 | 284A1AD81DC732C3003ECEA8 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; }; 89 | 284A1ADA1DC732CA003ECEA8 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 90 | 284A1ADC1DC732D0003ECEA8 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 91 | 284A1ADE1DC732D5003ECEA8 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 92 | 284A1BA41DC73460003ECEA8 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 93 | 284A1BA51DC73460003ECEA8 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 94 | 284A1BA61DC73460003ECEA8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 95 | 284A1BA81DC73460003ECEA8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 96 | 284A1BAA1DC73460003ECEA8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97 | 284A1BAD1DC73460003ECEA8 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 98 | 284A1BAE1DC73460003ECEA8 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 99 | 284A1BB21DC73460003ECEA8 /* UIToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIToast.h; sourceTree = ""; }; 100 | 284A1BB31DC73460003ECEA8 /* UIToast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIToast.m; sourceTree = ""; }; 101 | 284A1BB41DC73460003ECEA8 /* UploadImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UploadImageView.h; sourceTree = ""; }; 102 | 284A1BB51DC73460003ECEA8 /* UploadImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UploadImageView.m; sourceTree = ""; }; 103 | 284A1BB61DC73460003ECEA8 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 104 | 284A1BB71DC73460003ECEA8 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 105 | 288970BA1DE28DC800170684 /* CLLocation+GPSDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CLLocation+GPSDictionary.h"; sourceTree = ""; }; 106 | 288970BB1DE28DC800170684 /* CLLocation+GPSDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CLLocation+GPSDictionary.m"; sourceTree = ""; }; 107 | 288970BC1DE28DC800170684 /* NSDictionary+CLLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CLLocation.h"; sourceTree = ""; }; 108 | 288970BD1DE28DC800170684 /* NSDictionary+CLLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CLLocation.m"; sourceTree = ""; }; 109 | 28E57EC91DC743EC007246DE /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 110 | 28E57ED11DC7480A007246DE /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 111 | 28E57ED61DC74B0F007246DE /* NSString+Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Extension.h"; sourceTree = ""; }; 112 | 28E57ED71DC74B0F007246DE /* NSString+Extension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Extension.m"; sourceTree = ""; }; 113 | /* End PBXFileReference section */ 114 | 115 | /* Begin PBXFrameworksBuildPhase section */ 116 | 284A19401DC6E3EE003ECEA8 /* Frameworks */ = { 117 | isa = PBXFrameworksBuildPhase; 118 | buildActionMask = 2147483647; 119 | files = ( 120 | 28E57ED21DC7480A007246DE /* CoreTelephony.framework in Frameworks */, 121 | 284A1ADF1DC732D5003ECEA8 /* AVFoundation.framework in Frameworks */, 122 | 284A1ADD1DC732D0003ECEA8 /* CoreData.framework in Frameworks */, 123 | 284A1ADB1DC732CA003ECEA8 /* CoreLocation.framework in Frameworks */, 124 | 284A1AD91DC732C3003ECEA8 /* CoreText.framework in Frameworks */, 125 | 284A1AD71DC732BD003ECEA8 /* GLKit.framework in Frameworks */, 126 | 284A1AD51DC732B7003ECEA8 /* libc++.tbd in Frameworks */, 127 | 284A1AD31DC732AF003ECEA8 /* libicucore.tbd in Frameworks */, 128 | 284A1AD11DC7328D003ECEA8 /* libz.tbd in Frameworks */, 129 | 284A1ACF1DC73286003ECEA8 /* OpenGLES.framework in Frameworks */, 130 | 284A1ACD1DC7327A003ECEA8 /* QuartzCore.framework in Frameworks */, 131 | 284A1ACB1DC73274003ECEA8 /* SystemConfiguration.framework in Frameworks */, 132 | 284A1AC91DC7326C003ECEA8 /* libobjc.tbd in Frameworks */, 133 | 284A1AC71DC73261003ECEA8 /* Foundation.framework in Frameworks */, 134 | 284A1AC51DC7325B003ECEA8 /* CoreGraphics.framework in Frameworks */, 135 | 284A1AC31DC73252003ECEA8 /* UIKit.framework in Frameworks */, 136 | 284A1AC11DC7324C003ECEA8 /* Security.framework in Frameworks */, 137 | 284A1ABF1DC73245003ECEA8 /* CoreBluetooth.framework in Frameworks */, 138 | 284A1ABD1DC7323C003ECEA8 /* Accelerate.framework in Frameworks */, 139 | 284A19801DC6F13F003ECEA8 /* ImageIO.framework in Frameworks */, 140 | 284A197E1DC6E8A1003ECEA8 /* AssetsLibrary.framework in Frameworks */, 141 | ); 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | 284A19591DC6E3F0003ECEA8 /* Frameworks */ = { 145 | isa = PBXFrameworksBuildPhase; 146 | buildActionMask = 2147483647; 147 | files = ( 148 | ); 149 | runOnlyForDeploymentPostprocessing = 0; 150 | }; 151 | 284A19641DC6E3F1003ECEA8 /* Frameworks */ = { 152 | isa = PBXFrameworksBuildPhase; 153 | buildActionMask = 2147483647; 154 | files = ( 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXFrameworksBuildPhase section */ 159 | 160 | /* Begin PBXGroup section */ 161 | 284A193A1DC6E3EE003ECEA8 = { 162 | isa = PBXGroup; 163 | children = ( 164 | 284A1AE01DC7345F003ECEA8 /* changeLocation */, 165 | 284A195F1DC6E3F0003ECEA8 /* changeLocationTests */, 166 | 284A196A1DC6E3F1003ECEA8 /* changeLocationUITests */, 167 | 284A19441DC6E3EF003ECEA8 /* Products */, 168 | 284A197C1DC6E8A1003ECEA8 /* Frameworks */, 169 | ); 170 | sourceTree = ""; 171 | }; 172 | 284A19441DC6E3EF003ECEA8 /* Products */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 284A19431DC6E3EF003ECEA8 /* changeLocation.app */, 176 | 284A195C1DC6E3F0003ECEA8 /* changeLocationTests.xctest */, 177 | 284A19671DC6E3F1003ECEA8 /* changeLocationUITests.xctest */, 178 | ); 179 | name = Products; 180 | sourceTree = ""; 181 | }; 182 | 284A195F1DC6E3F0003ECEA8 /* changeLocationTests */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 284A19601DC6E3F0003ECEA8 /* changeLocationTests.m */, 186 | 284A19621DC6E3F1003ECEA8 /* Info.plist */, 187 | ); 188 | path = changeLocationTests; 189 | sourceTree = ""; 190 | }; 191 | 284A196A1DC6E3F1003ECEA8 /* changeLocationUITests */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | 284A196B1DC6E3F1003ECEA8 /* changeLocationUITests.m */, 195 | 284A196D1DC6E3F1003ECEA8 /* Info.plist */, 196 | ); 197 | path = changeLocationUITests; 198 | sourceTree = ""; 199 | }; 200 | 284A197C1DC6E8A1003ECEA8 /* Frameworks */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 28E57ED11DC7480A007246DE /* CoreTelephony.framework */, 204 | 28E57EC91DC743EC007246DE /* MapKit.framework */, 205 | 284A1ADE1DC732D5003ECEA8 /* AVFoundation.framework */, 206 | 284A1ADC1DC732D0003ECEA8 /* CoreData.framework */, 207 | 284A1ADA1DC732CA003ECEA8 /* CoreLocation.framework */, 208 | 284A1AD81DC732C3003ECEA8 /* CoreText.framework */, 209 | 284A1AD61DC732BD003ECEA8 /* GLKit.framework */, 210 | 284A1AD41DC732B7003ECEA8 /* libc++.tbd */, 211 | 284A1AD21DC732AF003ECEA8 /* libicucore.tbd */, 212 | 284A1AD01DC7328D003ECEA8 /* libz.tbd */, 213 | 284A1ACE1DC73286003ECEA8 /* OpenGLES.framework */, 214 | 284A1ACC1DC7327A003ECEA8 /* QuartzCore.framework */, 215 | 284A1ACA1DC73274003ECEA8 /* SystemConfiguration.framework */, 216 | 284A1AC81DC7326C003ECEA8 /* libobjc.tbd */, 217 | 284A1AC61DC73261003ECEA8 /* Foundation.framework */, 218 | 284A1AC41DC7325B003ECEA8 /* CoreGraphics.framework */, 219 | 284A1AC21DC73252003ECEA8 /* UIKit.framework */, 220 | 284A1AC01DC7324C003ECEA8 /* Security.framework */, 221 | 284A1ABE1DC73245003ECEA8 /* CoreBluetooth.framework */, 222 | 284A1ABC1DC7323C003ECEA8 /* Accelerate.framework */, 223 | 284A197F1DC6F13F003ECEA8 /* ImageIO.framework */, 224 | 284A197D1DC6E8A1003ECEA8 /* AssetsLibrary.framework */, 225 | ); 226 | name = Frameworks; 227 | sourceTree = ""; 228 | }; 229 | 284A1AE01DC7345F003ECEA8 /* changeLocation */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | 288970B91DE28DC800170684 /* 分类 */, 233 | 284A1BB11DC73460003ECEA8 /* Toast(吐司) */, 234 | 284A1BA41DC73460003ECEA8 /* AppDelegate.h */, 235 | 284A1BA51DC73460003ECEA8 /* AppDelegate.m */, 236 | 284A1BA61DC73460003ECEA8 /* Assets.xcassets */, 237 | 284A1BA71DC73460003ECEA8 /* LaunchScreen.storyboard */, 238 | 284A1BA91DC73460003ECEA8 /* Main.storyboard */, 239 | 284A1BAD1DC73460003ECEA8 /* Info.plist */, 240 | 284A1BAE1DC73460003ECEA8 /* main.m */, 241 | 28E57ED61DC74B0F007246DE /* NSString+Extension.h */, 242 | 28E57ED71DC74B0F007246DE /* NSString+Extension.m */, 243 | 284A1BB41DC73460003ECEA8 /* UploadImageView.h */, 244 | 284A1BB51DC73460003ECEA8 /* UploadImageView.m */, 245 | 284A1BB61DC73460003ECEA8 /* ViewController.h */, 246 | 284A1BB71DC73460003ECEA8 /* ViewController.m */, 247 | ); 248 | path = changeLocation; 249 | sourceTree = ""; 250 | }; 251 | 284A1BB11DC73460003ECEA8 /* Toast(吐司) */ = { 252 | isa = PBXGroup; 253 | children = ( 254 | 284A1BB21DC73460003ECEA8 /* UIToast.h */, 255 | 284A1BB31DC73460003ECEA8 /* UIToast.m */, 256 | ); 257 | path = "Toast(吐司)"; 258 | sourceTree = ""; 259 | }; 260 | 288970B91DE28DC800170684 /* 分类 */ = { 261 | isa = PBXGroup; 262 | children = ( 263 | 288970BA1DE28DC800170684 /* CLLocation+GPSDictionary.h */, 264 | 288970BB1DE28DC800170684 /* CLLocation+GPSDictionary.m */, 265 | 288970BC1DE28DC800170684 /* NSDictionary+CLLocation.h */, 266 | 288970BD1DE28DC800170684 /* NSDictionary+CLLocation.m */, 267 | ); 268 | path = "分类"; 269 | sourceTree = ""; 270 | }; 271 | /* End PBXGroup section */ 272 | 273 | /* Begin PBXNativeTarget section */ 274 | 284A19421DC6E3EE003ECEA8 /* changeLocation */ = { 275 | isa = PBXNativeTarget; 276 | buildConfigurationList = 284A19701DC6E3F1003ECEA8 /* Build configuration list for PBXNativeTarget "changeLocation" */; 277 | buildPhases = ( 278 | 284A193F1DC6E3EE003ECEA8 /* Sources */, 279 | 284A19401DC6E3EE003ECEA8 /* Frameworks */, 280 | 284A19411DC6E3EE003ECEA8 /* Resources */, 281 | ); 282 | buildRules = ( 283 | ); 284 | dependencies = ( 285 | ); 286 | name = changeLocation; 287 | productName = changeLocation; 288 | productReference = 284A19431DC6E3EF003ECEA8 /* changeLocation.app */; 289 | productType = "com.apple.product-type.application"; 290 | }; 291 | 284A195B1DC6E3F0003ECEA8 /* changeLocationTests */ = { 292 | isa = PBXNativeTarget; 293 | buildConfigurationList = 284A19731DC6E3F1003ECEA8 /* Build configuration list for PBXNativeTarget "changeLocationTests" */; 294 | buildPhases = ( 295 | 284A19581DC6E3F0003ECEA8 /* Sources */, 296 | 284A19591DC6E3F0003ECEA8 /* Frameworks */, 297 | 284A195A1DC6E3F0003ECEA8 /* Resources */, 298 | ); 299 | buildRules = ( 300 | ); 301 | dependencies = ( 302 | 284A195E1DC6E3F0003ECEA8 /* PBXTargetDependency */, 303 | ); 304 | name = changeLocationTests; 305 | productName = changeLocationTests; 306 | productReference = 284A195C1DC6E3F0003ECEA8 /* changeLocationTests.xctest */; 307 | productType = "com.apple.product-type.bundle.unit-test"; 308 | }; 309 | 284A19661DC6E3F1003ECEA8 /* changeLocationUITests */ = { 310 | isa = PBXNativeTarget; 311 | buildConfigurationList = 284A19761DC6E3F1003ECEA8 /* Build configuration list for PBXNativeTarget "changeLocationUITests" */; 312 | buildPhases = ( 313 | 284A19631DC6E3F1003ECEA8 /* Sources */, 314 | 284A19641DC6E3F1003ECEA8 /* Frameworks */, 315 | 284A19651DC6E3F1003ECEA8 /* Resources */, 316 | ); 317 | buildRules = ( 318 | ); 319 | dependencies = ( 320 | 284A19691DC6E3F1003ECEA8 /* PBXTargetDependency */, 321 | ); 322 | name = changeLocationUITests; 323 | productName = changeLocationUITests; 324 | productReference = 284A19671DC6E3F1003ECEA8 /* changeLocationUITests.xctest */; 325 | productType = "com.apple.product-type.bundle.ui-testing"; 326 | }; 327 | /* End PBXNativeTarget section */ 328 | 329 | /* Begin PBXProject section */ 330 | 284A193B1DC6E3EE003ECEA8 /* Project object */ = { 331 | isa = PBXProject; 332 | attributes = { 333 | LastUpgradeCheck = 0810; 334 | ORGANIZATIONNAME = liusong; 335 | TargetAttributes = { 336 | 284A19421DC6E3EE003ECEA8 = { 337 | CreatedOnToolsVersion = 8.1; 338 | DevelopmentTeam = MVWK55S4CF; 339 | ProvisioningStyle = Manual; 340 | }; 341 | 284A195B1DC6E3F0003ECEA8 = { 342 | CreatedOnToolsVersion = 8.1; 343 | DevelopmentTeam = U7SJ4KA3L8; 344 | ProvisioningStyle = Automatic; 345 | TestTargetID = 284A19421DC6E3EE003ECEA8; 346 | }; 347 | 284A19661DC6E3F1003ECEA8 = { 348 | CreatedOnToolsVersion = 8.1; 349 | DevelopmentTeam = U7SJ4KA3L8; 350 | ProvisioningStyle = Automatic; 351 | TestTargetID = 284A19421DC6E3EE003ECEA8; 352 | }; 353 | }; 354 | }; 355 | buildConfigurationList = 284A193E1DC6E3EE003ECEA8 /* Build configuration list for PBXProject "changeLocation" */; 356 | compatibilityVersion = "Xcode 3.2"; 357 | developmentRegion = English; 358 | hasScannedForEncodings = 0; 359 | knownRegions = ( 360 | en, 361 | Base, 362 | ar, 363 | ca, 364 | cs, 365 | da, 366 | de, 367 | el, 368 | en_GB, 369 | es, 370 | fi, 371 | fr, 372 | he, 373 | hr, 374 | hu, 375 | id, 376 | it, 377 | ja, 378 | ko, 379 | ms, 380 | nb, 381 | nl, 382 | pl, 383 | pt, 384 | pt_PT, 385 | ro, 386 | ru, 387 | sk, 388 | sv, 389 | th, 390 | tr, 391 | uk, 392 | vi, 393 | zh_CN, 394 | zh_TW, 395 | ); 396 | mainGroup = 284A193A1DC6E3EE003ECEA8; 397 | productRefGroup = 284A19441DC6E3EF003ECEA8 /* Products */; 398 | projectDirPath = ""; 399 | projectRoot = ""; 400 | targets = ( 401 | 284A19421DC6E3EE003ECEA8 /* changeLocation */, 402 | 284A195B1DC6E3F0003ECEA8 /* changeLocationTests */, 403 | 284A19661DC6E3F1003ECEA8 /* changeLocationUITests */, 404 | ); 405 | }; 406 | /* End PBXProject section */ 407 | 408 | /* Begin PBXResourcesBuildPhase section */ 409 | 284A19411DC6E3EE003ECEA8 /* Resources */ = { 410 | isa = PBXResourcesBuildPhase; 411 | buildActionMask = 2147483647; 412 | files = ( 413 | 284A1C281DC73460003ECEA8 /* Info.plist in Resources */, 414 | 284A1C261DC73460003ECEA8 /* Main.storyboard in Resources */, 415 | 284A1C241DC73460003ECEA8 /* Assets.xcassets in Resources */, 416 | 284A1C251DC73460003ECEA8 /* LaunchScreen.storyboard in Resources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | 284A195A1DC6E3F0003ECEA8 /* Resources */ = { 421 | isa = PBXResourcesBuildPhase; 422 | buildActionMask = 2147483647; 423 | files = ( 424 | ); 425 | runOnlyForDeploymentPostprocessing = 0; 426 | }; 427 | 284A19651DC6E3F1003ECEA8 /* Resources */ = { 428 | isa = PBXResourcesBuildPhase; 429 | buildActionMask = 2147483647; 430 | files = ( 431 | ); 432 | runOnlyForDeploymentPostprocessing = 0; 433 | }; 434 | /* End PBXResourcesBuildPhase section */ 435 | 436 | /* Begin PBXSourcesBuildPhase section */ 437 | 284A193F1DC6E3EE003ECEA8 /* Sources */ = { 438 | isa = PBXSourcesBuildPhase; 439 | buildActionMask = 2147483647; 440 | files = ( 441 | 288970BE1DE28DC800170684 /* CLLocation+GPSDictionary.m in Sources */, 442 | 284A1C231DC73460003ECEA8 /* AppDelegate.m in Sources */, 443 | 284A1C291DC73460003ECEA8 /* main.m in Sources */, 444 | 288970BF1DE28DC800170684 /* NSDictionary+CLLocation.m in Sources */, 445 | 284A1C2D1DC73460003ECEA8 /* ViewController.m in Sources */, 446 | 284A1C2C1DC73460003ECEA8 /* UploadImageView.m in Sources */, 447 | 28E57ED81DC74B0F007246DE /* NSString+Extension.m in Sources */, 448 | 284A1C2B1DC73460003ECEA8 /* UIToast.m in Sources */, 449 | ); 450 | runOnlyForDeploymentPostprocessing = 0; 451 | }; 452 | 284A19581DC6E3F0003ECEA8 /* Sources */ = { 453 | isa = PBXSourcesBuildPhase; 454 | buildActionMask = 2147483647; 455 | files = ( 456 | 284A19611DC6E3F0003ECEA8 /* changeLocationTests.m in Sources */, 457 | ); 458 | runOnlyForDeploymentPostprocessing = 0; 459 | }; 460 | 284A19631DC6E3F1003ECEA8 /* Sources */ = { 461 | isa = PBXSourcesBuildPhase; 462 | buildActionMask = 2147483647; 463 | files = ( 464 | 284A196C1DC6E3F1003ECEA8 /* changeLocationUITests.m in Sources */, 465 | ); 466 | runOnlyForDeploymentPostprocessing = 0; 467 | }; 468 | /* End PBXSourcesBuildPhase section */ 469 | 470 | /* Begin PBXTargetDependency section */ 471 | 284A195E1DC6E3F0003ECEA8 /* PBXTargetDependency */ = { 472 | isa = PBXTargetDependency; 473 | target = 284A19421DC6E3EE003ECEA8 /* changeLocation */; 474 | targetProxy = 284A195D1DC6E3F0003ECEA8 /* PBXContainerItemProxy */; 475 | }; 476 | 284A19691DC6E3F1003ECEA8 /* PBXTargetDependency */ = { 477 | isa = PBXTargetDependency; 478 | target = 284A19421DC6E3EE003ECEA8 /* changeLocation */; 479 | targetProxy = 284A19681DC6E3F1003ECEA8 /* PBXContainerItemProxy */; 480 | }; 481 | /* End PBXTargetDependency section */ 482 | 483 | /* Begin PBXVariantGroup section */ 484 | 284A1BA71DC73460003ECEA8 /* LaunchScreen.storyboard */ = { 485 | isa = PBXVariantGroup; 486 | children = ( 487 | 284A1BA81DC73460003ECEA8 /* Base */, 488 | ); 489 | name = LaunchScreen.storyboard; 490 | sourceTree = ""; 491 | }; 492 | 284A1BA91DC73460003ECEA8 /* Main.storyboard */ = { 493 | isa = PBXVariantGroup; 494 | children = ( 495 | 284A1BAA1DC73460003ECEA8 /* Base */, 496 | ); 497 | name = Main.storyboard; 498 | sourceTree = ""; 499 | }; 500 | /* End PBXVariantGroup section */ 501 | 502 | /* Begin XCBuildConfiguration section */ 503 | 284A196E1DC6E3F1003ECEA8 /* Debug */ = { 504 | isa = XCBuildConfiguration; 505 | buildSettings = { 506 | ALWAYS_SEARCH_USER_PATHS = NO; 507 | CLANG_ANALYZER_NONNULL = YES; 508 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 509 | CLANG_CXX_LIBRARY = "libc++"; 510 | CLANG_ENABLE_MODULES = YES; 511 | CLANG_ENABLE_OBJC_ARC = YES; 512 | CLANG_WARN_BOOL_CONVERSION = YES; 513 | CLANG_WARN_CONSTANT_CONVERSION = YES; 514 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 515 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 516 | CLANG_WARN_EMPTY_BODY = YES; 517 | CLANG_WARN_ENUM_CONVERSION = YES; 518 | CLANG_WARN_INFINITE_RECURSION = YES; 519 | CLANG_WARN_INT_CONVERSION = YES; 520 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 521 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 522 | CLANG_WARN_UNREACHABLE_CODE = YES; 523 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 524 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 525 | COPY_PHASE_STRIP = NO; 526 | DEBUG_INFORMATION_FORMAT = dwarf; 527 | ENABLE_STRICT_OBJC_MSGSEND = YES; 528 | ENABLE_TESTABILITY = YES; 529 | GCC_C_LANGUAGE_STANDARD = gnu99; 530 | GCC_DYNAMIC_NO_PIC = NO; 531 | GCC_NO_COMMON_BLOCKS = YES; 532 | GCC_OPTIMIZATION_LEVEL = 0; 533 | GCC_PREPROCESSOR_DEFINITIONS = ( 534 | "DEBUG=1", 535 | "$(inherited)", 536 | ); 537 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 538 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 539 | GCC_WARN_UNDECLARED_SELECTOR = YES; 540 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 541 | GCC_WARN_UNUSED_FUNCTION = YES; 542 | GCC_WARN_UNUSED_VARIABLE = YES; 543 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 544 | MTL_ENABLE_DEBUG_INFO = YES; 545 | ONLY_ACTIVE_ARCH = YES; 546 | SDKROOT = iphoneos; 547 | }; 548 | name = Debug; 549 | }; 550 | 284A196F1DC6E3F1003ECEA8 /* Release */ = { 551 | isa = XCBuildConfiguration; 552 | buildSettings = { 553 | ALWAYS_SEARCH_USER_PATHS = NO; 554 | CLANG_ANALYZER_NONNULL = YES; 555 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 556 | CLANG_CXX_LIBRARY = "libc++"; 557 | CLANG_ENABLE_MODULES = YES; 558 | CLANG_ENABLE_OBJC_ARC = YES; 559 | CLANG_WARN_BOOL_CONVERSION = YES; 560 | CLANG_WARN_CONSTANT_CONVERSION = YES; 561 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 562 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 563 | CLANG_WARN_EMPTY_BODY = YES; 564 | CLANG_WARN_ENUM_CONVERSION = YES; 565 | CLANG_WARN_INFINITE_RECURSION = YES; 566 | CLANG_WARN_INT_CONVERSION = YES; 567 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 568 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 569 | CLANG_WARN_UNREACHABLE_CODE = YES; 570 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 571 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 572 | COPY_PHASE_STRIP = NO; 573 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 574 | ENABLE_NS_ASSERTIONS = NO; 575 | ENABLE_STRICT_OBJC_MSGSEND = YES; 576 | GCC_C_LANGUAGE_STANDARD = gnu99; 577 | GCC_NO_COMMON_BLOCKS = YES; 578 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 579 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 580 | GCC_WARN_UNDECLARED_SELECTOR = YES; 581 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 582 | GCC_WARN_UNUSED_FUNCTION = YES; 583 | GCC_WARN_UNUSED_VARIABLE = YES; 584 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 585 | MTL_ENABLE_DEBUG_INFO = NO; 586 | SDKROOT = iphoneos; 587 | VALIDATE_PRODUCT = YES; 588 | }; 589 | name = Release; 590 | }; 591 | 284A19711DC6E3F1003ECEA8 /* Debug */ = { 592 | isa = XCBuildConfiguration; 593 | buildSettings = { 594 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 595 | DEVELOPMENT_TEAM = MVWK55S4CF; 596 | FRAMEWORK_SEARCH_PATHS = ( 597 | "$(inherited)", 598 | "$(PROJECT_DIR)/changeLocation/4190833e18b6920e-GoogleMaps-1.12.2/Frameworks", 599 | "$(PROJECT_DIR)/changeLocation/4190833e18b6920e-GoogleMaps-1.12.2/GoogleMapsSDKDemos", 600 | "$(PROJECT_DIR)/changeLocation", 601 | "$(PROJECT_DIR)/changeLocation/Subspecs/Base/Frameworks", 602 | "$(PROJECT_DIR)/changeLocation/Subspecs/M4B/Frameworks", 603 | "$(PROJECT_DIR)/changeLocation/Subspecs/Maps/Frameworks", 604 | "$(PROJECT_DIR)/changeLocation/AMapSearch", 605 | "$(PROJECT_DIR)/AMapFoundation", 606 | ); 607 | INFOPLIST_FILE = changeLocation/Info.plist; 608 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 609 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 610 | OTHER_LDFLAGS = "-Objc"; 611 | PRODUCT_BUNDLE_IDENTIFIER = com.kuaichengwuliu.changeLocation; 612 | PRODUCT_NAME = "$(TARGET_NAME)"; 613 | PROVISIONING_PROFILE = "1c899346-5bbc-48d8-ad1b-d53a84a13bd5"; 614 | PROVISIONING_PROFILE_SPECIFIER = kcwl_allapp_2; 615 | }; 616 | name = Debug; 617 | }; 618 | 284A19721DC6E3F1003ECEA8 /* Release */ = { 619 | isa = XCBuildConfiguration; 620 | buildSettings = { 621 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 622 | DEVELOPMENT_TEAM = ""; 623 | FRAMEWORK_SEARCH_PATHS = ( 624 | "$(inherited)", 625 | "$(PROJECT_DIR)/changeLocation/4190833e18b6920e-GoogleMaps-1.12.2/Frameworks", 626 | "$(PROJECT_DIR)/changeLocation/4190833e18b6920e-GoogleMaps-1.12.2/GoogleMapsSDKDemos", 627 | "$(PROJECT_DIR)/changeLocation", 628 | "$(PROJECT_DIR)/changeLocation/Subspecs/Base/Frameworks", 629 | "$(PROJECT_DIR)/changeLocation/Subspecs/M4B/Frameworks", 630 | "$(PROJECT_DIR)/changeLocation/Subspecs/Maps/Frameworks", 631 | "$(PROJECT_DIR)/changeLocation/AMapSearch", 632 | "$(PROJECT_DIR)/AMapFoundation", 633 | ); 634 | INFOPLIST_FILE = changeLocation/Info.plist; 635 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 636 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 637 | OTHER_LDFLAGS = "-Objc"; 638 | PRODUCT_BUNDLE_IDENTIFIER = com.kuaichengwuliu.changeLocation; 639 | PRODUCT_NAME = "$(TARGET_NAME)"; 640 | }; 641 | name = Release; 642 | }; 643 | 284A19741DC6E3F1003ECEA8 /* Debug */ = { 644 | isa = XCBuildConfiguration; 645 | buildSettings = { 646 | BUNDLE_LOADER = "$(TEST_HOST)"; 647 | DEVELOPMENT_TEAM = U7SJ4KA3L8; 648 | INFOPLIST_FILE = changeLocationTests/Info.plist; 649 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 650 | PRODUCT_BUNDLE_IDENTIFIER = com.kuaichengwuliu.changeLocationTests; 651 | PRODUCT_NAME = "$(TARGET_NAME)"; 652 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/changeLocation.app/changeLocation"; 653 | }; 654 | name = Debug; 655 | }; 656 | 284A19751DC6E3F1003ECEA8 /* Release */ = { 657 | isa = XCBuildConfiguration; 658 | buildSettings = { 659 | BUNDLE_LOADER = "$(TEST_HOST)"; 660 | DEVELOPMENT_TEAM = U7SJ4KA3L8; 661 | INFOPLIST_FILE = changeLocationTests/Info.plist; 662 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 663 | PRODUCT_BUNDLE_IDENTIFIER = com.kuaichengwuliu.changeLocationTests; 664 | PRODUCT_NAME = "$(TARGET_NAME)"; 665 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/changeLocation.app/changeLocation"; 666 | }; 667 | name = Release; 668 | }; 669 | 284A19771DC6E3F1003ECEA8 /* Debug */ = { 670 | isa = XCBuildConfiguration; 671 | buildSettings = { 672 | DEVELOPMENT_TEAM = U7SJ4KA3L8; 673 | INFOPLIST_FILE = changeLocationUITests/Info.plist; 674 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 675 | PRODUCT_BUNDLE_IDENTIFIER = com.kuaichengwuliu.changeLocationUITests; 676 | PRODUCT_NAME = "$(TARGET_NAME)"; 677 | TEST_TARGET_NAME = changeLocation; 678 | }; 679 | name = Debug; 680 | }; 681 | 284A19781DC6E3F1003ECEA8 /* Release */ = { 682 | isa = XCBuildConfiguration; 683 | buildSettings = { 684 | DEVELOPMENT_TEAM = U7SJ4KA3L8; 685 | INFOPLIST_FILE = changeLocationUITests/Info.plist; 686 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 687 | PRODUCT_BUNDLE_IDENTIFIER = com.kuaichengwuliu.changeLocationUITests; 688 | PRODUCT_NAME = "$(TARGET_NAME)"; 689 | TEST_TARGET_NAME = changeLocation; 690 | }; 691 | name = Release; 692 | }; 693 | /* End XCBuildConfiguration section */ 694 | 695 | /* Begin XCConfigurationList section */ 696 | 284A193E1DC6E3EE003ECEA8 /* Build configuration list for PBXProject "changeLocation" */ = { 697 | isa = XCConfigurationList; 698 | buildConfigurations = ( 699 | 284A196E1DC6E3F1003ECEA8 /* Debug */, 700 | 284A196F1DC6E3F1003ECEA8 /* Release */, 701 | ); 702 | defaultConfigurationIsVisible = 0; 703 | defaultConfigurationName = Release; 704 | }; 705 | 284A19701DC6E3F1003ECEA8 /* Build configuration list for PBXNativeTarget "changeLocation" */ = { 706 | isa = XCConfigurationList; 707 | buildConfigurations = ( 708 | 284A19711DC6E3F1003ECEA8 /* Debug */, 709 | 284A19721DC6E3F1003ECEA8 /* Release */, 710 | ); 711 | defaultConfigurationIsVisible = 0; 712 | defaultConfigurationName = Release; 713 | }; 714 | 284A19731DC6E3F1003ECEA8 /* Build configuration list for PBXNativeTarget "changeLocationTests" */ = { 715 | isa = XCConfigurationList; 716 | buildConfigurations = ( 717 | 284A19741DC6E3F1003ECEA8 /* Debug */, 718 | 284A19751DC6E3F1003ECEA8 /* Release */, 719 | ); 720 | defaultConfigurationIsVisible = 0; 721 | defaultConfigurationName = Release; 722 | }; 723 | 284A19761DC6E3F1003ECEA8 /* Build configuration list for PBXNativeTarget "changeLocationUITests" */ = { 724 | isa = XCConfigurationList; 725 | buildConfigurations = ( 726 | 284A19771DC6E3F1003ECEA8 /* Debug */, 727 | 284A19781DC6E3F1003ECEA8 /* Release */, 728 | ); 729 | defaultConfigurationIsVisible = 0; 730 | defaultConfigurationName = Release; 731 | }; 732 | /* End XCConfigurationList section */ 733 | }; 734 | rootObject = 284A193B1DC6E3EE003ECEA8 /* Project object */; 735 | } 736 | -------------------------------------------------------------------------------- /changeLocation/changeLocation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /changeLocation/changeLocation.xcodeproj/project.xcworkspace/xcuserdata/liusong.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lsmakethebest/LSChangeLocation/7222c5358f0656645df31a25173c96ab3d0ea63b/changeLocation/changeLocation.xcodeproj/project.xcworkspace/xcuserdata/liusong.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /changeLocation/changeLocation.xcodeproj/xcuserdata/liusong.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 40 | 52 | 53 | 54 | 56 | 68 | 69 | 70 | 72 | 84 | 85 | 86 | 88 | 100 | 101 | 102 | 104 | 116 | 117 | 118 | 120 | 132 | 133 | 134 | 136 | 148 | 149 | 150 | 152 | 164 | 165 | 166 | 168 | 180 | 181 | 182 | 183 | 184 | -------------------------------------------------------------------------------- /changeLocation/changeLocation.xcodeproj/xcuserdata/liusong.xcuserdatad/xcschemes/changeLocation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /changeLocation/changeLocation.xcodeproj/xcuserdata/liusong.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | changeLocation.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 284A19421DC6E3EE003ECEA8 16 | 17 | primary 18 | 19 | 20 | 284A195B1DC6E3F0003ECEA8 21 | 22 | primary 23 | 24 | 25 | 284A19661DC6E3F1003ECEA8 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | 21 | return YES; 22 | } 23 | 24 | 25 | 26 | - (void)applicationWillResignActive:(UIApplication *)application { 27 | // 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. 28 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 29 | } 30 | 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | // 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. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | 38 | - (void)applicationWillEnterForeground:(UIApplication *)application { 39 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 40 | } 41 | 42 | 43 | - (void)applicationDidBecomeActive:(UIApplication *)application { 44 | // 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. 45 | } 46 | 47 | 48 | - (void)applicationWillTerminate:(UIApplication *)application { 49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 50 | } 51 | 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /changeLocation/changeLocation/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSApplicationQueriesSchemes 22 | 23 | googlechromes 24 | comgooglemaps 25 | 26 | LSRequiresIPhoneOS 27 | 28 | NSAppTransportSecurity 29 | 30 | NSAllowsArbitraryLoads 31 | 32 | 33 | NSPhotoLibraryUsageDescription 34 | 35 | NSCameraUsageDescription 36 | 37 | UILaunchStoryboardName 38 | LaunchScreen 39 | UIMainStoryboardFile 40 | Main 41 | UIRequiredDeviceCapabilities 42 | 43 | armv7 44 | 45 | UISupportedInterfaceOrientations 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/NSString+Extension.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Extension.h 3 | // kuaichengwuliu 4 | // 5 | // Created by 刘松 on 16/5/9. 6 | // Copyright © 2016年 kuaicheng. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (Extension) 12 | 13 | @property (nonatomic,copy,readonly) NSString *value; 14 | 15 | @property (nonatomic,copy) NSString *date; 16 | @property (nonatomic,copy) NSString *noSecondDate; 17 | 18 | @property(nonatomic,strong) NSDate *formatDate; 19 | 20 | @property (nonatomic,copy) NSString *ymdLineString; 21 | 22 | @property (nonatomic,copy) NSString *ymdDate; 23 | 24 | @property (nonatomic,copy) NSString *priceString; 25 | 26 | @property (nonatomic,copy) NSString *otherString; 27 | 28 | 29 | 30 | @end 31 | 32 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/NSString+Extension.m: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // NSString+Extension.m 4 | // kuaichengwuliu 5 | // 6 | // Created by 刘松 on 16/5/9. 7 | // Copyright © 2016年 kuaicheng. All rights reserved. 8 | // 9 | 10 | #import "NSString+Extension.h" 11 | 12 | @implementation NSString (Extension) 13 | -(NSString *)value 14 | { 15 | if (self==nil||[self isEqualToString:@""]) { 16 | return @""; 17 | }else{ 18 | return self; 19 | } 20 | } 21 | -(NSString *)ymdDate 22 | { 23 | NSDateFormatter *formatter=[[NSDateFormatter alloc]init]; 24 | formatter.dateFormat=@"yyyy.MM.dd"; 25 | NSDate *date=[NSDate dateWithTimeIntervalSince1970:self.doubleValue/1000.0]; 26 | NSString *dateString=[formatter stringFromDate:date]; 27 | return dateString; 28 | 29 | } 30 | -(NSString *)noSecondDate 31 | { 32 | NSDateFormatter *formatter=[[NSDateFormatter alloc]init]; 33 | formatter.dateFormat=@"yyyy.MM.dd HH:mm"; 34 | NSDate *date=[NSDate dateWithTimeIntervalSince1970:self.doubleValue/1000.0]; 35 | NSString *dateString=[formatter stringFromDate:date]; 36 | return dateString; 37 | 38 | } 39 | -(NSString *)date 40 | { 41 | NSDateFormatter *formatter=[[NSDateFormatter alloc]init]; 42 | formatter.dateFormat=@"yyyy-MM-dd HH:mm:ss"; 43 | NSDate *date=[NSDate dateWithTimeIntervalSince1970:self.doubleValue/1000.0]; 44 | NSString *dateString=[formatter stringFromDate:date]; 45 | return dateString; 46 | } 47 | -(NSDate*)formatDate 48 | { 49 | NSDateFormatter *formatter=[[NSDateFormatter alloc]init]; 50 | formatter.dateFormat=@"yyyy-MM-dd"; 51 | return [formatter dateFromString:self]; 52 | 53 | } 54 | 55 | 56 | -(NSString *)ymdLineString 57 | { 58 | NSDateFormatter *formatter=[[NSDateFormatter alloc]init]; 59 | formatter.dateFormat=@"yyyy-MM-dd"; 60 | NSDate *date=[NSDate dateWithTimeIntervalSince1970:self.doubleValue/1000.0]; 61 | NSString *dateString=[formatter stringFromDate:date]; 62 | return dateString; 63 | } 64 | -(NSString *)priceString 65 | { 66 | NSArray *arr=[self componentsSeparatedByString:@"."]; 67 | if (arr.count>1) { 68 | return [NSString stringWithFormat:@"%.2lf", round(self.doubleValue*100)/100]; 69 | }else{ 70 | return [NSString stringWithFormat:@"%@.00",self]; 71 | } 72 | } 73 | -(NSString *)otherString 74 | { 75 | NSArray *arr=[self componentsSeparatedByString:@"."]; 76 | if (arr.count>1) { 77 | return [NSString stringWithFormat:@"%.2lf", round(self.doubleValue*100)/100]; 78 | }else{ 79 | return self; 80 | } 81 | 82 | } 83 | @end 84 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 123 4 | /svn/LCSJ/!svn/ver/4723/LCSJ_IOS/driver/trunk/driver/driver/Function(%E5%8A%9F%E8%83%BD%E7%B1%BB)/Toast(%E5%90%90%E5%8F%B8) 5 | END 6 | UIToast.m 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 133 10 | /svn/LCSJ/!svn/ver/4723/LCSJ_IOS/driver/trunk/driver/driver/Function(%E5%8A%9F%E8%83%BD%E7%B1%BB)/Toast(%E5%90%90%E5%8F%B8)/UIToast.m 11 | END 12 | UIToast.h 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 133 16 | /svn/LCSJ/!svn/ver/2736/LCSJ_IOS/driver/trunk/driver/driver/Function(%E5%8A%9F%E8%83%BD%E7%B1%BB)/Toast(%E5%90%90%E5%8F%B8)/UIToast.h 17 | END 18 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 6317 5 | https://lius@192.168.1.128/svn/LCSJ/LCSJ_IOS/driver/trunk/driver/driver/Function(%E5%8A%9F%E8%83%BD%E7%B1%BB)/Toast(%E5%90%90%E5%8F%B8) 6 | https://lius@192.168.1.128/svn/LCSJ 7 | 8 | 9 | 10 | 2016-09-02T09:01:19.566846Z 11 | 4723 12 | lius 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 293f1b3c-49e7-7143-b537-0c37a6abdd54 28 | 29 | UIToast.m 30 | file 31 | 32 | 33 | 34 | 35 | 2016-09-12T10:49:28.000000Z 36 | 2636e95efd59d3e7f8df7fb2fff50626 37 | 2016-09-02T09:01:19.566846Z 38 | 4723 39 | lius 40 | has-props 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 3591 62 | 63 | UIToast.h 64 | file 65 | 66 | 67 | 68 | 69 | 2016-09-12T10:49:28.000000Z 70 | b4a9a03367535a91abd32ad9a3a84102 71 | 2016-07-22T02:17:33.500419Z 72 | 2736 73 | lius 74 | has-props 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 132 96 | 97 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/.svn/prop-base/UIToast.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/.svn/prop-base/UIToast.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/.svn/text-base/UIToast.h.svn-base: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface UIToast : UILabel 5 | 6 | 7 | // 显示在当前window上 8 | + (void)showMessage:(NSString *)message; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/.svn/text-base/UIToast.m.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | #import "UIToast.h" 4 | 5 | #define LSToastContentFont [UIFont systemFontOfSize:15] 6 | #define LSToastBorder 8 7 | 8 | #define LSToastDuration 1.5 9 | 10 | 11 | @interface UIToast () 12 | 13 | @property(nonatomic, assign) BOOL isAdd; 14 | @property(nonatomic, assign) BOOL completed; 15 | 16 | @end 17 | @implementation UIToast 18 | 19 | + (instancetype)shareInstance { 20 | return [[self alloc] init]; 21 | } 22 | 23 | + (id)allocWithZone:(struct _NSZone *)zone { 24 | static id instance; 25 | static dispatch_once_t token; 26 | dispatch_once(&token, ^{ 27 | instance = [super allocWithZone:zone]; 28 | }); 29 | return instance; 30 | } 31 | 32 | - (id)initWithFrame:(CGRect)frame { 33 | self = [super initWithFrame:frame]; 34 | if (self) { 35 | self.numberOfLines = 0; 36 | self.backgroundColor = 37 | [UIColor colorWithRed:0.130 green:0.157 blue:0.156 alpha:0.884]; 38 | self.font = LSToastContentFont; 39 | self.layer.cornerRadius = 3.0; 40 | self.layer.masksToBounds = YES; 41 | self.textColor = [UIColor whiteColor]; 42 | self.textAlignment = NSTextAlignmentCenter; 43 | } 44 | return self; 45 | } 46 | 47 | - (id)initWithMessage:(NSString *)message { 48 | if (self) { 49 | CGSize msg_size = [self stringSizeWith:message]; 50 | CGFloat msg_x = (SCREEN_W - msg_size.width - 2 * LSToastBorder) / 2; 51 | CGFloat msg_y = SCREEN_H * 3 / 4; 52 | self.frame = CGRectMake(msg_x, msg_y, msg_size.width + 2 * LSToastBorder, 53 | msg_size.height + 2 * LSToastBorder); 54 | self.text = message; 55 | } 56 | return self; 57 | } 58 | 59 | #pragma mark - message显示 60 | + (void)showMessage:(NSString *)message { 61 | 62 | UIToast *toast = [[UIToast shareInstance] initWithMessage:message]; 63 | [[UIApplication sharedApplication].keyWindow endEditing:YES]; 64 | UIWindow *window = [UIApplication sharedApplication].windows.firstObject; 65 | 66 | //不存在才添加 67 | if ([window.subviews containsObject:toast] && toast.completed == NO) { 68 | toast.isAdd = NO; 69 | [toast.layer removeAllAnimations]; 70 | toast.alpha = 1; 71 | toast = [[UIToast shareInstance] initWithMessage:message]; 72 | [toast show]; 73 | [window bringSubviewToFront:toast]; 74 | } else { 75 | toast.isAdd = YES; 76 | [toast show]; 77 | } 78 | } 79 | 80 | - (void)show { 81 | 82 | if (self.isAdd) { 83 | [[UIApplication sharedApplication].keyWindow endEditing:YES]; 84 | UIWindow *window = [UIApplication sharedApplication].windows.firstObject; 85 | [window addSubview:self]; 86 | self.alpha = 0; 87 | self.completed = NO; 88 | 89 | [UIView animateWithDuration:0.5 90 | animations:^{ 91 | 92 | self.alpha = 1; 93 | } 94 | completion:^(BOOL finished) { 95 | 96 | [self addAnimation]; 97 | }]; 98 | return; 99 | } 100 | 101 | [self addAnimation]; 102 | } 103 | 104 | - (void)addAnimation { 105 | //将吐司时间延长到1.5秒 106 | 107 | [UIView animateWithDuration:1.0 108 | delay:LSToastDuration 109 | options:UIViewAnimationOptionAllowUserInteraction 110 | animations:^{ 111 | 112 | self.alpha = 0; 113 | } 114 | completion:^(BOOL finished) { 115 | if (self.isAdd) { 116 | [self removeFromSuperview]; 117 | self.completed = YES; 118 | } 119 | 120 | }]; 121 | } 122 | 123 | - (CGSize)stringSizeWith:(NSString *)string { 124 | CGSize stringSize; 125 | if (IOS_VERSION < 7.0) { 126 | stringSize = 127 | [string sizeWithFont:LSToastContentFont 128 | constrainedToSize:CGSizeMake(SCREEN_W - 2 * LSToastBorder, 200) 129 | lineBreakMode:NSLineBreakByWordWrapping]; 130 | } else { 131 | stringSize = 132 | [string 133 | boundingRectWithSize:CGSizeMake(SCREEN_W - 2 * LSToastBorder, 200) 134 | options:NSStringDrawingUsesLineFragmentOrigin 135 | attributes:@{ 136 | NSFontAttributeName : LSToastContentFont 137 | } 138 | context:nil] 139 | .size; 140 | } 141 | return stringSize; 142 | } 143 | @end 144 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/UIToast.h: -------------------------------------------------------------------------------- 1 | 2 | #import 3 | 4 | @interface UIToast : UILabel 5 | 6 | 7 | // 显示在当前window上 8 | + (void)showMessage:(NSString *)message; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/Toast(吐司)/UIToast.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | #import "UIToast.h" 4 | 5 | #define LSToastContentFont [UIFont systemFontOfSize:15] 6 | #define LSToastBorder 8 7 | 8 | #define LSToastDuration 1.5 9 | 10 | 11 | @interface UIToast () 12 | 13 | @property(nonatomic, assign) BOOL isAdd; 14 | @property(nonatomic, assign) BOOL completed; 15 | 16 | @end 17 | @implementation UIToast 18 | 19 | + (instancetype)shareInstance { 20 | return [[self alloc] init]; 21 | } 22 | 23 | + (id)allocWithZone:(struct _NSZone *)zone { 24 | static id instance; 25 | static dispatch_once_t token; 26 | dispatch_once(&token, ^{ 27 | instance = [super allocWithZone:zone]; 28 | }); 29 | return instance; 30 | } 31 | 32 | - (id)initWithFrame:(CGRect)frame { 33 | self = [super initWithFrame:frame]; 34 | if (self) { 35 | self.numberOfLines = 0; 36 | self.backgroundColor = 37 | [UIColor colorWithRed:0.130 green:0.157 blue:0.156 alpha:0.884]; 38 | self.font = LSToastContentFont; 39 | self.layer.cornerRadius = 3.0; 40 | self.layer.masksToBounds = YES; 41 | self.textColor = [UIColor whiteColor]; 42 | self.textAlignment = NSTextAlignmentCenter; 43 | } 44 | return self; 45 | } 46 | 47 | - (id)initWithMessage:(NSString *)message { 48 | if (self) { 49 | CGFloat width=[UIScreen mainScreen].bounds.size.width; 50 | CGSize msg_size = [self stringSizeWith:message]; 51 | CGFloat msg_x = (width - msg_size.width - 2 * LSToastBorder) / 2; 52 | CGFloat msg_y = width * 3 / 4; 53 | self.frame = CGRectMake(msg_x, msg_y, msg_size.width + 2 * LSToastBorder, 54 | msg_size.height + 2 * LSToastBorder); 55 | self.text = message; 56 | } 57 | return self; 58 | } 59 | 60 | #pragma mark - message显示 61 | + (void)showMessage:(NSString *)message { 62 | 63 | UIToast *toast = [[UIToast shareInstance] initWithMessage:message]; 64 | [[UIApplication sharedApplication].keyWindow endEditing:YES]; 65 | UIWindow *window = [UIApplication sharedApplication].windows.firstObject; 66 | 67 | //不存在才添加 68 | if ([window.subviews containsObject:toast] && toast.completed == NO) { 69 | toast.isAdd = NO; 70 | [toast.layer removeAllAnimations]; 71 | toast.alpha = 1; 72 | toast = [[UIToast shareInstance] initWithMessage:message]; 73 | [toast show]; 74 | [window bringSubviewToFront:toast]; 75 | } else { 76 | toast.isAdd = YES; 77 | [toast show]; 78 | } 79 | } 80 | 81 | - (void)show { 82 | 83 | if (self.isAdd) { 84 | [[UIApplication sharedApplication].keyWindow endEditing:YES]; 85 | UIWindow *window = [UIApplication sharedApplication].windows.firstObject; 86 | [window addSubview:self]; 87 | self.alpha = 0; 88 | self.completed = NO; 89 | 90 | [UIView animateWithDuration:0.5 91 | animations:^{ 92 | 93 | self.alpha = 1; 94 | } 95 | completion:^(BOOL finished) { 96 | 97 | [self addAnimation]; 98 | }]; 99 | return; 100 | } 101 | 102 | [self addAnimation]; 103 | } 104 | 105 | - (void)addAnimation { 106 | //将吐司时间延长到1.5秒 107 | 108 | [UIView animateWithDuration:1.0 109 | delay:LSToastDuration 110 | options:UIViewAnimationOptionAllowUserInteraction 111 | animations:^{ 112 | 113 | self.alpha = 0; 114 | } 115 | completion:^(BOOL finished) { 116 | if (self.isAdd) { 117 | [self removeFromSuperview]; 118 | self.completed = YES; 119 | } 120 | 121 | }]; 122 | } 123 | 124 | - (CGSize)stringSizeWith:(NSString *)string { 125 | CGSize stringSize; 126 | CGFloat width=[UIScreen mainScreen].bounds.size.width; 127 | if ([[UIDevice currentDevice].systemVersion doubleValue] < 7.0) { 128 | stringSize = 129 | [string sizeWithFont:LSToastContentFont 130 | constrainedToSize:CGSizeMake(width - 2 * LSToastBorder, 200) 131 | lineBreakMode:NSLineBreakByWordWrapping]; 132 | } else { 133 | stringSize = 134 | [string 135 | boundingRectWithSize:CGSizeMake(width - 2 * LSToastBorder, 200) 136 | options:NSStringDrawingUsesLineFragmentOrigin 137 | attributes:@{ 138 | NSFontAttributeName : LSToastContentFont 139 | } 140 | context:nil] 141 | .size; 142 | } 143 | return stringSize; 144 | } 145 | @end 146 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/UploadImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UploadImageView.h 3 | // kuaichengwuliu 4 | // 5 | // Created by 刘松 on 16/4/30. 6 | // Copyright © 2016年 kuaicheng. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void(^BlockImage)(UIImage *newImage); 12 | 13 | @interface UploadImageView : UIView 14 | 15 | @property (nonatomic,copy) BlockImage clickBlockImage; 16 | 17 | /** 18 | * 19 | * @param blockImage 选择完的图片 如若没选择到或者取消 block不会回调 20 | */ 21 | +(void)showUpUploadImageViewWithBlockImage:(BlockImage)blockImage longitude:(CGFloat)longitude latitude:(CGFloat)latitude; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/UploadImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UploadImageView.m 3 | // kuaichengwuliu 4 | // 5 | // Created by 刘松 on 16/4/30. 6 | // Copyright © 2016年 kuaicheng. All rights reserved. 7 | // 8 | 9 | #import "UploadImageView.h" 10 | #import 11 | #import 12 | #import "UIToast.h" 13 | @interface UploadImageView () < 14 | UITableViewDelegate, UITableViewDataSource, UINavigationControllerDelegate, 15 | UIImagePickerControllerDelegate, UIGestureRecognizerDelegate, 16 | UIActionSheetDelegate> 17 | 18 | @property(nonatomic, weak) UITableView *tableView; 19 | @property(nonatomic, strong) NSArray *contents; 20 | @property(nonatomic, assign) int index; 21 | @property(nonatomic,strong)NSMutableDictionary* mediaInfo;//当前照片的mediaInfo 22 | 23 | @property(nonatomic,strong) UIImage *image; 24 | 25 | @property (nonatomic,assign) CGFloat longitude; 26 | @property (nonatomic,assign) CGFloat latitude; 27 | @end 28 | @implementation UploadImageView 29 | 30 | + (void)showUpUploadImageViewWithBlockImage:(BlockImage)blockImage longitude:(CGFloat)longitude latitude:(CGFloat)latitude { 31 | 32 | UploadImageView *v = [[UploadImageView alloc] init]; 33 | v.longitude=longitude; 34 | v.latitude=latitude; 35 | [[UIApplication sharedApplication].keyWindow addSubview:v]; 36 | v.clickBlockImage = blockImage; 37 | if ([[UIDevice currentDevice].systemVersion doubleValue] >= 8.0) { 38 | UIAlertController *alert = [UIAlertController 39 | alertControllerWithTitle:@"请选择" 40 | message:nil 41 | preferredStyle:(UIAlertControllerStyleActionSheet)]; 42 | UIAlertAction *action1 = [UIAlertAction 43 | actionWithTitle:@"相册" 44 | style:(UIAlertActionStyleDefault) 45 | handler:^(UIAlertAction *_Nonnull action) { 46 | UIImagePickerController *picker = 47 | [[UIImagePickerController alloc] init]; 48 | picker.delegate = v; 49 | picker.sourceType = 50 | UIImagePickerControllerSourceTypePhotoLibrary; 51 | [[UIApplication sharedApplication] 52 | .keyWindow.rootViewController 53 | presentViewController:picker 54 | animated:YES 55 | completion:nil]; 56 | 57 | }]; 58 | UIAlertAction *action2 = [UIAlertAction 59 | actionWithTitle:@"拍照" 60 | style:(UIAlertActionStyleDefault) 61 | handler:^(UIAlertAction *_Nonnull action) { 62 | UIImagePickerController *picker = 63 | [[UIImagePickerController alloc] init]; 64 | picker.delegate = v; 65 | picker.sourceType = UIImagePickerControllerSourceTypeCamera; 66 | [[UIApplication sharedApplication] 67 | .keyWindow.rootViewController 68 | presentViewController:picker 69 | animated:YES 70 | completion:nil]; 71 | }]; 72 | UIAlertAction *action3 = 73 | [UIAlertAction actionWithTitle:@"取消" 74 | style:(UIAlertActionStyleCancel) 75 | handler:^(UIAlertAction *_Nonnull action) { 76 | [v removeFromSuperview]; 77 | 78 | }]; 79 | [alert addAction:action1]; 80 | [alert addAction:action2]; 81 | [alert addAction:action3]; 82 | [[UIApplication sharedApplication] 83 | .keyWindow.rootViewController presentViewController:alert 84 | animated:YES 85 | completion:nil]; 86 | } else { 87 | UIActionSheet *sheet = 88 | [[UIActionSheet alloc] initWithTitle:@"请选择" 89 | delegate:v 90 | cancelButtonTitle:@"取消" 91 | destructiveButtonTitle:nil 92 | otherButtonTitles:@"相册", @"拍照", nil]; 93 | [sheet showInView:[UIApplication sharedApplication] 94 | .keyWindow.rootViewController.view]; 95 | } 96 | } 97 | 98 | - (void)actionSheet:(UIActionSheet *)actionSheet 99 | clickedButtonAtIndex:(NSInteger)buttonIndex { 100 | UIImagePickerController *picker = [[UIImagePickerController alloc] init]; 101 | picker.delegate = self; 102 | 103 | if (buttonIndex == 0) { 104 | picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; 105 | [[UIApplication sharedApplication] 106 | .keyWindow.rootViewController presentViewController:picker 107 | animated:YES 108 | completion:nil]; 109 | } else if (buttonIndex == 1) { 110 | 111 | picker.sourceType = UIImagePickerControllerSourceTypeCamera; 112 | [[UIApplication sharedApplication] 113 | .keyWindow.rootViewController presentViewController:picker 114 | animated:YES 115 | completion:nil]; 116 | } else if (buttonIndex == 2) { 117 | [self removeFromSuperview]; 118 | } 119 | } 120 | 121 | 122 | - (void)imagePickerController:(UIImagePickerController *)picker 123 | didFinishPickingMediaWithInfo:(NSDictionary *)info { 124 | 125 | 126 | NSURL *assetURL = [info objectForKey:UIImagePickerControllerReferenceURL]; 127 | UIImage *image = info[UIImagePickerControllerOriginalImage]; 128 | self.image=image; 129 | self.mediaInfo=[NSMutableDictionary dictionaryWithDictionary:info]; 130 | 131 | 132 | // GPS setValue:@"25.271139" forKey:kCGImagePropertyGPSLatitude]; 133 | // [GPS setValue:@"55.30748500000004" for/ 134 | [self log:info]; 135 | 136 | // [self write]; 137 | [picker dismissViewControllerAnimated:YES completion:nil]; 138 | 139 | if (!image) { 140 | [self removeFromSuperview]; 141 | return; 142 | } 143 | if (self.clickBlockImage) { 144 | self.clickBlockImage(image); 145 | } 146 | [self removeFromSuperview]; 147 | 148 | } 149 | -(void)log:(NSDictionary*)info 150 | { 151 | NSLog(@"info:%@",info); 152 | __block NSMutableDictionary *imageMetadata = nil; 153 | NSURL *assetURL = [info objectForKey:UIImagePickerControllerReferenceURL]; 154 | ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; 155 | [library assetForURL:assetURL 156 | resultBlock:^(ALAsset *asset) { 157 | imageMetadata = [[NSMutableDictionary alloc] initWithDictionary:asset.defaultRepresentation.metadata]; 158 | //控制台输出查看照片的metadata 159 | NSLog(@"2222222-------%@",imageMetadata); 160 | self.mediaInfo=imageMetadata; 161 | [self write]; 162 | //GPS数据 163 | NSDictionary *GPSDict=[imageMetadata objectForKey:(NSString*)kCGImagePropertyGPSDictionary]; 164 | if (GPSDict!=nil) { 165 | 166 | } 167 | else{ 168 | 169 | } 170 | 171 | //EXIF数据 172 | NSMutableDictionary *EXIFDictionary =[[imageMetadata objectForKey:(NSString *)kCGImagePropertyExifDictionary]mutableCopy]; 173 | NSString * dateTimeOriginal=[[EXIFDictionary objectForKey:(NSString*)kCGImagePropertyExifDateTimeOriginal] mutableCopy]; 174 | NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; 175 | [dateFormatter setDateFormat:@"yyyy:MM:dd HH:mm:ss"];//yyyy-MM-dd HH:mm:ss 176 | NSDate *date = [dateFormatter dateFromString:dateTimeOriginal]; 177 | } 178 | failureBlock:^(NSError *error) { 179 | }]; 180 | 181 | } 182 | 183 | 184 | -(void)write 185 | { 186 | //获取照片元数据 187 | NSDictionary *dict = [_mediaInfo objectForKey:UIImagePickerControllerMediaMetadata]; 188 | NSMutableDictionary *metadata = [NSMutableDictionary dictionaryWithDictionary:dict]; 189 | NSLog(@"111111111111-----%@",dict); 190 | //将GPS数据写入图片并保存到相册 191 | 192 | NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"]; 193 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 194 | [formatter setTimeZone:timeZone]; 195 | [formatter setDateFormat:@"HH:mm:ss.SS"]; 196 | 197 | 198 | 199 | // CGFloat longitude=54.317147; 200 | // CGFloat latitude=24.461780; 201 | CGFloat longitude=self.longitude; 202 | CGFloat latitude=self.latitude; 203 | NSString * timeStamp=[_mediaInfo objectForKey:(NSString*)kCGImagePropertyGPSTimeStamp]; 204 | NSDate *timeDate=[formatter dateFromString:timeStamp]; 205 | 206 | 207 | NSDictionary *gpsDict = [NSDictionary dictionaryWithObjectsAndKeys: 208 | [NSNumber numberWithDouble :fabs(latitude)], kCGImagePropertyGPSLatitude, 209 | ((latitude >= 0) ? @"N" : @"S"), kCGImagePropertyGPSLatitudeRef, 210 | [NSNumber numberWithDouble:fabs(longitude)], kCGImagePropertyGPSLongitude, 211 | ((longitude >= 0) ? @"E" : @"W"), kCGImagePropertyGPSLongitudeRef, 212 | [formatter stringFromDate:timeDate], kCGImagePropertyGPSTimeStamp, 213 | nil]; 214 | 215 | 216 | if (metadata&& gpsDict) { 217 | [metadata setValue:gpsDict forKey:(NSString*)kCGImagePropertyGPSDictionary]; 218 | } 219 | [self writeCGImage:_image metadata:metadata]; 220 | } 221 | /* 222 | 保存图片到相册 223 | */ 224 | - (void)writeCGImage:(UIImage*)image metadata:(NSDictionary *)metadata{ 225 | ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; 226 | ALAssetsLibraryWriteImageCompletionBlock imageWriteCompletionBlock = 227 | ^(NSURL *newURL, NSError *error) { 228 | if (error) { 229 | [UIToast showMessage:@"改变失败"]; 230 | NSLog( @"Error writing image with metadata to Photo Library: %@", error ); 231 | } else { 232 | [UIToast showMessage:@"改变成功"]; 233 | NSLog( @"Wrote image with metadata to Photo Library"); 234 | } 235 | }; 236 | 237 | //保存相片到相册 注意:必须使用[image CGImage]不能使用强制转换: (__bridge CGImageRef)image,否则保存照片将会报错 238 | [library writeImageToSavedPhotosAlbum:[image CGImage] 239 | metadata:metadata 240 | completionBlock:imageWriteCompletionBlock]; 241 | 242 | } 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | //+ (void)showUpUploadImageViewWithBlockImage:(BlockImage)blockImage 257 | //{ 258 | // 259 | // UploadImageView *view = [[UploadImageView alloc] init]; 260 | // view.clickBlockImage=blockImage; 261 | // 262 | // UIView *window = [UIApplication sharedApplication] .keyWindow; 263 | // 264 | // UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc] 265 | // initWithTarget:view 266 | // action:@selector(dismiss)]; 267 | // tap.delegate=view; 268 | // [view addGestureRecognizer:tap]; 269 | // 270 | // view.backgroundColor = [UIColor colorWithWhite:0.000 alpha:0.204]; 271 | // view.frame = window.bounds; 272 | // view.contents=@[@"拍照",@"从相册中选择"]; 273 | // [window addSubview:view]; 274 | // 275 | // UITableView *tableView = 276 | // [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) 277 | // style:UITableViewStylePlain]; 278 | // tableView.layer.cornerRadius=5; 279 | // tableView.layer.masksToBounds=YES; 280 | // tableView.width = view.width * 3 / 5; 281 | // tableView.height = view.contents.count * 44; 282 | // tableView.center = view.center; 283 | // tableView.delegate = view; 284 | // tableView.dataSource = view; 285 | // view.tableView = tableView; 286 | // [view addSubview:tableView]; 287 | // 288 | // view.alpha = 0; 289 | // tableView.alpha = 0; 290 | // [UIView animateWithDuration:0.25 291 | // animations:^{ 292 | // view.alpha = 1; 293 | // tableView.alpha = 1; 294 | // }]; 295 | //} 296 | //- (NSInteger)tableView:(UITableView *)tableView 297 | // numberOfRowsInSection:(NSInteger)section { 298 | // return 2; 299 | //} 300 | //- (UITableViewCell *)tableView:(UITableView *)tableView 301 | // cellForRowAtIndexPath:(NSIndexPath *)indexPath { 302 | // TipPlainCell *cell = 303 | // [TipPlainCell tipPlainCellWithTableView:tableView]; 304 | // cell.textLabel.text = self.contents[indexPath.row]; 305 | // return cell; 306 | //} 307 | //-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath 308 | //*)indexPath 309 | //{ 310 | // self.alpha=0; 311 | // UIImagePickerController *picker=[[UIImagePickerController alloc]init]; 312 | // picker.delegate=self; 313 | // if (indexPath.row==0) { 314 | // picker.sourceType=UIImagePickerControllerSourceTypeCamera; 315 | // }else{ 316 | // picker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary; 317 | // } 318 | // 319 | // [[UIApplication sharedApplication].keyWindow.rootViewController 320 | // presentViewController:picker animated:YES completion:nil]; 321 | // 322 | //} 323 | 324 | //- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker 325 | //{ 326 | // [picker dismissViewControllerAnimated:YES completion:nil]; 327 | // [self removeFromSuperview]; 328 | //} 329 | //-(void)dealloc 330 | //{ 331 | // NSLog(@"dealloc"); 332 | // 333 | // 334 | //} 335 | ///// 消失 336 | //-(void)dismiss 337 | //{ 338 | // [UIView animateWithDuration:0.25 animations:^{ 339 | // self.alpha = 0; 340 | // 341 | // }completion:^(BOOL finished) { 342 | // [self removeFromSuperview]; 343 | // for (UIView *v in self.subviews) { 344 | // [v removeFromSuperview]; 345 | // } 346 | // 347 | // }]; 348 | //} 349 | //#pragma mark -UIGestureRecognizerDelegate 350 | //-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 351 | //shouldReceiveTouch:(UITouch *)touch 352 | //{ 353 | // if ([NSStringFromClass([touch.view class]) 354 | // isEqualToString:@"UITableViewCellContentView"]) { 355 | // return NO; 356 | // } 357 | // return YES; 358 | //} 359 | @end 360 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UploadImageView.h" 11 | #import "UIToast.h" 12 | 13 | 14 | @interface ViewController () 15 | @property (weak, nonatomic) IBOutlet UITextField *longitude; 16 | @property (weak, nonatomic) IBOutlet UITextField *latitude; 17 | 18 | @end 19 | 20 | @implementation ViewController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | 26 | } 27 | 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | 35 | - (IBAction)change:(id)sender { 36 | 37 | if (self.longitude.text.length<=0||self.latitude.text.length<=0) { 38 | [UIToast showMessage:@"请输入经纬度"]; 39 | return; 40 | } 41 | //浮点数值使用CGFloat,NSDecimalNumber对象进行处理: 42 | NSDecimalNumber *longitude = [[NSDecimalNumber alloc] initWithString:self.longitude.text]; 43 | NSDecimalNumber *latitude = [[NSDecimalNumber alloc] initWithString:self.latitude.text]; 44 | 45 | [UploadImageView showUpUploadImageViewWithBlockImage:^(UIImage *newImage) { 46 | 47 | } longitude:[longitude doubleValue ] latitude:[latitude doubleValue ]]; 48 | } 49 | @end 50 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/分类/CLLocation+GPSDictionary.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLLocation+GPSDictionary.h 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #import 12 | 13 | @interface CLLocation (GPSDictionary) 14 | 15 | //CLLocation对象转换为图片的GPSDictionary 16 | -(NSDictionary*)GPSDictionary; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/分类/CLLocation+GPSDictionary.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLLocation+GPSDictionary.m 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import "CLLocation+GPSDictionary.h" 10 | 11 | @implementation CLLocation (GPSDictionary) 12 | 13 | -(NSDictionary*)GPSDictionary{ 14 | 15 | 16 | 17 | NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"]; 18 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 19 | [formatter setTimeZone:timeZone]; 20 | [formatter setDateFormat:@"HH:mm:ss.SS"]; 21 | CLLocation *location=self; 22 | NSDictionary *gpsDict = [NSDictionary dictionaryWithObjectsAndKeys: 23 | [NSNumber numberWithFloat:fabs(location.coordinate.latitude)], kCGImagePropertyGPSLatitude, 24 | ((location.coordinate.latitude >= 0) ? @"N" : @"S"), kCGImagePropertyGPSLatitudeRef, 25 | [NSNumber numberWithFloat:fabs(location.coordinate.longitude)], kCGImagePropertyGPSLongitude, 26 | ((location.coordinate.longitude >= 0) ? @"E" : @"W"), kCGImagePropertyGPSLongitudeRef, 27 | [formatter stringFromDate:[location timestamp]], kCGImagePropertyGPSTimeStamp, 28 | nil]; 29 | return gpsDict; 30 | } 31 | 32 | 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/分类/NSDictionary+CLLocation.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+CLLocation.h 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | @interface NSDictionary (CLLocation) 13 | 14 | //图片的GPSDictionary转化为CLLocation对象 15 | -(CLLocation*)locationFromGPSDictionary; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /changeLocation/changeLocation/分类/NSDictionary+CLLocation.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+CLLocation.m 3 | // changeLocation 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+CLLocation.h" 10 | 11 | @implementation NSDictionary (CLLocation) 12 | 13 | -(CLLocation*)locationFromGPSDictionary 14 | { 15 | CLLocationDegrees latitude= [(NSNumber*)[self objectForKey:(NSString*)kCGImagePropertyGPSLatitude] doubleValue]; 16 | CLLocationDegrees longitude= [(NSNumber*)[self objectForKey:(NSString*)kCGImagePropertyGPSLongitude] doubleValue]; 17 | CLLocationDistance altitude= [(NSNumber*)[self objectForKey:(NSString*)kCGImagePropertyGPSAltitude] doubleValue]; 18 | 19 | NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"]; 20 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; 21 | [formatter setTimeZone:timeZone]; 22 | [formatter setDateFormat:@"HH:mm:ss.SS"]; 23 | NSString * timeStamp=[self objectForKey:(NSString*)kCGImagePropertyGPSTimeStamp]; 24 | NSDate *timeDate=[formatter dateFromString:timeStamp]; 25 | 26 | CLLocationCoordinate2D coordinate=CLLocationCoordinate2DMake(latitude, longitude); 27 | CLLocation *loc=[[CLLocation alloc] initWithCoordinate:(CLLocationCoordinate2D)coordinate 28 | altitude:altitude 29 | horizontalAccuracy:0 30 | verticalAccuracy:0 31 | timestamp:timeDate]; 32 | return loc; 33 | } 34 | @end 35 | -------------------------------------------------------------------------------- /changeLocation/changeLocationTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSAppTransportSecurity 6 | 7 | NSAllowsArbitraryLoads 8 | 9 | 10 | CFBundleDevelopmentRegion 11 | en 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | $(PRODUCT_NAME) 20 | CFBundlePackageType 21 | BNDL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleVersion 25 | 1 26 | 27 | 28 | -------------------------------------------------------------------------------- /changeLocation/changeLocationTests/changeLocationTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // changeLocationTests.m 3 | // changeLocationTests 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface changeLocationTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation changeLocationTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /changeLocation/changeLocationUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /changeLocation/changeLocationUITests/changeLocationUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // changeLocationUITests.m 3 | // changeLocationUITests 4 | // 5 | // Created by 刘松 on 16/10/31. 6 | // Copyright © 2016年 liusong. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface changeLocationUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation changeLocationUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // 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. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /images/IMG_0093.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lsmakethebest/LSChangeLocation/7222c5358f0656645df31a25173c96ab3d0ea63b/images/IMG_0093.PNG -------------------------------------------------------------------------------- /images/IMG_0094.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lsmakethebest/LSChangeLocation/7222c5358f0656645df31a25173c96ab3d0ea63b/images/IMG_0094.PNG --------------------------------------------------------------------------------