├── .gitignore ├── LICENSE ├── README.md ├── TumblrLikeAnimView ├── TumblrLikeAnimView.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── TumblrLikeAnimView │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── DataSource │ │ ├── big.png │ │ ├── icon_like@3x.png │ │ ├── icon_like_broken1@2x.png │ │ ├── icon_like_broken2@2x.png │ │ ├── icon_like_broken3@2x.png │ │ ├── icon_like_broken4@2x.png │ │ └── icon_likeon@3x.png │ ├── Info.plist │ ├── TOOL │ │ ├── UIView+Frame.h │ │ └── UIView+Frame.m │ ├── TableViewDemo │ │ ├── MyTableViewCell.h │ │ ├── MyTableViewCell.m │ │ ├── MyTableViewController.h │ │ └── MyTableViewController.m │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── TumblrLikeAnimViewTests │ ├── Info.plist │ └── TumblrLikeAnimViewTests.m └── TumblrLikeAnimViewUITests │ ├── Info.plist │ └── TumblrLikeAnimViewUITests.m ├── demo.gif └── demo2.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 HanJunqiang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TumblrLikeAnimView 2 | 仿Tumblr点赞动画效果 (心放大,心破碎效果)iOS开发者交流群:446310206 3 | 4 | 5 | 实例: 6 | 7 | ![](https://github.com/xiaohange/TumblrLikeAnimView/blob/master/demo.gif?raw=true) 8 | 9 | 应用中的效果展示: 10 | 11 | ![](https://github.com/xiaohange/TumblrLikeAnimView/blob/master/demo2.gif?raw=true) 12 | 13 | ## Star 14 | >iOS开发者交流群:446310206 喜欢就❤️❤️❤️star一下吧!你的支持是我更新的动力! Love is every every every star! Your support is my renewed motivation! 15 | 16 | ## Other 17 | [JQTumblrHud-高仿Tumblr App 加载指示器hud](https://github.com/xiaohange/JQTumblrHud) 18 | 19 | [JQScrollNumberLabel:仿tumblr热度滚动数字条数](https://github.com/xiaohange/JQScrollNumberLabel) 20 | 21 | [TumblrLikeAnimView-仿Tumblr点赞动画效果](https://github.com/xiaohange/TumblrLikeAnimView) 22 | 23 | [JQMenuPopView-仿Tumblr弹出视图发音频、视频、图片、文字的视图](https://github.com/xiaohange/JQMenuPopView) 24 | 25 | ## License 26 | 27 | This code is distributed under the terms and conditions of the [MIT license](LICENSE). 28 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 476206F71E9DD285003D62E1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 476206F61E9DD285003D62E1 /* main.m */; }; 11 | 476206FA1E9DD285003D62E1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 476206F91E9DD285003D62E1 /* AppDelegate.m */; }; 12 | 476206FD1E9DD285003D62E1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 476206FC1E9DD285003D62E1 /* ViewController.m */; }; 13 | 476207001E9DD285003D62E1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 476206FE1E9DD285003D62E1 /* Main.storyboard */; }; 14 | 476207021E9DD285003D62E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 476207011E9DD285003D62E1 /* Assets.xcassets */; }; 15 | 476207051E9DD285003D62E1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 476207031E9DD285003D62E1 /* LaunchScreen.storyboard */; }; 16 | 476207101E9DD285003D62E1 /* TumblrLikeAnimViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4762070F1E9DD285003D62E1 /* TumblrLikeAnimViewTests.m */; }; 17 | 4762071B1E9DD285003D62E1 /* TumblrLikeAnimViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4762071A1E9DD285003D62E1 /* TumblrLikeAnimViewUITests.m */; }; 18 | 4762072B1E9DD2A7003D62E1 /* UIView+Frame.m in Sources */ = {isa = PBXBuildFile; fileRef = 4762072A1E9DD2A7003D62E1 /* UIView+Frame.m */; }; 19 | 476207351E9DD35B003D62E1 /* big.png in Resources */ = {isa = PBXBuildFile; fileRef = 4762072E1E9DD35B003D62E1 /* big.png */; }; 20 | 476207361E9DD35B003D62E1 /* icon_like_broken1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4762072F1E9DD35B003D62E1 /* icon_like_broken1@2x.png */; }; 21 | 476207371E9DD35B003D62E1 /* icon_like_broken2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 476207301E9DD35B003D62E1 /* icon_like_broken2@2x.png */; }; 22 | 476207381E9DD35B003D62E1 /* icon_like_broken3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 476207311E9DD35B003D62E1 /* icon_like_broken3@2x.png */; }; 23 | 476207391E9DD35B003D62E1 /* icon_like_broken4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 476207321E9DD35B003D62E1 /* icon_like_broken4@2x.png */; }; 24 | 4762073A1E9DD35B003D62E1 /* icon_like@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 476207331E9DD35B003D62E1 /* icon_like@3x.png */; }; 25 | 4762073B1E9DD35B003D62E1 /* icon_likeon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 476207341E9DD35B003D62E1 /* icon_likeon@3x.png */; }; 26 | 476207421E9DD448003D62E1 /* MyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4762073E1E9DD448003D62E1 /* MyTableViewCell.m */; }; 27 | 476207441E9DD448003D62E1 /* MyTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 476207411E9DD448003D62E1 /* MyTableViewController.m */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXContainerItemProxy section */ 31 | 4762070C1E9DD285003D62E1 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = 476206EA1E9DD285003D62E1 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = 476206F11E9DD285003D62E1; 36 | remoteInfo = TumblrLikeAnimView; 37 | }; 38 | 476207171E9DD285003D62E1 /* PBXContainerItemProxy */ = { 39 | isa = PBXContainerItemProxy; 40 | containerPortal = 476206EA1E9DD285003D62E1 /* Project object */; 41 | proxyType = 1; 42 | remoteGlobalIDString = 476206F11E9DD285003D62E1; 43 | remoteInfo = TumblrLikeAnimView; 44 | }; 45 | /* End PBXContainerItemProxy section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 476206F21E9DD285003D62E1 /* TumblrLikeAnimView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TumblrLikeAnimView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 476206F61E9DD285003D62E1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 50 | 476206F81E9DD285003D62E1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 51 | 476206F91E9DD285003D62E1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 52 | 476206FB1E9DD285003D62E1 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ViewController.h; path = ../ViewController.h; sourceTree = ""; }; 53 | 476206FC1E9DD285003D62E1 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ViewController.m; path = ../ViewController.m; sourceTree = ""; }; 54 | 476206FF1E9DD285003D62E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 476207011E9DD285003D62E1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 476207041E9DD285003D62E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | 476207061E9DD285003D62E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 4762070B1E9DD285003D62E1 /* TumblrLikeAnimViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TumblrLikeAnimViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 4762070F1E9DD285003D62E1 /* TumblrLikeAnimViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TumblrLikeAnimViewTests.m; sourceTree = ""; }; 60 | 476207111E9DD285003D62E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 476207161E9DD285003D62E1 /* TumblrLikeAnimViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TumblrLikeAnimViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 4762071A1E9DD285003D62E1 /* TumblrLikeAnimViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TumblrLikeAnimViewUITests.m; sourceTree = ""; }; 63 | 4762071C1E9DD285003D62E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | 476207291E9DD2A7003D62E1 /* UIView+Frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Frame.h"; sourceTree = ""; }; 65 | 4762072A1E9DD2A7003D62E1 /* UIView+Frame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Frame.m"; sourceTree = ""; }; 66 | 4762072E1E9DD35B003D62E1 /* big.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = big.png; sourceTree = ""; }; 67 | 4762072F1E9DD35B003D62E1 /* icon_like_broken1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_like_broken1@2x.png"; sourceTree = ""; }; 68 | 476207301E9DD35B003D62E1 /* icon_like_broken2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_like_broken2@2x.png"; sourceTree = ""; }; 69 | 476207311E9DD35B003D62E1 /* icon_like_broken3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_like_broken3@2x.png"; sourceTree = ""; }; 70 | 476207321E9DD35B003D62E1 /* icon_like_broken4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_like_broken4@2x.png"; sourceTree = ""; }; 71 | 476207331E9DD35B003D62E1 /* icon_like@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_like@3x.png"; sourceTree = ""; }; 72 | 476207341E9DD35B003D62E1 /* icon_likeon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_likeon@3x.png"; sourceTree = ""; }; 73 | 4762073D1E9DD448003D62E1 /* MyTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTableViewCell.h; sourceTree = ""; }; 74 | 4762073E1E9DD448003D62E1 /* MyTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTableViewCell.m; sourceTree = ""; }; 75 | 476207401E9DD448003D62E1 /* MyTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTableViewController.h; sourceTree = ""; }; 76 | 476207411E9DD448003D62E1 /* MyTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTableViewController.m; sourceTree = ""; }; 77 | /* End PBXFileReference section */ 78 | 79 | /* Begin PBXFrameworksBuildPhase section */ 80 | 476206EF1E9DD285003D62E1 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | 476207081E9DD285003D62E1 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | 476207131E9DD285003D62E1 /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | ); 99 | runOnlyForDeploymentPostprocessing = 0; 100 | }; 101 | /* End PBXFrameworksBuildPhase section */ 102 | 103 | /* Begin PBXGroup section */ 104 | 476206E91E9DD285003D62E1 = { 105 | isa = PBXGroup; 106 | children = ( 107 | 476206F41E9DD285003D62E1 /* TumblrLikeAnimView */, 108 | 4762070E1E9DD285003D62E1 /* TumblrLikeAnimViewTests */, 109 | 476207191E9DD285003D62E1 /* TumblrLikeAnimViewUITests */, 110 | 476206F31E9DD285003D62E1 /* Products */, 111 | ); 112 | sourceTree = ""; 113 | }; 114 | 476206F31E9DD285003D62E1 /* Products */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 476206F21E9DD285003D62E1 /* TumblrLikeAnimView.app */, 118 | 4762070B1E9DD285003D62E1 /* TumblrLikeAnimViewTests.xctest */, 119 | 476207161E9DD285003D62E1 /* TumblrLikeAnimViewUITests.xctest */, 120 | ); 121 | name = Products; 122 | sourceTree = ""; 123 | }; 124 | 476206F41E9DD285003D62E1 /* TumblrLikeAnimView */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 476207281E9DD299003D62E1 /* TOOL */, 128 | 4762072D1E9DD34D003D62E1 /* DataSource */, 129 | 4762072C1E9DD2C3003D62E1 /* Demo */, 130 | 4762073C1E9DD448003D62E1 /* TableViewDemo */, 131 | 476206F81E9DD285003D62E1 /* AppDelegate.h */, 132 | 476206F91E9DD285003D62E1 /* AppDelegate.m */, 133 | 476206FE1E9DD285003D62E1 /* Main.storyboard */, 134 | 476207011E9DD285003D62E1 /* Assets.xcassets */, 135 | 476207031E9DD285003D62E1 /* LaunchScreen.storyboard */, 136 | 476207061E9DD285003D62E1 /* Info.plist */, 137 | 476206F51E9DD285003D62E1 /* Supporting Files */, 138 | ); 139 | path = TumblrLikeAnimView; 140 | sourceTree = ""; 141 | }; 142 | 476206F51E9DD285003D62E1 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 476206F61E9DD285003D62E1 /* main.m */, 146 | ); 147 | name = "Supporting Files"; 148 | sourceTree = ""; 149 | }; 150 | 4762070E1E9DD285003D62E1 /* TumblrLikeAnimViewTests */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 4762070F1E9DD285003D62E1 /* TumblrLikeAnimViewTests.m */, 154 | 476207111E9DD285003D62E1 /* Info.plist */, 155 | ); 156 | path = TumblrLikeAnimViewTests; 157 | sourceTree = ""; 158 | }; 159 | 476207191E9DD285003D62E1 /* TumblrLikeAnimViewUITests */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 4762071A1E9DD285003D62E1 /* TumblrLikeAnimViewUITests.m */, 163 | 4762071C1E9DD285003D62E1 /* Info.plist */, 164 | ); 165 | path = TumblrLikeAnimViewUITests; 166 | sourceTree = ""; 167 | }; 168 | 476207281E9DD299003D62E1 /* TOOL */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 476207291E9DD2A7003D62E1 /* UIView+Frame.h */, 172 | 4762072A1E9DD2A7003D62E1 /* UIView+Frame.m */, 173 | ); 174 | path = TOOL; 175 | sourceTree = ""; 176 | }; 177 | 4762072C1E9DD2C3003D62E1 /* Demo */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 476206FB1E9DD285003D62E1 /* ViewController.h */, 181 | 476206FC1E9DD285003D62E1 /* ViewController.m */, 182 | ); 183 | path = Demo; 184 | sourceTree = ""; 185 | }; 186 | 4762072D1E9DD34D003D62E1 /* DataSource */ = { 187 | isa = PBXGroup; 188 | children = ( 189 | 4762072E1E9DD35B003D62E1 /* big.png */, 190 | 4762072F1E9DD35B003D62E1 /* icon_like_broken1@2x.png */, 191 | 476207301E9DD35B003D62E1 /* icon_like_broken2@2x.png */, 192 | 476207311E9DD35B003D62E1 /* icon_like_broken3@2x.png */, 193 | 476207321E9DD35B003D62E1 /* icon_like_broken4@2x.png */, 194 | 476207331E9DD35B003D62E1 /* icon_like@3x.png */, 195 | 476207341E9DD35B003D62E1 /* icon_likeon@3x.png */, 196 | ); 197 | path = DataSource; 198 | sourceTree = ""; 199 | }; 200 | 4762073C1E9DD448003D62E1 /* TableViewDemo */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 4762073D1E9DD448003D62E1 /* MyTableViewCell.h */, 204 | 4762073E1E9DD448003D62E1 /* MyTableViewCell.m */, 205 | 476207401E9DD448003D62E1 /* MyTableViewController.h */, 206 | 476207411E9DD448003D62E1 /* MyTableViewController.m */, 207 | ); 208 | path = TableViewDemo; 209 | sourceTree = ""; 210 | }; 211 | /* End PBXGroup section */ 212 | 213 | /* Begin PBXNativeTarget section */ 214 | 476206F11E9DD285003D62E1 /* TumblrLikeAnimView */ = { 215 | isa = PBXNativeTarget; 216 | buildConfigurationList = 4762071F1E9DD285003D62E1 /* Build configuration list for PBXNativeTarget "TumblrLikeAnimView" */; 217 | buildPhases = ( 218 | 476206EE1E9DD285003D62E1 /* Sources */, 219 | 476206EF1E9DD285003D62E1 /* Frameworks */, 220 | 476206F01E9DD285003D62E1 /* Resources */, 221 | ); 222 | buildRules = ( 223 | ); 224 | dependencies = ( 225 | ); 226 | name = TumblrLikeAnimView; 227 | productName = TumblrLikeAnimView; 228 | productReference = 476206F21E9DD285003D62E1 /* TumblrLikeAnimView.app */; 229 | productType = "com.apple.product-type.application"; 230 | }; 231 | 4762070A1E9DD285003D62E1 /* TumblrLikeAnimViewTests */ = { 232 | isa = PBXNativeTarget; 233 | buildConfigurationList = 476207221E9DD285003D62E1 /* Build configuration list for PBXNativeTarget "TumblrLikeAnimViewTests" */; 234 | buildPhases = ( 235 | 476207071E9DD285003D62E1 /* Sources */, 236 | 476207081E9DD285003D62E1 /* Frameworks */, 237 | 476207091E9DD285003D62E1 /* Resources */, 238 | ); 239 | buildRules = ( 240 | ); 241 | dependencies = ( 242 | 4762070D1E9DD285003D62E1 /* PBXTargetDependency */, 243 | ); 244 | name = TumblrLikeAnimViewTests; 245 | productName = TumblrLikeAnimViewTests; 246 | productReference = 4762070B1E9DD285003D62E1 /* TumblrLikeAnimViewTests.xctest */; 247 | productType = "com.apple.product-type.bundle.unit-test"; 248 | }; 249 | 476207151E9DD285003D62E1 /* TumblrLikeAnimViewUITests */ = { 250 | isa = PBXNativeTarget; 251 | buildConfigurationList = 476207251E9DD285003D62E1 /* Build configuration list for PBXNativeTarget "TumblrLikeAnimViewUITests" */; 252 | buildPhases = ( 253 | 476207121E9DD285003D62E1 /* Sources */, 254 | 476207131E9DD285003D62E1 /* Frameworks */, 255 | 476207141E9DD285003D62E1 /* Resources */, 256 | ); 257 | buildRules = ( 258 | ); 259 | dependencies = ( 260 | 476207181E9DD285003D62E1 /* PBXTargetDependency */, 261 | ); 262 | name = TumblrLikeAnimViewUITests; 263 | productName = TumblrLikeAnimViewUITests; 264 | productReference = 476207161E9DD285003D62E1 /* TumblrLikeAnimViewUITests.xctest */; 265 | productType = "com.apple.product-type.bundle.ui-testing"; 266 | }; 267 | /* End PBXNativeTarget section */ 268 | 269 | /* Begin PBXProject section */ 270 | 476206EA1E9DD285003D62E1 /* Project object */ = { 271 | isa = PBXProject; 272 | attributes = { 273 | LastUpgradeCheck = 0830; 274 | ORGANIZATIONNAME = HaRi; 275 | TargetAttributes = { 276 | 476206F11E9DD285003D62E1 = { 277 | CreatedOnToolsVersion = 8.3.1; 278 | DevelopmentTeam = WTB2BKP7UZ; 279 | ProvisioningStyle = Automatic; 280 | }; 281 | 4762070A1E9DD285003D62E1 = { 282 | CreatedOnToolsVersion = 8.3.1; 283 | DevelopmentTeam = WTB2BKP7UZ; 284 | ProvisioningStyle = Automatic; 285 | TestTargetID = 476206F11E9DD285003D62E1; 286 | }; 287 | 476207151E9DD285003D62E1 = { 288 | CreatedOnToolsVersion = 8.3.1; 289 | DevelopmentTeam = WTB2BKP7UZ; 290 | ProvisioningStyle = Automatic; 291 | TestTargetID = 476206F11E9DD285003D62E1; 292 | }; 293 | }; 294 | }; 295 | buildConfigurationList = 476206ED1E9DD285003D62E1 /* Build configuration list for PBXProject "TumblrLikeAnimView" */; 296 | compatibilityVersion = "Xcode 3.2"; 297 | developmentRegion = English; 298 | hasScannedForEncodings = 0; 299 | knownRegions = ( 300 | en, 301 | Base, 302 | ); 303 | mainGroup = 476206E91E9DD285003D62E1; 304 | productRefGroup = 476206F31E9DD285003D62E1 /* Products */; 305 | projectDirPath = ""; 306 | projectRoot = ""; 307 | targets = ( 308 | 476206F11E9DD285003D62E1 /* TumblrLikeAnimView */, 309 | 4762070A1E9DD285003D62E1 /* TumblrLikeAnimViewTests */, 310 | 476207151E9DD285003D62E1 /* TumblrLikeAnimViewUITests */, 311 | ); 312 | }; 313 | /* End PBXProject section */ 314 | 315 | /* Begin PBXResourcesBuildPhase section */ 316 | 476206F01E9DD285003D62E1 /* Resources */ = { 317 | isa = PBXResourcesBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | 476207351E9DD35B003D62E1 /* big.png in Resources */, 321 | 476207051E9DD285003D62E1 /* LaunchScreen.storyboard in Resources */, 322 | 4762073A1E9DD35B003D62E1 /* icon_like@3x.png in Resources */, 323 | 476207381E9DD35B003D62E1 /* icon_like_broken3@2x.png in Resources */, 324 | 4762073B1E9DD35B003D62E1 /* icon_likeon@3x.png in Resources */, 325 | 476207021E9DD285003D62E1 /* Assets.xcassets in Resources */, 326 | 476207361E9DD35B003D62E1 /* icon_like_broken1@2x.png in Resources */, 327 | 476207371E9DD35B003D62E1 /* icon_like_broken2@2x.png in Resources */, 328 | 476207391E9DD35B003D62E1 /* icon_like_broken4@2x.png in Resources */, 329 | 476207001E9DD285003D62E1 /* Main.storyboard in Resources */, 330 | ); 331 | runOnlyForDeploymentPostprocessing = 0; 332 | }; 333 | 476207091E9DD285003D62E1 /* Resources */ = { 334 | isa = PBXResourcesBuildPhase; 335 | buildActionMask = 2147483647; 336 | files = ( 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | }; 340 | 476207141E9DD285003D62E1 /* Resources */ = { 341 | isa = PBXResourcesBuildPhase; 342 | buildActionMask = 2147483647; 343 | files = ( 344 | ); 345 | runOnlyForDeploymentPostprocessing = 0; 346 | }; 347 | /* End PBXResourcesBuildPhase section */ 348 | 349 | /* Begin PBXSourcesBuildPhase section */ 350 | 476206EE1E9DD285003D62E1 /* Sources */ = { 351 | isa = PBXSourcesBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | 4762072B1E9DD2A7003D62E1 /* UIView+Frame.m in Sources */, 355 | 476206FD1E9DD285003D62E1 /* ViewController.m in Sources */, 356 | 476206FA1E9DD285003D62E1 /* AppDelegate.m in Sources */, 357 | 476207441E9DD448003D62E1 /* MyTableViewController.m in Sources */, 358 | 476206F71E9DD285003D62E1 /* main.m in Sources */, 359 | 476207421E9DD448003D62E1 /* MyTableViewCell.m in Sources */, 360 | ); 361 | runOnlyForDeploymentPostprocessing = 0; 362 | }; 363 | 476207071E9DD285003D62E1 /* Sources */ = { 364 | isa = PBXSourcesBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | 476207101E9DD285003D62E1 /* TumblrLikeAnimViewTests.m in Sources */, 368 | ); 369 | runOnlyForDeploymentPostprocessing = 0; 370 | }; 371 | 476207121E9DD285003D62E1 /* Sources */ = { 372 | isa = PBXSourcesBuildPhase; 373 | buildActionMask = 2147483647; 374 | files = ( 375 | 4762071B1E9DD285003D62E1 /* TumblrLikeAnimViewUITests.m in Sources */, 376 | ); 377 | runOnlyForDeploymentPostprocessing = 0; 378 | }; 379 | /* End PBXSourcesBuildPhase section */ 380 | 381 | /* Begin PBXTargetDependency section */ 382 | 4762070D1E9DD285003D62E1 /* PBXTargetDependency */ = { 383 | isa = PBXTargetDependency; 384 | target = 476206F11E9DD285003D62E1 /* TumblrLikeAnimView */; 385 | targetProxy = 4762070C1E9DD285003D62E1 /* PBXContainerItemProxy */; 386 | }; 387 | 476207181E9DD285003D62E1 /* PBXTargetDependency */ = { 388 | isa = PBXTargetDependency; 389 | target = 476206F11E9DD285003D62E1 /* TumblrLikeAnimView */; 390 | targetProxy = 476207171E9DD285003D62E1 /* PBXContainerItemProxy */; 391 | }; 392 | /* End PBXTargetDependency section */ 393 | 394 | /* Begin PBXVariantGroup section */ 395 | 476206FE1E9DD285003D62E1 /* Main.storyboard */ = { 396 | isa = PBXVariantGroup; 397 | children = ( 398 | 476206FF1E9DD285003D62E1 /* Base */, 399 | ); 400 | name = Main.storyboard; 401 | sourceTree = ""; 402 | }; 403 | 476207031E9DD285003D62E1 /* LaunchScreen.storyboard */ = { 404 | isa = PBXVariantGroup; 405 | children = ( 406 | 476207041E9DD285003D62E1 /* Base */, 407 | ); 408 | name = LaunchScreen.storyboard; 409 | sourceTree = ""; 410 | }; 411 | /* End PBXVariantGroup section */ 412 | 413 | /* Begin XCBuildConfiguration section */ 414 | 4762071D1E9DD285003D62E1 /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | ALWAYS_SEARCH_USER_PATHS = NO; 418 | CLANG_ANALYZER_NONNULL = YES; 419 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 420 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 421 | CLANG_CXX_LIBRARY = "libc++"; 422 | CLANG_ENABLE_MODULES = YES; 423 | CLANG_ENABLE_OBJC_ARC = YES; 424 | CLANG_WARN_BOOL_CONVERSION = YES; 425 | CLANG_WARN_CONSTANT_CONVERSION = YES; 426 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 427 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 428 | CLANG_WARN_EMPTY_BODY = YES; 429 | CLANG_WARN_ENUM_CONVERSION = YES; 430 | CLANG_WARN_INFINITE_RECURSION = YES; 431 | CLANG_WARN_INT_CONVERSION = YES; 432 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 433 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 434 | CLANG_WARN_UNREACHABLE_CODE = YES; 435 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 436 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 437 | COPY_PHASE_STRIP = NO; 438 | DEBUG_INFORMATION_FORMAT = dwarf; 439 | ENABLE_STRICT_OBJC_MSGSEND = YES; 440 | ENABLE_TESTABILITY = YES; 441 | GCC_C_LANGUAGE_STANDARD = gnu99; 442 | GCC_DYNAMIC_NO_PIC = NO; 443 | GCC_NO_COMMON_BLOCKS = YES; 444 | GCC_OPTIMIZATION_LEVEL = 0; 445 | GCC_PREPROCESSOR_DEFINITIONS = ( 446 | "DEBUG=1", 447 | "$(inherited)", 448 | ); 449 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 450 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 451 | GCC_WARN_UNDECLARED_SELECTOR = YES; 452 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 453 | GCC_WARN_UNUSED_FUNCTION = YES; 454 | GCC_WARN_UNUSED_VARIABLE = YES; 455 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 456 | MTL_ENABLE_DEBUG_INFO = YES; 457 | ONLY_ACTIVE_ARCH = YES; 458 | SDKROOT = iphoneos; 459 | TARGETED_DEVICE_FAMILY = "1,2"; 460 | }; 461 | name = Debug; 462 | }; 463 | 4762071E1E9DD285003D62E1 /* Release */ = { 464 | isa = XCBuildConfiguration; 465 | buildSettings = { 466 | ALWAYS_SEARCH_USER_PATHS = NO; 467 | CLANG_ANALYZER_NONNULL = YES; 468 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 469 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 470 | CLANG_CXX_LIBRARY = "libc++"; 471 | CLANG_ENABLE_MODULES = YES; 472 | CLANG_ENABLE_OBJC_ARC = YES; 473 | CLANG_WARN_BOOL_CONVERSION = YES; 474 | CLANG_WARN_CONSTANT_CONVERSION = YES; 475 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 476 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 477 | CLANG_WARN_EMPTY_BODY = YES; 478 | CLANG_WARN_ENUM_CONVERSION = YES; 479 | CLANG_WARN_INFINITE_RECURSION = YES; 480 | CLANG_WARN_INT_CONVERSION = YES; 481 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 482 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 483 | CLANG_WARN_UNREACHABLE_CODE = YES; 484 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 485 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 486 | COPY_PHASE_STRIP = NO; 487 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 488 | ENABLE_NS_ASSERTIONS = NO; 489 | ENABLE_STRICT_OBJC_MSGSEND = YES; 490 | GCC_C_LANGUAGE_STANDARD = gnu99; 491 | GCC_NO_COMMON_BLOCKS = YES; 492 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 493 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 494 | GCC_WARN_UNDECLARED_SELECTOR = YES; 495 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 496 | GCC_WARN_UNUSED_FUNCTION = YES; 497 | GCC_WARN_UNUSED_VARIABLE = YES; 498 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 499 | MTL_ENABLE_DEBUG_INFO = NO; 500 | SDKROOT = iphoneos; 501 | TARGETED_DEVICE_FAMILY = "1,2"; 502 | VALIDATE_PRODUCT = YES; 503 | }; 504 | name = Release; 505 | }; 506 | 476207201E9DD285003D62E1 /* Debug */ = { 507 | isa = XCBuildConfiguration; 508 | buildSettings = { 509 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 510 | DEVELOPMENT_TEAM = WTB2BKP7UZ; 511 | INFOPLIST_FILE = TumblrLikeAnimView/Info.plist; 512 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 513 | PRODUCT_BUNDLE_IDENTIFIER = HanJunqiang.TumblrLikeAnimView; 514 | PRODUCT_NAME = "$(TARGET_NAME)"; 515 | }; 516 | name = Debug; 517 | }; 518 | 476207211E9DD285003D62E1 /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 522 | DEVELOPMENT_TEAM = WTB2BKP7UZ; 523 | INFOPLIST_FILE = TumblrLikeAnimView/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 525 | PRODUCT_BUNDLE_IDENTIFIER = HanJunqiang.TumblrLikeAnimView; 526 | PRODUCT_NAME = "$(TARGET_NAME)"; 527 | }; 528 | name = Release; 529 | }; 530 | 476207231E9DD285003D62E1 /* Debug */ = { 531 | isa = XCBuildConfiguration; 532 | buildSettings = { 533 | BUNDLE_LOADER = "$(TEST_HOST)"; 534 | DEVELOPMENT_TEAM = WTB2BKP7UZ; 535 | INFOPLIST_FILE = TumblrLikeAnimViewTests/Info.plist; 536 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 537 | PRODUCT_BUNDLE_IDENTIFIER = HanJunqiang.TumblrLikeAnimViewTests; 538 | PRODUCT_NAME = "$(TARGET_NAME)"; 539 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TumblrLikeAnimView.app/TumblrLikeAnimView"; 540 | }; 541 | name = Debug; 542 | }; 543 | 476207241E9DD285003D62E1 /* Release */ = { 544 | isa = XCBuildConfiguration; 545 | buildSettings = { 546 | BUNDLE_LOADER = "$(TEST_HOST)"; 547 | DEVELOPMENT_TEAM = WTB2BKP7UZ; 548 | INFOPLIST_FILE = TumblrLikeAnimViewTests/Info.plist; 549 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 550 | PRODUCT_BUNDLE_IDENTIFIER = HanJunqiang.TumblrLikeAnimViewTests; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TumblrLikeAnimView.app/TumblrLikeAnimView"; 553 | }; 554 | name = Release; 555 | }; 556 | 476207261E9DD285003D62E1 /* Debug */ = { 557 | isa = XCBuildConfiguration; 558 | buildSettings = { 559 | DEVELOPMENT_TEAM = WTB2BKP7UZ; 560 | INFOPLIST_FILE = TumblrLikeAnimViewUITests/Info.plist; 561 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 562 | PRODUCT_BUNDLE_IDENTIFIER = HanJunqiang.TumblrLikeAnimViewUITests; 563 | PRODUCT_NAME = "$(TARGET_NAME)"; 564 | TEST_TARGET_NAME = TumblrLikeAnimView; 565 | }; 566 | name = Debug; 567 | }; 568 | 476207271E9DD285003D62E1 /* Release */ = { 569 | isa = XCBuildConfiguration; 570 | buildSettings = { 571 | DEVELOPMENT_TEAM = WTB2BKP7UZ; 572 | INFOPLIST_FILE = TumblrLikeAnimViewUITests/Info.plist; 573 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 574 | PRODUCT_BUNDLE_IDENTIFIER = HanJunqiang.TumblrLikeAnimViewUITests; 575 | PRODUCT_NAME = "$(TARGET_NAME)"; 576 | TEST_TARGET_NAME = TumblrLikeAnimView; 577 | }; 578 | name = Release; 579 | }; 580 | /* End XCBuildConfiguration section */ 581 | 582 | /* Begin XCConfigurationList section */ 583 | 476206ED1E9DD285003D62E1 /* Build configuration list for PBXProject "TumblrLikeAnimView" */ = { 584 | isa = XCConfigurationList; 585 | buildConfigurations = ( 586 | 4762071D1E9DD285003D62E1 /* Debug */, 587 | 4762071E1E9DD285003D62E1 /* Release */, 588 | ); 589 | defaultConfigurationIsVisible = 0; 590 | defaultConfigurationName = Release; 591 | }; 592 | 4762071F1E9DD285003D62E1 /* Build configuration list for PBXNativeTarget "TumblrLikeAnimView" */ = { 593 | isa = XCConfigurationList; 594 | buildConfigurations = ( 595 | 476207201E9DD285003D62E1 /* Debug */, 596 | 476207211E9DD285003D62E1 /* Release */, 597 | ); 598 | defaultConfigurationIsVisible = 0; 599 | }; 600 | 476207221E9DD285003D62E1 /* Build configuration list for PBXNativeTarget "TumblrLikeAnimViewTests" */ = { 601 | isa = XCConfigurationList; 602 | buildConfigurations = ( 603 | 476207231E9DD285003D62E1 /* Debug */, 604 | 476207241E9DD285003D62E1 /* Release */, 605 | ); 606 | defaultConfigurationIsVisible = 0; 607 | }; 608 | 476207251E9DD285003D62E1 /* Build configuration list for PBXNativeTarget "TumblrLikeAnimViewUITests" */ = { 609 | isa = XCConfigurationList; 610 | buildConfigurations = ( 611 | 476207261E9DD285003D62E1 /* Debug */, 612 | 476207271E9DD285003D62E1 /* Release */, 613 | ); 614 | defaultConfigurationIsVisible = 0; 615 | }; 616 | /* End XCConfigurationList section */ 617 | }; 618 | rootObject = 476206EA1E9DD285003D62E1 /* Project object */; 619 | } 620 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TumblrLikeAnimView 4 | // 5 | // Created by 韩俊强 on 2017/4/12. 6 | // Copyright © 2017年 HaRi. 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 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // TumblrLikeAnimView 4 | // 5 | // Created by 韩俊强 on 2017/4/12. 6 | // Copyright © 2017年 HaRi. 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 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/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 | "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 | } -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/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 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/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 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/DataSource/big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/TumblrLikeAnimView/TumblrLikeAnimView/DataSource/big.png -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like@3x.png -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken1@2x.png -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken2@2x.png -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken3@2x.png -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_like_broken4@2x.png -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_likeon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/TumblrLikeAnimView/TumblrLikeAnimView/DataSource/icon_likeon@3x.png -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/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 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/TOOL/UIView+Frame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Frame.h 3 | // Demo-WeChat 4 | // 5 | // Created by Sun on 15/10/13. 6 | // Copyright (c) 2015年 Sun. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Frame) 12 | 13 | /** uiview的左边界 */ 14 | @property(nonatomic,assign) CGFloat left; 15 | /** uiview的右边界 */ 16 | @property(nonatomic,assign) CGFloat right; 17 | /** uiview的上边界 */ 18 | @property(nonatomic,assign) CGFloat top; 19 | /** uiview的下边界 */ 20 | @property(nonatomic,assign) CGFloat bottom; 21 | 22 | @property(nonatomic,assign) CGFloat width; 23 | 24 | @property(nonatomic,assign) CGFloat height; 25 | 26 | @property(nonatomic,assign) CGFloat centerX; 27 | 28 | @property(nonatomic,assign) CGFloat centerY; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/TOOL/UIView+Frame.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Frame.m 3 | // Demo-WeChat 4 | // 5 | // Created by Sun on 15/10/13. 6 | // Copyright (c) 2015年 Sun. All rights reserved. 7 | // 8 | 9 | #import "UIView+Frame.h" 10 | 11 | @implementation UIView (Frame) 12 | 13 | -(CGFloat)left{ 14 | return self.frame.origin.x; 15 | } 16 | 17 | -(void)setLeft:(CGFloat)left{ 18 | CGRect frame = self.frame; 19 | frame.origin.x = left; 20 | self.frame = frame; 21 | } 22 | 23 | -(CGFloat)right{ 24 | return self.frame.origin.x + self.frame.size.width; 25 | } 26 | 27 | -(void)setRight:(CGFloat)right{ 28 | CGRect frame = self.frame; 29 | frame.origin.x = right - frame.size.width; 30 | self.frame = frame; 31 | } 32 | 33 | -(CGFloat)top{ 34 | return self.frame.origin.y; 35 | } 36 | 37 | -(void)setTop:(CGFloat)top{ 38 | CGRect frame = self.frame; 39 | frame.origin.y = top; 40 | self.frame = frame; 41 | } 42 | 43 | -(CGFloat)bottom{ 44 | return self.frame.origin.y + self.frame.size.height; 45 | } 46 | 47 | -(void)setBottom:(CGFloat)bottom{ 48 | CGRect frame = self.frame; 49 | frame.origin.y = bottom - frame.size.height; 50 | self.frame = frame; 51 | } 52 | 53 | -(CGFloat)width{ 54 | return self.frame.size.width; 55 | } 56 | 57 | -(void)setWidth:(CGFloat)width{ 58 | CGRect frame = self.frame; 59 | frame.size.width = width; 60 | self.frame = frame; 61 | } 62 | 63 | -(CGFloat)height{ 64 | return self.frame.size.height; 65 | } 66 | 67 | -(void)setHeight:(CGFloat)height{ 68 | CGRect frame = self.frame; 69 | frame.size.height = height; 70 | self.frame = frame; 71 | } 72 | 73 | -(CGFloat)centerX{ 74 | return self.center.x; 75 | } 76 | 77 | -(void)setCenterX:(CGFloat)centerX{ 78 | self.center = CGPointMake(centerX, self.center.y); 79 | } 80 | 81 | -(CGFloat)centerY{ 82 | return self.center.y; 83 | } 84 | 85 | -(void)setCenterY:(CGFloat)centerY{ 86 | self.center = CGPointMake(self.center.x, centerY); 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/TableViewDemo/MyTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewCell.h 3 | 4 | // 5 | // Created by 韩俊强 on 2017/4/11. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyTableViewCell : UITableViewCell 12 | 13 | @property (nonatomic, strong) void (^LoveButtonClick)(); 14 | 15 | @property (nonatomic, strong) UIButton *praiseBtn; 16 | 17 | @property (nonatomic, strong) UIButton *coverBtn; 18 | 19 | @property (nonatomic, strong) UIImageView *cancelPraiseImg; 20 | 21 | @property (nonatomic, strong) id objc; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/TableViewDemo/MyTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewCell.m 3 | 4 | // 5 | // Created by 韩俊强 on 2017/4/11. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import "MyTableViewCell.h" 10 | #import "UIView+Frame.h" 11 | 12 | #define KPraiseBtnWH 30 13 | #define KToBrokenHeartWH 120/195 14 | 15 | @implementation MyTableViewCell 16 | 17 | - (void)awakeFromNib { 18 | [super awakeFromNib]; 19 | // Initialization code 20 | } 21 | 22 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 23 | { 24 | if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) 25 | { 26 | [self.contentView addSubview:self.praiseBtn]; 27 | [self.contentView addSubview:self.coverBtn]; 28 | [self.contentView insertSubview:self.coverBtn belowSubview:self.praiseBtn]; 29 | [self.contentView addSubview:self.cancelPraiseImg]; 30 | [self.praiseBtn addTarget:self action:@selector(loveBtnAction:) forControlEvents:UIControlEventTouchUpInside]; 31 | } 32 | return self; 33 | } 34 | 35 | - (void)loveBtnAction:(UIButton *)sender 36 | { 37 | if (self.LoveButtonClick) { 38 | self.LoveButtonClick(); 39 | } 40 | } 41 | 42 | - (void)setObjc:(id)objc 43 | { 44 | 45 | } 46 | 47 | - (UIButton*)praiseBtn 48 | { 49 | if (!_praiseBtn) { 50 | _praiseBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 51 | _praiseBtn.frame = CGRectMake(100, 60, KPraiseBtnWH, KPraiseBtnWH); 52 | [_praiseBtn setImage:[UIImage imageNamed:@"icon_like"] forState:UIControlStateNormal]; 53 | [_praiseBtn setImage:[UIImage imageNamed:@"icon_likeon"] forState:UIControlStateSelected]; 54 | } 55 | return _praiseBtn; 56 | } 57 | 58 | - (UIButton*)coverBtn 59 | { 60 | if (!_coverBtn) { 61 | _coverBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 62 | _coverBtn.frame = _praiseBtn.frame; 63 | _coverBtn.alpha = 0; 64 | [_coverBtn setImage:[UIImage imageNamed:@"big"] forState:UIControlStateSelected]; 65 | [_coverBtn setImage:[UIImage imageNamed:@"big"] forState:UIControlStateNormal]; 66 | 67 | _cancelPraiseImg = [[UIImageView alloc]initWithFrame:CGRectMake(self.praiseBtn.frame.origin.x-15, self.praiseBtn.frame.origin.y-40, KPraiseBtnWH*1.5, KPraiseBtnWH*1.5*KToBrokenHeartWH)]; 68 | _cancelPraiseImg.hidden = YES; 69 | _cancelPraiseImg.centerX = _praiseBtn.centerX; 70 | } 71 | return _coverBtn; 72 | 73 | } 74 | 75 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 76 | [super setSelected:selected animated:animated]; 77 | 78 | // Configure the view for the selected state 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/TableViewDemo/MyTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewController.h 3 | 4 | // 5 | // Created by 韩俊强 on 2017/4/11. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyTableViewController : UITableViewController 12 | 13 | 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/TableViewDemo/MyTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewController.m 3 | 4 | // 5 | // Created by 韩俊强 on 2017/4/11. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import "MyTableViewController.h" 10 | #import "MyTableViewCell.h" 11 | #import "UIView+Frame.h" 12 | 13 | #define KPraiseBtnWH 30 14 | #define KBorkenTime 0.8f 15 | #define KToBrokenHeartWH 120/195 16 | 17 | @interface MyTableViewController () 18 | 19 | @end 20 | 21 | @implementation MyTableViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | 26 | self.tableView.delegate = self; 27 | self.tableView.dataSource = self; 28 | [self.tableView registerClass:[MyTableViewCell class] forCellReuseIdentifier:@"myCell"]; 29 | } 30 | 31 | - (void)didReceiveMemoryWarning { 32 | [super didReceiveMemoryWarning]; 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | #pragma mark - Table view data source 37 | 38 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 39 | 40 | return 1; 41 | } 42 | 43 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 44 | 45 | return 10; 46 | } 47 | 48 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 49 | 50 | MyTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"myCell" forIndexPath:indexPath]; 51 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 52 | if (!cell) { 53 | cell = [[MyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"myCell"]; 54 | } 55 | cell.objc = nil; 56 | 57 | cell.LoveButtonClick = ^(){ 58 | [self loveButtonBy:indexPath]; 59 | }; 60 | 61 | return cell; 62 | } 63 | 64 | - (void)loveButtonBy:(NSIndexPath*)indexPath 65 | { 66 | [self playAnimation:indexPath]; 67 | MyTableViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:indexPath.row inSection:indexPath.section]]; 68 | cell.praiseBtn.userInteractionEnabled = NO; 69 | cell.praiseBtn.selected = !cell.praiseBtn.selected; 70 | } 71 | 72 | -(void)playAnimation:(NSIndexPath*)indexpath{ 73 | MyTableViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:indexpath.row inSection:indexpath.section]]; 74 | 75 | if (!cell.praiseBtn.selected) { 76 | cell.coverBtn.alpha = 1; 77 | [UIView animateWithDuration:1.0f animations:^{ 78 | cell.coverBtn.frame = CGRectMake(cell.praiseBtn.frame.origin.x, cell.praiseBtn.frame.origin.y-70, KPraiseBtnWH*2, KPraiseBtnWH*2); 79 | 80 | CAKeyframeAnimation *anima = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation"]; 81 | NSValue *value1 = [NSNumber numberWithFloat:-M_PI/180*5]; 82 | NSValue *value2 = [NSNumber numberWithFloat:M_PI/180*5]; 83 | NSValue *value3 = [NSNumber numberWithFloat:-M_PI/180*5]; 84 | anima.values = @[value1,value2,value3]; 85 | anima.repeatCount = MAXFLOAT; 86 | [cell.coverBtn.layer addAnimation:anima forKey:nil]; 87 | 88 | cell.coverBtn.alpha = 0; 89 | cell.coverBtn.centerX = cell.praiseBtn.centerX; 90 | } completion:^(BOOL finished) { 91 | cell.coverBtn.frame = cell.praiseBtn.frame; 92 | cell.praiseBtn.userInteractionEnabled = YES; 93 | }]; 94 | } else { 95 | cell.cancelPraiseImg.hidden = NO; 96 | NSArray *imgArr = [NSArray arrayWithObjects:[UIImage imageNamed:@"icon_like_broken1"],[UIImage imageNamed:@"icon_like_broken2"],[UIImage imageNamed:@"icon_like_broken3"],[UIImage imageNamed:@"icon_like_broken4"], nil]; 97 | cell.cancelPraiseImg.animationImages = imgArr; 98 | cell.cancelPraiseImg.animationDuration = KBorkenTime; 99 | cell.cancelPraiseImg.animationRepeatCount = 1; 100 | [cell.cancelPraiseImg startAnimating]; 101 | 102 | [UIView animateWithDuration:KBorkenTime animations:^{ 103 | cell.cancelPraiseImg.frame = CGRectMake(cell.praiseBtn.frame.origin.x-15, cell.praiseBtn.frame.origin.y, KPraiseBtnWH*2, KPraiseBtnWH*2*KToBrokenHeartWH); 104 | cell.cancelPraiseImg.alpha = 0; 105 | }completion:^(BOOL finished) { 106 | cell.cancelPraiseImg.frame = CGRectMake(cell.praiseBtn.frame.origin.x-15, cell.praiseBtn.frame.origin.y-40, KPraiseBtnWH*2, KPraiseBtnWH*2*KToBrokenHeartWH); 107 | cell.cancelPraiseImg.alpha = 1; 108 | cell.praiseBtn.userInteractionEnabled = YES; 109 | }]; 110 | } 111 | } 112 | 113 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 114 | { 115 | return 86; 116 | } 117 | 118 | 119 | /* 120 | // Override to support conditional editing of the table view. 121 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { 122 | // Return NO if you do not want the specified item to be editable. 123 | return YES; 124 | } 125 | */ 126 | 127 | /* 128 | // Override to support editing the table view. 129 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { 130 | if (editingStyle == UITableViewCellEditingStyleDelete) { 131 | // Delete the row from the data source 132 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; 133 | } else if (editingStyle == UITableViewCellEditingStyleInsert) { 134 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view 135 | } 136 | } 137 | */ 138 | 139 | /* 140 | // Override to support rearranging the table view. 141 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { 142 | } 143 | */ 144 | 145 | /* 146 | // Override to support conditional rearranging of the table view. 147 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { 148 | // Return NO if you do not want the item to be re-orderable. 149 | return YES; 150 | } 151 | */ 152 | 153 | /* 154 | #pragma mark - Navigation 155 | 156 | // In a storyboard-based application, you will often want to do a little preparation before navigation 157 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 158 | // Get the new view controller using [segue destinationViewController]. 159 | // Pass the selected object to the new view controller. 160 | } 161 | */ 162 | 163 | @end 164 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TumblrLikeAnimView 4 | // 5 | // Created by 韩俊强 on 2017/4/12. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // TumblrLikeAnimView 4 | // 5 | // Created by 韩俊强 on 2017/4/12. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIView+Frame.h" 11 | 12 | #define KKPraiseBtnWH 30 13 | #define KKBorkenTime 0.8f 14 | #define KKToBrokenHeartWH 120/195 15 | 16 | @interface ViewController () 17 | { 18 | UIButton *_praiseBtn; 19 | UIButton *_coverBtn; 20 | UIImageView *_cancelPraiseImg; 21 | } 22 | 23 | @end 24 | 25 | @implementation ViewController 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view, typically from a nib. 30 | 31 | [self setupUI]; 32 | } 33 | 34 | - (void)setupUI 35 | { 36 | // 点击的btn 37 | UIButton *praiseBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 38 | praiseBtn.frame = CGRectMake(100, 200, KKPraiseBtnWH, KKPraiseBtnWH); 39 | [praiseBtn setImage:[UIImage imageNamed:@"icon_like"] forState:UIControlStateNormal]; 40 | [praiseBtn setImage:[UIImage imageNamed:@"icon_likeon"] forState:UIControlStateSelected]; 41 | [self.view addSubview:praiseBtn]; 42 | [praiseBtn addTarget:self action:@selector(clickTheBtn:) forControlEvents:UIControlEventTouchUpInside]; 43 | _praiseBtn = praiseBtn; 44 | 45 | // 放大后的btn 46 | _coverBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 47 | _coverBtn.frame = praiseBtn.frame; 48 | _coverBtn.alpha = 0; 49 | [_coverBtn setImage:[UIImage imageNamed:@"big"] forState:UIControlStateSelected]; 50 | [_coverBtn setImage:[UIImage imageNamed:@"big"] forState:UIControlStateNormal]; 51 | [self.view insertSubview:_coverBtn belowSubview:praiseBtn]; 52 | _cancelPraiseImg = [[UIImageView alloc]initWithFrame:CGRectMake(80, 150, KKPraiseBtnWH*2, KKPraiseBtnWH*2*KKToBrokenHeartWH)]; 53 | _cancelPraiseImg.hidden = YES; 54 | _cancelPraiseImg.centerX = _praiseBtn.centerX; 55 | [self.view addSubview:_cancelPraiseImg]; 56 | } 57 | 58 | -(void)clickTheBtn:(UIButton *)btn 59 | { 60 | [self playAnimation]; 61 | btn.userInteractionEnabled = NO; 62 | btn.selected = !btn.selected; 63 | } 64 | -(void)playAnimation{ 65 | if (!_praiseBtn.selected) { 66 | _coverBtn.alpha = 1; 67 | [UIView animateWithDuration:1.0f animations:^{ 68 | _coverBtn.frame = CGRectMake(80, 100, KKPraiseBtnWH*2, KKPraiseBtnWH*2); 69 | 70 | CAKeyframeAnimation *anima = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation"]; 71 | NSValue *value1 = [NSNumber numberWithFloat:-M_PI/180*5]; 72 | NSValue *value2 = [NSNumber numberWithFloat:M_PI/180*5]; 73 | NSValue *value3 = [NSNumber numberWithFloat:-M_PI/180*5]; 74 | anima.values = @[value1,value2,value3]; 75 | anima.repeatCount = MAXFLOAT; 76 | [_coverBtn.layer addAnimation:anima forKey:nil]; 77 | 78 | _coverBtn.alpha = 0; 79 | _coverBtn.centerX = _praiseBtn.centerX; 80 | } completion:^(BOOL finished) { 81 | _coverBtn.frame = _praiseBtn.frame; 82 | _praiseBtn.userInteractionEnabled = YES; 83 | }]; 84 | } else { 85 | _cancelPraiseImg.hidden = NO; 86 | NSArray *imgArr = [NSArray arrayWithObjects:[UIImage imageNamed:@"icon_like_broken1"],[UIImage imageNamed:@"icon_like_broken2"],[UIImage imageNamed:@"icon_like_broken3"],[UIImage imageNamed:@"icon_like_broken4"], nil]; 87 | _cancelPraiseImg.animationImages = imgArr; 88 | _cancelPraiseImg.animationDuration = KKBorkenTime; 89 | _cancelPraiseImg.animationRepeatCount = 1; 90 | [_cancelPraiseImg startAnimating]; 91 | 92 | [UIView animateWithDuration:KKBorkenTime animations:^{ 93 | _cancelPraiseImg.frame = CGRectMake(80, 200, KKPraiseBtnWH*2, KKPraiseBtnWH*2*KKToBrokenHeartWH); 94 | _cancelPraiseImg.alpha = 0; 95 | }completion:^(BOOL finished) { 96 | _cancelPraiseImg.frame = CGRectMake(80, 150, KKPraiseBtnWH*2, KKPraiseBtnWH*2*KKToBrokenHeartWH); 97 | _cancelPraiseImg.alpha = 1; 98 | _praiseBtn.userInteractionEnabled = YES; 99 | }]; 100 | } 101 | } 102 | 103 | 104 | 105 | - (void)didReceiveMemoryWarning { 106 | [super didReceiveMemoryWarning]; 107 | // Dispose of any resources that can be recreated. 108 | } 109 | 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TumblrLikeAnimView 4 | // 5 | // Created by 韩俊强 on 2017/4/12. 6 | // Copyright © 2017年 HaRi. 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 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimViewTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimViewTests/TumblrLikeAnimViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TumblrLikeAnimViewTests.m 3 | // TumblrLikeAnimViewTests 4 | // 5 | // Created by 韩俊强 on 2017/4/12. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TumblrLikeAnimViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation TumblrLikeAnimViewTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimViewUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TumblrLikeAnimView/TumblrLikeAnimViewUITests/TumblrLikeAnimViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TumblrLikeAnimViewUITests.m 3 | // TumblrLikeAnimViewUITests 4 | // 5 | // Created by 韩俊强 on 2017/4/12. 6 | // Copyright © 2017年 HaRi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TumblrLikeAnimViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation TumblrLikeAnimViewUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/demo.gif -------------------------------------------------------------------------------- /demo2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaohange/TumblrLikeAnimView/b9be233e8f553a857fd9695ec949a4dfdc1b0988/demo2.gif --------------------------------------------------------------------------------