├── FlyOver_First ├── FlyOver.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── FlyOver.xcscmblueprint │ │ └── xcuserdata │ │ │ └── lizelu.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── lizelu.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── FlyOver.xcscheme │ │ └── xcschememanagement.plist └── FlyOver │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_120-1.png │ │ ├── icon_120.png │ │ ├── icon_180.png │ │ ├── icon_58.png │ │ ├── icon_80.png │ │ └── icon_87.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Controllers │ └── ViewController.swift │ ├── Info.plist │ └── Views │ ├── BackView.swift │ └── PointView.swift ├── FlyOver_Fourth ├── FlyOver.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── FlyOver.xcscmblueprint │ │ └── xcuserdata │ │ │ └── lizelu.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── lizelu.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── FlyOver.xcscheme │ │ └── xcschememanagement.plist └── FlyOver │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_120-1.png │ │ ├── icon_120.png │ │ ├── icon_180.png │ │ ├── icon_58.png │ │ ├── icon_80.png │ │ └── icon_87.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Controllers │ └── ViewController.swift │ ├── Info.plist │ └── Views │ ├── BackView.swift │ └── PointView.swift ├── FlyOver_Second ├── FlyOver.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── FlyOver.xcscmblueprint │ │ └── xcuserdata │ │ │ └── lizelu.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── lizelu.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── FlyOver.xcscheme │ │ └── xcschememanagement.plist └── FlyOver │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_120-1.png │ │ ├── icon_120.png │ │ ├── icon_180.png │ │ ├── icon_58.png │ │ ├── icon_80.png │ │ └── icon_87.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Controllers │ └── ViewController.swift │ ├── Info.plist │ └── Views │ ├── BackView.swift │ └── PointView.swift ├── FlyOver_Third ├── FlyOver.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── FlyOver.xcscmblueprint │ │ └── xcuserdata │ │ │ └── lizelu.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── lizelu.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── FlyOver.xcscheme │ │ └── xcschememanagement.plist └── FlyOver │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon_120-1.png │ │ ├── icon_120.png │ │ ├── icon_180.png │ │ ├── icon_80-1.png │ │ ├── icon_80.png │ │ └── icon_87.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Controllers │ └── ViewController.swift │ ├── Info.plist │ └── Views │ ├── BackView.swift │ └── PointView.swift └── README.md /FlyOver_First/FlyOver.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F44205F91E03ED22003D7062 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44205F81E03ED22003D7062 /* AppDelegate.swift */; }; 11 | F44205FE1E03ED22003D7062 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F44205FC1E03ED22003D7062 /* Main.storyboard */; }; 12 | F44206001E03ED22003D7062 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F44205FF1E03ED22003D7062 /* Assets.xcassets */; }; 13 | F44206031E03ED22003D7062 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F44206011E03ED22003D7062 /* LaunchScreen.storyboard */; }; 14 | F4D99CE51E092F7700864DEE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE21E092F7700864DEE /* ViewController.swift */; }; 15 | F4D99CE61E092F7700864DEE /* PointView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE41E092F7700864DEE /* PointView.swift */; }; 16 | F4D99CE81E092FC000864DEE /* BackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE71E092FC000864DEE /* BackView.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | F44205F51E03ED22003D7062 /* FlyOver.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlyOver.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | F44205F81E03ED22003D7062 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | F44205FD1E03ED22003D7062 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | F44205FF1E03ED22003D7062 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | F44206021E03ED22003D7062 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 25 | F44206041E03ED22003D7062 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | F4D99CE21E092F7700864DEE /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 27 | F4D99CE41E092F7700864DEE /* PointView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PointView.swift; sourceTree = ""; }; 28 | F4D99CE71E092FC000864DEE /* BackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackView.swift; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | F44205F21E03ED22003D7062 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | F44205EC1E03ED22003D7062 = { 43 | isa = PBXGroup; 44 | children = ( 45 | F44205F71E03ED22003D7062 /* FlyOver */, 46 | F44205F61E03ED22003D7062 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | F44205F61E03ED22003D7062 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | F44205F51E03ED22003D7062 /* FlyOver.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | F44205F71E03ED22003D7062 /* FlyOver */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | F4D99CE11E092F7700864DEE /* Controllers */, 62 | F4D99CE31E092F7700864DEE /* Views */, 63 | F44205F81E03ED22003D7062 /* AppDelegate.swift */, 64 | F44205FC1E03ED22003D7062 /* Main.storyboard */, 65 | F44205FF1E03ED22003D7062 /* Assets.xcassets */, 66 | F44206011E03ED22003D7062 /* LaunchScreen.storyboard */, 67 | F44206041E03ED22003D7062 /* Info.plist */, 68 | ); 69 | path = FlyOver; 70 | sourceTree = ""; 71 | }; 72 | F4D99CE11E092F7700864DEE /* Controllers */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | F4D99CE21E092F7700864DEE /* ViewController.swift */, 76 | ); 77 | path = Controllers; 78 | sourceTree = ""; 79 | }; 80 | F4D99CE31E092F7700864DEE /* Views */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | F4D99CE41E092F7700864DEE /* PointView.swift */, 84 | F4D99CE71E092FC000864DEE /* BackView.swift */, 85 | ); 86 | path = Views; 87 | sourceTree = ""; 88 | }; 89 | /* End PBXGroup section */ 90 | 91 | /* Begin PBXNativeTarget section */ 92 | F44205F41E03ED22003D7062 /* FlyOver */ = { 93 | isa = PBXNativeTarget; 94 | buildConfigurationList = F44206071E03ED22003D7062 /* Build configuration list for PBXNativeTarget "FlyOver" */; 95 | buildPhases = ( 96 | F44205F11E03ED22003D7062 /* Sources */, 97 | F44205F21E03ED22003D7062 /* Frameworks */, 98 | F44205F31E03ED22003D7062 /* Resources */, 99 | ); 100 | buildRules = ( 101 | ); 102 | dependencies = ( 103 | ); 104 | name = FlyOver; 105 | productName = FlyOver; 106 | productReference = F44205F51E03ED22003D7062 /* FlyOver.app */; 107 | productType = "com.apple.product-type.application"; 108 | }; 109 | /* End PBXNativeTarget section */ 110 | 111 | /* Begin PBXProject section */ 112 | F44205ED1E03ED22003D7062 /* Project object */ = { 113 | isa = PBXProject; 114 | attributes = { 115 | LastSwiftUpdateCheck = 0810; 116 | LastUpgradeCheck = 0810; 117 | ORGANIZATIONNAME = ZeluLi; 118 | TargetAttributes = { 119 | F44205F41E03ED22003D7062 = { 120 | CreatedOnToolsVersion = 8.1; 121 | DevelopmentTeam = N5WRHCE748; 122 | ProvisioningStyle = Automatic; 123 | }; 124 | }; 125 | }; 126 | buildConfigurationList = F44205F01E03ED22003D7062 /* Build configuration list for PBXProject "FlyOver" */; 127 | compatibilityVersion = "Xcode 3.2"; 128 | developmentRegion = English; 129 | hasScannedForEncodings = 0; 130 | knownRegions = ( 131 | en, 132 | Base, 133 | ); 134 | mainGroup = F44205EC1E03ED22003D7062; 135 | productRefGroup = F44205F61E03ED22003D7062 /* Products */; 136 | projectDirPath = ""; 137 | projectRoot = ""; 138 | targets = ( 139 | F44205F41E03ED22003D7062 /* FlyOver */, 140 | ); 141 | }; 142 | /* End PBXProject section */ 143 | 144 | /* Begin PBXResourcesBuildPhase section */ 145 | F44205F31E03ED22003D7062 /* Resources */ = { 146 | isa = PBXResourcesBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | F44206031E03ED22003D7062 /* LaunchScreen.storyboard in Resources */, 150 | F44206001E03ED22003D7062 /* Assets.xcassets in Resources */, 151 | F44205FE1E03ED22003D7062 /* Main.storyboard in Resources */, 152 | ); 153 | runOnlyForDeploymentPostprocessing = 0; 154 | }; 155 | /* End PBXResourcesBuildPhase section */ 156 | 157 | /* Begin PBXSourcesBuildPhase section */ 158 | F44205F11E03ED22003D7062 /* Sources */ = { 159 | isa = PBXSourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | F4D99CE61E092F7700864DEE /* PointView.swift in Sources */, 163 | F4D99CE81E092FC000864DEE /* BackView.swift in Sources */, 164 | F4D99CE51E092F7700864DEE /* ViewController.swift in Sources */, 165 | F44205F91E03ED22003D7062 /* AppDelegate.swift in Sources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXSourcesBuildPhase section */ 170 | 171 | /* Begin PBXVariantGroup section */ 172 | F44205FC1E03ED22003D7062 /* Main.storyboard */ = { 173 | isa = PBXVariantGroup; 174 | children = ( 175 | F44205FD1E03ED22003D7062 /* Base */, 176 | ); 177 | name = Main.storyboard; 178 | sourceTree = ""; 179 | }; 180 | F44206011E03ED22003D7062 /* LaunchScreen.storyboard */ = { 181 | isa = PBXVariantGroup; 182 | children = ( 183 | F44206021E03ED22003D7062 /* Base */, 184 | ); 185 | name = LaunchScreen.storyboard; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXVariantGroup section */ 189 | 190 | /* Begin XCBuildConfiguration section */ 191 | F44206051E03ED22003D7062 /* Debug */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | ALWAYS_SEARCH_USER_PATHS = NO; 195 | CLANG_ANALYZER_NONNULL = YES; 196 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 197 | CLANG_CXX_LIBRARY = "libc++"; 198 | CLANG_ENABLE_MODULES = YES; 199 | CLANG_ENABLE_OBJC_ARC = YES; 200 | CLANG_WARN_BOOL_CONVERSION = YES; 201 | CLANG_WARN_CONSTANT_CONVERSION = YES; 202 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 203 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 204 | CLANG_WARN_EMPTY_BODY = YES; 205 | CLANG_WARN_ENUM_CONVERSION = YES; 206 | CLANG_WARN_INFINITE_RECURSION = YES; 207 | CLANG_WARN_INT_CONVERSION = YES; 208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 209 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 210 | CLANG_WARN_UNREACHABLE_CODE = YES; 211 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 212 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 213 | COPY_PHASE_STRIP = NO; 214 | DEBUG_INFORMATION_FORMAT = dwarf; 215 | ENABLE_STRICT_OBJC_MSGSEND = YES; 216 | ENABLE_TESTABILITY = YES; 217 | GCC_C_LANGUAGE_STANDARD = gnu99; 218 | GCC_DYNAMIC_NO_PIC = NO; 219 | GCC_NO_COMMON_BLOCKS = YES; 220 | GCC_OPTIMIZATION_LEVEL = 0; 221 | GCC_PREPROCESSOR_DEFINITIONS = ( 222 | "DEBUG=1", 223 | "$(inherited)", 224 | ); 225 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 226 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 227 | GCC_WARN_UNDECLARED_SELECTOR = YES; 228 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 229 | GCC_WARN_UNUSED_FUNCTION = YES; 230 | GCC_WARN_UNUSED_VARIABLE = YES; 231 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 232 | MTL_ENABLE_DEBUG_INFO = YES; 233 | ONLY_ACTIVE_ARCH = YES; 234 | SDKROOT = iphoneos; 235 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 236 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 237 | }; 238 | name = Debug; 239 | }; 240 | F44206061E03ED22003D7062 /* Release */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_ANALYZER_NONNULL = YES; 245 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 246 | CLANG_CXX_LIBRARY = "libc++"; 247 | CLANG_ENABLE_MODULES = YES; 248 | CLANG_ENABLE_OBJC_ARC = YES; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_CONSTANT_CONVERSION = YES; 251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 252 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 253 | CLANG_WARN_EMPTY_BODY = YES; 254 | CLANG_WARN_ENUM_CONVERSION = YES; 255 | CLANG_WARN_INFINITE_RECURSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 259 | CLANG_WARN_UNREACHABLE_CODE = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 262 | COPY_PHASE_STRIP = NO; 263 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 264 | ENABLE_NS_ASSERTIONS = NO; 265 | ENABLE_STRICT_OBJC_MSGSEND = YES; 266 | GCC_C_LANGUAGE_STANDARD = gnu99; 267 | GCC_NO_COMMON_BLOCKS = YES; 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 275 | MTL_ENABLE_DEBUG_INFO = NO; 276 | SDKROOT = iphoneos; 277 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 278 | VALIDATE_PRODUCT = YES; 279 | }; 280 | name = Release; 281 | }; 282 | F44206081E03ED22003D7062 /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 286 | DEVELOPMENT_TEAM = N5WRHCE748; 287 | INFOPLIST_FILE = FlyOver/Info.plist; 288 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 289 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 290 | PRODUCT_BUNDLE_IDENTIFIER = ZeluLi.FlyOverFirst; 291 | PRODUCT_NAME = "$(TARGET_NAME)"; 292 | SWIFT_VERSION = 3.0; 293 | }; 294 | name = Debug; 295 | }; 296 | F44206091E03ED22003D7062 /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 300 | DEVELOPMENT_TEAM = N5WRHCE748; 301 | INFOPLIST_FILE = FlyOver/Info.plist; 302 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 303 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 304 | PRODUCT_BUNDLE_IDENTIFIER = ZeluLi.FlyOverFirst; 305 | PRODUCT_NAME = "$(TARGET_NAME)"; 306 | SWIFT_VERSION = 3.0; 307 | }; 308 | name = Release; 309 | }; 310 | /* End XCBuildConfiguration section */ 311 | 312 | /* Begin XCConfigurationList section */ 313 | F44205F01E03ED22003D7062 /* Build configuration list for PBXProject "FlyOver" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | F44206051E03ED22003D7062 /* Debug */, 317 | F44206061E03ED22003D7062 /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | F44206071E03ED22003D7062 /* Build configuration list for PBXNativeTarget "FlyOver" */ = { 323 | isa = XCConfigurationList; 324 | buildConfigurations = ( 325 | F44206081E03ED22003D7062 /* Debug */, 326 | F44206091E03ED22003D7062 /* Release */, 327 | ); 328 | defaultConfigurationIsVisible = 0; 329 | defaultConfigurationName = Release; 330 | }; 331 | /* End XCConfigurationList section */ 332 | }; 333 | rootObject = F44205ED1E03ED22003D7062 /* Project object */; 334 | } 335 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver.xcodeproj/project.xcworkspace/xcshareddata/FlyOver.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : 9223372036854775807, 8 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0A5EBD3F-C664-4D2F-B48B-31CD8A4622FB", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : "FlyOver\/", 13 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : "" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "FlyOver", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "FlyOver_First\/FlyOver.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/CollectionViewControllerDemo.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/FlyOver.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /FlyOver_First/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_First/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FlyOver_First/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/FlyOver.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FlyOver.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F44205F41E03ED22003D7062 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "icon_58.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "iphone", 22 | "filename" : "icon_87.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "iphone", 28 | "filename" : "icon_80.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "iphone", 34 | "filename" : "icon_120-1.png", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "size" : "60x60", 39 | "idiom" : "iphone", 40 | "filename" : "icon_120.png", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "size" : "60x60", 45 | "idiom" : "iphone", 46 | "filename" : "icon_180.png", 47 | "scale" : "3x" 48 | } 49 | ], 50 | "info" : { 51 | "version" : 1, 52 | "author" : "xcode" 53 | } 54 | } -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_58.png -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_First/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Controllers/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | override func loadView() { 13 | self.view = BackView(frame: ScreenBounds) 14 | } 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | } 18 | 19 | 20 | override func viewDidAppear(_ animated: Bool) { 21 | super.viewDidAppear(animated) 22 | // self.pointView.changePoint() 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 拖动连通图 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /FlyOver_First/FlyOver/Views/BackView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BackView.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/20. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BackView: UIView { 12 | let codeCount = 10 13 | var codeViews: Array = [] 14 | var graph: Array>! 15 | var beziers: Array = [] 16 | 17 | override init(frame: CGRect) { 18 | super.init(frame: frame) 19 | self.backgroundColor = UIColor.black 20 | self.addSubViews() 21 | } 22 | 23 | required init?(coder aDecoder: NSCoder) { 24 | fatalError("init(coder:) has not been implemented") 25 | } 26 | 27 | override func layoutSubviews() { 28 | super.layoutSubviews() 29 | self.drawLine() 30 | 31 | } 32 | 33 | /// 添加子视图 34 | func addSubViews() { 35 | for i in 0.. 64 | func addPoint(index: Int) { 65 | for j in 0..>(repeating: Array(repeating: false, count: self.codeCount), count: self.codeCount) 79 | } else { 80 | for i in 0.. Void 14 | 15 | func randomColor() -> UIColor { 16 | let weight = CGFloat(arc4random_uniform(1000))/1000 17 | return UIColor(hue: weight, saturation: 1, brightness: 1, alpha: 1) 18 | } 19 | 20 | class PointView: UIView { 21 | let widthAndHeight: CGFloat = 40 22 | var updateViewClosure: UpdateViewsClosure! = nil 23 | override init(frame: CGRect) { 24 | super.init(frame: frame) 25 | self.configCurrentView() 26 | } 27 | 28 | required init?(coder aDecoder: NSCoder) { 29 | fatalError("init(coder:) has not been implemented") 30 | } 31 | 32 | /// 配置当前View的配置项 33 | func configCurrentView() { 34 | self.layer.cornerRadius = self.widthAndHeight/2 35 | self.layer.borderWidth = 0.1 36 | self.layer.borderColor = UIColor.black.cgColor 37 | self.backgroundColor = randomColor() 38 | self.frame = CGRect(origin: randomPoint(), 39 | size: CGSize(width: widthAndHeight, height: widthAndHeight)) 40 | } 41 | 42 | /// 设置更新UI回调 43 | /// 44 | /// - Parameter closure: 45 | func setUpdateClosure(closure: @escaping UpdateViewsClosure) { 46 | self.updateViewClosure = closure 47 | } 48 | 49 | /// 随机生成坐标点 50 | /// 51 | /// - Returns: 返回随机生成的坐标点 52 | func randomPoint() -> CGPoint { 53 | return CGPoint(x: Int(arc4random_uniform(UInt32(ScreenSize.width-widthAndHeight))), 54 | y: Int(arc4random_uniform(UInt32(ScreenSize.height-widthAndHeight)))) 55 | } 56 | 57 | /// 触摸移动事件 58 | /// 59 | /// - Parameters: 60 | /// - touches: 61 | /// - event: 62 | override func touchesMoved(_ touches: Set, with event: UIEvent?) { 63 | for touche: UITouch in touches { 64 | self.center = touche.location(in: superview) 65 | 66 | if (self.updateViewClosure != nil) { 67 | self.backgroundColor = randomColor() 68 | self.updateViewClosure(self.tag) 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F44205F91E03ED22003D7062 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44205F81E03ED22003D7062 /* AppDelegate.swift */; }; 11 | F44205FE1E03ED22003D7062 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F44205FC1E03ED22003D7062 /* Main.storyboard */; }; 12 | F44206001E03ED22003D7062 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F44205FF1E03ED22003D7062 /* Assets.xcassets */; }; 13 | F44206031E03ED22003D7062 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F44206011E03ED22003D7062 /* LaunchScreen.storyboard */; }; 14 | F4D99CE51E092F7700864DEE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE21E092F7700864DEE /* ViewController.swift */; }; 15 | F4D99CE61E092F7700864DEE /* PointView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE41E092F7700864DEE /* PointView.swift */; }; 16 | F4D99CE81E092FC000864DEE /* BackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE71E092FC000864DEE /* BackView.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | F44205F51E03ED22003D7062 /* FlyOver.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlyOver.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | F44205F81E03ED22003D7062 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | F44205FD1E03ED22003D7062 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | F44205FF1E03ED22003D7062 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | F44206021E03ED22003D7062 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 25 | F44206041E03ED22003D7062 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | F4D99CE21E092F7700864DEE /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 27 | F4D99CE41E092F7700864DEE /* PointView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PointView.swift; sourceTree = ""; }; 28 | F4D99CE71E092FC000864DEE /* BackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackView.swift; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | F44205F21E03ED22003D7062 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | F44205EC1E03ED22003D7062 = { 43 | isa = PBXGroup; 44 | children = ( 45 | F44205F71E03ED22003D7062 /* FlyOver */, 46 | F44205F61E03ED22003D7062 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | F44205F61E03ED22003D7062 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | F44205F51E03ED22003D7062 /* FlyOver.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | F44205F71E03ED22003D7062 /* FlyOver */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | F4D99CE11E092F7700864DEE /* Controllers */, 62 | F4D99CE31E092F7700864DEE /* Views */, 63 | F44205F81E03ED22003D7062 /* AppDelegate.swift */, 64 | F44205FC1E03ED22003D7062 /* Main.storyboard */, 65 | F44205FF1E03ED22003D7062 /* Assets.xcassets */, 66 | F44206011E03ED22003D7062 /* LaunchScreen.storyboard */, 67 | F44206041E03ED22003D7062 /* Info.plist */, 68 | ); 69 | path = FlyOver; 70 | sourceTree = ""; 71 | }; 72 | F4D99CE11E092F7700864DEE /* Controllers */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | F4D99CE21E092F7700864DEE /* ViewController.swift */, 76 | ); 77 | path = Controllers; 78 | sourceTree = ""; 79 | }; 80 | F4D99CE31E092F7700864DEE /* Views */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | F4D99CE41E092F7700864DEE /* PointView.swift */, 84 | F4D99CE71E092FC000864DEE /* BackView.swift */, 85 | ); 86 | path = Views; 87 | sourceTree = ""; 88 | }; 89 | /* End PBXGroup section */ 90 | 91 | /* Begin PBXNativeTarget section */ 92 | F44205F41E03ED22003D7062 /* FlyOver */ = { 93 | isa = PBXNativeTarget; 94 | buildConfigurationList = F44206071E03ED22003D7062 /* Build configuration list for PBXNativeTarget "FlyOver" */; 95 | buildPhases = ( 96 | F44205F11E03ED22003D7062 /* Sources */, 97 | F44205F21E03ED22003D7062 /* Frameworks */, 98 | F44205F31E03ED22003D7062 /* Resources */, 99 | ); 100 | buildRules = ( 101 | ); 102 | dependencies = ( 103 | ); 104 | name = FlyOver; 105 | productName = FlyOver; 106 | productReference = F44205F51E03ED22003D7062 /* FlyOver.app */; 107 | productType = "com.apple.product-type.application"; 108 | }; 109 | /* End PBXNativeTarget section */ 110 | 111 | /* Begin PBXProject section */ 112 | F44205ED1E03ED22003D7062 /* Project object */ = { 113 | isa = PBXProject; 114 | attributes = { 115 | LastSwiftUpdateCheck = 0810; 116 | LastUpgradeCheck = 0810; 117 | ORGANIZATIONNAME = ZeluLi; 118 | TargetAttributes = { 119 | F44205F41E03ED22003D7062 = { 120 | CreatedOnToolsVersion = 8.1; 121 | DevelopmentTeam = N5WRHCE748; 122 | ProvisioningStyle = Automatic; 123 | }; 124 | }; 125 | }; 126 | buildConfigurationList = F44205F01E03ED22003D7062 /* Build configuration list for PBXProject "FlyOver" */; 127 | compatibilityVersion = "Xcode 3.2"; 128 | developmentRegion = English; 129 | hasScannedForEncodings = 0; 130 | knownRegions = ( 131 | en, 132 | Base, 133 | ); 134 | mainGroup = F44205EC1E03ED22003D7062; 135 | productRefGroup = F44205F61E03ED22003D7062 /* Products */; 136 | projectDirPath = ""; 137 | projectRoot = ""; 138 | targets = ( 139 | F44205F41E03ED22003D7062 /* FlyOver */, 140 | ); 141 | }; 142 | /* End PBXProject section */ 143 | 144 | /* Begin PBXResourcesBuildPhase section */ 145 | F44205F31E03ED22003D7062 /* Resources */ = { 146 | isa = PBXResourcesBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | F44206031E03ED22003D7062 /* LaunchScreen.storyboard in Resources */, 150 | F44206001E03ED22003D7062 /* Assets.xcassets in Resources */, 151 | F44205FE1E03ED22003D7062 /* Main.storyboard in Resources */, 152 | ); 153 | runOnlyForDeploymentPostprocessing = 0; 154 | }; 155 | /* End PBXResourcesBuildPhase section */ 156 | 157 | /* Begin PBXSourcesBuildPhase section */ 158 | F44205F11E03ED22003D7062 /* Sources */ = { 159 | isa = PBXSourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | F4D99CE61E092F7700864DEE /* PointView.swift in Sources */, 163 | F4D99CE81E092FC000864DEE /* BackView.swift in Sources */, 164 | F4D99CE51E092F7700864DEE /* ViewController.swift in Sources */, 165 | F44205F91E03ED22003D7062 /* AppDelegate.swift in Sources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXSourcesBuildPhase section */ 170 | 171 | /* Begin PBXVariantGroup section */ 172 | F44205FC1E03ED22003D7062 /* Main.storyboard */ = { 173 | isa = PBXVariantGroup; 174 | children = ( 175 | F44205FD1E03ED22003D7062 /* Base */, 176 | ); 177 | name = Main.storyboard; 178 | sourceTree = ""; 179 | }; 180 | F44206011E03ED22003D7062 /* LaunchScreen.storyboard */ = { 181 | isa = PBXVariantGroup; 182 | children = ( 183 | F44206021E03ED22003D7062 /* Base */, 184 | ); 185 | name = LaunchScreen.storyboard; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXVariantGroup section */ 189 | 190 | /* Begin XCBuildConfiguration section */ 191 | F44206051E03ED22003D7062 /* Debug */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | ALWAYS_SEARCH_USER_PATHS = NO; 195 | CLANG_ANALYZER_NONNULL = YES; 196 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 197 | CLANG_CXX_LIBRARY = "libc++"; 198 | CLANG_ENABLE_MODULES = YES; 199 | CLANG_ENABLE_OBJC_ARC = YES; 200 | CLANG_WARN_BOOL_CONVERSION = YES; 201 | CLANG_WARN_CONSTANT_CONVERSION = YES; 202 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 203 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 204 | CLANG_WARN_EMPTY_BODY = YES; 205 | CLANG_WARN_ENUM_CONVERSION = YES; 206 | CLANG_WARN_INFINITE_RECURSION = YES; 207 | CLANG_WARN_INT_CONVERSION = YES; 208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 209 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 210 | CLANG_WARN_UNREACHABLE_CODE = YES; 211 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 212 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 213 | COPY_PHASE_STRIP = NO; 214 | DEBUG_INFORMATION_FORMAT = dwarf; 215 | ENABLE_STRICT_OBJC_MSGSEND = YES; 216 | ENABLE_TESTABILITY = YES; 217 | GCC_C_LANGUAGE_STANDARD = gnu99; 218 | GCC_DYNAMIC_NO_PIC = NO; 219 | GCC_NO_COMMON_BLOCKS = YES; 220 | GCC_OPTIMIZATION_LEVEL = 0; 221 | GCC_PREPROCESSOR_DEFINITIONS = ( 222 | "DEBUG=1", 223 | "$(inherited)", 224 | ); 225 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 226 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 227 | GCC_WARN_UNDECLARED_SELECTOR = YES; 228 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 229 | GCC_WARN_UNUSED_FUNCTION = YES; 230 | GCC_WARN_UNUSED_VARIABLE = YES; 231 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 232 | MTL_ENABLE_DEBUG_INFO = YES; 233 | ONLY_ACTIVE_ARCH = YES; 234 | SDKROOT = iphoneos; 235 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 236 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 237 | }; 238 | name = Debug; 239 | }; 240 | F44206061E03ED22003D7062 /* Release */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_ANALYZER_NONNULL = YES; 245 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 246 | CLANG_CXX_LIBRARY = "libc++"; 247 | CLANG_ENABLE_MODULES = YES; 248 | CLANG_ENABLE_OBJC_ARC = YES; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_CONSTANT_CONVERSION = YES; 251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 252 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 253 | CLANG_WARN_EMPTY_BODY = YES; 254 | CLANG_WARN_ENUM_CONVERSION = YES; 255 | CLANG_WARN_INFINITE_RECURSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 259 | CLANG_WARN_UNREACHABLE_CODE = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 262 | COPY_PHASE_STRIP = NO; 263 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 264 | ENABLE_NS_ASSERTIONS = NO; 265 | ENABLE_STRICT_OBJC_MSGSEND = YES; 266 | GCC_C_LANGUAGE_STANDARD = gnu99; 267 | GCC_NO_COMMON_BLOCKS = YES; 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 275 | MTL_ENABLE_DEBUG_INFO = NO; 276 | SDKROOT = iphoneos; 277 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 278 | VALIDATE_PRODUCT = YES; 279 | }; 280 | name = Release; 281 | }; 282 | F44206081E03ED22003D7062 /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 286 | DEVELOPMENT_TEAM = N5WRHCE748; 287 | INFOPLIST_FILE = FlyOver/Info.plist; 288 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 289 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 290 | PRODUCT_BUNDLE_IDENTIFIER = ZeluLi.FlyOverFourth; 291 | PRODUCT_NAME = "$(TARGET_NAME)"; 292 | SWIFT_VERSION = 3.0; 293 | }; 294 | name = Debug; 295 | }; 296 | F44206091E03ED22003D7062 /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 300 | DEVELOPMENT_TEAM = N5WRHCE748; 301 | INFOPLIST_FILE = FlyOver/Info.plist; 302 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 303 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 304 | PRODUCT_BUNDLE_IDENTIFIER = ZeluLi.FlyOverFourth; 305 | PRODUCT_NAME = "$(TARGET_NAME)"; 306 | SWIFT_VERSION = 3.0; 307 | }; 308 | name = Release; 309 | }; 310 | /* End XCBuildConfiguration section */ 311 | 312 | /* Begin XCConfigurationList section */ 313 | F44205F01E03ED22003D7062 /* Build configuration list for PBXProject "FlyOver" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | F44206051E03ED22003D7062 /* Debug */, 317 | F44206061E03ED22003D7062 /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | F44206071E03ED22003D7062 /* Build configuration list for PBXNativeTarget "FlyOver" */ = { 323 | isa = XCConfigurationList; 324 | buildConfigurations = ( 325 | F44206081E03ED22003D7062 /* Debug */, 326 | F44206091E03ED22003D7062 /* Release */, 327 | ); 328 | defaultConfigurationIsVisible = 0; 329 | defaultConfigurationName = Release; 330 | }; 331 | /* End XCConfigurationList section */ 332 | }; 333 | rootObject = F44205ED1E03ED22003D7062 /* Project object */; 334 | } 335 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver.xcodeproj/project.xcworkspace/xcshareddata/FlyOver.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : 9223372036854775807, 8 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0A5EBD3F-C664-4D2F-B48B-31CD8A4622FB", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : "FlyOver\/", 13 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : "" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "FlyOver", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "FlyOver_Fourth\/FlyOver.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/CollectionViewControllerDemo.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/FlyOver.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Fourth/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/FlyOver.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FlyOver.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F44205F41E03ED22003D7062 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "icon_58.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "iphone", 22 | "filename" : "icon_87.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "iphone", 28 | "filename" : "icon_80.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "iphone", 34 | "filename" : "icon_120-1.png", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "size" : "60x60", 39 | "idiom" : "iphone", 40 | "filename" : "icon_120.png", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "size" : "60x60", 45 | "idiom" : "iphone", 46 | "filename" : "icon_180.png", 47 | "scale" : "3x" 48 | } 49 | ], 50 | "info" : { 51 | "version" : 1, 52 | "author" : "xcode" 53 | } 54 | } -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_58.png -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Fourth/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Controllers/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | override func loadView() { 13 | self.view = BackView(frame: ScreenBounds) 14 | } 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | } 18 | 19 | 20 | override func viewDidAppear(_ animated: Bool) { 21 | super.viewDidAppear(animated) 22 | // self.pointView.changePoint() 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 增加点连接 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /FlyOver_Fourth/FlyOver/Views/BackView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BackView.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/20. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BackView: UIView { 12 | let codeCount = 1 13 | let range: CGFloat = 80 14 | var codeViews: Array = [] 15 | var beziers: Array = [] 16 | override init(frame: CGRect) { 17 | super.init(frame: frame) 18 | self.backgroundColor = UIColor.black 19 | self.addSubViews() 20 | } 21 | 22 | required init?(coder aDecoder: NSCoder) { 23 | fatalError("init(coder:) has not been implemented") 24 | } 25 | 26 | /// 添加点 27 | func addSubViews() { 28 | for i in 0.., with event: UIEvent?) { 34 | if self.codeViews.count < 80 { 35 | for touche: UITouch in touches { 36 | let center = touche.location(in: superview) 37 | self.addCodeView(tag: self.codeViews.count, center: center) 38 | } 39 | } 40 | } 41 | 42 | /// 添加节点 43 | /// 44 | /// - Parameters: 45 | /// - tag: 添加节点的Tag 46 | /// - center: 添加节点的center,如果为nil的话,则随机生成 47 | func addCodeView(tag: Int, center: CGPoint?) { 48 | self.beziers.append(UIBezierPath()) 49 | let codeView = PointView(frame: CGRect.zero) 50 | codeView.tag = tag 51 | if let centerPoint = center { 52 | codeView.center = centerPoint 53 | } 54 | weak var weak_self = self 55 | codeView.setUpdateClosure(closure: { (index) in 56 | weak_self?.drawLine(index: index) 57 | }) 58 | 59 | self.addSubview(codeView) 60 | self.codeViews.append(codeView) 61 | } 62 | 63 | /// 画线 64 | /// 65 | /// - Parameter index: 当前划线点的索引 66 | func drawLine(index: Int) { 67 | let points: Array = self.areaPoints(index: index) 68 | var graph: Array>! = Array>(repeating: Array(repeating: false, count: points.count), count: points.count) 69 | 70 | let bezier = self.beziers[index] 71 | bezier.removeAllPoints() 72 | for i in 0.. Array { 90 | var points = Array() 91 | points.append(self.codeViews[index].center) 92 | for item in self.codeViews { 93 | let distance = self.countDistance(point1: self.codeViews[index].center, 94 | point2: item.center) 95 | if distance < self.range { 96 | points.append(item.center) 97 | } 98 | } 99 | return points 100 | } 101 | 102 | /// 计算两点之间的距离 103 | /// 104 | /// - Parameters: 105 | /// - point1: 点1 106 | /// - point2: 点2 107 | /// - Returns: 返回两点之间的距离 108 | func countDistance(point1: CGPoint, point2: CGPoint) -> CGFloat { 109 | let x = pow(point1.x - point2.x, 2) 110 | let y = pow(point1.y - point2.y, 2) 111 | return CGFloat(sqrt(Double(x + y))) 112 | } 113 | 114 | // Only override draw() if you perform custom drawing. 115 | // An empty implementation adversely affects performance during animation. 116 | override func draw(_ rect: CGRect) { 117 | for j in 0.. Void 13 | class PointView: UIView { 14 | 15 | let widthAndHeight: CGFloat = 10 16 | 17 | var x: CGFloat = 1 18 | var y: CGFloat = 1 19 | var updateViewClosure: UpdateViewsClosure! = nil 20 | var duration: Double = 0.0005 21 | var source: DispatchSourceTimer! 22 | 23 | override init(frame: CGRect) { 24 | super.init(frame: frame) 25 | self.config() 26 | } 27 | 28 | override func layoutSubviews() { 29 | super.layoutSubviews() 30 | self.addDispatchSourceTimer() 31 | } 32 | 33 | /// 配置当前View的默认属性 34 | func config() { 35 | self.x = randomIncrement() 36 | self.y = randomIncrement() 37 | self.layer.cornerRadius = widthAndHeight / 2 38 | self.backgroundColor = UIColor.black 39 | self.layer.borderColor = UIColor.black.cgColor 40 | self.layer.borderWidth = 1 41 | self.frame = CGRect(origin: randomPoint(), size: CGSize(width: widthAndHeight, height: widthAndHeight)) 42 | self.duration = self.randomDuraion() 43 | } 44 | 45 | /// 设置更新回调 46 | /// 47 | /// - Parameter closure: <#closure description#> 48 | func setUpdateClosure(closure: @escaping UpdateViewsClosure) { 49 | self.updateViewClosure = closure 50 | } 51 | 52 | /// 随机生成坐标点 53 | /// 54 | /// - Returns: <#return value description#> 55 | func randomPoint() -> CGPoint { 56 | arc4random_uniform(UInt32(ScreenSize.width)) 57 | return CGPoint(x: Int(arc4random_uniform(UInt32(ScreenSize.width-widthAndHeight))), 58 | y: Int(arc4random_uniform(UInt32(ScreenSize.height-widthAndHeight)))) 59 | } 60 | 61 | /// 随机生成x或者y的增量 62 | /// 63 | /// - Returns: <#return value description#> 64 | func randomIncrement() -> CGFloat { 65 | if arc4random() % 2 == 0 { 66 | return 1 67 | } else { 68 | return -1 69 | } 70 | } 71 | 72 | 73 | /// 添加Dispatch Source Timer 74 | func addDispatchSourceTimer() { 75 | if source == nil { 76 | source = DispatchSource.makeTimerSource(flags: DispatchSource.TimerFlags(rawValue: UInt(0)), queue: DispatchQueue.main) as? DispatchSource 77 | } 78 | 79 | let timer = UInt64(duration) * NSEC_PER_SEC 80 | source.scheduleRepeating(deadline: DispatchTime.init(uptimeNanoseconds: UInt64(timer)), interval: DispatchTimeInterval.seconds(Int(duration)), leeway: DispatchTimeInterval.seconds(0)) 81 | source.setEventHandler { 82 | self.changePoint() 83 | } 84 | source.resume() 85 | } 86 | 87 | /// 改变当前View的坐标 88 | func changePoint() { 89 | let weight = CGFloat(arc4random_uniform(1000))/1000 90 | self.backgroundColor = RandomColor.shareInstance() 91 | var currentPoint = self.frame.origin 92 | 93 | if currentPoint.x > ScreenSize.width-self.widthAndHeight || currentPoint.x < 0 { 94 | self.x = -self.x 95 | } 96 | 97 | if currentPoint.y > ScreenSize.height-self.widthAndHeight || currentPoint.y < 0 { 98 | self.y = -self.y 99 | } 100 | 101 | currentPoint.x += self.x 102 | currentPoint.y += self.y 103 | self.frame.origin = currentPoint 104 | 105 | if self.updateViewClosure != nil { 106 | self.updateViewClosure(self.tag) 107 | } 108 | } 109 | 110 | /// 随机生成动画时间 111 | /// 112 | /// - Returns: <#return value description#> 113 | func randomDuraion() -> Double { 114 | return Double(arc4random_uniform(10))/10 115 | } 116 | 117 | required init?(coder aDecoder: NSCoder) { 118 | fatalError("init(coder:) has not been implemented") 119 | } 120 | } 121 | 122 | class RandomColor { 123 | var randomColors = Array() 124 | var colorCount = 20 125 | var randomColor: UIColor { 126 | get { 127 | let index = Int(arc4random_uniform(1000)) % colorCount 128 | return randomColors[index] 129 | } 130 | } 131 | private static var color: RandomColor! 132 | static func shareInstance() -> UIColor { 133 | if color == nil { 134 | color = RandomColor() 135 | } 136 | return color.randomColor 137 | } 138 | 139 | private init() { 140 | if randomColors.isEmpty { 141 | self.addColors() 142 | } 143 | } 144 | 145 | func addColors() { 146 | for _ in 0.. 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver.xcodeproj/project.xcworkspace/xcshareddata/FlyOver.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : 9223372036854775807, 8 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0A5EBD3F-C664-4D2F-B48B-31CD8A4622FB", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : "FlyOver\/", 13 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : "" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "FlyOver", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "FlyOver_Second\/FlyOver.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/CollectionViewControllerDemo.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/FlyOver.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Second/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/FlyOver.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FlyOver.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F44205F41E03ED22003D7062 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "icon_58.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "iphone", 22 | "filename" : "icon_87.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "iphone", 28 | "filename" : "icon_80.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "iphone", 34 | "filename" : "icon_120-1.png", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "size" : "60x60", 39 | "idiom" : "iphone", 40 | "filename" : "icon_120.png", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "size" : "60x60", 45 | "idiom" : "iphone", 46 | "filename" : "icon_180.png", 47 | "scale" : "3x" 48 | } 49 | ], 50 | "info" : { 51 | "version" : 1, 52 | "author" : "xcode" 53 | } 54 | } -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_58.png -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Second/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Controllers/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | override func loadView() { 13 | self.view = BackView(frame: ScreenBounds) 14 | } 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | } 18 | 19 | 20 | override func viewDidAppear(_ animated: Bool) { 21 | super.viewDidAppear(animated) 22 | // self.pointView.changePoint() 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 自动变化 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /FlyOver_Second/FlyOver/Views/BackView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BackView.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/20. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BackView: UIView { 12 | let codeCount = 10 13 | var codeViews: Array = [] 14 | var graph: Array>! 15 | var beziers: Array = [] 16 | 17 | override init(frame: CGRect) { 18 | super.init(frame: frame) 19 | self.backgroundColor = UIColor.black 20 | self.addSubViews() 21 | } 22 | 23 | required init?(coder aDecoder: NSCoder) { 24 | fatalError("init(coder:) has not been implemented") 25 | } 26 | 27 | override func layoutSubviews() { 28 | super.layoutSubviews() 29 | self.drawLine() 30 | 31 | } 32 | 33 | /// 添加子视图和贝塞尔对象 34 | func addSubViews() { 35 | for i in 0.. 64 | func addPoint(index: Int) { 65 | for j in 0..>(repeating: Array(repeating: false, count: self.codeCount), count: self.codeCount) 79 | } else { 80 | for i in 0.. Void 13 | func randomColor() -> UIColor { 14 | let weight = CGFloat(arc4random_uniform(1000))/1000 15 | return UIColor(hue: weight, saturation: 1, brightness: 1, alpha: 1) 16 | } 17 | class PointView: UIView { 18 | var x: CGFloat = 1 19 | var y: CGFloat = 1 20 | var widthChange: CGFloat = 1 21 | let widthAndHeight: CGFloat = 10 22 | var updateViewClosure: UpdateViewsClosure! = nil 23 | override init(frame: CGRect) { 24 | super.init(frame: frame) 25 | self.configCurrentView() 26 | } 27 | 28 | required init?(coder aDecoder: NSCoder) { 29 | fatalError("init(coder:) has not been implemented") 30 | } 31 | 32 | override func layoutSubviews() { 33 | self.changePoint() 34 | } 35 | 36 | /// 配置当前View 37 | func configCurrentView() { 38 | self.x = randomIncrement() 39 | self.y = randomIncrement() 40 | self.layer.cornerRadius = widthAndHeight/2 41 | self.backgroundColor = UIColor.blue 42 | self.layer.borderWidth = 0.1 43 | self.layer.borderColor = UIColor.white.cgColor 44 | self.frame = CGRect(origin: randomPoint(), size: CGSize(width: widthAndHeight, height: widthAndHeight)) 45 | } 46 | 47 | /// 设置更新回调 48 | /// 49 | /// - Parameter closure: 50 | func setUpdateClosure(closure: @escaping UpdateViewsClosure) { 51 | self.updateViewClosure = closure 52 | } 53 | 54 | /// 随机生成坐标点 55 | /// 56 | /// - Returns: 57 | func randomPoint() -> CGPoint { 58 | arc4random_uniform(UInt32(ScreenSize.width)) 59 | return CGPoint(x: Int(arc4random_uniform(UInt32(ScreenSize.width-widthAndHeight))), 60 | y: Int(arc4random_uniform(UInt32(ScreenSize.height-widthAndHeight)))) 61 | } 62 | 63 | /// 随机生成偏移量 64 | /// 65 | /// - Returns: <#return value description#> 66 | func randomIncrement() -> CGFloat { 67 | if arc4random() % 2 == 0 { 68 | return 1 69 | } else { 70 | return -1 71 | } 72 | } 73 | 74 | /// 更新坐标点 75 | func changePoint() { 76 | UIView.animate(withDuration: 0.0001, animations: { 77 | var currentPoint = self.frame.origin 78 | 79 | if currentPoint.x > ScreenSize.width-self.widthAndHeight || currentPoint.x < 0 { 80 | self.x = -self.x 81 | } 82 | 83 | if currentPoint.y > ScreenSize.height-self.widthAndHeight || currentPoint.y < 0 { 84 | self.y = -self.y 85 | } 86 | 87 | currentPoint.x += self.x 88 | currentPoint.y += self.y 89 | self.frame.origin = currentPoint 90 | 91 | }, completion: { (bool) in 92 | self.backgroundColor = randomColor() 93 | if self.updateViewClosure != nil { 94 | self.updateViewClosure(self.tag) 95 | } 96 | self.changePoint() 97 | }) 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F44205F91E03ED22003D7062 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44205F81E03ED22003D7062 /* AppDelegate.swift */; }; 11 | F44205FE1E03ED22003D7062 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F44205FC1E03ED22003D7062 /* Main.storyboard */; }; 12 | F44206001E03ED22003D7062 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F44205FF1E03ED22003D7062 /* Assets.xcassets */; }; 13 | F44206031E03ED22003D7062 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F44206011E03ED22003D7062 /* LaunchScreen.storyboard */; }; 14 | F4D99CE51E092F7700864DEE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE21E092F7700864DEE /* ViewController.swift */; }; 15 | F4D99CE61E092F7700864DEE /* PointView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE41E092F7700864DEE /* PointView.swift */; }; 16 | F4D99CE81E092FC000864DEE /* BackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4D99CE71E092FC000864DEE /* BackView.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | F44205F51E03ED22003D7062 /* FlyOver.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FlyOver.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | F44205F81E03ED22003D7062 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | F44205FD1E03ED22003D7062 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | F44205FF1E03ED22003D7062 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 24 | F44206021E03ED22003D7062 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 25 | F44206041E03ED22003D7062 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 26 | F4D99CE21E092F7700864DEE /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 27 | F4D99CE41E092F7700864DEE /* PointView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PointView.swift; sourceTree = ""; }; 28 | F4D99CE71E092FC000864DEE /* BackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackView.swift; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | F44205F21E03ED22003D7062 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | F44205EC1E03ED22003D7062 = { 43 | isa = PBXGroup; 44 | children = ( 45 | F44205F71E03ED22003D7062 /* FlyOver */, 46 | F44205F61E03ED22003D7062 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | F44205F61E03ED22003D7062 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | F44205F51E03ED22003D7062 /* FlyOver.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | F44205F71E03ED22003D7062 /* FlyOver */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | F4D99CE11E092F7700864DEE /* Controllers */, 62 | F4D99CE31E092F7700864DEE /* Views */, 63 | F44205F81E03ED22003D7062 /* AppDelegate.swift */, 64 | F44205FC1E03ED22003D7062 /* Main.storyboard */, 65 | F44205FF1E03ED22003D7062 /* Assets.xcassets */, 66 | F44206011E03ED22003D7062 /* LaunchScreen.storyboard */, 67 | F44206041E03ED22003D7062 /* Info.plist */, 68 | ); 69 | path = FlyOver; 70 | sourceTree = ""; 71 | }; 72 | F4D99CE11E092F7700864DEE /* Controllers */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | F4D99CE21E092F7700864DEE /* ViewController.swift */, 76 | ); 77 | path = Controllers; 78 | sourceTree = ""; 79 | }; 80 | F4D99CE31E092F7700864DEE /* Views */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | F4D99CE41E092F7700864DEE /* PointView.swift */, 84 | F4D99CE71E092FC000864DEE /* BackView.swift */, 85 | ); 86 | path = Views; 87 | sourceTree = ""; 88 | }; 89 | /* End PBXGroup section */ 90 | 91 | /* Begin PBXNativeTarget section */ 92 | F44205F41E03ED22003D7062 /* FlyOver */ = { 93 | isa = PBXNativeTarget; 94 | buildConfigurationList = F44206071E03ED22003D7062 /* Build configuration list for PBXNativeTarget "FlyOver" */; 95 | buildPhases = ( 96 | F44205F11E03ED22003D7062 /* Sources */, 97 | F44205F21E03ED22003D7062 /* Frameworks */, 98 | F44205F31E03ED22003D7062 /* Resources */, 99 | ); 100 | buildRules = ( 101 | ); 102 | dependencies = ( 103 | ); 104 | name = FlyOver; 105 | productName = FlyOver; 106 | productReference = F44205F51E03ED22003D7062 /* FlyOver.app */; 107 | productType = "com.apple.product-type.application"; 108 | }; 109 | /* End PBXNativeTarget section */ 110 | 111 | /* Begin PBXProject section */ 112 | F44205ED1E03ED22003D7062 /* Project object */ = { 113 | isa = PBXProject; 114 | attributes = { 115 | LastSwiftUpdateCheck = 0810; 116 | LastUpgradeCheck = 0810; 117 | ORGANIZATIONNAME = ZeluLi; 118 | TargetAttributes = { 119 | F44205F41E03ED22003D7062 = { 120 | CreatedOnToolsVersion = 8.1; 121 | DevelopmentTeam = N5WRHCE748; 122 | ProvisioningStyle = Automatic; 123 | }; 124 | }; 125 | }; 126 | buildConfigurationList = F44205F01E03ED22003D7062 /* Build configuration list for PBXProject "FlyOver" */; 127 | compatibilityVersion = "Xcode 3.2"; 128 | developmentRegion = English; 129 | hasScannedForEncodings = 0; 130 | knownRegions = ( 131 | en, 132 | Base, 133 | ); 134 | mainGroup = F44205EC1E03ED22003D7062; 135 | productRefGroup = F44205F61E03ED22003D7062 /* Products */; 136 | projectDirPath = ""; 137 | projectRoot = ""; 138 | targets = ( 139 | F44205F41E03ED22003D7062 /* FlyOver */, 140 | ); 141 | }; 142 | /* End PBXProject section */ 143 | 144 | /* Begin PBXResourcesBuildPhase section */ 145 | F44205F31E03ED22003D7062 /* Resources */ = { 146 | isa = PBXResourcesBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | F44206031E03ED22003D7062 /* LaunchScreen.storyboard in Resources */, 150 | F44206001E03ED22003D7062 /* Assets.xcassets in Resources */, 151 | F44205FE1E03ED22003D7062 /* Main.storyboard in Resources */, 152 | ); 153 | runOnlyForDeploymentPostprocessing = 0; 154 | }; 155 | /* End PBXResourcesBuildPhase section */ 156 | 157 | /* Begin PBXSourcesBuildPhase section */ 158 | F44205F11E03ED22003D7062 /* Sources */ = { 159 | isa = PBXSourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | F4D99CE61E092F7700864DEE /* PointView.swift in Sources */, 163 | F4D99CE81E092FC000864DEE /* BackView.swift in Sources */, 164 | F4D99CE51E092F7700864DEE /* ViewController.swift in Sources */, 165 | F44205F91E03ED22003D7062 /* AppDelegate.swift in Sources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXSourcesBuildPhase section */ 170 | 171 | /* Begin PBXVariantGroup section */ 172 | F44205FC1E03ED22003D7062 /* Main.storyboard */ = { 173 | isa = PBXVariantGroup; 174 | children = ( 175 | F44205FD1E03ED22003D7062 /* Base */, 176 | ); 177 | name = Main.storyboard; 178 | sourceTree = ""; 179 | }; 180 | F44206011E03ED22003D7062 /* LaunchScreen.storyboard */ = { 181 | isa = PBXVariantGroup; 182 | children = ( 183 | F44206021E03ED22003D7062 /* Base */, 184 | ); 185 | name = LaunchScreen.storyboard; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXVariantGroup section */ 189 | 190 | /* Begin XCBuildConfiguration section */ 191 | F44206051E03ED22003D7062 /* Debug */ = { 192 | isa = XCBuildConfiguration; 193 | buildSettings = { 194 | ALWAYS_SEARCH_USER_PATHS = NO; 195 | CLANG_ANALYZER_NONNULL = YES; 196 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 197 | CLANG_CXX_LIBRARY = "libc++"; 198 | CLANG_ENABLE_MODULES = YES; 199 | CLANG_ENABLE_OBJC_ARC = YES; 200 | CLANG_WARN_BOOL_CONVERSION = YES; 201 | CLANG_WARN_CONSTANT_CONVERSION = YES; 202 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 203 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 204 | CLANG_WARN_EMPTY_BODY = YES; 205 | CLANG_WARN_ENUM_CONVERSION = YES; 206 | CLANG_WARN_INFINITE_RECURSION = YES; 207 | CLANG_WARN_INT_CONVERSION = YES; 208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 209 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 210 | CLANG_WARN_UNREACHABLE_CODE = YES; 211 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 212 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 213 | COPY_PHASE_STRIP = NO; 214 | DEBUG_INFORMATION_FORMAT = dwarf; 215 | ENABLE_STRICT_OBJC_MSGSEND = YES; 216 | ENABLE_TESTABILITY = YES; 217 | GCC_C_LANGUAGE_STANDARD = gnu99; 218 | GCC_DYNAMIC_NO_PIC = NO; 219 | GCC_NO_COMMON_BLOCKS = YES; 220 | GCC_OPTIMIZATION_LEVEL = 0; 221 | GCC_PREPROCESSOR_DEFINITIONS = ( 222 | "DEBUG=1", 223 | "$(inherited)", 224 | ); 225 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 226 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 227 | GCC_WARN_UNDECLARED_SELECTOR = YES; 228 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 229 | GCC_WARN_UNUSED_FUNCTION = YES; 230 | GCC_WARN_UNUSED_VARIABLE = YES; 231 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 232 | MTL_ENABLE_DEBUG_INFO = YES; 233 | ONLY_ACTIVE_ARCH = YES; 234 | SDKROOT = iphoneos; 235 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 236 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 237 | }; 238 | name = Debug; 239 | }; 240 | F44206061E03ED22003D7062 /* Release */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_ANALYZER_NONNULL = YES; 245 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 246 | CLANG_CXX_LIBRARY = "libc++"; 247 | CLANG_ENABLE_MODULES = YES; 248 | CLANG_ENABLE_OBJC_ARC = YES; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_CONSTANT_CONVERSION = YES; 251 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 252 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 253 | CLANG_WARN_EMPTY_BODY = YES; 254 | CLANG_WARN_ENUM_CONVERSION = YES; 255 | CLANG_WARN_INFINITE_RECURSION = YES; 256 | CLANG_WARN_INT_CONVERSION = YES; 257 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 258 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 259 | CLANG_WARN_UNREACHABLE_CODE = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 262 | COPY_PHASE_STRIP = NO; 263 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 264 | ENABLE_NS_ASSERTIONS = NO; 265 | ENABLE_STRICT_OBJC_MSGSEND = YES; 266 | GCC_C_LANGUAGE_STANDARD = gnu99; 267 | GCC_NO_COMMON_BLOCKS = YES; 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 270 | GCC_WARN_UNDECLARED_SELECTOR = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 272 | GCC_WARN_UNUSED_FUNCTION = YES; 273 | GCC_WARN_UNUSED_VARIABLE = YES; 274 | IPHONEOS_DEPLOYMENT_TARGET = 10.1; 275 | MTL_ENABLE_DEBUG_INFO = NO; 276 | SDKROOT = iphoneos; 277 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 278 | VALIDATE_PRODUCT = YES; 279 | }; 280 | name = Release; 281 | }; 282 | F44206081E03ED22003D7062 /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 286 | DEVELOPMENT_TEAM = N5WRHCE748; 287 | INFOPLIST_FILE = FlyOver/Info.plist; 288 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 289 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 290 | PRODUCT_BUNDLE_IDENTIFIER = ZeluLi.FlyOverThird; 291 | PRODUCT_NAME = "$(TARGET_NAME)"; 292 | SWIFT_VERSION = 3.0; 293 | }; 294 | name = Debug; 295 | }; 296 | F44206091E03ED22003D7062 /* Release */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 300 | DEVELOPMENT_TEAM = N5WRHCE748; 301 | INFOPLIST_FILE = FlyOver/Info.plist; 302 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 303 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 304 | PRODUCT_BUNDLE_IDENTIFIER = ZeluLi.FlyOverThird; 305 | PRODUCT_NAME = "$(TARGET_NAME)"; 306 | SWIFT_VERSION = 3.0; 307 | }; 308 | name = Release; 309 | }; 310 | /* End XCBuildConfiguration section */ 311 | 312 | /* Begin XCConfigurationList section */ 313 | F44205F01E03ED22003D7062 /* Build configuration list for PBXProject "FlyOver" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | F44206051E03ED22003D7062 /* Debug */, 317 | F44206061E03ED22003D7062 /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | F44206071E03ED22003D7062 /* Build configuration list for PBXNativeTarget "FlyOver" */ = { 323 | isa = XCConfigurationList; 324 | buildConfigurations = ( 325 | F44206081E03ED22003D7062 /* Debug */, 326 | F44206091E03ED22003D7062 /* Release */, 327 | ); 328 | defaultConfigurationIsVisible = 0; 329 | defaultConfigurationName = Release; 330 | }; 331 | /* End XCConfigurationList section */ 332 | }; 333 | rootObject = F44205ED1E03ED22003D7062 /* Project object */; 334 | } 335 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver.xcodeproj/project.xcworkspace/xcshareddata/FlyOver.xcscmblueprint: -------------------------------------------------------------------------------- 1 | { 2 | "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26", 3 | "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { 4 | 5 | }, 6 | "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { 7 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : 9223372036854775807, 8 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : 9223372036854775807 9 | }, 10 | "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "0A5EBD3F-C664-4D2F-B48B-31CD8A4622FB", 11 | "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { 12 | "E5317DD7489314F07FC034452F37953EEF5A6B26" : "FlyOver\/", 13 | "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" : "" 14 | }, 15 | "DVTSourceControlWorkspaceBlueprintNameKey" : "FlyOver", 16 | "DVTSourceControlWorkspaceBlueprintVersion" : 204, 17 | "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "FlyOver_Third\/FlyOver.xcodeproj", 18 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ 19 | { 20 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/CollectionViewControllerDemo.git", 21 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 22 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "59B0DD3A0DC0B86D2A06DD4B68CBD1C997876614" 23 | }, 24 | { 25 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/lizelu\/FlyOver.git", 26 | "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", 27 | "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "E5317DD7489314F07FC034452F37953EEF5A6B26" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Third/FlyOver.xcodeproj/project.xcworkspace/xcuserdata/lizelu.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/FlyOver.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver.xcodeproj/xcuserdata/lizelu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FlyOver.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F44205F41E03ED22003D7062 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "size" : "29x29", 15 | "idiom" : "iphone", 16 | "filename" : "icon_87.png", 17 | "scale" : "2x" 18 | }, 19 | { 20 | "size" : "29x29", 21 | "idiom" : "iphone", 22 | "filename" : "icon_80-1.png", 23 | "scale" : "3x" 24 | }, 25 | { 26 | "size" : "40x40", 27 | "idiom" : "iphone", 28 | "filename" : "icon_80.png", 29 | "scale" : "2x" 30 | }, 31 | { 32 | "size" : "40x40", 33 | "idiom" : "iphone", 34 | "filename" : "icon_120-1.png", 35 | "scale" : "3x" 36 | }, 37 | { 38 | "size" : "60x60", 39 | "idiom" : "iphone", 40 | "filename" : "icon_120.png", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "size" : "60x60", 45 | "idiom" : "iphone", 46 | "filename" : "icon_180.png", 47 | "scale" : "3x" 48 | } 49 | ], 50 | "info" : { 51 | "version" : 1, 52 | "author" : "xcode" 53 | } 54 | } -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120-1.png -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_120.png -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_180.png -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80-1.png -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_80.png -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lizelu/FlyOver/0390d19f6cc14cde3af7c2f5f48c6dfcf934af4b/FlyOver_Third/FlyOver/Assets.xcassets/AppIcon.appiconset/icon_87.png -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/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 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Controllers/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/16. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | override func loadView() { 13 | self.view = BackView(frame: ScreenBounds) 14 | } 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | } 18 | 19 | 20 | override func viewDidAppear(_ animated: Bool) { 21 | super.viewDidAppear(animated) 22 | // self.pointView.changePoint() 23 | } 24 | 25 | override func didReceiveMemoryWarning() { 26 | super.didReceiveMemoryWarning() 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 局部连接 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /FlyOver_Third/FlyOver/Views/BackView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BackView.swift 3 | // FlyOver 4 | // 5 | // Created by Mr.LuDashi on 2016/12/20. 6 | // Copyright © 2016年 ZeluLi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class BackView: UIView { 12 | let codeCount = 50 13 | let range: CGFloat = 80 14 | var codeViews: Array = [] 15 | var beziers: Array = [] 16 | override init(frame: CGRect) { 17 | super.init(frame: frame) 18 | self.backgroundColor = UIColor.black 19 | self.addSubViews() 20 | } 21 | 22 | required init?(coder aDecoder: NSCoder) { 23 | fatalError("init(coder:) has not been implemented") 24 | } 25 | 26 | /// 添加点 27 | func addSubViews() { 28 | for i in 0.. = self.areaPoints(index: index) 47 | var graph: Array>! = Array>(repeating: Array(repeating: false, count: points.count), count: points.count) 48 | 49 | let bezier = self.beziers[index] 50 | bezier.removeAllPoints() 51 | for i in 0.. Array { 69 | var points = Array() 70 | points.append(self.codeViews[index].center) 71 | for item in self.codeViews { 72 | let distance = self.countDistance(point1: self.codeViews[index].center, 73 | point2: item.center) 74 | if distance < self.range { 75 | points.append(item.center) 76 | } 77 | } 78 | return points 79 | } 80 | 81 | /// 计算两点之间的距离 82 | /// 83 | /// - Parameters: 84 | /// - point1: 点1 85 | /// - point2: 点2 86 | /// - Returns: 返回两点之间的距离 87 | func countDistance(point1: CGPoint, point2: CGPoint) -> CGFloat { 88 | let x = pow(point1.x - point2.x, 2) 89 | let y = pow(point1.y - point2.y, 2) 90 | return CGFloat(sqrt(Double(x + y))) 91 | } 92 | 93 | // Only override draw() if you perform custom drawing. 94 | // An empty implementation adversely affects performance during animation. 95 | override func draw(_ rect: CGRect) { 96 | for j in 0.. Void 13 | class PointView: UIView { 14 | 15 | let widthAndHeight: CGFloat = 6 16 | 17 | var x: CGFloat = 1 18 | var y: CGFloat = 1 19 | var updateViewClosure: UpdateViewsClosure! = nil 20 | var duration: Double = 0.0005 21 | var source: DispatchSourceTimer! 22 | 23 | override init(frame: CGRect) { 24 | super.init(frame: frame) 25 | self.config() 26 | } 27 | 28 | override func layoutSubviews() { 29 | super.layoutSubviews() 30 | self.addDispatchSourceTimer() 31 | } 32 | 33 | /// 配置当前View的默认属性 34 | func config() { 35 | self.x = randomIncrement() 36 | self.y = randomIncrement() 37 | self.layer.cornerRadius = widthAndHeight / 2 38 | self.backgroundColor = UIColor.black 39 | self.layer.borderColor = UIColor.black.cgColor 40 | self.layer.borderWidth = 1 41 | self.frame = CGRect(origin: randomPoint(), size: CGSize(width: widthAndHeight, height: widthAndHeight)) 42 | self.duration = self.randomDuraion() 43 | } 44 | 45 | /// 设置更新回调 46 | /// 47 | /// - Parameter closure: <#closure description#> 48 | func setUpdateClosure(closure: @escaping UpdateViewsClosure) { 49 | self.updateViewClosure = closure 50 | } 51 | 52 | /// 随机生成坐标点 53 | /// 54 | /// - Returns: <#return value description#> 55 | func randomPoint() -> CGPoint { 56 | arc4random_uniform(UInt32(ScreenSize.width)) 57 | return CGPoint(x: Int(arc4random_uniform(UInt32(ScreenSize.width-widthAndHeight))), 58 | y: Int(arc4random_uniform(UInt32(ScreenSize.height-widthAndHeight)))) 59 | } 60 | 61 | /// 随机生成x或者y的增量 62 | /// 63 | /// - Returns: <#return value description#> 64 | func randomIncrement() -> CGFloat { 65 | if arc4random() % 2 == 0 { 66 | return 1 67 | } else { 68 | return -1 69 | } 70 | } 71 | 72 | 73 | /// 添加Dispatch Source Timer 74 | func addDispatchSourceTimer() { 75 | if source == nil { 76 | source = DispatchSource.makeTimerSource(flags: DispatchSource.TimerFlags(rawValue: UInt(0)), queue: DispatchQueue.main) as? DispatchSource 77 | } 78 | 79 | let timer = UInt64(duration) * NSEC_PER_SEC 80 | source.scheduleRepeating(deadline: DispatchTime.init(uptimeNanoseconds: UInt64(timer)), interval: DispatchTimeInterval.seconds(Int(duration)), leeway: DispatchTimeInterval.seconds(0)) 81 | source.setEventHandler { 82 | self.changePoint() 83 | } 84 | source.resume() 85 | } 86 | 87 | /// 改变当前View的坐标 88 | func changePoint() { 89 | self.backgroundColor = RandomColor.shareInstance() 90 | var currentPoint = self.frame.origin 91 | 92 | if currentPoint.x > ScreenSize.width-self.widthAndHeight || currentPoint.x < 0 { 93 | self.x = -self.x 94 | } 95 | 96 | if currentPoint.y > ScreenSize.height-self.widthAndHeight || currentPoint.y < 0 { 97 | self.y = -self.y 98 | } 99 | 100 | currentPoint.x += self.x 101 | currentPoint.y += self.y 102 | self.frame.origin = currentPoint 103 | 104 | if self.updateViewClosure != nil { 105 | self.updateViewClosure(self.tag) 106 | } 107 | } 108 | 109 | /// 随机生成动画时间 110 | /// 111 | /// - Returns: <#return value description#> 112 | func randomDuraion() -> Double { 113 | return Double(arc4random_uniform(100))/100 114 | } 115 | 116 | required init?(coder aDecoder: NSCoder) { 117 | fatalError("init(coder:) has not been implemented") 118 | } 119 | } 120 | 121 | 122 | class RandomColor { 123 | var randomColors = Array() 124 | var colorCount = 20 125 | var randomColor: UIColor { 126 | get { 127 | let index = Int(arc4random_uniform(1000)) % colorCount 128 | return randomColors[index] 129 | } 130 | } 131 | private static var color: RandomColor! 132 | static func shareInstance() -> UIColor { 133 | if color == nil { 134 | color = RandomColor() 135 | } 136 | return color.randomColor 137 | } 138 | 139 | private init() { 140 | if randomColors.isEmpty { 141 | self.addColors() 142 | } 143 | } 144 | 145 | func addColors() { 146 | for _ in 0..