├── 2017-06-27 10_48_31.gif ├── README.md ├── TabelViewLoadAnimation └── UITabelView+LoadAnimation.swift ├── ZYTabelViewLoadAnimationDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── tarena.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── soufun.xcuserdatad │ └── xcschemes │ │ ├── ZYTabelViewLoadAnimationDemo.xcscheme │ │ └── xcschememanagement.plist │ └── tarena.xcuserdatad │ └── xcschemes │ ├── ZYTabelViewLoadAnimationDemo.xcscheme │ └── xcschememanagement.plist ├── ZYTabelViewLoadAnimationDemo ├── AppDelegate.swift ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── ViewController.swift └── ZYViewController.swift └── ZYTabelViewLoadAnimationDemoTests ├── Info.plist └── ZYTabelViewLoadAnimationDemoTests.swift /2017-06-27 10_48_31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjzhangyang/ZYTabelViewLoadAnimationDemo/ebb87555b4d23ead74de447b732c807b30ab5e4f/2017-06-27 10_48_31.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ZYTabelViewLoadAnimationDemo 2 | tableview加载动画 3 | ![img](https://github.com/bjzhangyang/ZYTabelViewLoadAnimationDemo/blob/master/2017-06-27%2010_48_31.gif) 4 | -------------------------------------------------------------------------------- /TabelViewLoadAnimation/UITabelView+LoadAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UITabelView+VerticalAnimation.swift 3 | // ZYTabelVIewVerticalAnimationDemo 4 | // 5 | // Created by soufun on 15/6/18. 6 | // Copyright (c) 2015年 ZY. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | enum AnimationDirect{ 12 | case dropDownFromTop 13 | case liftUpFromBottum 14 | case fromRightToLeft 15 | case fromLeftToRight 16 | } 17 | extension UITableView { 18 | /** 19 | * UITableView重新加载动画 20 | * 21 | * @param direct cell运动方向 22 | * @param time 动画持续时间,设置成1.0 23 | * @param interval 每个cell间隔,设置成0.1 24 | * @example self.tableView.reloadDataWithAnimate(AnimationDirect.DropDownFromTop, animationTime: 0.5, interval: 0.05) 25 | */ 26 | func reloadDataWithAnimate(_ direct:AnimationDirect,animationTime:TimeInterval,interval:TimeInterval)->Void{ 27 | self.setContentOffset(self.contentOffset, animated: false) 28 | UIView.animate(withDuration: 0.2, animations: { () -> Void in 29 | self.isHidden = true 30 | self.reloadData() 31 | }, completion: { (finished) -> Void in 32 | self.isHidden = false 33 | self.visibleRowsBeginAnimation(direct, animationTime: animationTime, interval: interval) 34 | }) 35 | } 36 | func visibleRowsBeginAnimation(_ direct:AnimationDirect,animationTime:TimeInterval,interval:TimeInterval)->Void{ 37 | let visibleArray : NSArray = self.indexPathsForVisibleRows! as NSArray 38 | let count = visibleArray.count 39 | switch direct{ 40 | case .dropDownFromTop: 41 | for i in 0...(count-1){ 42 | let path : IndexPath = visibleArray.object(at: count - 1 - i) as! IndexPath 43 | let cell : UITableViewCell = self.cellForRow(at: path)! 44 | cell.isHidden = true 45 | let originPoint : CGPoint = cell.center 46 | cell.center = CGPoint(x: originPoint.x, y: originPoint.y - 1000) 47 | UIView.animate(withDuration: animationTime + TimeInterval(i) * interval, delay: 0.0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 48 | cell.center = CGPoint(x: originPoint.x , y: originPoint.y + 2.0) 49 | cell.isHidden = false 50 | }, completion: { (finished) -> Void in 51 | UIView.animate(withDuration: 0.1, delay: 0.0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 52 | cell.center = CGPoint(x: originPoint.x , y: originPoint.y - 2.0) 53 | }, completion: { (finished) -> Void in 54 | UIView.animate(withDuration: 0.1, delay: 0.0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 55 | cell.center = originPoint 56 | }, completion: { (finished) -> Void in 57 | 58 | }) 59 | }) 60 | 61 | }) 62 | } 63 | case .liftUpFromBottum: 64 | for i in 0...(count-1){ 65 | let path : IndexPath = visibleArray.object(at: i) as! IndexPath 66 | let cell : UITableViewCell = self.cellForRow(at: path)! 67 | cell.isHidden = true 68 | let originPoint : CGPoint = cell.center 69 | cell.center = CGPoint(x: originPoint.x, y: originPoint.y + 1000) 70 | UIView.animate(withDuration: animationTime + TimeInterval(i) * interval, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: { () -> Void in 71 | cell.center = CGPoint(x: originPoint.x , y: originPoint.y - 2.0) 72 | cell.isHidden = false 73 | }, completion: { (finished) -> Void in 74 | UIView.animate(withDuration: 0.1, delay: 0.0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 75 | cell.center = CGPoint(x: originPoint.x , y: originPoint.y + 2.0) 76 | }, completion: { (finished) -> Void in 77 | UIView.animate(withDuration: 0.1, delay: 0.0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 78 | cell.center = originPoint 79 | }, completion: { (finished) -> Void in 80 | 81 | }) 82 | }) 83 | }) 84 | } 85 | case .fromLeftToRight: 86 | for i in 0...(count-1){ 87 | let path : IndexPath = visibleArray.object(at: i) as! IndexPath 88 | let cell : UITableViewCell = self.cellForRow(at: path)! 89 | cell.isHidden = true 90 | let originPoint : CGPoint = cell.center 91 | cell.center = CGPoint(x: -cell.frame.size.width, y: originPoint.y) 92 | UIView.animate(withDuration: animationTime + TimeInterval(i) * interval, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: { () -> Void in 93 | cell.center = CGPoint(x: originPoint.x - 2.0, y: originPoint.y) 94 | cell.isHidden = false; 95 | }, completion: { (finished) -> Void in 96 | UIView.animate(withDuration: 0.1, delay: 0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 97 | cell.center = CGPoint(x: originPoint.x + 2.0, y: originPoint.y) 98 | }, completion: { (finished) -> Void in 99 | UIView.animate(withDuration: 0.1, delay: 0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 100 | cell.center = originPoint 101 | }, completion: { (finished) -> Void in 102 | 103 | }) 104 | }) 105 | }) 106 | } 107 | case .fromRightToLeft: 108 | for i in 0...(count-1){ 109 | let path : IndexPath = visibleArray.object(at: i) as! IndexPath 110 | let cell : UITableViewCell = self.cellForRow(at: path)! 111 | cell.isHidden = true 112 | let originPoint : CGPoint = cell.center 113 | cell.center = CGPoint(x: cell.frame.size.width * 3.0, y: originPoint.y) 114 | UIView.animate(withDuration: animationTime + TimeInterval(i) * interval, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: { () -> Void in 115 | cell.center = CGPoint(x: originPoint.x + 2.0, y: originPoint.y) 116 | cell.isHidden = false; 117 | }, completion: { (finished) -> Void in 118 | UIView.animate(withDuration: 0.1, delay: 0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 119 | cell.center = CGPoint(x: originPoint.x - 2.0, y: originPoint.y) 120 | }, completion: { (finished) -> Void in 121 | UIView.animate(withDuration: 0.1, delay: 0, options: UIViewAnimationOptions.curveEaseIn, animations: { () -> Void in 122 | cell.center = originPoint 123 | }, completion: { (finished) -> Void in 124 | 125 | }) 126 | }) 127 | }) 128 | 129 | } 130 | 131 | } 132 | 133 | } 134 | 135 | } 136 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5ADCDF501B32A6B100266D07 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADCDF4F1B32A6B100266D07 /* AppDelegate.swift */; }; 11 | 5ADCDF521B32A6B100266D07 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADCDF511B32A6B100266D07 /* ViewController.swift */; }; 12 | 5ADCDF551B32A6B100266D07 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5ADCDF531B32A6B100266D07 /* Main.storyboard */; }; 13 | 5ADCDF571B32A6B100266D07 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5ADCDF561B32A6B100266D07 /* Images.xcassets */; }; 14 | 5ADCDF5A1B32A6B100266D07 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5ADCDF581B32A6B100266D07 /* LaunchScreen.xib */; }; 15 | 5ADCDF661B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADCDF651B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.swift */; }; 16 | 5ADCDF711B32A6DF00266D07 /* UITabelView+LoadAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADCDF701B32A6DF00266D07 /* UITabelView+LoadAnimation.swift */; }; 17 | 5ADCDF731B32A92C00266D07 /* ZYViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ADCDF721B32A92B00266D07 /* ZYViewController.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 5ADCDF601B32A6B100266D07 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 5ADCDF421B32A6B100266D07 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 5ADCDF491B32A6B100266D07; 26 | remoteInfo = ZYTabelViewLoadAnimationDemo; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 5ADCDF4A1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZYTabelViewLoadAnimationDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 5ADCDF4E1B32A6B100266D07 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | 5ADCDF4F1B32A6B100266D07 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 34 | 5ADCDF511B32A6B100266D07 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 35 | 5ADCDF541B32A6B100266D07 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 36 | 5ADCDF561B32A6B100266D07 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 37 | 5ADCDF591B32A6B100266D07 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 38 | 5ADCDF5F1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZYTabelViewLoadAnimationDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 5ADCDF641B32A6B100266D07 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 40 | 5ADCDF651B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZYTabelViewLoadAnimationDemoTests.swift; sourceTree = ""; }; 41 | 5ADCDF701B32A6DF00266D07 /* UITabelView+LoadAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITabelView+LoadAnimation.swift"; sourceTree = ""; }; 42 | 5ADCDF721B32A92B00266D07 /* ZYViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZYViewController.swift; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | 5ADCDF471B32A6B100266D07 /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | 5ADCDF5C1B32A6B100266D07 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | 5ADCDF411B32A6B100266D07 = { 64 | isa = PBXGroup; 65 | children = ( 66 | 5ADCDF6F1B32A6DF00266D07 /* TabelViewLoadAnimation */, 67 | 5ADCDF4C1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo */, 68 | 5ADCDF621B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests */, 69 | 5ADCDF4B1B32A6B100266D07 /* Products */, 70 | ); 71 | sourceTree = ""; 72 | }; 73 | 5ADCDF4B1B32A6B100266D07 /* Products */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 5ADCDF4A1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo.app */, 77 | 5ADCDF5F1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.xctest */, 78 | ); 79 | name = Products; 80 | sourceTree = ""; 81 | }; 82 | 5ADCDF4C1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 5ADCDF4F1B32A6B100266D07 /* AppDelegate.swift */, 86 | 5ADCDF511B32A6B100266D07 /* ViewController.swift */, 87 | 5ADCDF721B32A92B00266D07 /* ZYViewController.swift */, 88 | 5ADCDF531B32A6B100266D07 /* Main.storyboard */, 89 | 5ADCDF561B32A6B100266D07 /* Images.xcassets */, 90 | 5ADCDF581B32A6B100266D07 /* LaunchScreen.xib */, 91 | 5ADCDF4D1B32A6B100266D07 /* Supporting Files */, 92 | ); 93 | path = ZYTabelViewLoadAnimationDemo; 94 | sourceTree = ""; 95 | }; 96 | 5ADCDF4D1B32A6B100266D07 /* Supporting Files */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 5ADCDF4E1B32A6B100266D07 /* Info.plist */, 100 | ); 101 | name = "Supporting Files"; 102 | sourceTree = ""; 103 | }; 104 | 5ADCDF621B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 5ADCDF651B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.swift */, 108 | 5ADCDF631B32A6B100266D07 /* Supporting Files */, 109 | ); 110 | path = ZYTabelViewLoadAnimationDemoTests; 111 | sourceTree = ""; 112 | }; 113 | 5ADCDF631B32A6B100266D07 /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 5ADCDF641B32A6B100266D07 /* Info.plist */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | 5ADCDF6F1B32A6DF00266D07 /* TabelViewLoadAnimation */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 5ADCDF701B32A6DF00266D07 /* UITabelView+LoadAnimation.swift */, 125 | ); 126 | path = TabelViewLoadAnimation; 127 | sourceTree = ""; 128 | }; 129 | /* End PBXGroup section */ 130 | 131 | /* Begin PBXNativeTarget section */ 132 | 5ADCDF491B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo */ = { 133 | isa = PBXNativeTarget; 134 | buildConfigurationList = 5ADCDF691B32A6B100266D07 /* Build configuration list for PBXNativeTarget "ZYTabelViewLoadAnimationDemo" */; 135 | buildPhases = ( 136 | 5ADCDF461B32A6B100266D07 /* Sources */, 137 | 5ADCDF471B32A6B100266D07 /* Frameworks */, 138 | 5ADCDF481B32A6B100266D07 /* Resources */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = ZYTabelViewLoadAnimationDemo; 145 | productName = ZYTabelViewLoadAnimationDemo; 146 | productReference = 5ADCDF4A1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | 5ADCDF5E1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests */ = { 150 | isa = PBXNativeTarget; 151 | buildConfigurationList = 5ADCDF6C1B32A6B100266D07 /* Build configuration list for PBXNativeTarget "ZYTabelViewLoadAnimationDemoTests" */; 152 | buildPhases = ( 153 | 5ADCDF5B1B32A6B100266D07 /* Sources */, 154 | 5ADCDF5C1B32A6B100266D07 /* Frameworks */, 155 | 5ADCDF5D1B32A6B100266D07 /* Resources */, 156 | ); 157 | buildRules = ( 158 | ); 159 | dependencies = ( 160 | 5ADCDF611B32A6B100266D07 /* PBXTargetDependency */, 161 | ); 162 | name = ZYTabelViewLoadAnimationDemoTests; 163 | productName = ZYTabelViewLoadAnimationDemoTests; 164 | productReference = 5ADCDF5F1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.xctest */; 165 | productType = "com.apple.product-type.bundle.unit-test"; 166 | }; 167 | /* End PBXNativeTarget section */ 168 | 169 | /* Begin PBXProject section */ 170 | 5ADCDF421B32A6B100266D07 /* Project object */ = { 171 | isa = PBXProject; 172 | attributes = { 173 | CLASSPREFIX = ZY; 174 | LastUpgradeCheck = 0630; 175 | ORGANIZATIONNAME = ZY; 176 | TargetAttributes = { 177 | 5ADCDF491B32A6B100266D07 = { 178 | CreatedOnToolsVersion = 6.3; 179 | LastSwiftMigration = 0820; 180 | }; 181 | 5ADCDF5E1B32A6B100266D07 = { 182 | CreatedOnToolsVersion = 6.3; 183 | LastSwiftMigration = 0820; 184 | TestTargetID = 5ADCDF491B32A6B100266D07; 185 | }; 186 | }; 187 | }; 188 | buildConfigurationList = 5ADCDF451B32A6B100266D07 /* Build configuration list for PBXProject "ZYTabelViewLoadAnimationDemo" */; 189 | compatibilityVersion = "Xcode 3.2"; 190 | developmentRegion = English; 191 | hasScannedForEncodings = 0; 192 | knownRegions = ( 193 | en, 194 | Base, 195 | ); 196 | mainGroup = 5ADCDF411B32A6B100266D07; 197 | productRefGroup = 5ADCDF4B1B32A6B100266D07 /* Products */; 198 | projectDirPath = ""; 199 | projectRoot = ""; 200 | targets = ( 201 | 5ADCDF491B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo */, 202 | 5ADCDF5E1B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 5ADCDF481B32A6B100266D07 /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 5ADCDF551B32A6B100266D07 /* Main.storyboard in Resources */, 213 | 5ADCDF5A1B32A6B100266D07 /* LaunchScreen.xib in Resources */, 214 | 5ADCDF571B32A6B100266D07 /* Images.xcassets in Resources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | 5ADCDF5D1B32A6B100266D07 /* Resources */ = { 219 | isa = PBXResourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | /* End PBXResourcesBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 5ADCDF461B32A6B100266D07 /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 5ADCDF711B32A6DF00266D07 /* UITabelView+LoadAnimation.swift in Sources */, 233 | 5ADCDF521B32A6B100266D07 /* ViewController.swift in Sources */, 234 | 5ADCDF501B32A6B100266D07 /* AppDelegate.swift in Sources */, 235 | 5ADCDF731B32A92C00266D07 /* ZYViewController.swift in Sources */, 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | }; 239 | 5ADCDF5B1B32A6B100266D07 /* Sources */ = { 240 | isa = PBXSourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 5ADCDF661B32A6B100266D07 /* ZYTabelViewLoadAnimationDemoTests.swift in Sources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | /* End PBXSourcesBuildPhase section */ 248 | 249 | /* Begin PBXTargetDependency section */ 250 | 5ADCDF611B32A6B100266D07 /* PBXTargetDependency */ = { 251 | isa = PBXTargetDependency; 252 | target = 5ADCDF491B32A6B100266D07 /* ZYTabelViewLoadAnimationDemo */; 253 | targetProxy = 5ADCDF601B32A6B100266D07 /* PBXContainerItemProxy */; 254 | }; 255 | /* End PBXTargetDependency section */ 256 | 257 | /* Begin PBXVariantGroup section */ 258 | 5ADCDF531B32A6B100266D07 /* Main.storyboard */ = { 259 | isa = PBXVariantGroup; 260 | children = ( 261 | 5ADCDF541B32A6B100266D07 /* Base */, 262 | ); 263 | name = Main.storyboard; 264 | sourceTree = ""; 265 | }; 266 | 5ADCDF581B32A6B100266D07 /* LaunchScreen.xib */ = { 267 | isa = PBXVariantGroup; 268 | children = ( 269 | 5ADCDF591B32A6B100266D07 /* Base */, 270 | ); 271 | name = LaunchScreen.xib; 272 | sourceTree = ""; 273 | }; 274 | /* End PBXVariantGroup section */ 275 | 276 | /* Begin XCBuildConfiguration section */ 277 | 5ADCDF671B32A6B100266D07 /* Debug */ = { 278 | isa = XCBuildConfiguration; 279 | buildSettings = { 280 | ALWAYS_SEARCH_USER_PATHS = NO; 281 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 282 | CLANG_CXX_LIBRARY = "libc++"; 283 | CLANG_ENABLE_MODULES = YES; 284 | CLANG_ENABLE_OBJC_ARC = YES; 285 | CLANG_WARN_BOOL_CONVERSION = YES; 286 | CLANG_WARN_CONSTANT_CONVERSION = YES; 287 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 288 | CLANG_WARN_EMPTY_BODY = YES; 289 | CLANG_WARN_ENUM_CONVERSION = YES; 290 | CLANG_WARN_INT_CONVERSION = YES; 291 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 292 | CLANG_WARN_UNREACHABLE_CODE = YES; 293 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 294 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 295 | COPY_PHASE_STRIP = NO; 296 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 297 | ENABLE_STRICT_OBJC_MSGSEND = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu99; 299 | GCC_DYNAMIC_NO_PIC = NO; 300 | GCC_NO_COMMON_BLOCKS = YES; 301 | GCC_OPTIMIZATION_LEVEL = 0; 302 | GCC_PREPROCESSOR_DEFINITIONS = ( 303 | "DEBUG=1", 304 | "$(inherited)", 305 | ); 306 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 307 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 308 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 309 | GCC_WARN_UNDECLARED_SELECTOR = YES; 310 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 311 | GCC_WARN_UNUSED_FUNCTION = YES; 312 | GCC_WARN_UNUSED_VARIABLE = YES; 313 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 314 | MTL_ENABLE_DEBUG_INFO = YES; 315 | ONLY_ACTIVE_ARCH = YES; 316 | SDKROOT = iphoneos; 317 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 318 | TARGETED_DEVICE_FAMILY = "1,2"; 319 | }; 320 | name = Debug; 321 | }; 322 | 5ADCDF681B32A6B100266D07 /* Release */ = { 323 | isa = XCBuildConfiguration; 324 | buildSettings = { 325 | ALWAYS_SEARCH_USER_PATHS = NO; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_CONSTANT_CONVERSION = YES; 332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 333 | CLANG_WARN_EMPTY_BODY = YES; 334 | CLANG_WARN_ENUM_CONVERSION = YES; 335 | CLANG_WARN_INT_CONVERSION = YES; 336 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 337 | CLANG_WARN_UNREACHABLE_CODE = YES; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 340 | COPY_PHASE_STRIP = NO; 341 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 342 | ENABLE_NS_ASSERTIONS = NO; 343 | ENABLE_STRICT_OBJC_MSGSEND = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu99; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 353 | MTL_ENABLE_DEBUG_INFO = NO; 354 | SDKROOT = iphoneos; 355 | TARGETED_DEVICE_FAMILY = "1,2"; 356 | VALIDATE_PRODUCT = YES; 357 | }; 358 | name = Release; 359 | }; 360 | 5ADCDF6A1B32A6B100266D07 /* Debug */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 364 | INFOPLIST_FILE = ZYTabelViewLoadAnimationDemo/Info.plist; 365 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 366 | PRODUCT_NAME = "$(TARGET_NAME)"; 367 | SWIFT_VERSION = 3.0; 368 | }; 369 | name = Debug; 370 | }; 371 | 5ADCDF6B1B32A6B100266D07 /* Release */ = { 372 | isa = XCBuildConfiguration; 373 | buildSettings = { 374 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 375 | INFOPLIST_FILE = ZYTabelViewLoadAnimationDemo/Info.plist; 376 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 377 | PRODUCT_NAME = "$(TARGET_NAME)"; 378 | SWIFT_VERSION = 3.0; 379 | }; 380 | name = Release; 381 | }; 382 | 5ADCDF6D1B32A6B100266D07 /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | BUNDLE_LOADER = "$(TEST_HOST)"; 386 | FRAMEWORK_SEARCH_PATHS = ( 387 | "$(SDKROOT)/Developer/Library/Frameworks", 388 | "$(inherited)", 389 | ); 390 | GCC_PREPROCESSOR_DEFINITIONS = ( 391 | "DEBUG=1", 392 | "$(inherited)", 393 | ); 394 | INFOPLIST_FILE = ZYTabelViewLoadAnimationDemoTests/Info.plist; 395 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | SWIFT_VERSION = 3.0; 398 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZYTabelViewLoadAnimationDemo.app/ZYTabelViewLoadAnimationDemo"; 399 | }; 400 | name = Debug; 401 | }; 402 | 5ADCDF6E1B32A6B100266D07 /* Release */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | BUNDLE_LOADER = "$(TEST_HOST)"; 406 | FRAMEWORK_SEARCH_PATHS = ( 407 | "$(SDKROOT)/Developer/Library/Frameworks", 408 | "$(inherited)", 409 | ); 410 | INFOPLIST_FILE = ZYTabelViewLoadAnimationDemoTests/Info.plist; 411 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | SWIFT_VERSION = 3.0; 414 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZYTabelViewLoadAnimationDemo.app/ZYTabelViewLoadAnimationDemo"; 415 | }; 416 | name = Release; 417 | }; 418 | /* End XCBuildConfiguration section */ 419 | 420 | /* Begin XCConfigurationList section */ 421 | 5ADCDF451B32A6B100266D07 /* Build configuration list for PBXProject "ZYTabelViewLoadAnimationDemo" */ = { 422 | isa = XCConfigurationList; 423 | buildConfigurations = ( 424 | 5ADCDF671B32A6B100266D07 /* Debug */, 425 | 5ADCDF681B32A6B100266D07 /* Release */, 426 | ); 427 | defaultConfigurationIsVisible = 0; 428 | defaultConfigurationName = Release; 429 | }; 430 | 5ADCDF691B32A6B100266D07 /* Build configuration list for PBXNativeTarget "ZYTabelViewLoadAnimationDemo" */ = { 431 | isa = XCConfigurationList; 432 | buildConfigurations = ( 433 | 5ADCDF6A1B32A6B100266D07 /* Debug */, 434 | 5ADCDF6B1B32A6B100266D07 /* Release */, 435 | ); 436 | defaultConfigurationIsVisible = 0; 437 | defaultConfigurationName = Release; 438 | }; 439 | 5ADCDF6C1B32A6B100266D07 /* Build configuration list for PBXNativeTarget "ZYTabelViewLoadAnimationDemoTests" */ = { 440 | isa = XCConfigurationList; 441 | buildConfigurations = ( 442 | 5ADCDF6D1B32A6B100266D07 /* Debug */, 443 | 5ADCDF6E1B32A6B100266D07 /* Release */, 444 | ); 445 | defaultConfigurationIsVisible = 0; 446 | defaultConfigurationName = Release; 447 | }; 448 | /* End XCConfigurationList section */ 449 | }; 450 | rootObject = 5ADCDF421B32A6B100266D07 /* Project object */; 451 | } 452 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo.xcodeproj/project.xcworkspace/xcuserdata/tarena.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bjzhangyang/ZYTabelViewLoadAnimationDemo/ebb87555b4d23ead74de447b732c807b30ab5e4f/ZYTabelViewLoadAnimationDemo.xcodeproj/project.xcworkspace/xcuserdata/tarena.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo.xcodeproj/xcuserdata/soufun.xcuserdatad/xcschemes/ZYTabelViewLoadAnimationDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo.xcodeproj/xcuserdata/soufun.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ZYTabelViewLoadAnimationDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 5ADCDF491B32A6B100266D07 16 | 17 | primary 18 | 19 | 20 | 5ADCDF5E1B32A6B100266D07 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo.xcodeproj/xcuserdata/tarena.xcuserdatad/xcschemes/ZYTabelViewLoadAnimationDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo.xcodeproj/xcuserdata/tarena.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ZYTabelViewLoadAnimationDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 5ADCDF491B32A6B100266D07 16 | 17 | primary 18 | 19 | 20 | 5ADCDF5E1B32A6B100266D07 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ZYTabelViewLoadAnimationDemo 4 | // 5 | // Created by soufun on 15/6/18. 6 | // Copyright (c) 2015年 ZY. 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 throttle down OpenGL ES frame rates. 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 inactive 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 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 29 | 38 | 47 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | ZY.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 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 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ZYTabelViewLoadAnimationDemo 4 | // 5 | // Created by soufun on 15/6/18. 6 | // Copyright (c) 2015年 ZY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | 19 | @IBAction func clicked(_ sender: UIButton) { 20 | var direct:AnimationDirect = AnimationDirect.dropDownFromTop 21 | switch sender.tag{ 22 | case 1: 23 | direct = AnimationDirect.dropDownFromTop 24 | case 2: 25 | direct = AnimationDirect.liftUpFromBottum 26 | case 3: 27 | direct = AnimationDirect.fromRightToLeft 28 | case 4: 29 | direct = AnimationDirect.fromLeftToRight 30 | default: 31 | return 32 | } 33 | let target : ZYViewController = self.storyboard?.instantiateViewController(withIdentifier: "tableView") as! ZYViewController 34 | target.direct = direct 35 | self.navigationController?.pushViewController(target, animated: true) 36 | } 37 | override func didReceiveMemoryWarning() { 38 | super.didReceiveMemoryWarning() 39 | // Dispose of any resources that can be recreated. 40 | } 41 | 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemo/ZYViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZYViewController.swift 3 | // ZYTabelViewLoadAnimationDemo 4 | // 5 | // Created by soufun on 15/6/18. 6 | // Copyright (c) 2015年 ZY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ZYViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { 12 | @IBOutlet weak var tableView: UITableView! 13 | var direct : AnimationDirect! 14 | override func viewDidLoad() { 15 | super.viewDidLoad() 16 | self.title = "展示动画" 17 | self.tableView.reloadDataWithAnimate(direct, animationTime: 0.5, interval: 0.05) 18 | } 19 | 20 | override func didReceiveMemoryWarning() { 21 | super.didReceiveMemoryWarning() 22 | // Dispose of any resources that can be recreated. 23 | } 24 | 25 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int{ 26 | return 20 27 | } 28 | 29 | 30 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell{ 31 | var cell:UITableViewCell? = tableView.dequeueReusableCell(withIdentifier: "cell") as UITableViewCell? 32 | if (cell == nil){ 33 | cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: "cell") 34 | } 35 | cell?.textLabel?.text = "这是第\(indexPath.row)行" 36 | return cell! 37 | } 38 | 39 | } 40 | 41 | /* 42 | // MARK: - Navigation 43 | 44 | // In a storyboard-based application, you will often want to do a little preparation before navigation 45 | override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { 46 | // Get the new view controller using segue.destinationViewController. 47 | // Pass the selected object to the new view controller. 48 | } 49 | */ 50 | 51 | 52 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | ZY.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ZYTabelViewLoadAnimationDemoTests/ZYTabelViewLoadAnimationDemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ZYTabelViewLoadAnimationDemoTests.swift 3 | // ZYTabelViewLoadAnimationDemoTests 4 | // 5 | // Created by soufun on 15/6/18. 6 | // Copyright (c) 2015年 ZY. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class ZYTabelViewLoadAnimationDemoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------