├── LYDynamicDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── wanglingling.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── LYDynamicDemo.xcscheme │ └── xcschememanagement.plist ├── LYDynamicDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── ViewController.h ├── ViewController.m ├── headIcon │ ├── head-back.jpg │ ├── headIcon-0.jpg │ ├── headIcon-1.jpg │ ├── headIcon-10.jpg │ ├── headIcon-11.jpg │ ├── headIcon-12.jpg │ ├── headIcon-13.jpg │ ├── headIcon-14.jpg │ ├── headIcon-15.jpg │ ├── headIcon-16.jpg │ ├── headIcon-17.jpg │ ├── headIcon-18.jpg │ ├── headIcon-19.jpg │ ├── headIcon-2.jpg │ ├── headIcon-3.jpg │ ├── headIcon-4.jpg │ ├── headIcon-5.jpg │ ├── headIcon-6.jpg │ ├── headIcon-7.jpg │ ├── headIcon-8.jpg │ ├── headIcon-9.jpg │ └── introduce-2.gif └── main.m └── README.md /LYDynamicDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CF999BD41EEF865000797384 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CF999BD31EEF865000797384 /* main.m */; }; 11 | CF999BD71EEF865000797384 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CF999BD61EEF865000797384 /* AppDelegate.m */; }; 12 | CF999BDA1EEF865000797384 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CF999BD91EEF865000797384 /* ViewController.m */; }; 13 | CF999BDD1EEF865000797384 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CF999BDB1EEF865000797384 /* Main.storyboard */; }; 14 | CF999BDF1EEF865000797384 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CF999BDE1EEF865000797384 /* Assets.xcassets */; }; 15 | CF999BE21EEF865000797384 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CF999BE01EEF865000797384 /* LaunchScreen.storyboard */; }; 16 | CF999BF51EEF8B3A00797384 /* head-back.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BEA1EEF8B3A00797384 /* head-back.jpg */; }; 17 | CF999BF61EEF8B3A00797384 /* headIcon-0.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BEB1EEF8B3A00797384 /* headIcon-0.jpg */; }; 18 | CF999BF71EEF8B3A00797384 /* headIcon-1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BEC1EEF8B3A00797384 /* headIcon-1.jpg */; }; 19 | CF999BF81EEF8B3A00797384 /* headIcon-2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BED1EEF8B3A00797384 /* headIcon-2.jpg */; }; 20 | CF999BF91EEF8B3A00797384 /* headIcon-3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BEE1EEF8B3A00797384 /* headIcon-3.jpg */; }; 21 | CF999BFA1EEF8B3A00797384 /* headIcon-4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BEF1EEF8B3A00797384 /* headIcon-4.jpg */; }; 22 | CF999BFB1EEF8B3A00797384 /* headIcon-5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BF01EEF8B3A00797384 /* headIcon-5.jpg */; }; 23 | CF999BFC1EEF8B3A00797384 /* headIcon-6.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BF11EEF8B3A00797384 /* headIcon-6.jpg */; }; 24 | CF999BFD1EEF8B3A00797384 /* headIcon-7.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BF21EEF8B3A00797384 /* headIcon-7.jpg */; }; 25 | CF999BFE1EEF8B3A00797384 /* headIcon-8.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BF31EEF8B3A00797384 /* headIcon-8.jpg */; }; 26 | CF999BFF1EEF8B3A00797384 /* headIcon-9.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999BF41EEF8B3A00797384 /* headIcon-9.jpg */; }; 27 | CF999C061EEF97D100797384 /* headIcon-14.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C001EEF97D100797384 /* headIcon-14.jpg */; }; 28 | CF999C071EEF97D100797384 /* headIcon-15.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C011EEF97D100797384 /* headIcon-15.jpg */; }; 29 | CF999C081EEF97D100797384 /* headIcon-16.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C021EEF97D100797384 /* headIcon-16.jpg */; }; 30 | CF999C091EEF97D100797384 /* headIcon-17.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C031EEF97D100797384 /* headIcon-17.jpg */; }; 31 | CF999C0A1EEF97D100797384 /* headIcon-18.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C041EEF97D100797384 /* headIcon-18.jpg */; }; 32 | CF999C0B1EEF97D100797384 /* headIcon-19.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C051EEF97D100797384 /* headIcon-19.jpg */; }; 33 | CF999C101EEF97F200797384 /* headIcon-10.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C0C1EEF97F200797384 /* headIcon-10.jpg */; }; 34 | CF999C111EEF97F200797384 /* headIcon-11.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C0D1EEF97F200797384 /* headIcon-11.jpg */; }; 35 | CF999C121EEF97F200797384 /* headIcon-12.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C0E1EEF97F200797384 /* headIcon-12.jpg */; }; 36 | CF999C131EEF97F200797384 /* headIcon-13.jpg in Resources */ = {isa = PBXBuildFile; fileRef = CF999C0F1EEF97F200797384 /* headIcon-13.jpg */; }; 37 | CF999C171EEFA24100797384 /* introduce-2.gif in Resources */ = {isa = PBXBuildFile; fileRef = CF999C161EEFA24100797384 /* introduce-2.gif */; }; 38 | /* End PBXBuildFile section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | CF999BCF1EEF864F00797384 /* LYDynamicDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LYDynamicDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | CF999BD31EEF865000797384 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 43 | CF999BD51EEF865000797384 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 44 | CF999BD61EEF865000797384 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 45 | CF999BD81EEF865000797384 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 46 | CF999BD91EEF865000797384 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 47 | CF999BDC1EEF865000797384 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | CF999BDE1EEF865000797384 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | CF999BE11EEF865000797384 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | CF999BE31EEF865000797384 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | CF999BEA1EEF8B3A00797384 /* head-back.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "head-back.jpg"; sourceTree = ""; }; 52 | CF999BEB1EEF8B3A00797384 /* headIcon-0.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-0.jpg"; sourceTree = ""; }; 53 | CF999BEC1EEF8B3A00797384 /* headIcon-1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-1.jpg"; sourceTree = ""; }; 54 | CF999BED1EEF8B3A00797384 /* headIcon-2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-2.jpg"; sourceTree = ""; }; 55 | CF999BEE1EEF8B3A00797384 /* headIcon-3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-3.jpg"; sourceTree = ""; }; 56 | CF999BEF1EEF8B3A00797384 /* headIcon-4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-4.jpg"; sourceTree = ""; }; 57 | CF999BF01EEF8B3A00797384 /* headIcon-5.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-5.jpg"; sourceTree = ""; }; 58 | CF999BF11EEF8B3A00797384 /* headIcon-6.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-6.jpg"; sourceTree = ""; }; 59 | CF999BF21EEF8B3A00797384 /* headIcon-7.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-7.jpg"; sourceTree = ""; }; 60 | CF999BF31EEF8B3A00797384 /* headIcon-8.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-8.jpg"; sourceTree = ""; }; 61 | CF999BF41EEF8B3A00797384 /* headIcon-9.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-9.jpg"; sourceTree = ""; }; 62 | CF999C001EEF97D100797384 /* headIcon-14.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-14.jpg"; sourceTree = ""; }; 63 | CF999C011EEF97D100797384 /* headIcon-15.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-15.jpg"; sourceTree = ""; }; 64 | CF999C021EEF97D100797384 /* headIcon-16.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-16.jpg"; sourceTree = ""; }; 65 | CF999C031EEF97D100797384 /* headIcon-17.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-17.jpg"; sourceTree = ""; }; 66 | CF999C041EEF97D100797384 /* headIcon-18.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-18.jpg"; sourceTree = ""; }; 67 | CF999C051EEF97D100797384 /* headIcon-19.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-19.jpg"; sourceTree = ""; }; 68 | CF999C0C1EEF97F200797384 /* headIcon-10.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-10.jpg"; sourceTree = ""; }; 69 | CF999C0D1EEF97F200797384 /* headIcon-11.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-11.jpg"; sourceTree = ""; }; 70 | CF999C0E1EEF97F200797384 /* headIcon-12.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-12.jpg"; sourceTree = ""; }; 71 | CF999C0F1EEF97F200797384 /* headIcon-13.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "headIcon-13.jpg"; sourceTree = ""; }; 72 | CF999C161EEFA24100797384 /* introduce-2.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = "introduce-2.gif"; sourceTree = ""; }; 73 | /* End PBXFileReference section */ 74 | 75 | /* Begin PBXFrameworksBuildPhase section */ 76 | CF999BCC1EEF864F00797384 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | /* End PBXFrameworksBuildPhase section */ 84 | 85 | /* Begin PBXGroup section */ 86 | CF999BC61EEF864F00797384 = { 87 | isa = PBXGroup; 88 | children = ( 89 | CF999BD11EEF864F00797384 /* LYDynamicDemo */, 90 | CF999BD01EEF864F00797384 /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | CF999BD01EEF864F00797384 /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | CF999BCF1EEF864F00797384 /* LYDynamicDemo.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | CF999BD11EEF864F00797384 /* LYDynamicDemo */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | CF999BE91EEF8B3A00797384 /* headIcon */, 106 | CF999BD51EEF865000797384 /* AppDelegate.h */, 107 | CF999BD61EEF865000797384 /* AppDelegate.m */, 108 | CF999BD81EEF865000797384 /* ViewController.h */, 109 | CF999BD91EEF865000797384 /* ViewController.m */, 110 | CF999BDB1EEF865000797384 /* Main.storyboard */, 111 | CF999BDE1EEF865000797384 /* Assets.xcassets */, 112 | CF999BE01EEF865000797384 /* LaunchScreen.storyboard */, 113 | CF999BE31EEF865000797384 /* Info.plist */, 114 | CF999BD21EEF865000797384 /* Supporting Files */, 115 | ); 116 | path = LYDynamicDemo; 117 | sourceTree = ""; 118 | }; 119 | CF999BD21EEF865000797384 /* Supporting Files */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | CF999BD31EEF865000797384 /* main.m */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | CF999BE91EEF8B3A00797384 /* headIcon */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | CF999C161EEFA24100797384 /* introduce-2.gif */, 131 | CF999C0C1EEF97F200797384 /* headIcon-10.jpg */, 132 | CF999C0D1EEF97F200797384 /* headIcon-11.jpg */, 133 | CF999C0E1EEF97F200797384 /* headIcon-12.jpg */, 134 | CF999C0F1EEF97F200797384 /* headIcon-13.jpg */, 135 | CF999C001EEF97D100797384 /* headIcon-14.jpg */, 136 | CF999C011EEF97D100797384 /* headIcon-15.jpg */, 137 | CF999C021EEF97D100797384 /* headIcon-16.jpg */, 138 | CF999C031EEF97D100797384 /* headIcon-17.jpg */, 139 | CF999C041EEF97D100797384 /* headIcon-18.jpg */, 140 | CF999C051EEF97D100797384 /* headIcon-19.jpg */, 141 | CF999BEA1EEF8B3A00797384 /* head-back.jpg */, 142 | CF999BEB1EEF8B3A00797384 /* headIcon-0.jpg */, 143 | CF999BEC1EEF8B3A00797384 /* headIcon-1.jpg */, 144 | CF999BED1EEF8B3A00797384 /* headIcon-2.jpg */, 145 | CF999BEE1EEF8B3A00797384 /* headIcon-3.jpg */, 146 | CF999BEF1EEF8B3A00797384 /* headIcon-4.jpg */, 147 | CF999BF01EEF8B3A00797384 /* headIcon-5.jpg */, 148 | CF999BF11EEF8B3A00797384 /* headIcon-6.jpg */, 149 | CF999BF21EEF8B3A00797384 /* headIcon-7.jpg */, 150 | CF999BF31EEF8B3A00797384 /* headIcon-8.jpg */, 151 | CF999BF41EEF8B3A00797384 /* headIcon-9.jpg */, 152 | ); 153 | path = headIcon; 154 | sourceTree = ""; 155 | }; 156 | /* End PBXGroup section */ 157 | 158 | /* Begin PBXNativeTarget section */ 159 | CF999BCE1EEF864F00797384 /* LYDynamicDemo */ = { 160 | isa = PBXNativeTarget; 161 | buildConfigurationList = CF999BE61EEF865000797384 /* Build configuration list for PBXNativeTarget "LYDynamicDemo" */; 162 | buildPhases = ( 163 | CF999BCB1EEF864F00797384 /* Sources */, 164 | CF999BCC1EEF864F00797384 /* Frameworks */, 165 | CF999BCD1EEF864F00797384 /* Resources */, 166 | ); 167 | buildRules = ( 168 | ); 169 | dependencies = ( 170 | ); 171 | name = LYDynamicDemo; 172 | productName = LYDynamicDemo; 173 | productReference = CF999BCF1EEF864F00797384 /* LYDynamicDemo.app */; 174 | productType = "com.apple.product-type.application"; 175 | }; 176 | /* End PBXNativeTarget section */ 177 | 178 | /* Begin PBXProject section */ 179 | CF999BC71EEF864F00797384 /* Project object */ = { 180 | isa = PBXProject; 181 | attributes = { 182 | LastUpgradeCheck = 0830; 183 | ORGANIZATIONNAME = com.LYoung; 184 | TargetAttributes = { 185 | CF999BCE1EEF864F00797384 = { 186 | CreatedOnToolsVersion = 8.3.3; 187 | DevelopmentTeam = 8E534K4D8Z; 188 | ProvisioningStyle = Automatic; 189 | }; 190 | }; 191 | }; 192 | buildConfigurationList = CF999BCA1EEF864F00797384 /* Build configuration list for PBXProject "LYDynamicDemo" */; 193 | compatibilityVersion = "Xcode 3.2"; 194 | developmentRegion = English; 195 | hasScannedForEncodings = 0; 196 | knownRegions = ( 197 | en, 198 | Base, 199 | ); 200 | mainGroup = CF999BC61EEF864F00797384; 201 | productRefGroup = CF999BD01EEF864F00797384 /* Products */; 202 | projectDirPath = ""; 203 | projectRoot = ""; 204 | targets = ( 205 | CF999BCE1EEF864F00797384 /* LYDynamicDemo */, 206 | ); 207 | }; 208 | /* End PBXProject section */ 209 | 210 | /* Begin PBXResourcesBuildPhase section */ 211 | CF999BCD1EEF864F00797384 /* Resources */ = { 212 | isa = PBXResourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | CF999C0A1EEF97D100797384 /* headIcon-18.jpg in Resources */, 216 | CF999C091EEF97D100797384 /* headIcon-17.jpg in Resources */, 217 | CF999BFD1EEF8B3A00797384 /* headIcon-7.jpg in Resources */, 218 | CF999BFB1EEF8B3A00797384 /* headIcon-5.jpg in Resources */, 219 | CF999C121EEF97F200797384 /* headIcon-12.jpg in Resources */, 220 | CF999BF91EEF8B3A00797384 /* headIcon-3.jpg in Resources */, 221 | CF999C061EEF97D100797384 /* headIcon-14.jpg in Resources */, 222 | CF999BF71EEF8B3A00797384 /* headIcon-1.jpg in Resources */, 223 | CF999BF61EEF8B3A00797384 /* headIcon-0.jpg in Resources */, 224 | CF999C0B1EEF97D100797384 /* headIcon-19.jpg in Resources */, 225 | CF999BFA1EEF8B3A00797384 /* headIcon-4.jpg in Resources */, 226 | CF999C081EEF97D100797384 /* headIcon-16.jpg in Resources */, 227 | CF999BFE1EEF8B3A00797384 /* headIcon-8.jpg in Resources */, 228 | CF999BFC1EEF8B3A00797384 /* headIcon-6.jpg in Resources */, 229 | CF999BF51EEF8B3A00797384 /* head-back.jpg in Resources */, 230 | CF999C171EEFA24100797384 /* introduce-2.gif in Resources */, 231 | CF999BF81EEF8B3A00797384 /* headIcon-2.jpg in Resources */, 232 | CF999BFF1EEF8B3A00797384 /* headIcon-9.jpg in Resources */, 233 | CF999C071EEF97D100797384 /* headIcon-15.jpg in Resources */, 234 | CF999C131EEF97F200797384 /* headIcon-13.jpg in Resources */, 235 | CF999BE21EEF865000797384 /* LaunchScreen.storyboard in Resources */, 236 | CF999C101EEF97F200797384 /* headIcon-10.jpg in Resources */, 237 | CF999BDF1EEF865000797384 /* Assets.xcassets in Resources */, 238 | CF999C111EEF97F200797384 /* headIcon-11.jpg in Resources */, 239 | CF999BDD1EEF865000797384 /* Main.storyboard in Resources */, 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | }; 243 | /* End PBXResourcesBuildPhase section */ 244 | 245 | /* Begin PBXSourcesBuildPhase section */ 246 | CF999BCB1EEF864F00797384 /* Sources */ = { 247 | isa = PBXSourcesBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | CF999BDA1EEF865000797384 /* ViewController.m in Sources */, 251 | CF999BD71EEF865000797384 /* AppDelegate.m in Sources */, 252 | CF999BD41EEF865000797384 /* main.m in Sources */, 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | }; 256 | /* End PBXSourcesBuildPhase section */ 257 | 258 | /* Begin PBXVariantGroup section */ 259 | CF999BDB1EEF865000797384 /* Main.storyboard */ = { 260 | isa = PBXVariantGroup; 261 | children = ( 262 | CF999BDC1EEF865000797384 /* Base */, 263 | ); 264 | name = Main.storyboard; 265 | sourceTree = ""; 266 | }; 267 | CF999BE01EEF865000797384 /* LaunchScreen.storyboard */ = { 268 | isa = PBXVariantGroup; 269 | children = ( 270 | CF999BE11EEF865000797384 /* Base */, 271 | ); 272 | name = LaunchScreen.storyboard; 273 | sourceTree = ""; 274 | }; 275 | /* End PBXVariantGroup section */ 276 | 277 | /* Begin XCBuildConfiguration section */ 278 | CF999BE41EEF865000797384 /* Debug */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | ALWAYS_SEARCH_USER_PATHS = NO; 282 | CLANG_ANALYZER_NONNULL = YES; 283 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 284 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 285 | CLANG_CXX_LIBRARY = "libc++"; 286 | CLANG_ENABLE_MODULES = YES; 287 | CLANG_ENABLE_OBJC_ARC = YES; 288 | CLANG_WARN_BOOL_CONVERSION = YES; 289 | CLANG_WARN_CONSTANT_CONVERSION = YES; 290 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 291 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 292 | CLANG_WARN_EMPTY_BODY = YES; 293 | CLANG_WARN_ENUM_CONVERSION = YES; 294 | CLANG_WARN_INFINITE_RECURSION = YES; 295 | CLANG_WARN_INT_CONVERSION = YES; 296 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 297 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 298 | CLANG_WARN_UNREACHABLE_CODE = YES; 299 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 300 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 301 | COPY_PHASE_STRIP = NO; 302 | DEBUG_INFORMATION_FORMAT = dwarf; 303 | ENABLE_STRICT_OBJC_MSGSEND = YES; 304 | ENABLE_TESTABILITY = YES; 305 | GCC_C_LANGUAGE_STANDARD = gnu99; 306 | GCC_DYNAMIC_NO_PIC = NO; 307 | GCC_NO_COMMON_BLOCKS = YES; 308 | GCC_OPTIMIZATION_LEVEL = 0; 309 | GCC_PREPROCESSOR_DEFINITIONS = ( 310 | "DEBUG=1", 311 | "$(inherited)", 312 | ); 313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 314 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 315 | GCC_WARN_UNDECLARED_SELECTOR = YES; 316 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 317 | GCC_WARN_UNUSED_FUNCTION = YES; 318 | GCC_WARN_UNUSED_VARIABLE = YES; 319 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 320 | MTL_ENABLE_DEBUG_INFO = YES; 321 | ONLY_ACTIVE_ARCH = YES; 322 | SDKROOT = iphoneos; 323 | }; 324 | name = Debug; 325 | }; 326 | CF999BE51EEF865000797384 /* Release */ = { 327 | isa = XCBuildConfiguration; 328 | buildSettings = { 329 | ALWAYS_SEARCH_USER_PATHS = NO; 330 | CLANG_ANALYZER_NONNULL = YES; 331 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_MODULES = YES; 335 | CLANG_ENABLE_OBJC_ARC = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 339 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 340 | CLANG_WARN_EMPTY_BODY = YES; 341 | CLANG_WARN_ENUM_CONVERSION = YES; 342 | CLANG_WARN_INFINITE_RECURSION = YES; 343 | CLANG_WARN_INT_CONVERSION = YES; 344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 345 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 351 | ENABLE_NS_ASSERTIONS = NO; 352 | ENABLE_STRICT_OBJC_MSGSEND = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu99; 354 | GCC_NO_COMMON_BLOCKS = YES; 355 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 356 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 357 | GCC_WARN_UNDECLARED_SELECTOR = YES; 358 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 359 | GCC_WARN_UNUSED_FUNCTION = YES; 360 | GCC_WARN_UNUSED_VARIABLE = YES; 361 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 362 | MTL_ENABLE_DEBUG_INFO = NO; 363 | SDKROOT = iphoneos; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | CF999BE71EEF865000797384 /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | DEVELOPMENT_TEAM = 8E534K4D8Z; 373 | INFOPLIST_FILE = LYDynamicDemo/Info.plist; 374 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 375 | PRODUCT_BUNDLE_IDENTIFIER = com.LYoung.dynamic; 376 | PRODUCT_NAME = "$(TARGET_NAME)"; 377 | }; 378 | name = Debug; 379 | }; 380 | CF999BE81EEF865000797384 /* Release */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 384 | DEVELOPMENT_TEAM = 8E534K4D8Z; 385 | INFOPLIST_FILE = LYDynamicDemo/Info.plist; 386 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 387 | PRODUCT_BUNDLE_IDENTIFIER = com.LYoung.dynamic; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | }; 390 | name = Release; 391 | }; 392 | /* End XCBuildConfiguration section */ 393 | 394 | /* Begin XCConfigurationList section */ 395 | CF999BCA1EEF864F00797384 /* Build configuration list for PBXProject "LYDynamicDemo" */ = { 396 | isa = XCConfigurationList; 397 | buildConfigurations = ( 398 | CF999BE41EEF865000797384 /* Debug */, 399 | CF999BE51EEF865000797384 /* Release */, 400 | ); 401 | defaultConfigurationIsVisible = 0; 402 | defaultConfigurationName = Release; 403 | }; 404 | CF999BE61EEF865000797384 /* Build configuration list for PBXNativeTarget "LYDynamicDemo" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | CF999BE71EEF865000797384 /* Debug */, 408 | CF999BE81EEF865000797384 /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | defaultConfigurationName = Release; 412 | }; 413 | /* End XCConfigurationList section */ 414 | }; 415 | rootObject = CF999BC71EEF864F00797384 /* Project object */; 416 | } 417 | -------------------------------------------------------------------------------- /LYDynamicDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LYDynamicDemo.xcodeproj/xcuserdata/wanglingling.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /LYDynamicDemo.xcodeproj/xcuserdata/wanglingling.xcuserdatad/xcschemes/LYDynamicDemo.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 | -------------------------------------------------------------------------------- /LYDynamicDemo.xcodeproj/xcuserdata/wanglingling.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | LYDynamicDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | CF999BCE1EEF864F00797384 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /LYDynamicDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LYDynamicDemo 4 | // 5 | // Created by CNFOL_iOS on 2017/6/13. 6 | // Copyright © 2017年 com.LYoung. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /LYDynamicDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LYDynamicDemo 4 | // 5 | // Created by CNFOL_iOS on 2017/6/13. 6 | // Copyright © 2017年 com.LYoung. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // 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. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /LYDynamicDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /LYDynamicDemo/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 | -------------------------------------------------------------------------------- /LYDynamicDemo/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 | -------------------------------------------------------------------------------- /LYDynamicDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIRequiresFullScreen 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LYDynamicDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // LYDynamicDemo 4 | // 5 | // Created by CNFOL_iOS on 2017/6/13. 6 | // Copyright © 2017年 com.LYoung. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LYDynamicDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // LYDynamicDemo 4 | // 5 | // Created by CNFOL_iOS on 2017/6/13. 6 | // Copyright © 2017年 com.LYoung. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) NSMutableArray *balls; 15 | @property (nonatomic, strong) UIGravityBehavior *gravityBeahvior; 16 | @property (nonatomic, strong) UIGravityBehavior *gravity; 17 | @property (nonatomic, strong) UICollisionBehavior *collision; 18 | @property (nonatomic, strong) UIDynamicAnimator *animator; 19 | @property (nonatomic, strong) UIDynamicItemBehavior *dynamicItemBehavior; 20 | @property (nonatomic) CMMotionManager *MotionManager; 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | // Do any additional setup after loading the view, typically from a nib. 29 | 30 | UIButton *clickBtn = [UIButton new]; 31 | [clickBtn addTarget:self action:@selector(buttonClickAction:) forControlEvents:UIControlEventTouchUpInside]; 32 | [clickBtn setBackgroundColor:[UIColor redColor]]; 33 | [clickBtn setTitle:@"开始碰撞" forState:UIControlStateNormal]; 34 | [clickBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 35 | [self.view addSubview:clickBtn]; 36 | clickBtn.frame = CGRectMake((self.view.frame.size.width - 80)/2, 80, 80, 40); 37 | 38 | self.view.backgroundColor = [UIColor colorWithRed:24/255.f green:24/255.f blue:24/255.f alpha:1.f]; 39 | 40 | } 41 | 42 | - (void)_setupBalls{ 43 | 44 | 45 | 46 | self.balls = [NSMutableArray array]; 47 | //添加两个球体,使用拥有重力特性和碰撞特性 48 | NSUInteger numOfBalls = 20; 49 | for (NSUInteger i = 0; i < numOfBalls; i ++) { 50 | 51 | UIImageView *ball = [UIImageView new]; 52 | 53 | //球的随机颜色 54 | ball.image = [UIImage imageNamed:[NSString stringWithFormat:@"headIcon-%ld.jpg",i]]; 55 | 56 | //球的随机大小:40~60之间 57 | CGFloat width = 40; 58 | ball.layer.cornerRadius = width/2; 59 | ball.layer.masksToBounds = YES; 60 | 61 | //球的随机位置 62 | CGRect frame = CGRectMake(arc4random()%((int)(self.view.bounds.size.width - width)), 0, width, width); 63 | [ball setFrame:frame]; 64 | 65 | //添加球体到父视图 66 | [self.view addSubview:ball]; 67 | //球堆添加该球 68 | [self.balls addObject:ball]; 69 | } 70 | 71 | UIDynamicAnimator *animator = [[UIDynamicAnimator alloc]initWithReferenceView:self.view]; 72 | _animator = animator; 73 | 74 | //添加重力的动态特性,使其可执行 75 | UIGravityBehavior *gravity = [[UIGravityBehavior alloc]initWithItems:self.balls]; 76 | [self.animator addBehavior:gravity]; 77 | _gravity = gravity; 78 | 79 | //添加碰撞的动态特性,使其可执行 80 | UICollisionBehavior *collision = [[UICollisionBehavior alloc]initWithItems:self.balls]; 81 | collision.translatesReferenceBoundsIntoBoundary = YES; 82 | [self.animator addBehavior:collision]; 83 | _collision = collision; 84 | 85 | //弹性 86 | UIDynamicItemBehavior *dynamicItemBehavior = [[UIDynamicItemBehavior alloc] initWithItems:self.balls]; 87 | dynamicItemBehavior.allowsRotation = YES;//允许旋转 88 | dynamicItemBehavior.elasticity = 0.6;//弹性 89 | [self.animator addBehavior:dynamicItemBehavior]; 90 | } 91 | 92 | - (void)buttonClickAction:(UIButton *)sender{ 93 | sender.enabled = NO; 94 | [self _setupBalls]; 95 | 96 | [self useGyroPush]; 97 | } 98 | 99 | 100 | - (void)useGyroPush{ 101 | //初始化全局管理对象 102 | 103 | self.MotionManager = [[CMMotionManager alloc]init]; 104 | self.MotionManager.deviceMotionUpdateInterval = 0.01; 105 | 106 | 107 | __weak ViewController *weakSelf = self; 108 | 109 | [self.MotionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue] withHandler:^(CMDeviceMotion *_Nullable motion,NSError * _Nullable error) { 110 | 111 | NSString *yaw = [NSString stringWithFormat:@"%f",motion.attitude.yaw]; 112 | NSString *pitch = [NSString stringWithFormat:@"%f",motion.attitude.pitch]; 113 | NSString *roll = [NSString stringWithFormat:@"%f",motion.attitude.roll]; 114 | 115 | double rotation = atan2(motion.attitude.pitch, motion.attitude.roll); 116 | 117 | //重力角度 118 | weakSelf.gravity.angle = rotation; 119 | 120 | NSLog(@"yaw = %@,pitch = %@, roll = %@,rotation = %fd",yaw,pitch,roll,rotation); 121 | 122 | }]; 123 | 124 | } 125 | 126 | 127 | 128 | #pragma mark - UICollisionBehaviorDelegate 129 | - (void)collisionBehavior:(UICollisionBehavior*)behavior beganContactForItem:(id )item withBoundaryIdentifier:(nullable id )identifier atPoint:(CGPoint)p { 130 | 131 | } 132 | 133 | - (void)collisionBehavior:(UICollisionBehavior*)behavior endedContactForItem:(id )item withBoundaryIdentifier:(nullable id )identifier { 134 | 135 | } 136 | 137 | - (void)dealloc{ 138 | NSLog(@"[dealloc]"); 139 | [self.MotionManager stopDeviceMotionUpdates]; 140 | } 141 | @end 142 | -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/head-back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/head-back.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-0.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-1.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-10.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-11.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-12.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-13.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-14.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-15.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-16.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-17.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-18.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-19.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-2.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-3.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-4.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-5.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-6.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-7.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-8.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/headIcon-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/headIcon-9.jpg -------------------------------------------------------------------------------- /LYDynamicDemo/headIcon/introduce-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeeYouth/UIDynamicDemo/6857a8eb79a6bea2b935445f73f74b29905b7c47/LYDynamicDemo/headIcon/introduce-2.gif -------------------------------------------------------------------------------- /LYDynamicDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LYDynamicDemo 4 | // 5 | // Created by CNFOL_iOS on 2017/6/13. 6 | // Copyright © 2017年 com.LYoung. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UIDynamicDemo 2 | 一个小球弹性碰撞(UIDynamic和CMMotion综合使用) 3 | 4 | # CMDeviceMotion陀螺仪和UIkit动力学结合使用 5 | ## 一个小球弹性碰撞的效果(看到摩拜单车里的效果,模仿做了一个哈哈哈) 6 | ## 支持重力感应哦(在真机中调试才有效) 7 | 8 | 效果图 9 | ![image](https://github.com/LeeYouth/UIDynamicDemo/blob/master/LYDynamicDemo/headIcon/introduce-2.gif) 10 | --------------------------------------------------------------------------------