├── .gitignore ├── Image Map (ARC) ├── Image Map (ARC).xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── almightykim.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── Image Map (ARC) │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── Image Map (ARC)-Info.plist │ ├── Image Map (ARC)-Prefix.pch │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ └── InfoPlist.strings │ └── main.m ├── Image Map (MRC) ├── Image Map (MRC).xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── almightykim.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── Image Map (MRC) │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── Image Map (MRC)-Info.plist │ ├── Image Map (MRC)-Prefix.pch │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj │ └── InfoPlist.strings │ └── main.m ├── LICENSE ├── MTImageMapView.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── MTImageMapView.xccheckout ├── MTImageMapView ├── MTImageMapView.h └── MTImageMapView.m ├── README.md └── Resource ├── US_States.gif ├── ViewController-iPad.xib ├── ViewController-iPhone5.xib ├── ViewController.xib ├── states_coord.plist └── states_name.plist /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | .DS_Store 25 | xcuserdata/ 26 | 27 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC).xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 042C52C116AE782900839277 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 042C52C016AE782900839277 /* UIKit.framework */; }; 11 | 042C52C316AE782900839277 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 042C52C216AE782900839277 /* Foundation.framework */; }; 12 | 042C52C516AE782900839277 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 042C52C416AE782900839277 /* CoreGraphics.framework */; }; 13 | 042C52CB16AE782900839277 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 042C52C916AE782900839277 /* InfoPlist.strings */; }; 14 | 042C52CD16AE782900839277 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C52CC16AE782900839277 /* main.m */; }; 15 | 042C52D116AE782900839277 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C52D016AE782900839277 /* AppDelegate.m */; }; 16 | 042C52D316AE782900839277 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 042C52D216AE782900839277 /* Default.png */; }; 17 | 042C52D516AE782900839277 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 042C52D416AE782900839277 /* Default@2x.png */; }; 18 | 042C52D716AE782900839277 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 042C52D616AE782900839277 /* Default-568h@2x.png */; }; 19 | 042C533E16AE796F00839277 /* states_coord.plist in Resources */ = {isa = PBXBuildFile; fileRef = 042C533816AE796F00839277 /* states_coord.plist */; }; 20 | 042C533F16AE796F00839277 /* states_name.plist in Resources */ = {isa = PBXBuildFile; fileRef = 042C533916AE796F00839277 /* states_name.plist */; }; 21 | 042C534016AE796F00839277 /* US_States.gif in Resources */ = {isa = PBXBuildFile; fileRef = 042C533A16AE796F00839277 /* US_States.gif */; }; 22 | 042C534116AE796F00839277 /* ViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 042C533B16AE796F00839277 /* ViewController-iPad.xib */; }; 23 | 042C534216AE796F00839277 /* ViewController-iPhone5.xib in Resources */ = {isa = PBXBuildFile; fileRef = 042C533C16AE796F00839277 /* ViewController-iPhone5.xib */; }; 24 | 042C534316AE796F00839277 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 042C533D16AE796F00839277 /* ViewController.xib */; }; 25 | 042C53AD16AE809F00839277 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C53AC16AE809F00839277 /* ViewController.m */; }; 26 | 042C53B116AE811A00839277 /* MTImageMapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C53B016AE811A00839277 /* MTImageMapView.m */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 042C52BC16AE782900839277 /* Image Map (ARC).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Image Map (ARC).app"; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 042C52C016AE782900839277 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 32 | 042C52C216AE782900839277 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 33 | 042C52C416AE782900839277 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 34 | 042C52C816AE782900839277 /* Image Map (ARC)-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Image Map (ARC)-Info.plist"; sourceTree = ""; }; 35 | 042C52CA16AE782900839277 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 36 | 042C52CC16AE782900839277 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 37 | 042C52CE16AE782900839277 /* Image Map (ARC)-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Image Map (ARC)-Prefix.pch"; sourceTree = ""; }; 38 | 042C52CF16AE782900839277 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 39 | 042C52D016AE782900839277 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 40 | 042C52D216AE782900839277 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 41 | 042C52D416AE782900839277 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 42 | 042C52D616AE782900839277 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 43 | 042C533816AE796F00839277 /* states_coord.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = states_coord.plist; sourceTree = ""; }; 44 | 042C533916AE796F00839277 /* states_name.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = states_name.plist; sourceTree = ""; }; 45 | 042C533A16AE796F00839277 /* US_States.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = US_States.gif; sourceTree = ""; }; 46 | 042C533B16AE796F00839277 /* ViewController-iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ViewController-iPad.xib"; sourceTree = ""; }; 47 | 042C533C16AE796F00839277 /* ViewController-iPhone5.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ViewController-iPhone5.xib"; sourceTree = ""; }; 48 | 042C533D16AE796F00839277 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; }; 49 | 042C53AB16AE809F00839277 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 50 | 042C53AC16AE809F00839277 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 51 | 042C53AF16AE811A00839277 /* MTImageMapView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTImageMapView.h; sourceTree = ""; }; 52 | 042C53B016AE811A00839277 /* MTImageMapView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTImageMapView.m; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 042C52B916AE782900839277 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 042C52C116AE782900839277 /* UIKit.framework in Frameworks */, 61 | 042C52C316AE782900839277 /* Foundation.framework in Frameworks */, 62 | 042C52C516AE782900839277 /* CoreGraphics.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 042C52B116AE782900839277 = { 70 | isa = PBXGroup; 71 | children = ( 72 | 042C53AE16AE811A00839277 /* MTImageMapView */, 73 | 042C52C616AE782900839277 /* Image Map (ARC) */, 74 | 042C533716AE796F00839277 /* Resource */, 75 | 042C52BF16AE782900839277 /* Frameworks */, 76 | 042C52BD16AE782900839277 /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 042C52BD16AE782900839277 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 042C52BC16AE782900839277 /* Image Map (ARC).app */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 042C52BF16AE782900839277 /* Frameworks */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 042C52C016AE782900839277 /* UIKit.framework */, 92 | 042C52C216AE782900839277 /* Foundation.framework */, 93 | 042C52C416AE782900839277 /* CoreGraphics.framework */, 94 | ); 95 | name = Frameworks; 96 | sourceTree = ""; 97 | }; 98 | 042C52C616AE782900839277 /* Image Map (ARC) */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 042C53AB16AE809F00839277 /* ViewController.h */, 102 | 042C53AC16AE809F00839277 /* ViewController.m */, 103 | 042C52CF16AE782900839277 /* AppDelegate.h */, 104 | 042C52D016AE782900839277 /* AppDelegate.m */, 105 | 042C52C716AE782900839277 /* Supporting Files */, 106 | ); 107 | path = "Image Map (ARC)"; 108 | sourceTree = ""; 109 | }; 110 | 042C52C716AE782900839277 /* Supporting Files */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 042C52C816AE782900839277 /* Image Map (ARC)-Info.plist */, 114 | 042C52C916AE782900839277 /* InfoPlist.strings */, 115 | 042C52CC16AE782900839277 /* main.m */, 116 | 042C52CE16AE782900839277 /* Image Map (ARC)-Prefix.pch */, 117 | 042C52D216AE782900839277 /* Default.png */, 118 | 042C52D416AE782900839277 /* Default@2x.png */, 119 | 042C52D616AE782900839277 /* Default-568h@2x.png */, 120 | ); 121 | name = "Supporting Files"; 122 | sourceTree = ""; 123 | }; 124 | 042C533716AE796F00839277 /* Resource */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 042C533816AE796F00839277 /* states_coord.plist */, 128 | 042C533916AE796F00839277 /* states_name.plist */, 129 | 042C533A16AE796F00839277 /* US_States.gif */, 130 | 042C533B16AE796F00839277 /* ViewController-iPad.xib */, 131 | 042C533C16AE796F00839277 /* ViewController-iPhone5.xib */, 132 | 042C533D16AE796F00839277 /* ViewController.xib */, 133 | ); 134 | name = Resource; 135 | path = ../Resource; 136 | sourceTree = ""; 137 | }; 138 | 042C53AE16AE811A00839277 /* MTImageMapView */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 042C53AF16AE811A00839277 /* MTImageMapView.h */, 142 | 042C53B016AE811A00839277 /* MTImageMapView.m */, 143 | ); 144 | name = MTImageMapView; 145 | path = ../MTImageMapView; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 042C52BB16AE782900839277 /* Image Map (ARC) */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 042C52E016AE782900839277 /* Build configuration list for PBXNativeTarget "Image Map (ARC)" */; 154 | buildPhases = ( 155 | 042C52B816AE782900839277 /* Sources */, 156 | 042C52B916AE782900839277 /* Frameworks */, 157 | 042C52BA16AE782900839277 /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = "Image Map (ARC)"; 164 | productName = "Image Map (ARC)"; 165 | productReference = 042C52BC16AE782900839277 /* Image Map (ARC).app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | /* End PBXNativeTarget section */ 169 | 170 | /* Begin PBXProject section */ 171 | 042C52B316AE782900839277 /* Project object */ = { 172 | isa = PBXProject; 173 | attributes = { 174 | LastUpgradeCheck = 0450; 175 | ORGANIZATIONNAME = "Colorful Glue"; 176 | }; 177 | buildConfigurationList = 042C52B616AE782900839277 /* Build configuration list for PBXProject "Image Map (ARC)" */; 178 | compatibilityVersion = "Xcode 3.2"; 179 | developmentRegion = English; 180 | hasScannedForEncodings = 0; 181 | knownRegions = ( 182 | en, 183 | ); 184 | mainGroup = 042C52B116AE782900839277; 185 | productRefGroup = 042C52BD16AE782900839277 /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | 042C52BB16AE782900839277 /* Image Map (ARC) */, 190 | ); 191 | }; 192 | /* End PBXProject section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | 042C52BA16AE782900839277 /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 042C52CB16AE782900839277 /* InfoPlist.strings in Resources */, 200 | 042C52D316AE782900839277 /* Default.png in Resources */, 201 | 042C52D516AE782900839277 /* Default@2x.png in Resources */, 202 | 042C52D716AE782900839277 /* Default-568h@2x.png in Resources */, 203 | 042C533E16AE796F00839277 /* states_coord.plist in Resources */, 204 | 042C533F16AE796F00839277 /* states_name.plist in Resources */, 205 | 042C534016AE796F00839277 /* US_States.gif in Resources */, 206 | 042C534116AE796F00839277 /* ViewController-iPad.xib in Resources */, 207 | 042C534216AE796F00839277 /* ViewController-iPhone5.xib in Resources */, 208 | 042C534316AE796F00839277 /* ViewController.xib in Resources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXResourcesBuildPhase section */ 213 | 214 | /* Begin PBXSourcesBuildPhase section */ 215 | 042C52B816AE782900839277 /* Sources */ = { 216 | isa = PBXSourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | 042C52CD16AE782900839277 /* main.m in Sources */, 220 | 042C52D116AE782900839277 /* AppDelegate.m in Sources */, 221 | 042C53AD16AE809F00839277 /* ViewController.m in Sources */, 222 | 042C53B116AE811A00839277 /* MTImageMapView.m in Sources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXSourcesBuildPhase section */ 227 | 228 | /* Begin PBXVariantGroup section */ 229 | 042C52C916AE782900839277 /* InfoPlist.strings */ = { 230 | isa = PBXVariantGroup; 231 | children = ( 232 | 042C52CA16AE782900839277 /* en */, 233 | ); 234 | name = InfoPlist.strings; 235 | sourceTree = ""; 236 | }; 237 | /* End PBXVariantGroup section */ 238 | 239 | /* Begin XCBuildConfiguration section */ 240 | 042C52DE16AE782900839277 /* Debug */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 245 | CLANG_CXX_LIBRARY = "libc++"; 246 | CLANG_ENABLE_OBJC_ARC = YES; 247 | CLANG_WARN_EMPTY_BODY = YES; 248 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 249 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 250 | COPY_PHASE_STRIP = NO; 251 | GCC_C_LANGUAGE_STANDARD = gnu99; 252 | GCC_DYNAMIC_NO_PIC = NO; 253 | GCC_OPTIMIZATION_LEVEL = 0; 254 | GCC_PREPROCESSOR_DEFINITIONS = ( 255 | "DEBUG=1", 256 | "$(inherited)", 257 | ); 258 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 259 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 260 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 261 | GCC_WARN_UNUSED_VARIABLE = YES; 262 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 263 | ONLY_ACTIVE_ARCH = YES; 264 | SDKROOT = iphoneos; 265 | }; 266 | name = Debug; 267 | }; 268 | 042C52DF16AE782900839277 /* Release */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | ALWAYS_SEARCH_USER_PATHS = NO; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_OBJC_ARC = YES; 275 | CLANG_WARN_EMPTY_BODY = YES; 276 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 277 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 278 | COPY_PHASE_STRIP = YES; 279 | GCC_C_LANGUAGE_STANDARD = gnu99; 280 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 281 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 282 | GCC_WARN_UNUSED_VARIABLE = YES; 283 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 284 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 285 | SDKROOT = iphoneos; 286 | VALIDATE_PRODUCT = YES; 287 | }; 288 | name = Release; 289 | }; 290 | 042C52E116AE782900839277 /* Debug */ = { 291 | isa = XCBuildConfiguration; 292 | buildSettings = { 293 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 294 | GCC_PREFIX_HEADER = "Image Map (ARC)/Image Map (ARC)-Prefix.pch"; 295 | INFOPLIST_FILE = "Image Map (ARC)/Image Map (ARC)-Info.plist"; 296 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 297 | PRODUCT_NAME = "$(TARGET_NAME)"; 298 | WRAPPER_EXTENSION = app; 299 | }; 300 | name = Debug; 301 | }; 302 | 042C52E216AE782900839277 /* Release */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 306 | GCC_PREFIX_HEADER = "Image Map (ARC)/Image Map (ARC)-Prefix.pch"; 307 | INFOPLIST_FILE = "Image Map (ARC)/Image Map (ARC)-Info.plist"; 308 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 309 | PRODUCT_NAME = "$(TARGET_NAME)"; 310 | WRAPPER_EXTENSION = app; 311 | }; 312 | name = Release; 313 | }; 314 | /* End XCBuildConfiguration section */ 315 | 316 | /* Begin XCConfigurationList section */ 317 | 042C52B616AE782900839277 /* Build configuration list for PBXProject "Image Map (ARC)" */ = { 318 | isa = XCConfigurationList; 319 | buildConfigurations = ( 320 | 042C52DE16AE782900839277 /* Debug */, 321 | 042C52DF16AE782900839277 /* Release */, 322 | ); 323 | defaultConfigurationIsVisible = 0; 324 | defaultConfigurationName = Release; 325 | }; 326 | 042C52E016AE782900839277 /* Build configuration list for PBXNativeTarget "Image Map (ARC)" */ = { 327 | isa = XCConfigurationList; 328 | buildConfigurations = ( 329 | 042C52E116AE782900839277 /* Debug */, 330 | 042C52E216AE782900839277 /* Release */, 331 | ); 332 | defaultConfigurationIsVisible = 0; 333 | defaultConfigurationName = Release; 334 | }; 335 | /* End XCConfigurationList section */ 336 | }; 337 | rootObject = 042C52B316AE782900839277 /* Project object */; 338 | } 339 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC).xcodeproj/project.xcworkspace/xcuserdata/almightykim.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (ARC)/Image Map (ARC).xcodeproj/project.xcworkspace/xcuserdata/almightykim.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2017 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import 32 | 33 | @class ViewController; 34 | 35 | @interface AppDelegate : UIResponder 36 | @property (strong, nonatomic) UIWindow *window; 37 | @property (strong, nonatomic) ViewController *viewController; 38 | @end 39 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2017 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import "AppDelegate.h" 32 | #import "ViewController.h" 33 | 34 | @implementation AppDelegate 35 | 36 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 37 | { 38 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 39 | self.viewController = [[ViewController alloc] init]; 40 | self.window.rootViewController = self.viewController; 41 | [self.window makeKeyAndVisible]; 42 | return YES; 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (ARC)/Image Map (ARC)/Default-568h@2x.png -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (ARC)/Image Map (ARC)/Default.png -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (ARC)/Image Map (ARC)/Default@2x.png -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/Image Map (ARC)-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.colorfulglue.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/Image Map (ARC)-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Image Map (ARC)' target in the 'Image Map (ARC)' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/ViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2017 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | 32 | #import 33 | #import "MTImageMapView.h" 34 | 35 | @interface ViewController : UIViewController 36 | 37 | @property (nonatomic, assign) IBOutlet UIScrollView *viewScrollStub; 38 | @property (nonatomic, assign) IBOutlet MTImageMapView *viewImageMap; 39 | @property (nonatomic, strong) NSArray *stateNames; 40 | @end -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/ViewController.m: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2017 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import "ViewController.h" 32 | 33 | 34 | @implementation ViewController 35 | { 36 | __unsafe_unretained UIScrollView *_viewScrollStub; 37 | __unsafe_unretained MTImageMapView *_viewImageMap; 38 | __strong NSArray *_stateNames; 39 | } 40 | @synthesize viewScrollStub = _viewScrollStub; 41 | @synthesize viewImageMap = _viewImageMap; 42 | @synthesize stateNames = _stateNames; 43 | 44 | -(NSString *)nibName 45 | { 46 | if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) 47 | { 48 | CGSize result = [[UIScreen mainScreen] bounds].size; 49 | 50 | if (result.height == 480.f) 51 | { 52 | return @"ViewController"; 53 | } 54 | else 55 | { 56 | return @"ViewController-iPhone5"; 57 | } 58 | } 59 | 60 | return @"ViewController-iPad"; 61 | } 62 | 63 | - (void)loadView 64 | { 65 | [super loadView]; 66 | // Do any additional setup after loading the view, typically from a nib. 67 | 68 | self.stateNames = \ 69 | [NSArray arrayWithContentsOfFile: 70 | [[NSBundle mainBundle] 71 | pathForResource:@"states_name" 72 | ofType:@"plist"]]; 73 | 74 | [_viewScrollStub addSubview:_viewImageMap]; 75 | [_viewScrollStub setContentSize: 76 | [_viewImageMap sizeThatFits:CGSizeZero] 77 | ]; 78 | 79 | NSArray *arrStates = \ 80 | [NSArray arrayWithContentsOfFile: 81 | [[NSBundle mainBundle] 82 | pathForResource:@"states_coord" 83 | ofType:@"plist"]]; 84 | 85 | [_viewImageMap 86 | setMapping:arrStates 87 | doneBlock:^(MTImageMapView *imageMapView) { 88 | NSLog(@"Areas are all mapped"); 89 | }]; 90 | } 91 | 92 | -(void)imageMapView:(MTImageMapView *)inImageMapView 93 | didSelectMapArea:(NSUInteger)inIndexSelected 94 | areaCentrePoint:(CGPoint)point 95 | { 96 | [[[UIAlertView alloc] 97 | initWithTitle:@"*** State Name ***" 98 | message:[_stateNames objectAtIndex:inIndexSelected] 99 | delegate:nil 100 | cancelButtonTitle:@"Ok" 101 | otherButtonTitles:nil] show]; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Image Map (ARC)/Image Map (ARC)/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2013 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import 32 | 33 | #import "AppDelegate.h" 34 | 35 | int main(int argc, char *argv[]) 36 | { 37 | @autoreleasepool { 38 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC).xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 042C536C16AE7F4300839277 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 042C536B16AE7F4300839277 /* UIKit.framework */; }; 11 | 042C536E16AE7F4300839277 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 042C536D16AE7F4300839277 /* Foundation.framework */; }; 12 | 042C537016AE7F4300839277 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 042C536F16AE7F4300839277 /* CoreGraphics.framework */; }; 13 | 042C537616AE7F4300839277 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 042C537416AE7F4300839277 /* InfoPlist.strings */; }; 14 | 042C537816AE7F4300839277 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C537716AE7F4300839277 /* main.m */; }; 15 | 042C537C16AE7F4300839277 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C537B16AE7F4300839277 /* AppDelegate.m */; }; 16 | 042C537E16AE7F4300839277 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 042C537D16AE7F4300839277 /* Default.png */; }; 17 | 042C538016AE7F4300839277 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 042C537F16AE7F4300839277 /* Default@2x.png */; }; 18 | 042C538216AE7F4300839277 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 042C538116AE7F4300839277 /* Default-568h@2x.png */; }; 19 | 042C539116AE7F5200839277 /* MTImageMapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C539016AE7F5200839277 /* MTImageMapView.m */; }; 20 | 042C539916AE7F5C00839277 /* states_coord.plist in Resources */ = {isa = PBXBuildFile; fileRef = 042C539316AE7F5C00839277 /* states_coord.plist */; }; 21 | 042C539A16AE7F5C00839277 /* states_name.plist in Resources */ = {isa = PBXBuildFile; fileRef = 042C539416AE7F5C00839277 /* states_name.plist */; }; 22 | 042C539B16AE7F5C00839277 /* US_States.gif in Resources */ = {isa = PBXBuildFile; fileRef = 042C539516AE7F5C00839277 /* US_States.gif */; }; 23 | 042C539C16AE7F5C00839277 /* ViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 042C539616AE7F5C00839277 /* ViewController-iPad.xib */; }; 24 | 042C539D16AE7F5C00839277 /* ViewController-iPhone5.xib in Resources */ = {isa = PBXBuildFile; fileRef = 042C539716AE7F5C00839277 /* ViewController-iPhone5.xib */; }; 25 | 042C539E16AE7F5C00839277 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 042C539816AE7F5C00839277 /* ViewController.xib */; }; 26 | 042C53A116AE7FA300839277 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 042C53A016AE7FA300839277 /* ViewController.m */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 042C536716AE7F4300839277 /* Image Map (MRC).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Image Map (MRC).app"; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 042C536B16AE7F4300839277 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 32 | 042C536D16AE7F4300839277 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 33 | 042C536F16AE7F4300839277 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 34 | 042C537316AE7F4300839277 /* Image Map (MRC)-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Image Map (MRC)-Info.plist"; sourceTree = ""; }; 35 | 042C537516AE7F4300839277 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 36 | 042C537716AE7F4300839277 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 37 | 042C537916AE7F4300839277 /* Image Map (MRC)-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Image Map (MRC)-Prefix.pch"; sourceTree = ""; }; 38 | 042C537A16AE7F4300839277 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 39 | 042C537B16AE7F4300839277 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 40 | 042C537D16AE7F4300839277 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 41 | 042C537F16AE7F4300839277 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 42 | 042C538116AE7F4300839277 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 43 | 042C538F16AE7F5200839277 /* MTImageMapView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTImageMapView.h; sourceTree = ""; }; 44 | 042C539016AE7F5200839277 /* MTImageMapView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTImageMapView.m; sourceTree = ""; }; 45 | 042C539316AE7F5C00839277 /* states_coord.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = states_coord.plist; sourceTree = ""; }; 46 | 042C539416AE7F5C00839277 /* states_name.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = states_name.plist; sourceTree = ""; }; 47 | 042C539516AE7F5C00839277 /* US_States.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = US_States.gif; sourceTree = ""; }; 48 | 042C539616AE7F5C00839277 /* ViewController-iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ViewController-iPad.xib"; sourceTree = ""; }; 49 | 042C539716AE7F5C00839277 /* ViewController-iPhone5.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "ViewController-iPhone5.xib"; sourceTree = ""; }; 50 | 042C539816AE7F5C00839277 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; }; 51 | 042C539F16AE7FA300839277 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 52 | 042C53A016AE7FA300839277 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 042C536416AE7F4300839277 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 042C536C16AE7F4300839277 /* UIKit.framework in Frameworks */, 61 | 042C536E16AE7F4300839277 /* Foundation.framework in Frameworks */, 62 | 042C537016AE7F4300839277 /* CoreGraphics.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 042C535C16AE7F4300839277 = { 70 | isa = PBXGroup; 71 | children = ( 72 | 042C538E16AE7F5200839277 /* MTImageMapView */, 73 | 042C537116AE7F4300839277 /* Image Map (MRC) */, 74 | 042C539216AE7F5C00839277 /* Resource */, 75 | 042C536A16AE7F4300839277 /* Frameworks */, 76 | 042C536816AE7F4300839277 /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 042C536816AE7F4300839277 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 042C536716AE7F4300839277 /* Image Map (MRC).app */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 042C536A16AE7F4300839277 /* Frameworks */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 042C536B16AE7F4300839277 /* UIKit.framework */, 92 | 042C536D16AE7F4300839277 /* Foundation.framework */, 93 | 042C536F16AE7F4300839277 /* CoreGraphics.framework */, 94 | ); 95 | name = Frameworks; 96 | sourceTree = ""; 97 | }; 98 | 042C537116AE7F4300839277 /* Image Map (MRC) */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 042C539F16AE7FA300839277 /* ViewController.h */, 102 | 042C53A016AE7FA300839277 /* ViewController.m */, 103 | 042C537A16AE7F4300839277 /* AppDelegate.h */, 104 | 042C537B16AE7F4300839277 /* AppDelegate.m */, 105 | 042C537216AE7F4300839277 /* Supporting Files */, 106 | ); 107 | path = "Image Map (MRC)"; 108 | sourceTree = ""; 109 | }; 110 | 042C537216AE7F4300839277 /* Supporting Files */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 042C537316AE7F4300839277 /* Image Map (MRC)-Info.plist */, 114 | 042C537416AE7F4300839277 /* InfoPlist.strings */, 115 | 042C537716AE7F4300839277 /* main.m */, 116 | 042C537916AE7F4300839277 /* Image Map (MRC)-Prefix.pch */, 117 | 042C537D16AE7F4300839277 /* Default.png */, 118 | 042C537F16AE7F4300839277 /* Default@2x.png */, 119 | 042C538116AE7F4300839277 /* Default-568h@2x.png */, 120 | ); 121 | name = "Supporting Files"; 122 | sourceTree = ""; 123 | }; 124 | 042C538E16AE7F5200839277 /* MTImageMapView */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 042C538F16AE7F5200839277 /* MTImageMapView.h */, 128 | 042C539016AE7F5200839277 /* MTImageMapView.m */, 129 | ); 130 | name = MTImageMapView; 131 | path = ../MTImageMapView; 132 | sourceTree = ""; 133 | }; 134 | 042C539216AE7F5C00839277 /* Resource */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 042C539316AE7F5C00839277 /* states_coord.plist */, 138 | 042C539416AE7F5C00839277 /* states_name.plist */, 139 | 042C539516AE7F5C00839277 /* US_States.gif */, 140 | 042C539616AE7F5C00839277 /* ViewController-iPad.xib */, 141 | 042C539716AE7F5C00839277 /* ViewController-iPhone5.xib */, 142 | 042C539816AE7F5C00839277 /* ViewController.xib */, 143 | ); 144 | name = Resource; 145 | path = ../Resource; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 042C536616AE7F4300839277 /* Image Map (MRC) */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 042C538B16AE7F4300839277 /* Build configuration list for PBXNativeTarget "Image Map (MRC)" */; 154 | buildPhases = ( 155 | 042C536316AE7F4300839277 /* Sources */, 156 | 042C536416AE7F4300839277 /* Frameworks */, 157 | 042C536516AE7F4300839277 /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = "Image Map (MRC)"; 164 | productName = "Image Map (MRC)"; 165 | productReference = 042C536716AE7F4300839277 /* Image Map (MRC).app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | /* End PBXNativeTarget section */ 169 | 170 | /* Begin PBXProject section */ 171 | 042C535E16AE7F4300839277 /* Project object */ = { 172 | isa = PBXProject; 173 | attributes = { 174 | LastUpgradeCheck = 0450; 175 | ORGANIZATIONNAME = "Colorful Glue"; 176 | }; 177 | buildConfigurationList = 042C536116AE7F4300839277 /* Build configuration list for PBXProject "Image Map (MRC)" */; 178 | compatibilityVersion = "Xcode 3.2"; 179 | developmentRegion = English; 180 | hasScannedForEncodings = 0; 181 | knownRegions = ( 182 | en, 183 | ); 184 | mainGroup = 042C535C16AE7F4300839277; 185 | productRefGroup = 042C536816AE7F4300839277 /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | 042C536616AE7F4300839277 /* Image Map (MRC) */, 190 | ); 191 | }; 192 | /* End PBXProject section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | 042C536516AE7F4300839277 /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 042C537616AE7F4300839277 /* InfoPlist.strings in Resources */, 200 | 042C537E16AE7F4300839277 /* Default.png in Resources */, 201 | 042C538016AE7F4300839277 /* Default@2x.png in Resources */, 202 | 042C538216AE7F4300839277 /* Default-568h@2x.png in Resources */, 203 | 042C539916AE7F5C00839277 /* states_coord.plist in Resources */, 204 | 042C539A16AE7F5C00839277 /* states_name.plist in Resources */, 205 | 042C539B16AE7F5C00839277 /* US_States.gif in Resources */, 206 | 042C539C16AE7F5C00839277 /* ViewController-iPad.xib in Resources */, 207 | 042C539D16AE7F5C00839277 /* ViewController-iPhone5.xib in Resources */, 208 | 042C539E16AE7F5C00839277 /* ViewController.xib in Resources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXResourcesBuildPhase section */ 213 | 214 | /* Begin PBXSourcesBuildPhase section */ 215 | 042C536316AE7F4300839277 /* Sources */ = { 216 | isa = PBXSourcesBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | 042C537816AE7F4300839277 /* main.m in Sources */, 220 | 042C537C16AE7F4300839277 /* AppDelegate.m in Sources */, 221 | 042C539116AE7F5200839277 /* MTImageMapView.m in Sources */, 222 | 042C53A116AE7FA300839277 /* ViewController.m in Sources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXSourcesBuildPhase section */ 227 | 228 | /* Begin PBXVariantGroup section */ 229 | 042C537416AE7F4300839277 /* InfoPlist.strings */ = { 230 | isa = PBXVariantGroup; 231 | children = ( 232 | 042C537516AE7F4300839277 /* en */, 233 | ); 234 | name = InfoPlist.strings; 235 | sourceTree = ""; 236 | }; 237 | /* End PBXVariantGroup section */ 238 | 239 | /* Begin XCBuildConfiguration section */ 240 | 042C538916AE7F4300839277 /* Debug */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 245 | CLANG_CXX_LIBRARY = "libc++"; 246 | CLANG_WARN_EMPTY_BODY = YES; 247 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 248 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 249 | COPY_PHASE_STRIP = NO; 250 | GCC_C_LANGUAGE_STANDARD = gnu99; 251 | GCC_DYNAMIC_NO_PIC = NO; 252 | GCC_OPTIMIZATION_LEVEL = 0; 253 | GCC_PREPROCESSOR_DEFINITIONS = ( 254 | "DEBUG=1", 255 | "$(inherited)", 256 | ); 257 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 258 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 259 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 260 | GCC_WARN_UNUSED_VARIABLE = YES; 261 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 262 | ONLY_ACTIVE_ARCH = YES; 263 | SDKROOT = iphoneos; 264 | }; 265 | name = Debug; 266 | }; 267 | 042C538A16AE7F4300839277 /* Release */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 272 | CLANG_CXX_LIBRARY = "libc++"; 273 | CLANG_WARN_EMPTY_BODY = YES; 274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 275 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 276 | COPY_PHASE_STRIP = YES; 277 | GCC_C_LANGUAGE_STANDARD = gnu99; 278 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 279 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 280 | GCC_WARN_UNUSED_VARIABLE = YES; 281 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 282 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 283 | SDKROOT = iphoneos; 284 | VALIDATE_PRODUCT = YES; 285 | }; 286 | name = Release; 287 | }; 288 | 042C538C16AE7F4300839277 /* Debug */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 292 | GCC_PREFIX_HEADER = "Image Map (MRC)/Image Map (MRC)-Prefix.pch"; 293 | INFOPLIST_FILE = "Image Map (MRC)/Image Map (MRC)-Info.plist"; 294 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | WRAPPER_EXTENSION = app; 297 | }; 298 | name = Debug; 299 | }; 300 | 042C538D16AE7F4300839277 /* Release */ = { 301 | isa = XCBuildConfiguration; 302 | buildSettings = { 303 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 304 | GCC_PREFIX_HEADER = "Image Map (MRC)/Image Map (MRC)-Prefix.pch"; 305 | INFOPLIST_FILE = "Image Map (MRC)/Image Map (MRC)-Info.plist"; 306 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 307 | PRODUCT_NAME = "$(TARGET_NAME)"; 308 | WRAPPER_EXTENSION = app; 309 | }; 310 | name = Release; 311 | }; 312 | /* End XCBuildConfiguration section */ 313 | 314 | /* Begin XCConfigurationList section */ 315 | 042C536116AE7F4300839277 /* Build configuration list for PBXProject "Image Map (MRC)" */ = { 316 | isa = XCConfigurationList; 317 | buildConfigurations = ( 318 | 042C538916AE7F4300839277 /* Debug */, 319 | 042C538A16AE7F4300839277 /* Release */, 320 | ); 321 | defaultConfigurationIsVisible = 0; 322 | defaultConfigurationName = Release; 323 | }; 324 | 042C538B16AE7F4300839277 /* Build configuration list for PBXNativeTarget "Image Map (MRC)" */ = { 325 | isa = XCConfigurationList; 326 | buildConfigurations = ( 327 | 042C538C16AE7F4300839277 /* Debug */, 328 | 042C538D16AE7F4300839277 /* Release */, 329 | ); 330 | defaultConfigurationIsVisible = 0; 331 | }; 332 | /* End XCConfigurationList section */ 333 | }; 334 | rootObject = 042C535E16AE7F4300839277 /* Project object */; 335 | } 336 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC).xcodeproj/project.xcworkspace/xcuserdata/almightykim.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (MRC)/Image Map (MRC).xcodeproj/project.xcworkspace/xcuserdata/almightykim.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2013 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | 32 | #import 33 | 34 | @class ViewController; 35 | 36 | @interface AppDelegate : UIResponder 37 | @property (strong, nonatomic) UIWindow *window; 38 | @property (strong, nonatomic) ViewController *viewController; 39 | @end 40 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2013 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | 32 | #import "AppDelegate.h" 33 | #import "ViewController.h" 34 | 35 | @implementation AppDelegate 36 | 37 | - (void)dealloc 38 | { 39 | [_window release]; 40 | [_viewController release]; 41 | [super dealloc]; 42 | } 43 | 44 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 45 | { 46 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 47 | self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease]; 48 | self.window.rootViewController = self.viewController; 49 | [self.window makeKeyAndVisible]; 50 | return YES; 51 | } 52 | @end -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (MRC)/Image Map (MRC)/Default-568h@2x.png -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (MRC)/Image Map (MRC)/Default.png -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Image Map (MRC)/Image Map (MRC)/Default@2x.png -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/Image Map (MRC)-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.colorfulglue.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/Image Map (MRC)-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Image Map (MRC)' target in the 'Image Map (MRC)' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/ViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2013 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import 32 | #import "MTImageMapView.h" 33 | 34 | @interface ViewController : UIViewController 35 | 36 | @property (nonatomic, assign) IBOutlet UIScrollView *viewScrollStub; 37 | @property (nonatomic, assign) IBOutlet MTImageMapView *viewImageMap; 38 | @property (nonatomic, retain) NSArray *stateNames; 39 | @end 40 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/ViewController.m: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2013 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import "ViewController.h" 32 | @implementation ViewController 33 | { 34 | UIScrollView *_viewScrollStub; 35 | MTImageMapView *_viewImageMap; 36 | NSArray *_stateNames; 37 | } 38 | @synthesize viewScrollStub = _viewScrollStub; 39 | @synthesize viewImageMap = _viewImageMap; 40 | @synthesize stateNames = _stateNames; 41 | 42 | -(NSString *)nibName 43 | { 44 | if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) 45 | { 46 | CGSize result = [[UIScreen mainScreen] bounds].size; 47 | 48 | if(result.height == 480.f) 49 | { 50 | return @"ViewController"; 51 | } 52 | else 53 | { 54 | return @"ViewController-iPhone5"; 55 | } 56 | } 57 | 58 | return @"ViewController-iPad"; 59 | } 60 | 61 | - (void)loadView 62 | { 63 | [super loadView]; 64 | // Do any additional setup after loading the view, typically from a nib. 65 | 66 | self.stateNames = \ 67 | [NSArray arrayWithContentsOfFile: 68 | [[NSBundle mainBundle] 69 | pathForResource:@"states_name" 70 | ofType:@"plist"]]; 71 | 72 | [_viewScrollStub addSubview:_viewImageMap]; 73 | [_viewScrollStub setContentSize: 74 | [_viewImageMap sizeThatFits:CGSizeZero] 75 | ]; 76 | 77 | NSArray *arrStates = \ 78 | [NSArray arrayWithContentsOfFile: 79 | [[NSBundle mainBundle] 80 | pathForResource:@"states_coord" 81 | ofType:@"plist"]]; 82 | 83 | [_viewImageMap 84 | setMapping:arrStates 85 | doneBlock:^(MTImageMapView *imageMapView) { 86 | NSLog(@"Areas are all mapped"); 87 | }]; 88 | } 89 | 90 | -(void)imageMapView:(MTImageMapView *)inImageMapView 91 | didSelectMapArea:(NSUInteger)inIndexSelected areaCenterPoint :(CGPoint)point 92 | { 93 | [[[[UIAlertView alloc] 94 | initWithTitle:@"*** State Name ***" 95 | message:[_stateNames objectAtIndex:inIndexSelected] 96 | delegate:nil 97 | cancelButtonTitle:@"Ok" 98 | otherButtonTitles:nil] 99 | autorelease] show]; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Image Map (MRC)/Image Map (MRC)/main.m: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2013 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import 32 | 33 | #import "AppDelegate.h" 34 | 35 | int main(int argc, char *argv[]) 36 | { 37 | @autoreleasepool { 38 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | License 2 | ======= 3 | 4 | BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 5 | 6 | Copyright (c) 2012-2013 Sung-Taek, Kim All Rights Reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | Redistributions of source code must retain the above copyright notice, 12 | this list of conditions and the following disclaimer. Redistributions in 13 | binary form must reproduce the above copyright notice, this list of 14 | conditions and the following disclaimer in the documentation and/or other 15 | materials provided with the distribution. Neither the name of Sung-Ta 16 | ek kim nor the names of its contributors may be used to endorse or promote 17 | products derived from this software without specific prior written 18 | permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 19 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 20 | NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 24 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /MTImageMapView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /MTImageMapView.xcworkspace/xcshareddata/MTImageMapView.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 2BEAD264-E15C-4446-A7B2-AC49D4A01D39 9 | IDESourceControlProjectName 10 | MTImageMapView 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 2FC3B263-C93A-49E6-A755-D327D8998C1C 14 | https://github.com/stkim1/MTImageMapView.git 15 | 16 | IDESourceControlProjectPath 17 | MTImageMapView.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 2FC3B263-C93A-49E6-A755-D327D8998C1C 21 | .. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/stkim1/MTImageMapView.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 2FC3B263-C93A-49E6-A755-D327D8998C1C 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 2FC3B263-C93A-49E6-A755-D327D8998C1C 36 | IDESourceControlWCCName 37 | MTImageMapView 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MTImageMapView/MTImageMapView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2017 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #import 32 | 33 | // in case you want to debug... 34 | //#define DEBUG_MAP_AREA 35 | 36 | @class MTImageMapView; 37 | 38 | @protocol MTImageMapDelegate 39 | -(void)imageMapView:(MTImageMapView *)inImageMapView 40 | didSelectMapArea:(NSUInteger)inIndexSelected 41 | areaCentrePoint:(CGPoint)point; 42 | @end 43 | 44 | @interface MTImageMapView : UIImageView 45 | @property (nonatomic, assign) IBOutlet id delegate; 46 | -(void)setMapping:(NSArray *)inArrMapping 47 | doneBlock:(void (^)(MTImageMapView *imageMapView))inBlockDone; 48 | @end 49 | -------------------------------------------------------------------------------- /MTImageMapView/MTImageMapView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * BSD license follows (http://www.opensource.org/licenses/bsd-license.php) 4 | * 5 | * Copyright (c) 2012-2017 Sung-Taek, Kim All Rights Reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without modification, 8 | * are permitted provided that the following conditions are met: 9 | * 10 | * Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. Redistributions in 12 | * binary form must reproduce the above copyright notice, this list of 13 | * conditions and the following disclaimer in the documentation and/or other 14 | * materials provided with the distribution. Neither the name of Sung-Ta 15 | * ek kim nor the names of its contributors may be used to endorse or promote 16 | * products derived from this software without specific prior written 17 | * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 18 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 19 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 23 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | 32 | #import "MTImageMapView.h" 33 | 34 | #pragma mark MACRO 35 | 36 | #ifdef DEBUG 37 | #define MTLOG(args...) NSLog(@"%@",[NSString stringWithFormat:args]) 38 | #else 39 | #define MTLOG(args...) 40 | #endif 41 | 42 | #define MTASSERT(cond,desc...) NSAssert(cond, @"%@", [NSString stringWithFormat: desc]) 43 | #if __has_feature(objc_arc) 44 | #define SAFE_DEALLOC_CHECK(__POINTER) 45 | #else 46 | #define SAFE_DEALLOC_CHECK(__POINTER) {[super dealloc];} 47 | #endif 48 | 49 | #define IS_NULL_STRING(__POINTER) \ 50 | (__POINTER == nil || \ 51 | __POINTER == (NSString *)[NSNull null] || \ 52 | ![__POINTER isKindOfClass:[NSString class]] || \ 53 | ![__POINTER length]) 54 | 55 | 56 | #pragma mark - INTERFACES 57 | #pragma mark - 58 | #pragma mark Debug View 59 | #ifdef DEBUG_MAP_AREA 60 | @interface MTMapDebugView: UIView 61 | @property (nonatomic, assign) NSMutableArray *mapAreasToDebug; 62 | @property (nonatomic) CGPoint aTouchPoint; 63 | @end 64 | #endif 65 | 66 | #pragma mark Map Area Model 67 | @interface MTMapArea : NSObject 68 | @property (nonatomic, retain) UIBezierPath *mapArea; 69 | @property (nonatomic, readonly) NSUInteger areaID; 70 | @property (nonatomic) CGPoint centrePoint; 71 | -(id)initWithCoordinate:(NSString*)inStrCoordinate areaID:(NSInteger)inAreaID; 72 | -(BOOL)isAreaSelected:(CGPoint)inPointTouch; 73 | @end 74 | 75 | #pragma mark Image Map View 76 | @interface MTImageMapView() 77 | @property (atomic, strong) NSMutableArray *mapAreas; 78 | -(void)_finishConstructionWithImage:(UIImage *)inImage; 79 | -(void)_performHitTestOnArea:(NSValue *)inTouchPoint; 80 | 81 | #ifdef DEBUG_MAP_AREA 82 | #if __has_feature(objc_arc) 83 | @property (nonatomic, strong) MTMapDebugView *viewDebugPath; 84 | #else 85 | @property (nonatomic, retain) MTMapDebugView *viewDebugPath; 86 | #endif 87 | #endif 88 | 89 | @end 90 | 91 | #pragma mark - IMPLEMENTATIONS 92 | #pragma mark - 93 | #pragma mark Image Map View 94 | @implementation MTImageMapView 95 | { 96 | #if __has_feature(objc_arc) 97 | __unsafe_unretained id _delegate; 98 | #else 99 | id _delegate; 100 | #endif 101 | } 102 | 103 | @synthesize mapAreas; 104 | @synthesize delegate = _delegate; 105 | 106 | #ifdef DEBUG_MAP_AREA 107 | @synthesize viewDebugPath; 108 | #endif 109 | 110 | -(id)initWithImage:(UIImage *)image 111 | { 112 | self = [super initWithImage:image]; 113 | if (self != nil) 114 | { 115 | self.mapAreas = [NSMutableArray arrayWithCapacity:0]; 116 | [self _finishConstructionWithImage:image]; 117 | } 118 | return self; 119 | } 120 | 121 | -(id)initWithImage:(UIImage *)image highlightedImage:(UIImage *)highlightedImage 122 | { 123 | self = [super initWithImage:image highlightedImage:highlightedImage]; 124 | if (self != nil) 125 | { 126 | self.mapAreas = [NSMutableArray arrayWithCapacity:0]; 127 | [self _finishConstructionWithImage:image]; 128 | } 129 | return self; 130 | } 131 | 132 | -(id)initWithCoder:(NSCoder *)aDecoder 133 | { 134 | self = [super initWithCoder:aDecoder]; 135 | if (self != nil) 136 | { 137 | self.mapAreas = [NSMutableArray arrayWithCapacity:0]; 138 | [self _finishConstructionWithImage:self.image]; 139 | } 140 | return self; 141 | } 142 | 143 | -(void)dealloc 144 | { 145 | #ifdef DEBUG_MAP_AREA 146 | self.viewDebugPath = nil; 147 | #endif 148 | self.mapAreas = nil; 149 | self.delegate = nil; 150 | 151 | SAFE_DEALLOC_CHECK(self); 152 | } 153 | 154 | -(BOOL)canBecomeFirstResponder 155 | { 156 | return YES; 157 | } 158 | 159 | // public methods 160 | -(void)setMapping:(NSArray *)inMappingArea 161 | doneBlock:(void (^)(MTImageMapView *imageMapView))inBlockDone 162 | { 163 | MTASSERT(inMappingArea != nil, @"mapping array cannot be nil"); 164 | MTASSERT([inMappingArea count] != 0, @"mapping array should have element"); 165 | 166 | dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0); 167 | dispatch_group_t group = dispatch_group_create(); 168 | NSUInteger countArea = [inMappingArea count]; 169 | NSString* aStrArea = nil; 170 | 171 | [self.mapAreas removeAllObjects]; 172 | #ifdef DEBUG_MAP_AREA 173 | [self.viewDebugPath setMapAreasToDebug:[self mapAreas]]; 174 | #endif 175 | 176 | __block typeof (self) belf = self; 177 | for (NSUInteger index = 0; index < countArea; index++) 178 | { 179 | aStrArea = [inMappingArea objectAtIndex:index]; 180 | 181 | dispatch_group_async(group,queue,^{ 182 | @autoreleasepool { 183 | MTMapArea* anArea = \ 184 | [[MTMapArea alloc] 185 | initWithCoordinate:aStrArea 186 | areaID:index]; 187 | [[belf mapAreas] addObject:anArea]; 188 | #if !__has_feature(objc_arc) 189 | [anArea release]; 190 | #endif 191 | } 192 | }); 193 | } 194 | 195 | if (inBlockDone != NULL) 196 | { 197 | dispatch_group_notify(group, dispatch_get_main_queue(), ^{ 198 | inBlockDone(belf); 199 | }); 200 | } 201 | 202 | #if !OS_OBJECT_USE_OBJC 203 | dispatch_release(queue); 204 | dispatch_release(group); 205 | #endif 206 | } 207 | 208 | // private methods 209 | -(void)_finishConstructionWithImage:(UIImage *)inImage 210 | { 211 | CGSize imageSize = [inImage size]; 212 | CGRect imageFrame = (CGRect){CGPointZero,imageSize}; 213 | 214 | // set frame to size of image 215 | [self setFrame:imageFrame]; 216 | 217 | //do not change width or height by aytoresizing 218 | UIViewAutoresizing sizingOption = [self autoresizingMask]; 219 | UIViewAutoresizing sizingFilter = \ 220 | (UIViewAutoresizingFlexibleWidth | 221 | UIViewAutoresizingFlexibleHeight) ^ (NSUInteger)(-1); 222 | sizingOption &= sizingFilter; 223 | [self setAutoresizingMask:sizingOption]; 224 | [self setUserInteractionEnabled:YES]; 225 | [self setMultipleTouchEnabled:NO]; 226 | 227 | #ifdef DEBUG_MAP_AREA 228 | self.viewDebugPath = \ 229 | [[MTMapDebugView alloc] initWithFrame:imageFrame]; 230 | [self.viewDebugPath setBackgroundColor:[UIColor clearColor]]; 231 | [self addSubview:self.viewDebugPath]; 232 | 233 | #if !__has_feature(objc_arc) 234 | [self.viewDebugPath release]; 235 | #endif 236 | 237 | #endif 238 | } 239 | 240 | -(void)_performHitTestOnArea:(NSValue *)inTouchPoint 241 | { 242 | MTASSERT(inTouchPoint != nil, @"touch point is null"); 243 | 244 | CGPoint aTouchPoint = [inTouchPoint CGPointValue]; 245 | NSArray* areaArray = [self mapAreas]; 246 | 247 | for (MTMapArea *anArea in areaArray) 248 | { 249 | if ([anArea isAreaSelected:aTouchPoint]) 250 | { 251 | if (_delegate != nil 252 | && [_delegate conformsToProtocol:@protocol(MTImageMapDelegate)] 253 | && [_delegate 254 | respondsToSelector: 255 | @selector(imageMapView:didSelectMapArea:areaCentrePoint:)]) 256 | { 257 | [_delegate 258 | imageMapView:self 259 | didSelectMapArea:anArea.areaID 260 | areaCentrePoint:anArea.centrePoint]; 261 | } 262 | break; 263 | } 264 | } 265 | } 266 | 267 | -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 268 | { 269 | [super touchesEnded:touches withEvent:event]; 270 | // cancel previous touch ended event 271 | [NSObject cancelPreviousPerformRequestsWithTarget:self]; 272 | 273 | CGPoint touchPoint = [[touches anyObject] locationInView:self]; 274 | NSValue* touchValue = [NSValue valueWithCGPoint:touchPoint]; 275 | 276 | // perform new one 277 | [self 278 | performSelector:@selector(_performHitTestOnArea:) 279 | withObject:touchValue 280 | afterDelay:0.1]; 281 | 282 | #ifdef DEBUG_MAP_AREA 283 | [self.viewDebugPath setATouchPoint:touchPoint]; 284 | [self.viewDebugPath setNeedsDisplay]; 285 | #endif 286 | } 287 | @end 288 | 289 | 290 | #pragma mark Debug View 291 | #ifdef DEBUG_MAP_AREA 292 | @implementation MTMapDebugView 293 | @synthesize mapAreasToDebug = _mapAreasToDebug; 294 | @synthesize aTouchPoint = _aTouchPoint; 295 | 296 | - (void)drawRect:(CGRect)rect 297 | { 298 | [super drawRect:rect]; 299 | 300 | if (_mapAreasToDebug == nil || ![_mapAreasToDebug count]) 301 | return; 302 | 303 | CGContextRef context = UIGraphicsGetCurrentContext(); 304 | CGContextSaveGState(context); 305 | // drawing path 306 | CGContextSetLineWidth(context, 1.0); 307 | UIColor *lineColor = [UIColor blueColor]; 308 | CGContextSetStrokeColorWithColor(context, lineColor.CGColor); 309 | CGContextSetFillColorWithColor(context, lineColor.CGColor); 310 | 311 | CGContextDrawPath(context, kCGPathFillStroke); 312 | CGContextSetLineJoin(context,kCGLineJoinRound); 313 | CGContextSetLineCap(context,kCGLineCapButt); 314 | CGContextSetBlendMode(context,kCGBlendModePlusLighter); 315 | 316 | CGRect dotRect = \ 317 | CGRectMake(_aTouchPoint.x - 3, _aTouchPoint.y - 3.0, 5.0, 5.0); 318 | CGContextAddEllipseInRect(context, dotRect); 319 | 320 | CGContextDrawPath(context, kCGPathStroke); 321 | for (MTMapArea *anArea in _mapAreasToDebug) 322 | { 323 | CGContextAddPath(context, anArea.mapArea.CGPath); 324 | } 325 | 326 | CGContextStrokePath(context); 327 | CGContextRestoreGState(context); 328 | } 329 | @end 330 | #endif 331 | 332 | 333 | #pragma mark Map Area Model 334 | @implementation MTMapArea 335 | { 336 | UIBezierPath *_mapArea; 337 | NSUInteger _areaID; 338 | CGPoint _centrePoint; 339 | } 340 | @synthesize mapArea = _mapArea; 341 | @synthesize areaID = _areaID; 342 | @synthesize centrePoint = _centrePoint; 343 | 344 | -(id)initWithCoordinate:(NSString*)inStrCoordinate areaID:(NSInteger)inAreaID 345 | { 346 | self = [super init]; 347 | 348 | if (self != nil) 349 | { 350 | // set area id 351 | _areaID = inAreaID; 352 | 353 | // create map area out of coordinate string 354 | MTASSERT(!IS_NULL_STRING(inStrCoordinate), 355 | @"*** string must contain area coordinates ***"); 356 | 357 | NSArray* arrAreaCoordinates = \ 358 | [inStrCoordinate componentsSeparatedByString:@","]; 359 | NSUInteger countTotal = [arrAreaCoordinates count]; 360 | NSUInteger countCoord = countTotal / 2; 361 | BOOL isFirstPoint = YES; 362 | 363 | // # of coordinate must be in even numbers. 364 | //http://stackoverflow.com/questions/160930/how-do-i-check-if-an-integer-is-even-or-odd 365 | MTASSERT(!(countTotal % 2), @"total # of coordinates must be even. count %lu",(unsigned long)countCoord); 366 | MTASSERT((3 <= countCoord), @"At least, three dots to represent an area"); 367 | 368 | // add points to bezier path 369 | UIBezierPath *path = [UIBezierPath new]; 370 | double minX = [[arrAreaCoordinates objectAtIndex:0] doubleValue]; 371 | double maxX = [[arrAreaCoordinates objectAtIndex:0] doubleValue]; 372 | double minY = [[arrAreaCoordinates objectAtIndex:1] doubleValue]; 373 | double maxY = [[arrAreaCoordinates objectAtIndex:1] doubleValue]; 374 | 375 | for (NSUInteger i = 0; i < countCoord; i++) 376 | { 377 | NSUInteger index = i<<1; 378 | CGPoint aPoint = \ 379 | CGPointMake([[arrAreaCoordinates objectAtIndex:index] floatValue], 380 | [[arrAreaCoordinates objectAtIndex:index + 1] floatValue]); 381 | 382 | if (isFirstPoint) 383 | { 384 | [path moveToPoint:aPoint]; 385 | isFirstPoint = NO; 386 | } 387 | 388 | if (aPoint.x < minX) { 389 | minX = aPoint.x; 390 | } else if (aPoint.x > maxX) { 391 | maxX = aPoint.x; 392 | } 393 | 394 | if (aPoint.y < minY) { 395 | minY = aPoint.y; 396 | } else if (aPoint.y > maxY) { 397 | maxY = aPoint.y; 398 | } 399 | 400 | [path addLineToPoint:aPoint]; 401 | 402 | } 403 | 404 | [path closePath]; 405 | 406 | double cx = minX + (maxX - minX) / 2.0; 407 | double cy = minY + (maxY - minY) / 2.0; 408 | 409 | self.mapArea = path; 410 | self.centrePoint = CGPointMake(cx,cy); 411 | #if !__has_feature(objc_arc) 412 | [path release]; 413 | #endif 414 | } 415 | return self; 416 | } 417 | 418 | -(BOOL)isAreaSelected:(CGPoint)inPointTouch 419 | { 420 | return CGPathContainsPoint(self.mapArea.CGPath,NULL,inPointTouch,false); 421 | } 422 | 423 | -(void)dealloc 424 | { 425 | self.mapArea = nil; 426 | SAFE_DEALLOC_CHECK(self); 427 | } 428 | @end 429 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MTImageMapView 2 | 3 | An UIImageView subclass to select a complex polygon map out of many 4 | Extremely useful for handling touches on, for example, Europe map, or an eye of owl 5 | 6 | ## Screen Shots 7 | 8 | ![Debug screen](https://github.com/stkim1/MTImageMapView/blob/gh-pages/images/debug.jpeg?raw=true) ![Relase screen](https://github.com/stkim1/MTImageMapView/blob/gh-pages/images/release.jpeg?raw=true) 9 | 10 | ## Features 11 | 12 | - Handling multiple maps on an image1 13 | - Multiple MTImageMapView on a single view 14 | - Support Interface Builder, or progmatical initiation 15 | - Batch mapping2 16 | - Completion block for notifying the end of mapping3 17 | - Delegate to provide selected map index 18 | - Single public class and protocol to implement 19 | - Debug mode to superimpose maps on an image 20 | 21 | 1. There is no limit but you need to be reasonable. In this example, I put around 50. 22 | 2. Mapping takes place in background and prevents UI animation from stuttering. 23 | 3. At the end, mapping function notifies on main thread. 24 | 25 | ## Support 26 | 27 | - XCode 4.4 or higher required 28 | - Works on iOS 4.3 ~ iOS 6.0 ARC/MRC (tested on devices) 29 | - Starting from iOS 6.0, DispatchObjects are Object-C objects, meaning when you are to go with ARC, DispatchObjects are also managed by ARC. 30 | ♠ You can read more detail at [Does ARC support dispatch queues?](http://stackoverflow.com/questions/8618632/does-arc-support-dispatch-queues). 31 | ♦ This paricular issue is solved with OS_OBJECT_USE_OBJC flag. You can read more in detail at [OMG, GCD+ARC](http://www.cocoanetics.com/2013/01/omg-gcdarc/). 32 | 33 | ## Implementation 34 | 1. Use tools like [Gimp](http://www.gimp.org/) and generate a image map. 35 | 2. Copy only coordinate pairs of the map (e.g. "123,242,452,242,142,322") in NSString type. 36 | 3. Put the strings in an NSArray. 37 | 4. Instantiate MTImageMapView and implement MTImageMapDelegate procotol. 38 | 5. pass the array to the map view. 39 | (You can use .plist to pass a map batch to a MTImageMapView.) 40 | 41 | ```objective-c 42 | MTImageMapView *viewImageMap =\ 43 | [[MTImageMapView alloc] 44 | initWithImage: 45 | [UIImage imageNamed:@"sample_image.png"] 46 | ]; 47 | 48 | [viewImageMap setDelegate:self]; 49 | [self.view addSubview:viewImageMap]; 50 | 51 | NSArray *arrStates = \ 52 | [NSArray arrayWithObjects: 53 | @"542,94,568,94,568,111,542,111" 54 | @"555,150,574,150,574,161,555,161" 55 | @"535,149,551,149,551,159,535,159" 56 | ,nil]; 57 | 58 | [viewImageMap 59 | setMapping:arrStates 60 | doneBlock:^(MTImageMapView *imageMapView) { 61 | NSLog(@"Mapping complete!"); 62 | }]; 63 | ``` 64 | 65 | ```objective-c 66 | -(void)imageMapView:(MTImageMapView *)inImageMapView 67 | didSelectMapArea:(NSUInteger)inIndexSelected 68 | areaCentrePoint:(CGPoint)point 69 | { 70 | [[[[UIAlertView alloc] 71 | initWithTitle:@"*** State Name ***" 72 | message:[stateNames objectAtIndex:inIndexSelected] 73 | delegate:nil 74 | cancelButtonTitle:@"Ok" 75 | otherButtonTitles:nil] 76 | autorelease] show]; 77 | } 78 | ``` 79 | 80 | ### LIMITS 81 | 82 | - Delegate only receives the index of a map 83 | - Coordinates must be provided in pairs 84 | - At least 3 pairs of coordinates must be presented 85 | - No "rect", "circle" type map is supported. "Polygon" only at this time being 86 | 87 | ## Credits 88 | - US states image and all coordinates are credited to [Illinois Center for Information Technology and Web Accessibility](http://html.cita.illinois.edu/text/map/map-example.php) 89 | - [The center point of a selected area](https://github.com/stkim1/MTImageMapView/pull/5) by [@RajnishTomar](https://github.com/RajnishTomar) 90 | 91 | 92 | ## License 93 | 94 |
BSD license follows (http://www.opensource.org/licenses/bsd-license.php)
 95 | 
 96 | Copyright © 2012-2022 Sung-Taek, Kim All Rights Reserved.
 97 | 
 98 | Redistribution and use in source and binary forms, with or without modification,
 99 | are permitted provided that the following conditions are met:
100 | 
101 | Redistributions of  source code  must retain  the above  copyright notice,
102 | this list of  conditions and the following  disclaimer. Redistributions in
103 | binary  form must  reproduce  the  above copyright  notice,  this list  of
104 | conditions and the following disclaimer  in the documentation and/or other
105 | materials  provided with  the distribution.  Neither the  name of  Sung-Ta
106 | ek kim nor the names of its contributors may be used to endorse or promote
107 | products  derived  from  this  software  without  specific  prior  written
108 | permission.  THIS  SOFTWARE  IS  PROVIDED BY  THE  COPYRIGHT  HOLDERS  AND
109 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
110 | NOT LIMITED TO, THE IMPLIED  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
111 | A  PARTICULAR PURPOSE  ARE DISCLAIMED.  IN  NO EVENT  SHALL THE  COPYRIGHT
112 | HOLDER OR  CONTRIBUTORS BE  LIABLE FOR  ANY DIRECT,  INDIRECT, INCIDENTAL,
113 | SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL DAMAGES (INCLUDING,  BUT NOT LIMITED
114 | TO, PROCUREMENT  OF SUBSTITUTE GOODS  OR SERVICES;  LOSS OF USE,  DATA, OR
115 | PROFITS; OR  BUSINESS INTERRUPTION)  HOWEVER CAUSED AND  ON ANY  THEORY OF
116 | LIABILITY,  WHETHER  IN CONTRACT,  STRICT  LIABILITY,  OR TORT  (INCLUDING
117 | NEGLIGENCE  OR OTHERWISE)  ARISING  IN ANY  WAY  OUT OF  THE  USE OF  THIS
118 | SOFTWARE,   EVEN  IF   ADVISED  OF   THE  POSSIBILITY   OF  SUCH   DAMAGE.
119 | 120 | _VER_ : 1.1 121 | 122 | _UPDATED_ : Nov. 11, 2022 -------------------------------------------------------------------------------- /Resource/US_States.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stkim1/MTImageMapView/4571203e60b68d47c311c46a2b53d48252d07360/Resource/US_States.gif -------------------------------------------------------------------------------- /Resource/ViewController-iPhone5.xib: -------------------------------------------------------------------------------- 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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Resource/states_coord.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 409,298,409,298,411,292,409,279,409,233,408,233,437,231,446,263,449,267,448,270,448,275,450,285,421,288,420,290,423,294,423,296,420,299,418,297,416,294,414,294,414,298,409,298 6 | 58,294,56,293,55,292,54,292,51,294,49,293,47,294,46,293,43,292,41,293,39,292,38,291,36,291,35,291,34,291,33,290,31,292,28,292,26,294,24,295,22,298,22,300,21,301,16,301,16,303,21,307,21,309,23,310,24,313,24,314,24,314,20,314,20,312,17,312,17,314,16,313,12,316,15,317,14,318,14,319,15,320,17,321,21,321,22,321,25,320,26,320,25,322,26,325,25,326,22,326,21,328,20,328,19,327,18,328,17,330,15,331,14,335,15,336,16,337,16,338,15,339,17,341,18,342,18,343,20,343,22,342,23,345,23,347,23,348,23,349,24,348,27,347,30,350,31,347,32,349,34,348,33,350,32,354,29,358,26,361,25,362,24,361,23,362,21,364,18,366,17,365,15,366,14,368,11,369,9,369,8,369,8,370,7,372,6,372,6,371,5,371,4,372,2,374,5,373,6,373,11,370,14,370,15,368,19,367,21,366,22,366,23,365,23,363,26,364,28,362,30,363,32,360,31,359,36,356,37,354,40,351,42,350,42,349,43,347,41,346,41,345,43,344,44,342,44,340,45,339,47,336,48,335,51,337,49,336,48,337,47,339,46,342,48,343,47,344,46,345,48,345,49,344,52,340,53,341,55,340,55,337,55,336,58,335,58,336,59,337,61,337,62,337,64,339,69,337,72,337,74,335,74,336,74,338,78,339,79,340,81,341,84,340,84,342,87,344,90,347,90,347,90,346,90,343,92,344,93,346,94,349,97,351,100,351,99,348,100,346,100,348,102,350,104,349,104,348,102,343,97,343,88,336,87,336,86,335,85,335,83,333,81,334,82,336,80,338,74,334,74,333,73,334,70,335,58,294 7 | 163,213,153,290,131,288,90,266,91,262,93,263,95,262,95,259,94,258,93,254,96,250,98,245,102,242,102,240,100,239,99,235,98,230,100,216,101,216,103,216,104,218,105,219,106,218,109,207,163,213 8 | 383,236,383,236,381,235,380,239,378,239,378,243,374,247,374,249,374,250,373,252,373,254,372,254,371,256,373,261,373,263,372,265,339,266,339,259,333,257,333,257,333,232,331,218,381,216,382,218,379,221,379,222,380,223,382,223,383,227,383,236 9 | 82,262,53,259,52,253,50,247,47,242,45,239,41,235,39,235,36,233,32,228,22,224,20,220,22,214,13,196,12,192,16,192,17,191,16,188,12,182,11,180,10,174,7,167,6,161,3,154,5,144,3,139,2,133,5,127,8,122,10,112,51,121,41,164,87,228,87,232,89,237,90,239,90,242,87,244,84,251,83,252,82,254,82,257,84,261,82,262 10 | 171,152,195,154,223,156,244,159,244,171,242,191,241,214,228,214,163,207,171,152 11 | 542,94,568,94,568,111,542,111 12 | 555,150,574,150,574,161,555,161 13 | 535,149,551,149,551,159,535,159 14 | 527,141,526,143,527,157,533,157,533,154,533,154,531,152,530,150,530,148,529,146,528,144,529,143,530,141,527,141 15 | 442,289,452,288,453,290,454,291,486,290,487,292,488,291,488,287,488,287,490,285,494,286,498,294,502,303,511,314,511,319,515,326,521,337,522,351,521,352,521,355,521,359,514,361,506,352,502,352,500,347,497,344,495,341,492,341,489,337,487,334,487,332,490,328,488,326,488,327,487,329,485,329,485,328,485,314,482,310,478,309,469,300,466,300,465,300,463,300,458,305,454,308,451,306,449,304,447,302,443,300,439,299,432,299,430,297,427,300,425,300,425,296,422,293,422,292,423,290,442,289 16 | 439,232,448,264,451,268,450,271,450,276,452,286,453,288,454,289,486,288,487,290,488,289,488,285,488,285,490,283,494,284,494,278,495,278,495,276,495,271,497,266,499,266,498,264,495,264,496,263,495,261,490,258,490,254,485,249,482,246,480,246,480,244,478,242,475,240,471,235,465,233,467,228,439,232 17 | 114,348,163,348,163,381,114,381 18 | 146,356,142,354,141,355,142,356,146,356 19 | 137,353,137,351,133,350,134,352,136,355,137,353 20 | 148,133,120,129,87,121,89,111,92,99,95,92,94,91,93,89,93,86,100,79,102,75,102,71,100,67,100,63,100,59,102,52,107,27,116,29,114,39,113,41,114,44,115,48,116,52,118,55,123,63,126,63,123,70,123,71,123,73,122,76,121,78,122,80,127,78,129,81,128,85,131,87,130,90,131,90,132,91,134,96,138,96,141,96,148,97,148,95,150,95,151,97,148,133 21 | 383,196,381,190,379,188,376,187,371,182,372,178,373,173,370,172,368,171,369,169,369,168,367,168,364,168,361,164,357,158,357,154,357,151,359,149,361,147,363,143,361,139,365,137,369,135,370,130,365,123,393,120,393,124,397,132,399,167,401,173,399,178,396,187,396,187,396,190,395,191,392,195,392,196,392,197,391,197,387,196,385,197,386,199,383,196 22 | 397,181,398,177,399,178,401,173,400,170,399,168,400,163,397,132,400,133,403,132,405,130,425,129,428,161,430,165,430,165,430,166,429,169,427,170,424,170,424,172,422,175,421,176,421,178,419,181,414,180,412,183,409,183,407,185,405,185,403,183,401,185,396,187,397,181 23 | 357,115,332,116,306,116,303,117,304,121,305,122,305,123,304,126,304,128,306,131,307,135,308,138,309,144,311,146,312,154,313,157,328,157,344,156,354,155,357,157,359,155,363,150,361,144,364,143,366,142,369,140,370,135,365,128,363,126,360,124,358,120,357,115 24 | 325,217,326,199,325,188,322,185,320,181,321,178,322,176,319,176,316,174,268,175,257,174,247,173,246,195,245,208,245,215,325,217 25 | 465,186,459,178,458,176,458,174,453,170,450,172,448,171,445,172,444,171,441,171,439,171,438,170,438,168,433,168,433,169,432,172,430,173,427,173,427,175,425,178,424,179,424,181,422,184,417,183,415,186,412,186,410,188,408,188,406,186,404,188,399,190,399,193,398,194,395,198,395,199,395,200,394,200,390,199,388,200,389,202,388,207,386,209,393,209,402,207,402,205,452,200,465,186 26 | 343,312,343,312,344,309,346,306,346,300,348,297,348,295,348,292,344,285,340,280,341,266,374,265,375,268,376,270,376,272,378,275,376,276,376,280,372,285,370,290,371,292,392,292,392,295,392,298,395,300,395,302,393,302,390,302,391,300,388,300,385,303,385,304,386,304,390,306,395,307,397,305,398,308,395,311,393,311,402,316,402,319,390,312,390,314,391,315,388,318,387,316,385,316,383,318,377,316,376,313,373,313,371,311,370,311,368,309,366,311,366,313,365,314,364,314,358,313,352,311,352,308,351,311,343,312 27 | 568,0,594,33,582,54,567,71,553,41 28 | 529,160,547,160,547,175,529,175 29 | 488,141,526,132,533,148,539,149,534,155,527,159,516,150,500,142,500,148 30 | 549,82,569,76,592,94,550,91 31 | 426,68,423,68,419,69,416,69,413,69,410,69,409,70,404,72,402,74,401,75,401,74,400,73,399,74,398,75,396,75,392,83,390,81,388,77,386,75,384,73,379,73,374,71,372,72,368,71,364,67,366,65,368,62,370,63,372,62,379,57,381,54,384,52,387,52,383,57,382,61,384,60,387,59,388,60,393,64,395,64,400,65,404,62,410,60,413,59,414,62,419,62,423,62,423,64,426,68 32 | 447,125,448,118,451,112,453,109,454,106,452,100,448,94,444,94,442,96,441,99,437,100,436,96,438,96,440,94,440,91,442,90,442,87,441,83,440,82,440,81,440,79,439,77,433,75,429,73,424,72,423,76,423,78,421,78,421,81,420,85,418,86,418,82,416,84,414,85,412,89,413,93,411,98,412,100,411,103,414,109,415,112,416,118,415,124,413,127,412,129,432,128,447,125 33 | 369,51,367,52,365,51,359,50,357,48,356,50,352,51,347,48,343,50,341,47,335,45,333,45,332,46,327,45,322,44,319,36,317,36,316,39,298,41,299,46,299,52,300,57,301,60,301,63,301,70,304,77,304,83,302,87,303,90,305,91,306,115,332,117,355,115,357,114,357,109,355,107,352,106,351,104,348,102,343,100,341,98,342,89,339,84,342,82,345,81,345,71,348,68,353,65,354,62,357,59,360,57,361,55,365,54,369,51 34 | 377,263,378,266,379,268,379,270,381,273,379,274,379,278,375,283,373,288,374,290,395,290,395,293,395,296,398,298,398,300,402,299,407,297,410,297,412,291,410,278,410,232,388,234,386,233,385,237,383,237,383,241,379,245,379,247,379,248,378,250,378,252,377,252,376,254,378,259,378,261,377,263 35 | 361,159,358,156,339,158,317,159,318,162,320,166,322,167,324,168,326,168,325,171,324,171,324,173,327,177,329,180,330,202,329,208,331,215,377,214,380,214,379,218,378,221,380,221,383,225,385,218,388,211,390,210,391,208,388,204,385,202,386,199,385,196,378,192,375,188,377,180,373,178,373,173,370,175,365,172,361,165,361,159 36 | 224,96,225,83,228,42,173,37,136,30,118,26,116,37,115,39,116,42,117,46,118,50,120,53,125,61,128,61,125,68,125,69,125,71,124,74,123,76,124,78,129,76,131,79,130,83,133,85,132,88,133,88,134,89,136,94,140,94,143,94,150,95,150,93,152,93,153,94,153,95,155,90,224,96 37 | 316,174,265,175,248,173,248,160,227,158,229,132,256,132,284,133,289,137,292,135,297,135,304,138,305,139,307,142,308,147,309,152,311,156,311,162,313,168,316,174 38 | 54,118,114,133,108,167,101,204,97,214,96,212,94,211,93,212,92,214,90,224,66,191,44,160,54,118 39 | 548,81,553,42,566,72,549,79,547,66 40 | 545,125,561,125,561,136,545,136 41 | 531,106,541,110,543,138,531,136,536,123,528,117 42 | 536,119,529,116,528,117,526,121,527,123,526,124,527,126,528,128,531,130,528,133,528,135,526,137,525,139,526,139,526,140,530,143,531,142,533,143,533,145,533,146,534,144,534,144,535,141,536,139,536,139,536,138,537,137,538,135,537,134,537,131,538,128,536,125,535,126,535,123,536,122,536,119 43 | 167,209,234,216,229,284,187,281,187,283,169,282,168,288,158,287,167,209 44 | 517,59,531,55,543,112,526,103,481,111,484,92,509,82,507,73 45 | 524,229,526,228,526,229,528,228,528,223,531,220,531,217,535,215,536,215,539,214,542,213,543,210,542,210,538,211,534,210,537,210,538,210,539,210,539,208,539,207,538,206,535,205,537,205,538,203,543,204,545,202,547,199,547,197,546,196,544,195,543,198,542,196,542,195,538,196,535,197,535,195,536,195,538,195,540,193,541,192,543,191,542,187,525,191,480,199,480,201,477,203,476,205,473,206,471,208,467,210,461,216,458,216,457,216,456,218,456,220,453,222,453,223,453,224,467,223,475,219,483,218,490,218,493,219,493,221,506,220,520,230,522,229,524,229 46 | 292,46,229,43,227,63,225,84,243,86,265,87,283,87,297,87,295,77,294,63,293,60,292,46 47 | 428,162,425,128,438,126,450,129,453,128,457,127,460,123,465,120,468,119,472,139,469,152,462,158,461,163,459,161,457,171,455,172,455,171,450,167,447,169,445,168,442,169,441,168,438,168,436,168,435,167,435,165,430,165,429,163,428,162 48 | 237,222,237,216,329,217,329,224,331,239,331,264,328,262,326,261,323,259,321,261,319,260,314,261,311,262,307,261,306,260,304,260,301,263,301,261,297,261,295,259,293,261,290,258,288,257,286,258,284,257,282,257,279,256,277,253,273,253,271,251,269,250,270,224,237,222 49 | 82,120,87,98,90,91,89,90,88,88,88,85,95,78,97,74,97,70,95,66,91,67,76,63,61,63,59,62,53,62,53,61,51,60,47,60,44,61,42,61,40,61,39,59,39,57,38,53,37,50,35,49,31,48,29,51,21,72,16,83,11,89,12,93,11,96,9,97,9,99,12,104,82,120 50 | 470,113,477,107,481,113,526,102,530,127,478,141 51 | 572,97,590,97,590,113,572,113 52 | 558,107,561,105,560,100,558,98,555,98,556,102,558,107 53 | 475,222,483,221,490,221,493,222,493,224,506,223,520,233,518,236,514,241,515,244,514,245,513,246,511,246,511,248,507,253,504,255,501,256,499,257,500,260,498,262,495,262,496,261,495,259,490,256,490,252,485,247,482,244,480,244,480,242,478,240,475,238,471,233,465,231,467,226,475,222 54 | 300,89,265,89,240,88,228,87,225,128,251,129,281,129,285,133,288,132,290,131,294,132,299,134,301,132,302,130,300,124,302,122,301,98,299,97,298,94,300,89 55 | 384,231,386,219,389,211,396,211,405,209,405,207,475,200,475,200,475,202,472,204,471,206,468,207,466,209,462,211,456,217,453,217,452,217,451,219,451,221,448,223,448,224,449,225,384,231 56 | 331,265,331,266,328,264,326,263,323,261,321,263,319,262,314,263,311,264,307,263,306,262,304,262,301,265,301,263,297,263,295,261,293,263,290,260,288,259,286,260,284,259,282,259,279,258,277,255,273,255,271,253,269,252,270,226,237,224,232,286,190,283,189,286,192,287,194,292,197,292,201,297,203,301,208,303,210,307,211,310,211,315,214,319,217,322,221,324,225,327,228,328,231,326,232,323,235,318,238,318,239,316,245,318,249,319,254,325,259,330,260,333,263,338,262,340,266,343,267,346,270,349,272,351,272,354,272,358,275,361,275,364,276,366,279,366,282,368,283,368,285,368,288,371,295,371,297,374,300,372,298,367,296,359,298,354,300,349,297,347,300,345,302,342,306,342,306,339,311,339,309,336,311,335,314,336,317,334,325,329,328,326,326,321,329,320,331,323,339,320,340,317,342,314,342,308,344,305,344,303,344,300,340,293,336,288,337,267,331,265 57 | 168,155,160,209,106,203,118,134,148,138,147,152,168,155 58 | 533,54,535,64,537,73,539,73,540,84,544,83,548,83,547,73,549,63,547,61,549,59,551,57,551,54,550,50,533,54 59 | 537,186,537,185,520,189,492,194,471,197,454,199,457,197,462,192,463,189,467,186,468,184,472,188,474,188,475,187,477,186,481,185,482,184,487,182,487,179,487,176,489,172,492,165,494,167,496,165,497,161,501,158,502,156,502,153,504,151,508,155,510,151,512,162,519,162,514,160,519,161,521,167,525,170,529,172,530,173,529,177,526,175,531,179,528,180,526,179,521,178,527,180,535,180,536,183,537,186 60 | 97,65,83,61,67,61,65,60,60,60,58,58,55,57,50,59,46,58,45,55,45,52,44,49,41,47,35,44,34,43,35,42,35,40,37,40,36,37,39,36,37,34,36,31,36,28,36,21,35,18,36,17,37,13,44,19,49,21,50,21,50,20,51,18,51,17,53,11,108,24,108,24,103,49,101,56,101,63,97,65 61 | 551,175,572,175,572,184,551,184 62 | 513,160,511,155,516,152,510,152,508,147,507,152,501,152,506,155,504,160,509,157,513,160 63 | 507,151,503,149,501,151,501,153,500,156,495,159,495,161,494,165,492,164,491,162,486,174,486,179,481,181,479,183,476,183,471,185,467,183,461,175,459,173,460,171,461,172,462,172,462,170,463,164,464,161,465,163,466,163,466,163,468,157,472,155,474,152,476,139,479,149,490,147,490,151,490,154,493,152,495,150,497,148,498,148,500,148,502,147,503,145,507,146,507,148,507,151 64 | 359,116,359,118,360,120,364,122,365,123,379,122,387,121,393,120,392,115,392,110,392,106,392,100,393,97,393,93,395,89,397,85,397,82,395,84,393,88,392,89,390,93,388,93,388,90,390,88,391,86,392,85,392,82,389,78,385,74,376,72,371,72,367,69,364,67,358,66,359,64,358,62,354,64,350,65,346,65,344,67,345,75,342,77,340,78,340,79,342,84,342,86,342,88,342,93,347,97,352,101,356,102,357,104,357,108,358,112,359,112,358,115,359,116 65 | 148,148,155,94,224,101,220,155,181,154,150,150,148,148 66 | 67 | 68 | -------------------------------------------------------------------------------- /Resource/states_name.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Alabama 6 | Alaska 7 | Arizona 8 | Arkansas 9 | California 10 | Colorado 11 | Connecticut 12 | Delaware 13 | Delaware 14 | Delaware 15 | Florida 16 | Georgia 17 | Hawaii 18 | Hawaii 19 | Hawaii 20 | Idaho 21 | Illinois 22 | Indiana 23 | Iowa 24 | Kansas 25 | Kentucky 26 | Louisiana 27 | Maine 28 | Maryland 29 | Maryland 30 | massachusettes 31 | Michigan 32 | Michigan 33 | Minnesota 34 | Mississippi 35 | Missouri 36 | Montana 37 | Nebraska 38 | Nevada 39 | New Hampshire 40 | New Jersey 41 | New Jersey 42 | New Jersey 43 | New Mexico 44 | New York 45 | North Carolina 46 | North Dakota 47 | Ohio 48 | Oklahoma 49 | Oregon 50 | Pennsylvania 51 | Rhode Island 52 | Rhode Island 53 | South Carolina 54 | South Dakota 55 | Tennessee 56 | Texas 57 | Utah 58 | Vermont 59 | Virginia 60 | Washington 61 | Washington D.C. 62 | Washington D.C. 63 | West Virginia 64 | Wisconsin 65 | Wyoming 66 | 67 | --------------------------------------------------------------------------------