├── .gitignore ├── FSRotatingCameraExample.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── FSRotatingCameraExample ├── Base.lproj │ └── Main.storyboard ├── FSAppDelegate.h ├── FSAppDelegate.m ├── FSRotatingCamera │ ├── FSRotatingCamera.h │ └── FSRotatingCamera.m ├── FSRotatingCameraExample-Info.plist ├── FSRotatingCameraExample-Prefix.pch ├── FSViewController.h ├── FSViewController.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── en.lproj │ └── InfoPlist.strings └── main.m ├── FSRotatingCameraExampleTests ├── FSRotatingCameraExampleTests-Info.plist ├── FSRotatingCameraExampleTests.m └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── README.md └── images └── FSRotatingCameraExampleDemo.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | 20 | #CocoaPods 21 | Pods 22 | -------------------------------------------------------------------------------- /FSRotatingCameraExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CB14EC38186DEC290055D210 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB14EC37186DEC290055D210 /* Foundation.framework */; }; 11 | CB14EC3A186DEC290055D210 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB14EC39186DEC290055D210 /* CoreGraphics.framework */; }; 12 | CB14EC3C186DEC290055D210 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB14EC3B186DEC290055D210 /* UIKit.framework */; }; 13 | CB14EC42186DEC290055D210 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CB14EC40186DEC290055D210 /* InfoPlist.strings */; }; 14 | CB14EC44186DEC290055D210 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CB14EC43186DEC290055D210 /* main.m */; }; 15 | CB14EC48186DEC290055D210 /* FSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CB14EC47186DEC290055D210 /* FSAppDelegate.m */; }; 16 | CB14EC4B186DEC290055D210 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CB14EC49186DEC290055D210 /* Main.storyboard */; }; 17 | CB14EC4E186DEC290055D210 /* FSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CB14EC4D186DEC290055D210 /* FSViewController.m */; }; 18 | CB14EC50186DEC290055D210 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CB14EC4F186DEC290055D210 /* Images.xcassets */; }; 19 | CB14EC57186DEC290055D210 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB14EC56186DEC290055D210 /* XCTest.framework */; }; 20 | CB14EC58186DEC290055D210 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB14EC37186DEC290055D210 /* Foundation.framework */; }; 21 | CB14EC59186DEC290055D210 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB14EC3B186DEC290055D210 /* UIKit.framework */; }; 22 | CB14EC61186DEC290055D210 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CB14EC5F186DEC290055D210 /* InfoPlist.strings */; }; 23 | CB14EC63186DEC290055D210 /* FSRotatingCameraExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CB14EC62186DEC290055D210 /* FSRotatingCameraExampleTests.m */; }; 24 | CB14EC6D186DED670055D210 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB14EC6C186DED670055D210 /* MapKit.framework */; }; 25 | CB14EC75186E0DC30055D210 /* FSRotatingCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = CB14EC74186E0DC30055D210 /* FSRotatingCamera.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | CB14EC5A186DEC290055D210 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = CB14EC2C186DEC290055D210 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = CB14EC33186DEC290055D210; 34 | remoteInfo = FSRotatingCameraExample; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | CB14EC34186DEC290055D210 /* FSRotatingCameraExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FSRotatingCameraExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | CB14EC37186DEC290055D210 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 41 | CB14EC39186DEC290055D210 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 42 | CB14EC3B186DEC290055D210 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 43 | CB14EC3F186DEC290055D210 /* FSRotatingCameraExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FSRotatingCameraExample-Info.plist"; sourceTree = ""; }; 44 | CB14EC41186DEC290055D210 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 45 | CB14EC43186DEC290055D210 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | CB14EC45186DEC290055D210 /* FSRotatingCameraExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FSRotatingCameraExample-Prefix.pch"; sourceTree = ""; }; 47 | CB14EC46186DEC290055D210 /* FSAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FSAppDelegate.h; sourceTree = ""; }; 48 | CB14EC47186DEC290055D210 /* FSAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FSAppDelegate.m; sourceTree = ""; }; 49 | CB14EC4A186DEC290055D210 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | CB14EC4C186DEC290055D210 /* FSViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FSViewController.h; sourceTree = ""; }; 51 | CB14EC4D186DEC290055D210 /* FSViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FSViewController.m; sourceTree = ""; }; 52 | CB14EC4F186DEC290055D210 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 53 | CB14EC55186DEC290055D210 /* FSRotatingCameraExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FSRotatingCameraExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | CB14EC56186DEC290055D210 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 55 | CB14EC5E186DEC290055D210 /* FSRotatingCameraExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FSRotatingCameraExampleTests-Info.plist"; sourceTree = ""; }; 56 | CB14EC60186DEC290055D210 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 57 | CB14EC62186DEC290055D210 /* FSRotatingCameraExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FSRotatingCameraExampleTests.m; sourceTree = ""; }; 58 | CB14EC6C186DED670055D210 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 59 | CB14EC73186E0DC30055D210 /* FSRotatingCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSRotatingCamera.h; sourceTree = ""; }; 60 | CB14EC74186E0DC30055D210 /* FSRotatingCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSRotatingCamera.m; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | CB14EC31186DEC290055D210 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | CB14EC6D186DED670055D210 /* MapKit.framework in Frameworks */, 69 | CB14EC3A186DEC290055D210 /* CoreGraphics.framework in Frameworks */, 70 | CB14EC3C186DEC290055D210 /* UIKit.framework in Frameworks */, 71 | CB14EC38186DEC290055D210 /* Foundation.framework in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | CB14EC52186DEC290055D210 /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | CB14EC57186DEC290055D210 /* XCTest.framework in Frameworks */, 80 | CB14EC59186DEC290055D210 /* UIKit.framework in Frameworks */, 81 | CB14EC58186DEC290055D210 /* Foundation.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | /* End PBXFrameworksBuildPhase section */ 86 | 87 | /* Begin PBXGroup section */ 88 | CB14EC2B186DEC290055D210 = { 89 | isa = PBXGroup; 90 | children = ( 91 | CB14EC3D186DEC290055D210 /* FSRotatingCameraExample */, 92 | CB14EC5C186DEC290055D210 /* FSRotatingCameraExampleTests */, 93 | CB14EC36186DEC290055D210 /* Frameworks */, 94 | CB14EC35186DEC290055D210 /* Products */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | CB14EC35186DEC290055D210 /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | CB14EC34186DEC290055D210 /* FSRotatingCameraExample.app */, 102 | CB14EC55186DEC290055D210 /* FSRotatingCameraExampleTests.xctest */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | CB14EC36186DEC290055D210 /* Frameworks */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | CB14EC6C186DED670055D210 /* MapKit.framework */, 111 | CB14EC37186DEC290055D210 /* Foundation.framework */, 112 | CB14EC39186DEC290055D210 /* CoreGraphics.framework */, 113 | CB14EC3B186DEC290055D210 /* UIKit.framework */, 114 | CB14EC56186DEC290055D210 /* XCTest.framework */, 115 | ); 116 | name = Frameworks; 117 | sourceTree = ""; 118 | }; 119 | CB14EC3D186DEC290055D210 /* FSRotatingCameraExample */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | CB14EC72186E0DC30055D210 /* FSRotatingCamera */, 123 | CB14EC46186DEC290055D210 /* FSAppDelegate.h */, 124 | CB14EC47186DEC290055D210 /* FSAppDelegate.m */, 125 | CB14EC49186DEC290055D210 /* Main.storyboard */, 126 | CB14EC4C186DEC290055D210 /* FSViewController.h */, 127 | CB14EC4D186DEC290055D210 /* FSViewController.m */, 128 | CB14EC4F186DEC290055D210 /* Images.xcassets */, 129 | CB14EC3E186DEC290055D210 /* Supporting Files */, 130 | ); 131 | path = FSRotatingCameraExample; 132 | sourceTree = ""; 133 | }; 134 | CB14EC3E186DEC290055D210 /* Supporting Files */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | CB14EC3F186DEC290055D210 /* FSRotatingCameraExample-Info.plist */, 138 | CB14EC40186DEC290055D210 /* InfoPlist.strings */, 139 | CB14EC43186DEC290055D210 /* main.m */, 140 | CB14EC45186DEC290055D210 /* FSRotatingCameraExample-Prefix.pch */, 141 | ); 142 | name = "Supporting Files"; 143 | sourceTree = ""; 144 | }; 145 | CB14EC5C186DEC290055D210 /* FSRotatingCameraExampleTests */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | CB14EC62186DEC290055D210 /* FSRotatingCameraExampleTests.m */, 149 | CB14EC5D186DEC290055D210 /* Supporting Files */, 150 | ); 151 | path = FSRotatingCameraExampleTests; 152 | sourceTree = ""; 153 | }; 154 | CB14EC5D186DEC290055D210 /* Supporting Files */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | CB14EC5E186DEC290055D210 /* FSRotatingCameraExampleTests-Info.plist */, 158 | CB14EC5F186DEC290055D210 /* InfoPlist.strings */, 159 | ); 160 | name = "Supporting Files"; 161 | sourceTree = ""; 162 | }; 163 | CB14EC72186E0DC30055D210 /* FSRotatingCamera */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | CB14EC73186E0DC30055D210 /* FSRotatingCamera.h */, 167 | CB14EC74186E0DC30055D210 /* FSRotatingCamera.m */, 168 | ); 169 | name = FSRotatingCamera; 170 | path = FSRotatingCameraExample/FSRotatingCamera; 171 | sourceTree = SOURCE_ROOT; 172 | }; 173 | /* End PBXGroup section */ 174 | 175 | /* Begin PBXNativeTarget section */ 176 | CB14EC33186DEC290055D210 /* FSRotatingCameraExample */ = { 177 | isa = PBXNativeTarget; 178 | buildConfigurationList = CB14EC66186DEC290055D210 /* Build configuration list for PBXNativeTarget "FSRotatingCameraExample" */; 179 | buildPhases = ( 180 | CB14EC30186DEC290055D210 /* Sources */, 181 | CB14EC31186DEC290055D210 /* Frameworks */, 182 | CB14EC32186DEC290055D210 /* Resources */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = FSRotatingCameraExample; 189 | productName = FSRotatingCameraExample; 190 | productReference = CB14EC34186DEC290055D210 /* FSRotatingCameraExample.app */; 191 | productType = "com.apple.product-type.application"; 192 | }; 193 | CB14EC54186DEC290055D210 /* FSRotatingCameraExampleTests */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = CB14EC69186DEC290055D210 /* Build configuration list for PBXNativeTarget "FSRotatingCameraExampleTests" */; 196 | buildPhases = ( 197 | CB14EC51186DEC290055D210 /* Sources */, 198 | CB14EC52186DEC290055D210 /* Frameworks */, 199 | CB14EC53186DEC290055D210 /* Resources */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | CB14EC5B186DEC290055D210 /* PBXTargetDependency */, 205 | ); 206 | name = FSRotatingCameraExampleTests; 207 | productName = FSRotatingCameraExampleTests; 208 | productReference = CB14EC55186DEC290055D210 /* FSRotatingCameraExampleTests.xctest */; 209 | productType = "com.apple.product-type.bundle.unit-test"; 210 | }; 211 | /* End PBXNativeTarget section */ 212 | 213 | /* Begin PBXProject section */ 214 | CB14EC2C186DEC290055D210 /* Project object */ = { 215 | isa = PBXProject; 216 | attributes = { 217 | CLASSPREFIX = FS; 218 | LastUpgradeCheck = 0500; 219 | ORGANIZATIONNAME = FS; 220 | TargetAttributes = { 221 | CB14EC54186DEC290055D210 = { 222 | TestTargetID = CB14EC33186DEC290055D210; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = CB14EC2F186DEC290055D210 /* Build configuration list for PBXProject "FSRotatingCameraExample" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = English; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = CB14EC2B186DEC290055D210; 235 | productRefGroup = CB14EC35186DEC290055D210 /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | CB14EC33186DEC290055D210 /* FSRotatingCameraExample */, 240 | CB14EC54186DEC290055D210 /* FSRotatingCameraExampleTests */, 241 | ); 242 | }; 243 | /* End PBXProject section */ 244 | 245 | /* Begin PBXResourcesBuildPhase section */ 246 | CB14EC32186DEC290055D210 /* Resources */ = { 247 | isa = PBXResourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | CB14EC50186DEC290055D210 /* Images.xcassets in Resources */, 251 | CB14EC42186DEC290055D210 /* InfoPlist.strings in Resources */, 252 | CB14EC4B186DEC290055D210 /* Main.storyboard in Resources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | CB14EC53186DEC290055D210 /* Resources */ = { 257 | isa = PBXResourcesBuildPhase; 258 | buildActionMask = 2147483647; 259 | files = ( 260 | CB14EC61186DEC290055D210 /* InfoPlist.strings in Resources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | /* End PBXResourcesBuildPhase section */ 265 | 266 | /* Begin PBXSourcesBuildPhase section */ 267 | CB14EC30186DEC290055D210 /* Sources */ = { 268 | isa = PBXSourcesBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | CB14EC44186DEC290055D210 /* main.m in Sources */, 272 | CB14EC48186DEC290055D210 /* FSAppDelegate.m in Sources */, 273 | CB14EC4E186DEC290055D210 /* FSViewController.m in Sources */, 274 | CB14EC75186E0DC30055D210 /* FSRotatingCamera.m in Sources */, 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | CB14EC51186DEC290055D210 /* Sources */ = { 279 | isa = PBXSourcesBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | CB14EC63186DEC290055D210 /* FSRotatingCameraExampleTests.m in Sources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXSourcesBuildPhase section */ 287 | 288 | /* Begin PBXTargetDependency section */ 289 | CB14EC5B186DEC290055D210 /* PBXTargetDependency */ = { 290 | isa = PBXTargetDependency; 291 | target = CB14EC33186DEC290055D210 /* FSRotatingCameraExample */; 292 | targetProxy = CB14EC5A186DEC290055D210 /* PBXContainerItemProxy */; 293 | }; 294 | /* End PBXTargetDependency section */ 295 | 296 | /* Begin PBXVariantGroup section */ 297 | CB14EC40186DEC290055D210 /* InfoPlist.strings */ = { 298 | isa = PBXVariantGroup; 299 | children = ( 300 | CB14EC41186DEC290055D210 /* en */, 301 | ); 302 | name = InfoPlist.strings; 303 | sourceTree = ""; 304 | }; 305 | CB14EC49186DEC290055D210 /* Main.storyboard */ = { 306 | isa = PBXVariantGroup; 307 | children = ( 308 | CB14EC4A186DEC290055D210 /* Base */, 309 | ); 310 | name = Main.storyboard; 311 | sourceTree = ""; 312 | }; 313 | CB14EC5F186DEC290055D210 /* InfoPlist.strings */ = { 314 | isa = PBXVariantGroup; 315 | children = ( 316 | CB14EC60186DEC290055D210 /* en */, 317 | ); 318 | name = InfoPlist.strings; 319 | sourceTree = ""; 320 | }; 321 | /* End PBXVariantGroup section */ 322 | 323 | /* Begin XCBuildConfiguration section */ 324 | CB14EC64186DEC290055D210 /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | buildSettings = { 327 | ALWAYS_SEARCH_USER_PATHS = NO; 328 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 329 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 330 | CLANG_CXX_LIBRARY = "libc++"; 331 | CLANG_ENABLE_MODULES = YES; 332 | CLANG_ENABLE_OBJC_ARC = YES; 333 | CLANG_WARN_BOOL_CONVERSION = YES; 334 | CLANG_WARN_CONSTANT_CONVERSION = YES; 335 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 336 | CLANG_WARN_EMPTY_BODY = YES; 337 | CLANG_WARN_ENUM_CONVERSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 342 | COPY_PHASE_STRIP = NO; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_DYNAMIC_NO_PIC = NO; 345 | GCC_OPTIMIZATION_LEVEL = 0; 346 | GCC_PREPROCESSOR_DEFINITIONS = ( 347 | "DEBUG=1", 348 | "$(inherited)", 349 | ); 350 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 353 | GCC_WARN_UNDECLARED_SELECTOR = YES; 354 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 355 | GCC_WARN_UNUSED_FUNCTION = YES; 356 | GCC_WARN_UNUSED_VARIABLE = YES; 357 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 358 | ONLY_ACTIVE_ARCH = YES; 359 | SDKROOT = iphoneos; 360 | }; 361 | name = Debug; 362 | }; 363 | CB14EC65186DEC290055D210 /* Release */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 368 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 369 | CLANG_CXX_LIBRARY = "libc++"; 370 | CLANG_ENABLE_MODULES = YES; 371 | CLANG_ENABLE_OBJC_ARC = YES; 372 | CLANG_WARN_BOOL_CONVERSION = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 375 | CLANG_WARN_EMPTY_BODY = YES; 376 | CLANG_WARN_ENUM_CONVERSION = YES; 377 | CLANG_WARN_INT_CONVERSION = YES; 378 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 379 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 380 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 381 | COPY_PHASE_STRIP = YES; 382 | ENABLE_NS_ASSERTIONS = NO; 383 | GCC_C_LANGUAGE_STANDARD = gnu99; 384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 386 | GCC_WARN_UNDECLARED_SELECTOR = YES; 387 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 388 | GCC_WARN_UNUSED_FUNCTION = YES; 389 | GCC_WARN_UNUSED_VARIABLE = YES; 390 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 391 | SDKROOT = iphoneos; 392 | VALIDATE_PRODUCT = YES; 393 | }; 394 | name = Release; 395 | }; 396 | CB14EC67186DEC290055D210 /* Debug */ = { 397 | isa = XCBuildConfiguration; 398 | buildSettings = { 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 401 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 402 | GCC_PREFIX_HEADER = "FSRotatingCameraExample/FSRotatingCameraExample-Prefix.pch"; 403 | INFOPLIST_FILE = "FSRotatingCameraExample/FSRotatingCameraExample-Info.plist"; 404 | PRODUCT_NAME = FSRotatingCameraExample; 405 | WRAPPER_EXTENSION = app; 406 | }; 407 | name = Debug; 408 | }; 409 | CB14EC68186DEC290055D210 /* Release */ = { 410 | isa = XCBuildConfiguration; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 414 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 415 | GCC_PREFIX_HEADER = "FSRotatingCameraExample/FSRotatingCameraExample-Prefix.pch"; 416 | INFOPLIST_FILE = "FSRotatingCameraExample/FSRotatingCameraExample-Info.plist"; 417 | PRODUCT_NAME = FSRotatingCameraExample; 418 | WRAPPER_EXTENSION = app; 419 | }; 420 | name = Release; 421 | }; 422 | CB14EC6A186DEC290055D210 /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 426 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FSRotatingCameraExample.app/FSRotatingCameraExample"; 427 | FRAMEWORK_SEARCH_PATHS = ( 428 | "$(SDKROOT)/Developer/Library/Frameworks", 429 | "$(inherited)", 430 | "$(DEVELOPER_FRAMEWORKS_DIR)", 431 | ); 432 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 433 | GCC_PREFIX_HEADER = "FSRotatingCameraExample/FSRotatingCameraExample-Prefix.pch"; 434 | GCC_PREPROCESSOR_DEFINITIONS = ( 435 | "DEBUG=1", 436 | "$(inherited)", 437 | ); 438 | INFOPLIST_FILE = "FSRotatingCameraExampleTests/FSRotatingCameraExampleTests-Info.plist"; 439 | PRODUCT_NAME = FSRotatingCameraExampleTests; 440 | TEST_HOST = "$(BUNDLE_LOADER)"; 441 | WRAPPER_EXTENSION = xctest; 442 | }; 443 | name = Debug; 444 | }; 445 | CB14EC6B186DEC290055D210 /* Release */ = { 446 | isa = XCBuildConfiguration; 447 | buildSettings = { 448 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 449 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/FSRotatingCameraExample.app/FSRotatingCameraExample"; 450 | FRAMEWORK_SEARCH_PATHS = ( 451 | "$(SDKROOT)/Developer/Library/Frameworks", 452 | "$(inherited)", 453 | "$(DEVELOPER_FRAMEWORKS_DIR)", 454 | ); 455 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 456 | GCC_PREFIX_HEADER = "FSRotatingCameraExample/FSRotatingCameraExample-Prefix.pch"; 457 | INFOPLIST_FILE = "FSRotatingCameraExampleTests/FSRotatingCameraExampleTests-Info.plist"; 458 | PRODUCT_NAME = FSRotatingCameraExampleTests; 459 | TEST_HOST = "$(BUNDLE_LOADER)"; 460 | WRAPPER_EXTENSION = xctest; 461 | }; 462 | name = Release; 463 | }; 464 | /* End XCBuildConfiguration section */ 465 | 466 | /* Begin XCConfigurationList section */ 467 | CB14EC2F186DEC290055D210 /* Build configuration list for PBXProject "FSRotatingCameraExample" */ = { 468 | isa = XCConfigurationList; 469 | buildConfigurations = ( 470 | CB14EC64186DEC290055D210 /* Debug */, 471 | CB14EC65186DEC290055D210 /* Release */, 472 | ); 473 | defaultConfigurationIsVisible = 0; 474 | defaultConfigurationName = Release; 475 | }; 476 | CB14EC66186DEC290055D210 /* Build configuration list for PBXNativeTarget "FSRotatingCameraExample" */ = { 477 | isa = XCConfigurationList; 478 | buildConfigurations = ( 479 | CB14EC67186DEC290055D210 /* Debug */, 480 | CB14EC68186DEC290055D210 /* Release */, 481 | ); 482 | defaultConfigurationIsVisible = 0; 483 | defaultConfigurationName = Release; 484 | }; 485 | CB14EC69186DEC290055D210 /* Build configuration list for PBXNativeTarget "FSRotatingCameraExampleTests" */ = { 486 | isa = XCConfigurationList; 487 | buildConfigurations = ( 488 | CB14EC6A186DEC290055D210 /* Debug */, 489 | CB14EC6B186DEC290055D210 /* Release */, 490 | ); 491 | defaultConfigurationIsVisible = 0; 492 | defaultConfigurationName = Release; 493 | }; 494 | /* End XCConfigurationList section */ 495 | }; 496 | rootObject = CB14EC2C186DEC290055D210 /* Project object */; 497 | } 498 | -------------------------------------------------------------------------------- /FSRotatingCameraExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // FSAppDelegate.h 3 | // FSRotatingCameraExample 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FSAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // FSAppDelegate.m 3 | // FSRotatingCameraExample 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import "FSAppDelegate.h" 10 | 11 | @implementation FSAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSRotatingCamera/FSRotatingCamera.h: -------------------------------------------------------------------------------- 1 | // 2 | // FSRotatingCamera.h 3 | // FSRotatingCamera 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FSRotatingCamera : NSObject 12 | 13 | - (id)initWithMapView:(MKMapView *)mapView; 14 | 15 | // Starts rotating the camera around the current MKMapView centerCoordinate 16 | - (void)startRotating; 17 | 18 | // Starts rotating the camera around the coordinate 19 | - (void)startRotatingWithCoordinate:(CLLocationCoordinate2D)coordinate; 20 | 21 | // Starts rotating the camera around the coordinate, using heading, pitch, altitude and headingStep 22 | - (void)startRotatingWithCoordinate:(CLLocationCoordinate2D)coordinate heading:(CLLocationDirection)heading pitch:(CGFloat)pitch altitude:(CLLocationDistance)altitude headingStep:(double)headingStep; 23 | 24 | // Should be called in your MKMapView's delegate method, mapView:regionDidChangeAnimated: 25 | - (void)continueRotating; 26 | 27 | // Will stop rotating the camera 28 | // You will have to call any of the startRotating methods to start again. 29 | - (void)stopRotating; 30 | 31 | - (BOOL)isStopped; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSRotatingCamera/FSRotatingCamera.m: -------------------------------------------------------------------------------- 1 | // 2 | // FSRotatingCamera.m 3 | // FSRotatingCamera 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import "FSRotatingCamera.h" 10 | 11 | #define DEFAULT_HEADING 0 12 | #define DEFAULT_PITCH 45 13 | #define DEFAULT_ALTITUDE 700 14 | #define DEFAULT_HEADING_STEP 10 15 | 16 | @interface FSRotatingCamera() 17 | 18 | @property (nonatomic, weak) MKMapView *mapView; 19 | @property (nonatomic, assign) BOOL rotating; 20 | @property (nonatomic, assign) double headingStep; 21 | 22 | @end 23 | 24 | @implementation FSRotatingCamera 25 | 26 | - (id)initWithMapView:(MKMapView *)mapView { 27 | self = [self init]; 28 | if (self) { 29 | self.rotating = NO; 30 | self.mapView = mapView; 31 | } 32 | return self; 33 | } 34 | 35 | - (void)startRotatingWithCoordinate:(CLLocationCoordinate2D)coordinate heading:(CLLocationDirection)heading pitch:(CGFloat)pitch altitude:(CLLocationDistance)altitude headingStep:(double)headingStep { 36 | MKMapCamera *camera = [MKMapCamera new]; 37 | camera.centerCoordinate = coordinate; 38 | camera.heading = heading; 39 | camera.pitch = pitch; 40 | camera.altitude = altitude; 41 | [self.mapView setCamera:camera animated:YES]; 42 | self.rotating = YES; 43 | self.headingStep = headingStep; 44 | } 45 | 46 | - (void)startRotatingWithCoordinate:(CLLocationCoordinate2D)coordinate { 47 | [self startRotatingWithCoordinate:coordinate heading:DEFAULT_HEADING pitch:DEFAULT_PITCH altitude:DEFAULT_ALTITUDE headingStep:DEFAULT_HEADING_STEP]; 48 | } 49 | 50 | - (void)startRotating { 51 | [self startRotatingWithCoordinate:self.mapView.centerCoordinate]; 52 | } 53 | 54 | - (void)stopRotating { 55 | self.rotating = NO; 56 | } 57 | 58 | - (BOOL)isStopped { 59 | return !self.rotating; 60 | } 61 | 62 | - (void)continueRotating { 63 | MKMapCamera *camera = [self.mapView.camera copy]; 64 | camera.heading = fmod(camera.heading + self.headingStep, 360); 65 | 66 | [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ 67 | self.mapView.camera = camera; 68 | } completion:nil]; 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSRotatingCameraExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.fs.${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 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSRotatingCameraExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FSViewController.h 3 | // FSRotatingCameraExample 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface FSViewController : UIViewController 13 | 14 | @property (weak, nonatomic) IBOutlet MKMapView *mapView; 15 | @property (weak, nonatomic) IBOutlet UIButton *startStopRotating; 16 | - (IBAction)startStopAction:(id)sender; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/FSViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FSViewController.m 3 | // FSRotatingCameraExample 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import "FSViewController.h" 10 | #import "FSRotatingCamera.h" 11 | 12 | #define DEFAULT_COORDINATE CLLocationCoordinate2DMake(37.78275123, -122.40416442) 13 | 14 | @interface FSViewController() 15 | 16 | @property (nonatomic, strong) FSRotatingCamera *rotCamera; 17 | @property (nonatomic, assign) BOOL rotating; 18 | 19 | @end 20 | 21 | @implementation FSViewController 22 | 23 | - (void)viewDidLoad 24 | { 25 | [super viewDidLoad]; 26 | 27 | [self.startStopRotating setTitle:@"Start" forState:UIControlStateNormal]; 28 | 29 | self.mapView.centerCoordinate = DEFAULT_COORDINATE; 30 | self.mapView.delegate = self; 31 | self.mapView.showsBuildings = YES; 32 | 33 | MKPointAnnotation *annotationPoint = [[MKPointAnnotation alloc] init]; 34 | annotationPoint.coordinate = DEFAULT_COORDINATE; 35 | annotationPoint.title = @"Center"; 36 | [self.mapView addAnnotation:annotationPoint]; 37 | 38 | self.rotCamera = [[FSRotatingCamera alloc] initWithMapView:self.mapView]; 39 | } 40 | 41 | -(void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated { 42 | if ([self.rotCamera isStopped] == NO) { 43 | [self.rotCamera continueRotating]; 44 | } 45 | } 46 | 47 | - (IBAction)startStopAction:(id)sender { 48 | if ([self.startStopRotating.titleLabel.text isEqualToString:@"Start"] == YES) { 49 | [self.startStopRotating setTitle:@"Stop" forState:UIControlStateNormal]; 50 | [self.rotCamera startRotatingWithCoordinate:DEFAULT_COORDINATE]; 51 | } else { 52 | [self.startStopRotating setTitle:@"Start" forState:UIControlStateNormal]; 53 | [self.rotCamera stopRotating]; 54 | } 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FSRotatingCameraExample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FSRotatingCameraExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /FSRotatingCameraExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FSRotatingCameraExample 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "FSAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([FSAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /FSRotatingCameraExampleTests/FSRotatingCameraExampleTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.fs.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /FSRotatingCameraExampleTests/FSRotatingCameraExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FSRotatingCameraExampleTests.m 3 | // FSRotatingCameraExampleTests 4 | // 5 | // Created by Fernando Sproviero on 27/12/13. 6 | // Copyright (c) 2013 FS. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FSRotatingCameraExampleTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FSRotatingCameraExampleTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /FSRotatingCameraExampleTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 fernandospr 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Click here to lend your support to: Fernando's Open Source Projects and make a donation at pledgie.com ! 2 | 3 | 4 | FSRotatingCamera 5 | ================ 6 | 7 | Class helper that uses MKMapCamera to rotate around a coordinate. 8 | 9 | ![Demo](https://github.com/fernandospr/FSRotatingCamera/raw/master/images/FSRotatingCameraExampleDemo.gif) 10 | 11 | ## Usage 12 | 13 | Copy FSRotatingCamera folder to your project, include FSRotatingCamera.h and start using! 14 | 15 | Steps: 16 | 17 | * Instantiate the class 18 | 19 | ``` 20 | [[FSRotatingCamera alloc] initWithMapView:self.mapView]; 21 | ``` 22 | * Call any of the startRotating methods. 23 | * In your view controller implement the following MKMapViewDelegate method: 24 | 25 | ``` 26 | - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated { 27 | if ([self.rotCamera isStopped] == NO) { 28 | [self.rotCamera continueRotating]; 29 | } 30 | } 31 | ``` 32 | 33 | 34 | See example project for more details! 35 | -------------------------------------------------------------------------------- /images/FSRotatingCameraExampleDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandospr/FSRotatingCamera/e654bdd838b17632deb02d8e96e16ede991f8607/images/FSRotatingCameraExampleDemo.gif --------------------------------------------------------------------------------