├── README.md ├── TumblrLikeMenu.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── TumblrLikeMenu.xccheckout │ └── xcuserdata │ │ ├── Chandler.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings │ │ └── hpcc.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ ├── Chandler.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── TumblrLikeMenu.xcscheme │ │ └── xcschememanagement.plist │ └── hpcc.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── TumblrLikeMenu.xcscheme │ └── xcschememanagement.plist ├── TumblrLikeMenu ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── Main_iPad.storyboard │ └── Main_iPhone.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── Images │ ├── Facebook.png │ ├── Facebook@2x.png │ ├── Google+.png │ ├── Google+@2x.png │ ├── LinkedIn.png │ ├── LinkedIn@2x.png │ ├── Tumblr.png │ ├── Tumblr@2x.png │ ├── Twitter.png │ ├── Twitter@2x.png │ ├── Youtube.png │ └── Youtube@2x.png ├── TumblrLikeMenu-Info.plist ├── TumblrLikeMenu-Prefix.pch ├── TumblrLikeMenu │ ├── TumblrLikeMenu.h │ ├── TumblrLikeMenu.m │ ├── TumblrLikeMenuItem.h │ ├── TumblrLikeMenuItem.m │ ├── UIView+CommonAnimation.h │ └── UIView+CommonAnimation.m ├── ViewController.h ├── ViewController.m ├── en.lproj │ └── InfoPlist.strings └── main.m └── TumblrLikeMenuTests ├── TumblrLikeMenuTests-Info.plist ├── TumblrLikeMenuTests.m └── en.lproj └── InfoPlist.strings /README.md: -------------------------------------------------------------------------------- 1 | TumblrLikeMenu 2 | 3 | ************** 4 | 5 | ### Tumblr Menu using CAAnimation 6 | 7 | **How to:** 8 | 9 | First, setup the submenus: 10 | 11 | TumblrLikeMenuItem *menuItem0 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Twitter"] 12 | highlightedImage:[UIImage imageNamed:@"Twitter"] 13 | text:@"Twitter"]; 14 | TumblrLikeMenuItem *menuItem1 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Facebook"] 15 | highlightedImage:[UIImage imageNamed:@"Facebook"] 16 | text:@"Facebook"]; 17 | TumblrLikeMenuItem *menuItem2 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Youtube"] 18 | highlightedImage:[UIImage imageNamed:@"Youtube"] 19 | text:@"Youtube"]; 20 | TumblrLikeMenuItem *menuItem3 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Google+"] 21 | highlightedImage:[UIImage imageNamed:@"Google+"] 22 | text:@"Google+"]; 23 | TumblrLikeMenuItem *menuItem4 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Tumblr"] 24 | highlightedImage:[UIImage imageNamed:@"Tumblr"] 25 | text:@"Tumblr"]; 26 | TumblrLikeMenuItem *menuItem5 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"LinkedIn"] 27 | highlightedImage:[UIImage imageNamed:@"LinkedIn"] 28 | text:@"LinkedIn"]; 29 | 30 | NSArray *subMenus = @[menuItem0, menuItem1, menuItem2, menuItem3, menuItem4, menuItem5]; 31 | 32 | Second, create the menu: 33 | 34 | TumblrLikeMenu *menu = [[TumblrLikeMenu alloc] initWithFrame:self.view.bounds 35 | subMenus:subMenus 36 | tip:@"Nevermind"]; 37 | menu.selectBlock = ^(NSUInteger index) { 38 | NSLog(@"item %ld index selected", index); 39 | }; 40 | 41 | Last, show: 42 | 43 | [menu show]; 44 | 45 | 46 | 47 | **A Quick Peek** 48 | 49 | ![screenshots](https://f.cloud.github.com/assets/4316898/1861424/2ae670e6-77c2-11e3-8438-06c660954d51.gif) 50 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CB1EDD371861C61F0014C01E /* TumblrLikeMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = CB1EDD361861C61F0014C01E /* TumblrLikeMenuItem.m */; }; 11 | CB314BEA18793FD800C07F6E /* Google+@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BE418793FD700C07F6E /* Google+@2x.png */; }; 12 | CB314BEB18793FD800C07F6E /* Facebook@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BE518793FD700C07F6E /* Facebook@2x.png */; }; 13 | CB314BEC18793FD800C07F6E /* LinkedIn@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BE618793FD700C07F6E /* LinkedIn@2x.png */; }; 14 | CB314BED18793FD800C07F6E /* Youtube@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BE718793FD700C07F6E /* Youtube@2x.png */; }; 15 | CB314BEE18793FD800C07F6E /* Tumblr@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BE818793FD700C07F6E /* Tumblr@2x.png */; }; 16 | CB314BEF18793FD800C07F6E /* Twitter@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BE918793FD800C07F6E /* Twitter@2x.png */; }; 17 | CB314BF11879403600C07F6E /* Google+.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BF01879403600C07F6E /* Google+.png */; }; 18 | CB314BF31879403C00C07F6E /* Facebook.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BF21879403C00C07F6E /* Facebook.png */; }; 19 | CB314BF71879404800C07F6E /* Youtube.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BF61879404800C07F6E /* Youtube.png */; }; 20 | CB314BF91879405000C07F6E /* Tumblr.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BF81879405000C07F6E /* Tumblr.png */; }; 21 | CB314BFB1879405500C07F6E /* Twitter.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BFA1879405500C07F6E /* Twitter.png */; }; 22 | CB314BFD1879433E00C07F6E /* LinkedIn.png in Resources */ = {isa = PBXBuildFile; fileRef = CB314BFC1879433E00C07F6E /* LinkedIn.png */; }; 23 | CB42CE07185B1F7F0068FA33 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB42CE06185B1F7F0068FA33 /* Foundation.framework */; }; 24 | CB42CE09185B1F7F0068FA33 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB42CE08185B1F7F0068FA33 /* CoreGraphics.framework */; }; 25 | CB42CE0B185B1F7F0068FA33 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB42CE0A185B1F7F0068FA33 /* UIKit.framework */; }; 26 | CB42CE11185B1F7F0068FA33 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CB42CE0F185B1F7F0068FA33 /* InfoPlist.strings */; }; 27 | CB42CE13185B1F7F0068FA33 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CB42CE12185B1F7F0068FA33 /* main.m */; }; 28 | CB42CE17185B1F7F0068FA33 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CB42CE16185B1F7F0068FA33 /* AppDelegate.m */; }; 29 | CB42CE1A185B1F7F0068FA33 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CB42CE18185B1F7F0068FA33 /* Main_iPhone.storyboard */; }; 30 | CB42CE1D185B1F7F0068FA33 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CB42CE1B185B1F7F0068FA33 /* Main_iPad.storyboard */; }; 31 | CB42CE20185B1F7F0068FA33 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CB42CE1F185B1F7F0068FA33 /* ViewController.m */; }; 32 | CB42CE22185B1F7F0068FA33 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CB42CE21185B1F7F0068FA33 /* Images.xcassets */; }; 33 | CB42CE29185B1F800068FA33 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB42CE28185B1F800068FA33 /* XCTest.framework */; }; 34 | CB42CE2A185B1F800068FA33 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB42CE06185B1F7F0068FA33 /* Foundation.framework */; }; 35 | CB42CE2B185B1F800068FA33 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB42CE0A185B1F7F0068FA33 /* UIKit.framework */; }; 36 | CB42CE33185B1F800068FA33 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CB42CE31185B1F800068FA33 /* InfoPlist.strings */; }; 37 | CB42CE35185B1F800068FA33 /* TumblrLikeMenuTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CB42CE34185B1F800068FA33 /* TumblrLikeMenuTests.m */; }; 38 | CBC604F1185E190300B957A5 /* TumblrLikeMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = CBC604F0185E190300B957A5 /* TumblrLikeMenu.m */; }; 39 | EF2E898818628DEF009C1A86 /* UIView+CommonAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = EF2E898718628DEF009C1A86 /* UIView+CommonAnimation.m */; }; 40 | /* End PBXBuildFile section */ 41 | 42 | /* Begin PBXContainerItemProxy section */ 43 | CB42CE2C185B1F800068FA33 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = CB42CDFB185B1F7F0068FA33 /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = CB42CE02185B1F7F0068FA33; 48 | remoteInfo = TumblrLikeMenu; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | CB1EDD351861C61F0014C01E /* TumblrLikeMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TumblrLikeMenuItem.h; sourceTree = ""; }; 54 | CB1EDD361861C61F0014C01E /* TumblrLikeMenuItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TumblrLikeMenuItem.m; sourceTree = ""; }; 55 | CB314BE418793FD700C07F6E /* Google+@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Google+@2x.png"; sourceTree = ""; }; 56 | CB314BE518793FD700C07F6E /* Facebook@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Facebook@2x.png"; sourceTree = ""; }; 57 | CB314BE618793FD700C07F6E /* LinkedIn@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "LinkedIn@2x.png"; sourceTree = ""; }; 58 | CB314BE718793FD700C07F6E /* Youtube@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Youtube@2x.png"; sourceTree = ""; }; 59 | CB314BE818793FD700C07F6E /* Tumblr@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Tumblr@2x.png"; sourceTree = ""; }; 60 | CB314BE918793FD800C07F6E /* Twitter@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Twitter@2x.png"; sourceTree = ""; }; 61 | CB314BF01879403600C07F6E /* Google+.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Google+.png"; sourceTree = ""; }; 62 | CB314BF21879403C00C07F6E /* Facebook.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Facebook.png; sourceTree = ""; }; 63 | CB314BF61879404800C07F6E /* Youtube.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Youtube.png; sourceTree = ""; }; 64 | CB314BF81879405000C07F6E /* Tumblr.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Tumblr.png; sourceTree = ""; }; 65 | CB314BFA1879405500C07F6E /* Twitter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Twitter.png; sourceTree = ""; }; 66 | CB314BFC1879433E00C07F6E /* LinkedIn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = LinkedIn.png; sourceTree = ""; }; 67 | CB42CE03185B1F7F0068FA33 /* TumblrLikeMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TumblrLikeMenu.app; sourceTree = BUILT_PRODUCTS_DIR; }; 68 | CB42CE06185B1F7F0068FA33 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 69 | CB42CE08185B1F7F0068FA33 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 70 | CB42CE0A185B1F7F0068FA33 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 71 | CB42CE0E185B1F7F0068FA33 /* TumblrLikeMenu-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TumblrLikeMenu-Info.plist"; sourceTree = ""; }; 72 | CB42CE10185B1F7F0068FA33 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 73 | CB42CE12185B1F7F0068FA33 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 74 | CB42CE14185B1F7F0068FA33 /* TumblrLikeMenu-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TumblrLikeMenu-Prefix.pch"; sourceTree = ""; }; 75 | CB42CE15185B1F7F0068FA33 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 76 | CB42CE16185B1F7F0068FA33 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 77 | CB42CE19185B1F7F0068FA33 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = ""; }; 78 | CB42CE1C185B1F7F0068FA33 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = ""; }; 79 | CB42CE1E185B1F7F0068FA33 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 80 | CB42CE1F185B1F7F0068FA33 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 81 | CB42CE21185B1F7F0068FA33 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 82 | CB42CE27185B1F800068FA33 /* TumblrLikeMenuTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TumblrLikeMenuTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | CB42CE28185B1F800068FA33 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 84 | CB42CE30185B1F800068FA33 /* TumblrLikeMenuTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TumblrLikeMenuTests-Info.plist"; sourceTree = ""; }; 85 | CB42CE32185B1F800068FA33 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 86 | CB42CE34185B1F800068FA33 /* TumblrLikeMenuTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TumblrLikeMenuTests.m; sourceTree = ""; }; 87 | CBC604EF185E190300B957A5 /* TumblrLikeMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TumblrLikeMenu.h; sourceTree = ""; }; 88 | CBC604F0185E190300B957A5 /* TumblrLikeMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TumblrLikeMenu.m; sourceTree = ""; }; 89 | EF2E898618628DEF009C1A86 /* UIView+CommonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+CommonAnimation.h"; sourceTree = ""; }; 90 | EF2E898718628DEF009C1A86 /* UIView+CommonAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+CommonAnimation.m"; sourceTree = ""; }; 91 | /* End PBXFileReference section */ 92 | 93 | /* Begin PBXFrameworksBuildPhase section */ 94 | CB42CE00185B1F7F0068FA33 /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | CB42CE09185B1F7F0068FA33 /* CoreGraphics.framework in Frameworks */, 99 | CB42CE0B185B1F7F0068FA33 /* UIKit.framework in Frameworks */, 100 | CB42CE07185B1F7F0068FA33 /* Foundation.framework in Frameworks */, 101 | ); 102 | runOnlyForDeploymentPostprocessing = 0; 103 | }; 104 | CB42CE24185B1F800068FA33 /* Frameworks */ = { 105 | isa = PBXFrameworksBuildPhase; 106 | buildActionMask = 2147483647; 107 | files = ( 108 | CB42CE29185B1F800068FA33 /* XCTest.framework in Frameworks */, 109 | CB42CE2B185B1F800068FA33 /* UIKit.framework in Frameworks */, 110 | CB42CE2A185B1F800068FA33 /* Foundation.framework in Frameworks */, 111 | ); 112 | runOnlyForDeploymentPostprocessing = 0; 113 | }; 114 | /* End PBXFrameworksBuildPhase section */ 115 | 116 | /* Begin PBXGroup section */ 117 | CB1EDD381861C9C10014C01E /* Images */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | CB314BE418793FD700C07F6E /* Google+@2x.png */, 121 | CB314BF01879403600C07F6E /* Google+.png */, 122 | CB314BE518793FD700C07F6E /* Facebook@2x.png */, 123 | CB314BF21879403C00C07F6E /* Facebook.png */, 124 | CB314BE618793FD700C07F6E /* LinkedIn@2x.png */, 125 | CB314BFC1879433E00C07F6E /* LinkedIn.png */, 126 | CB314BE718793FD700C07F6E /* Youtube@2x.png */, 127 | CB314BF61879404800C07F6E /* Youtube.png */, 128 | CB314BE818793FD700C07F6E /* Tumblr@2x.png */, 129 | CB314BF81879405000C07F6E /* Tumblr.png */, 130 | CB314BE918793FD800C07F6E /* Twitter@2x.png */, 131 | CB314BFA1879405500C07F6E /* Twitter.png */, 132 | ); 133 | path = Images; 134 | sourceTree = ""; 135 | }; 136 | CB42CDFA185B1F7F0068FA33 = { 137 | isa = PBXGroup; 138 | children = ( 139 | CB42CE0C185B1F7F0068FA33 /* TumblrLikeMenu */, 140 | CB42CE2E185B1F800068FA33 /* TumblrLikeMenuTests */, 141 | CB42CE05185B1F7F0068FA33 /* Frameworks */, 142 | CB42CE04185B1F7F0068FA33 /* Products */, 143 | ); 144 | sourceTree = ""; 145 | }; 146 | CB42CE04185B1F7F0068FA33 /* Products */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | CB42CE03185B1F7F0068FA33 /* TumblrLikeMenu.app */, 150 | CB42CE27185B1F800068FA33 /* TumblrLikeMenuTests.xctest */, 151 | ); 152 | name = Products; 153 | sourceTree = ""; 154 | }; 155 | CB42CE05185B1F7F0068FA33 /* Frameworks */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | CB42CE06185B1F7F0068FA33 /* Foundation.framework */, 159 | CB42CE08185B1F7F0068FA33 /* CoreGraphics.framework */, 160 | CB42CE0A185B1F7F0068FA33 /* UIKit.framework */, 161 | CB42CE28185B1F800068FA33 /* XCTest.framework */, 162 | ); 163 | name = Frameworks; 164 | sourceTree = ""; 165 | }; 166 | CB42CE0C185B1F7F0068FA33 /* TumblrLikeMenu */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | CB42CE15185B1F7F0068FA33 /* AppDelegate.h */, 170 | CB42CE16185B1F7F0068FA33 /* AppDelegate.m */, 171 | CB42CE18185B1F7F0068FA33 /* Main_iPhone.storyboard */, 172 | CB42CE1B185B1F7F0068FA33 /* Main_iPad.storyboard */, 173 | CB42CE1E185B1F7F0068FA33 /* ViewController.h */, 174 | CB42CE1F185B1F7F0068FA33 /* ViewController.m */, 175 | CB1EDD381861C9C10014C01E /* Images */, 176 | CBC604EE185E18E500B957A5 /* TumblrLikeMenu */, 177 | CB42CE21185B1F7F0068FA33 /* Images.xcassets */, 178 | CB42CE0D185B1F7F0068FA33 /* Supporting Files */, 179 | ); 180 | path = TumblrLikeMenu; 181 | sourceTree = ""; 182 | }; 183 | CB42CE0D185B1F7F0068FA33 /* Supporting Files */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | CB42CE0E185B1F7F0068FA33 /* TumblrLikeMenu-Info.plist */, 187 | CB42CE0F185B1F7F0068FA33 /* InfoPlist.strings */, 188 | CB42CE12185B1F7F0068FA33 /* main.m */, 189 | CB42CE14185B1F7F0068FA33 /* TumblrLikeMenu-Prefix.pch */, 190 | ); 191 | name = "Supporting Files"; 192 | sourceTree = ""; 193 | }; 194 | CB42CE2E185B1F800068FA33 /* TumblrLikeMenuTests */ = { 195 | isa = PBXGroup; 196 | children = ( 197 | CB42CE34185B1F800068FA33 /* TumblrLikeMenuTests.m */, 198 | CB42CE2F185B1F800068FA33 /* Supporting Files */, 199 | ); 200 | path = TumblrLikeMenuTests; 201 | sourceTree = ""; 202 | }; 203 | CB42CE2F185B1F800068FA33 /* Supporting Files */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | CB42CE30185B1F800068FA33 /* TumblrLikeMenuTests-Info.plist */, 207 | CB42CE31185B1F800068FA33 /* InfoPlist.strings */, 208 | ); 209 | name = "Supporting Files"; 210 | sourceTree = ""; 211 | }; 212 | CBC604EE185E18E500B957A5 /* TumblrLikeMenu */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | CBC604EF185E190300B957A5 /* TumblrLikeMenu.h */, 216 | CBC604F0185E190300B957A5 /* TumblrLikeMenu.m */, 217 | CB1EDD351861C61F0014C01E /* TumblrLikeMenuItem.h */, 218 | CB1EDD361861C61F0014C01E /* TumblrLikeMenuItem.m */, 219 | EF2E898618628DEF009C1A86 /* UIView+CommonAnimation.h */, 220 | EF2E898718628DEF009C1A86 /* UIView+CommonAnimation.m */, 221 | ); 222 | path = TumblrLikeMenu; 223 | sourceTree = ""; 224 | }; 225 | /* End PBXGroup section */ 226 | 227 | /* Begin PBXNativeTarget section */ 228 | CB42CE02185B1F7F0068FA33 /* TumblrLikeMenu */ = { 229 | isa = PBXNativeTarget; 230 | buildConfigurationList = CB42CE38185B1F800068FA33 /* Build configuration list for PBXNativeTarget "TumblrLikeMenu" */; 231 | buildPhases = ( 232 | CB42CDFF185B1F7F0068FA33 /* Sources */, 233 | CB42CE00185B1F7F0068FA33 /* Frameworks */, 234 | CB42CE01185B1F7F0068FA33 /* Resources */, 235 | ); 236 | buildRules = ( 237 | ); 238 | dependencies = ( 239 | ); 240 | name = TumblrLikeMenu; 241 | productName = TumblrLikeMenu; 242 | productReference = CB42CE03185B1F7F0068FA33 /* TumblrLikeMenu.app */; 243 | productType = "com.apple.product-type.application"; 244 | }; 245 | CB42CE26185B1F800068FA33 /* TumblrLikeMenuTests */ = { 246 | isa = PBXNativeTarget; 247 | buildConfigurationList = CB42CE3B185B1F800068FA33 /* Build configuration list for PBXNativeTarget "TumblrLikeMenuTests" */; 248 | buildPhases = ( 249 | CB42CE23185B1F800068FA33 /* Sources */, 250 | CB42CE24185B1F800068FA33 /* Frameworks */, 251 | CB42CE25185B1F800068FA33 /* Resources */, 252 | ); 253 | buildRules = ( 254 | ); 255 | dependencies = ( 256 | CB42CE2D185B1F800068FA33 /* PBXTargetDependency */, 257 | ); 258 | name = TumblrLikeMenuTests; 259 | productName = TumblrLikeMenuTests; 260 | productReference = CB42CE27185B1F800068FA33 /* TumblrLikeMenuTests.xctest */; 261 | productType = "com.apple.product-type.bundle.unit-test"; 262 | }; 263 | /* End PBXNativeTarget section */ 264 | 265 | /* Begin PBXProject section */ 266 | CB42CDFB185B1F7F0068FA33 /* Project object */ = { 267 | isa = PBXProject; 268 | attributes = { 269 | LastUpgradeCheck = 0500; 270 | ORGANIZATIONNAME = "Tu You"; 271 | TargetAttributes = { 272 | CB42CE26185B1F800068FA33 = { 273 | TestTargetID = CB42CE02185B1F7F0068FA33; 274 | }; 275 | }; 276 | }; 277 | buildConfigurationList = CB42CDFE185B1F7F0068FA33 /* Build configuration list for PBXProject "TumblrLikeMenu" */; 278 | compatibilityVersion = "Xcode 3.2"; 279 | developmentRegion = English; 280 | hasScannedForEncodings = 0; 281 | knownRegions = ( 282 | en, 283 | Base, 284 | ); 285 | mainGroup = CB42CDFA185B1F7F0068FA33; 286 | productRefGroup = CB42CE04185B1F7F0068FA33 /* Products */; 287 | projectDirPath = ""; 288 | projectRoot = ""; 289 | targets = ( 290 | CB42CE02185B1F7F0068FA33 /* TumblrLikeMenu */, 291 | CB42CE26185B1F800068FA33 /* TumblrLikeMenuTests */, 292 | ); 293 | }; 294 | /* End PBXProject section */ 295 | 296 | /* Begin PBXResourcesBuildPhase section */ 297 | CB42CE01185B1F7F0068FA33 /* Resources */ = { 298 | isa = PBXResourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | CB314BFB1879405500C07F6E /* Twitter.png in Resources */, 302 | CB314BEA18793FD800C07F6E /* Google+@2x.png in Resources */, 303 | CB42CE1D185B1F7F0068FA33 /* Main_iPad.storyboard in Resources */, 304 | CB42CE22185B1F7F0068FA33 /* Images.xcassets in Resources */, 305 | CB314BEF18793FD800C07F6E /* Twitter@2x.png in Resources */, 306 | CB314BF91879405000C07F6E /* Tumblr.png in Resources */, 307 | CB314BED18793FD800C07F6E /* Youtube@2x.png in Resources */, 308 | CB314BEB18793FD800C07F6E /* Facebook@2x.png in Resources */, 309 | CB314BF11879403600C07F6E /* Google+.png in Resources */, 310 | CB314BEE18793FD800C07F6E /* Tumblr@2x.png in Resources */, 311 | CB42CE1A185B1F7F0068FA33 /* Main_iPhone.storyboard in Resources */, 312 | CB314BF31879403C00C07F6E /* Facebook.png in Resources */, 313 | CB314BEC18793FD800C07F6E /* LinkedIn@2x.png in Resources */, 314 | CB314BFD1879433E00C07F6E /* LinkedIn.png in Resources */, 315 | CB42CE11185B1F7F0068FA33 /* InfoPlist.strings in Resources */, 316 | CB314BF71879404800C07F6E /* Youtube.png in Resources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | CB42CE25185B1F800068FA33 /* Resources */ = { 321 | isa = PBXResourcesBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | CB42CE33185B1F800068FA33 /* InfoPlist.strings in Resources */, 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | /* End PBXResourcesBuildPhase section */ 329 | 330 | /* Begin PBXSourcesBuildPhase section */ 331 | CB42CDFF185B1F7F0068FA33 /* Sources */ = { 332 | isa = PBXSourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | EF2E898818628DEF009C1A86 /* UIView+CommonAnimation.m in Sources */, 336 | CB42CE20185B1F7F0068FA33 /* ViewController.m in Sources */, 337 | CB42CE17185B1F7F0068FA33 /* AppDelegate.m in Sources */, 338 | CB1EDD371861C61F0014C01E /* TumblrLikeMenuItem.m in Sources */, 339 | CB42CE13185B1F7F0068FA33 /* main.m in Sources */, 340 | CBC604F1185E190300B957A5 /* TumblrLikeMenu.m in Sources */, 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | }; 344 | CB42CE23185B1F800068FA33 /* Sources */ = { 345 | isa = PBXSourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | CB42CE35185B1F800068FA33 /* TumblrLikeMenuTests.m in Sources */, 349 | ); 350 | runOnlyForDeploymentPostprocessing = 0; 351 | }; 352 | /* End PBXSourcesBuildPhase section */ 353 | 354 | /* Begin PBXTargetDependency section */ 355 | CB42CE2D185B1F800068FA33 /* PBXTargetDependency */ = { 356 | isa = PBXTargetDependency; 357 | target = CB42CE02185B1F7F0068FA33 /* TumblrLikeMenu */; 358 | targetProxy = CB42CE2C185B1F800068FA33 /* PBXContainerItemProxy */; 359 | }; 360 | /* End PBXTargetDependency section */ 361 | 362 | /* Begin PBXVariantGroup section */ 363 | CB42CE0F185B1F7F0068FA33 /* InfoPlist.strings */ = { 364 | isa = PBXVariantGroup; 365 | children = ( 366 | CB42CE10185B1F7F0068FA33 /* en */, 367 | ); 368 | name = InfoPlist.strings; 369 | sourceTree = ""; 370 | }; 371 | CB42CE18185B1F7F0068FA33 /* Main_iPhone.storyboard */ = { 372 | isa = PBXVariantGroup; 373 | children = ( 374 | CB42CE19185B1F7F0068FA33 /* Base */, 375 | ); 376 | name = Main_iPhone.storyboard; 377 | sourceTree = ""; 378 | }; 379 | CB42CE1B185B1F7F0068FA33 /* Main_iPad.storyboard */ = { 380 | isa = PBXVariantGroup; 381 | children = ( 382 | CB42CE1C185B1F7F0068FA33 /* Base */, 383 | ); 384 | name = Main_iPad.storyboard; 385 | sourceTree = ""; 386 | }; 387 | CB42CE31185B1F800068FA33 /* InfoPlist.strings */ = { 388 | isa = PBXVariantGroup; 389 | children = ( 390 | CB42CE32185B1F800068FA33 /* en */, 391 | ); 392 | name = InfoPlist.strings; 393 | sourceTree = ""; 394 | }; 395 | /* End PBXVariantGroup section */ 396 | 397 | /* Begin XCBuildConfiguration section */ 398 | CB42CE36185B1F800068FA33 /* Debug */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ALWAYS_SEARCH_USER_PATHS = NO; 402 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 403 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 404 | CLANG_CXX_LIBRARY = "libc++"; 405 | CLANG_ENABLE_MODULES = YES; 406 | CLANG_ENABLE_OBJC_ARC = YES; 407 | CLANG_WARN_BOOL_CONVERSION = YES; 408 | CLANG_WARN_CONSTANT_CONVERSION = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 410 | CLANG_WARN_EMPTY_BODY = YES; 411 | CLANG_WARN_ENUM_CONVERSION = YES; 412 | CLANG_WARN_INT_CONVERSION = YES; 413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | COPY_PHASE_STRIP = NO; 417 | GCC_C_LANGUAGE_STANDARD = gnu99; 418 | GCC_DYNAMIC_NO_PIC = NO; 419 | GCC_OPTIMIZATION_LEVEL = 0; 420 | GCC_PREPROCESSOR_DEFINITIONS = ( 421 | "DEBUG=1", 422 | "$(inherited)", 423 | ); 424 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 425 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 426 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 427 | GCC_WARN_UNDECLARED_SELECTOR = YES; 428 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 429 | GCC_WARN_UNUSED_FUNCTION = YES; 430 | GCC_WARN_UNUSED_VARIABLE = YES; 431 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 432 | ONLY_ACTIVE_ARCH = YES; 433 | SDKROOT = iphoneos; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | }; 436 | name = Debug; 437 | }; 438 | CB42CE37185B1F800068FA33 /* Release */ = { 439 | isa = XCBuildConfiguration; 440 | buildSettings = { 441 | ALWAYS_SEARCH_USER_PATHS = NO; 442 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 443 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 444 | CLANG_CXX_LIBRARY = "libc++"; 445 | CLANG_ENABLE_MODULES = YES; 446 | CLANG_ENABLE_OBJC_ARC = YES; 447 | CLANG_WARN_BOOL_CONVERSION = YES; 448 | CLANG_WARN_CONSTANT_CONVERSION = YES; 449 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 450 | CLANG_WARN_EMPTY_BODY = YES; 451 | CLANG_WARN_ENUM_CONVERSION = YES; 452 | CLANG_WARN_INT_CONVERSION = YES; 453 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 454 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 455 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 456 | COPY_PHASE_STRIP = YES; 457 | ENABLE_NS_ASSERTIONS = NO; 458 | GCC_C_LANGUAGE_STANDARD = gnu99; 459 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 460 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 461 | GCC_WARN_UNDECLARED_SELECTOR = YES; 462 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 463 | GCC_WARN_UNUSED_FUNCTION = YES; 464 | GCC_WARN_UNUSED_VARIABLE = YES; 465 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 466 | SDKROOT = iphoneos; 467 | TARGETED_DEVICE_FAMILY = "1,2"; 468 | VALIDATE_PRODUCT = YES; 469 | }; 470 | name = Release; 471 | }; 472 | CB42CE39185B1F800068FA33 /* Debug */ = { 473 | isa = XCBuildConfiguration; 474 | buildSettings = { 475 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 476 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 477 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 478 | GCC_PREFIX_HEADER = "TumblrLikeMenu/TumblrLikeMenu-Prefix.pch"; 479 | INFOPLIST_FILE = "TumblrLikeMenu/TumblrLikeMenu-Info.plist"; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | WRAPPER_EXTENSION = app; 482 | }; 483 | name = Debug; 484 | }; 485 | CB42CE3A185B1F800068FA33 /* Release */ = { 486 | isa = XCBuildConfiguration; 487 | buildSettings = { 488 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 489 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 490 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 491 | GCC_PREFIX_HEADER = "TumblrLikeMenu/TumblrLikeMenu-Prefix.pch"; 492 | INFOPLIST_FILE = "TumblrLikeMenu/TumblrLikeMenu-Info.plist"; 493 | PRODUCT_NAME = "$(TARGET_NAME)"; 494 | WRAPPER_EXTENSION = app; 495 | }; 496 | name = Release; 497 | }; 498 | CB42CE3C185B1F800068FA33 /* Debug */ = { 499 | isa = XCBuildConfiguration; 500 | buildSettings = { 501 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 502 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TumblrLikeMenu.app/TumblrLikeMenu"; 503 | FRAMEWORK_SEARCH_PATHS = ( 504 | "$(SDKROOT)/Developer/Library/Frameworks", 505 | "$(inherited)", 506 | "$(DEVELOPER_FRAMEWORKS_DIR)", 507 | ); 508 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 509 | GCC_PREFIX_HEADER = "TumblrLikeMenu/TumblrLikeMenu-Prefix.pch"; 510 | GCC_PREPROCESSOR_DEFINITIONS = ( 511 | "DEBUG=1", 512 | "$(inherited)", 513 | ); 514 | INFOPLIST_FILE = "TumblrLikeMenuTests/TumblrLikeMenuTests-Info.plist"; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | TEST_HOST = "$(BUNDLE_LOADER)"; 517 | WRAPPER_EXTENSION = xctest; 518 | }; 519 | name = Debug; 520 | }; 521 | CB42CE3D185B1F800068FA33 /* Release */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 525 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TumblrLikeMenu.app/TumblrLikeMenu"; 526 | FRAMEWORK_SEARCH_PATHS = ( 527 | "$(SDKROOT)/Developer/Library/Frameworks", 528 | "$(inherited)", 529 | "$(DEVELOPER_FRAMEWORKS_DIR)", 530 | ); 531 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 532 | GCC_PREFIX_HEADER = "TumblrLikeMenu/TumblrLikeMenu-Prefix.pch"; 533 | INFOPLIST_FILE = "TumblrLikeMenuTests/TumblrLikeMenuTests-Info.plist"; 534 | PRODUCT_NAME = "$(TARGET_NAME)"; 535 | TEST_HOST = "$(BUNDLE_LOADER)"; 536 | WRAPPER_EXTENSION = xctest; 537 | }; 538 | name = Release; 539 | }; 540 | /* End XCBuildConfiguration section */ 541 | 542 | /* Begin XCConfigurationList section */ 543 | CB42CDFE185B1F7F0068FA33 /* Build configuration list for PBXProject "TumblrLikeMenu" */ = { 544 | isa = XCConfigurationList; 545 | buildConfigurations = ( 546 | CB42CE36185B1F800068FA33 /* Debug */, 547 | CB42CE37185B1F800068FA33 /* Release */, 548 | ); 549 | defaultConfigurationIsVisible = 0; 550 | defaultConfigurationName = Release; 551 | }; 552 | CB42CE38185B1F800068FA33 /* Build configuration list for PBXNativeTarget "TumblrLikeMenu" */ = { 553 | isa = XCConfigurationList; 554 | buildConfigurations = ( 555 | CB42CE39185B1F800068FA33 /* Debug */, 556 | CB42CE3A185B1F800068FA33 /* Release */, 557 | ); 558 | defaultConfigurationIsVisible = 0; 559 | defaultConfigurationName = Release; 560 | }; 561 | CB42CE3B185B1F800068FA33 /* Build configuration list for PBXNativeTarget "TumblrLikeMenuTests" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | CB42CE3C185B1F800068FA33 /* Debug */, 565 | CB42CE3D185B1F800068FA33 /* Release */, 566 | ); 567 | defaultConfigurationIsVisible = 0; 568 | defaultConfigurationName = Release; 569 | }; 570 | /* End XCConfigurationList section */ 571 | }; 572 | rootObject = CB42CDFB185B1F7F0068FA33 /* Project object */; 573 | } 574 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/project.xcworkspace/xcshareddata/TumblrLikeMenu.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 97AB6EFF-FFDF-4426-9FEE-11C90F831284 9 | IDESourceControlProjectName 10 | TumblrLikeMenu 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 6916BA50-D0E7-428A-962F-215FC1007CFF 14 | https://github.com/itouch2/TumblrLikeMenu.git 15 | 16 | IDESourceControlProjectPath 17 | TumblrLikeMenu.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 6916BA50-D0E7-428A-962F-215FC1007CFF 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/itouch2/TumblrLikeMenu.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 6916BA50-D0E7-428A-962F-215FC1007CFF 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 6916BA50-D0E7-428A-962F-215FC1007CFF 36 | IDESourceControlWCCName 37 | TumblrLikeMenu 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/project.xcworkspace/xcuserdata/Chandler.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu.xcodeproj/project.xcworkspace/xcuserdata/Chandler.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/project.xcworkspace/xcuserdata/Chandler.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/project.xcworkspace/xcuserdata/hpcc.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu.xcodeproj/project.xcworkspace/xcuserdata/hpcc.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/project.xcworkspace/xcuserdata/hpcc.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/xcuserdata/Chandler.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/xcuserdata/Chandler.xcuserdatad/xcschemes/TumblrLikeMenu.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/xcuserdata/Chandler.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TumblrLikeMenu.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | CB42CE02185B1F7F0068FA33 16 | 17 | primary 18 | 19 | 20 | CB42CE26185B1F800068FA33 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/xcuserdata/hpcc.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/xcuserdata/hpcc.xcuserdatad/xcschemes/TumblrLikeMenu.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /TumblrLikeMenu.xcodeproj/xcuserdata/hpcc.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | TumblrLikeMenu.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | CB42CE02185B1F7F0068FA33 16 | 17 | primary 18 | 19 | 20 | CB42CE26185B1F800068FA33 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TumblrLikeMenu/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/13/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /TumblrLikeMenu/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/13/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /TumblrLikeMenu/Base.lproj/Main_iPad.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 | -------------------------------------------------------------------------------- /TumblrLikeMenu/Base.lproj/Main_iPhone.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 | -------------------------------------------------------------------------------- /TumblrLikeMenu/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /TumblrLikeMenu/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Facebook.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Facebook@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Facebook@2x.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Google+.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Google+.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Google+@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Google+@2x.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/LinkedIn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/LinkedIn.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/LinkedIn@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/LinkedIn@2x.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Tumblr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Tumblr.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Tumblr@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Tumblr@2x.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Twitter.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Twitter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Twitter@2x.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Youtube.png -------------------------------------------------------------------------------- /TumblrLikeMenu/Images/Youtube@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itouch2/TumblrLikeMenu/4fd7a3c4d5348fe75feffd7e91a104c587df42ac/TumblrLikeMenu/Images/Youtube@2x.png -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | COM.TUYOU.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main_iPhone 29 | UIMainStoryboardFile~ipad 30 | Main_iPad 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu/TumblrLikeMenu.h: -------------------------------------------------------------------------------- 1 | // 2 | // TumblrLikeMenu.h 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/16/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "TumblrLikeMenuItem.h" 12 | 13 | typedef void (^TumblrLikeMenuSelectBlock)(NSUInteger index); 14 | 15 | @interface TumblrLikeMenu : UIView 16 | 17 | @property (nonatomic, strong) NSArray *submenus; 18 | @property (nonatomic, copy) TumblrLikeMenuSelectBlock selectBlock; 19 | 20 | - (id)initWithFrame:(CGRect)frame subMenus:(NSArray *)menus; 21 | - (id)initWithFrame:(CGRect)frame subMenus:(NSArray *)menus tip:(NSString *)tip; 22 | 23 | - (void)show; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu/TumblrLikeMenu.m: -------------------------------------------------------------------------------- 1 | // 2 | // TumblrLikeMenu.m 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/16/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import "TumblrLikeMenu.h" 10 | #import "TumblrLikeMenuItem.h" 11 | #import "UIView+CommonAnimation.h" 12 | 13 | #define kStringMenuItemAppearKey @"kStringMenuItemAppearKey" 14 | #define kFloatMenuItemAppearDuration (0.35f) 15 | #define kFloatTipLabelAppearDuration (0.45f) 16 | #define kFloatTipLabelHeight (50.0f) 17 | 18 | @interface TumblrLikeMenu() 19 | 20 | @property (nonatomic, strong) UILabel *tipLabel; 21 | @property (nonatomic, strong) UIView *magicBgImageView; 22 | @property (nonatomic, strong) NSArray *delayArray; 23 | @property (nonatomic, strong) NSArray *delayDisappearArray; 24 | 25 | @end 26 | 27 | @implementation TumblrLikeMenu 28 | 29 | - (id)initWithFrame:(CGRect)frame subMenus:(NSArray *)menus 30 | { 31 | return [self initWithFrame:frame subMenus:menus tip:nil]; 32 | } 33 | 34 | - (id)initWithFrame:(CGRect)frame subMenus:(NSArray *)menus tip:(NSString *)tip 35 | { 36 | self = [super initWithFrame:frame]; 37 | 38 | if (self) 39 | { 40 | if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) 41 | { 42 | self.magicBgImageView = [[UIImageView alloc] initWithFrame:frame]; 43 | self.magicBgImageView.userInteractionEnabled = YES; 44 | self.magicBgImageView.backgroundColor = [UIColor colorWithWhite:0.22 alpha:0.9]; 45 | } 46 | else 47 | { 48 | // use tool bar in iOS 7 to blur the backgroud 49 | self.magicBgImageView = [[UIToolbar alloc] initWithFrame:frame]; 50 | ((UIToolbar *)self.magicBgImageView).barStyle = UIBarStyleBlackTranslucent; 51 | } 52 | 53 | [self addSubview:self.magicBgImageView]; 54 | 55 | if (tip) 56 | { 57 | self.tipLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(frame), CGRectGetWidth(frame), kFloatTipLabelHeight)]; 58 | self.tipLabel.autoresizingMask = UIViewAutoresizingFlexibleTopMargin; 59 | self.tipLabel.text = tip; 60 | self.tipLabel.backgroundColor = [UIColor clearColor]; 61 | self.tipLabel.textAlignment = NSTextAlignmentCenter; 62 | self.tipLabel.textColor = [UIColor whiteColor]; 63 | [self addSubview:self.tipLabel]; 64 | } 65 | 66 | self.submenus = menus; 67 | 68 | [self setupSubmenus]; 69 | 70 | UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)]; 71 | [self.magicBgImageView addGestureRecognizer:tapGestureRecognizer]; 72 | 73 | self.delayArray = @[@(0.15), @(0.0), @(0.15), @(0.18), @(0.02), @(0.18)]; 74 | self.delayDisappearArray = @[@(0.12), @(0.0), @(0.13), @(0.20), @(0.10), @(0.25)]; 75 | } 76 | return self; 77 | } 78 | 79 | - (void)setupSubmenus 80 | { 81 | for (int i = 0; i < 2; ++i) 82 | { 83 | for (int j = 0; j < 3; ++j) 84 | { 85 | TumblrLikeMenuItem *subMenu = self.submenus[i * 3 + j]; 86 | subMenu.center = CGPointMake(100 * j + 62, CGRectGetHeight(self.frame) + i * 125 + 40); 87 | if (NULL == subMenu.selectBlock) 88 | { 89 | __weak TumblrLikeMenu *weakSelf = self; 90 | subMenu.selectBlock = ^(TumblrLikeMenuItem *item) 91 | { 92 | NSUInteger index = [weakSelf.submenus indexOfObject:item]; 93 | if (index != NSNotFound) { 94 | [weakSelf handleSelectAtIndex:index]; 95 | } 96 | }; 97 | } 98 | [self addSubview:subMenu]; 99 | } 100 | } 101 | } 102 | 103 | - (void)handleSelectAtIndex:(NSUInteger)index 104 | { 105 | if (self.selectBlock) 106 | { 107 | self.selectBlock(index); 108 | } 109 | [self disappear]; 110 | } 111 | 112 | - (void)resetThePosition 113 | { 114 | for (int i = 0; i < 2; ++i) 115 | { 116 | for (int j = 0; j < 3; ++j) 117 | { 118 | UIView *subMenu = self.submenus[i * 3 + j]; 119 | subMenu.center = CGPointMake(95 * j + 58, CGRectGetHeight(self.frame) + i * 100); 120 | } 121 | } 122 | } 123 | 124 | - (void)appear 125 | { 126 | [self.magicBgImageView.layer addAnimation:[self fadeIn] forKey:@"fadeIn"]; 127 | 128 | for (int i = 0; i < self.submenus.count; ++i) 129 | { 130 | double delayInSeconds = [self.delayArray[i] doubleValue]; 131 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 132 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 133 | TumblrLikeMenuItem *item = (TumblrLikeMenuItem *)self.submenus[i]; 134 | [self appearMenuItem:item animated:YES]; 135 | }); 136 | } 137 | 138 | if (self.tipLabel) 139 | { 140 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.translation.y"]; 141 | animation.beginTime = CACurrentMediaTime() + 0.3; 142 | animation.duration = kFloatTipLabelAppearDuration; 143 | animation.toValue = @(-kFloatTipLabelHeight); 144 | animation.fillMode = kCAFillModeForwards; 145 | animation.removedOnCompletion = NO; 146 | animation.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.35 :1.0 :0.53 :1.0]; 147 | [self.tipLabel.layer addAnimation:animation forKey:@"ShowTip"]; 148 | } 149 | } 150 | 151 | - (void)disappear 152 | { 153 | for (int i = 0; i < self.submenus.count; ++i) 154 | { 155 | double delayInSeconds = [(NSNumber *)self.delayDisappearArray[i] doubleValue]; 156 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 157 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 158 | TumblrLikeMenuItem *item = (TumblrLikeMenuItem *)self.submenus[i]; 159 | [self disappearMenuItem:item animated:YES]; 160 | }); 161 | } 162 | 163 | [UIView animateWithDuration:0.2 delay:0.32 options:UIViewAnimationOptionCurveEaseIn animations:^{ 164 | self.magicBgImageView.alpha = 0.7; 165 | } completion:^(BOOL finished) { 166 | [self removeFromSuperview]; 167 | }]; 168 | 169 | [UIView animateWithDuration:0.15 animations:^{ 170 | self.tipLabel.center = CGPointMake(self.tipLabel.center.x, self.tipLabel.center.y + kFloatTipLabelHeight); 171 | }]; 172 | } 173 | 174 | - (void)disappearMenuItem:(TumblrLikeMenuItem *)item animated:(BOOL )animted 175 | { 176 | CGPoint point = item.center; 177 | CGPoint finalPoint = CGPointMake(point.x, point.y - CGRectGetHeight(self.bounds) / 2 - 80); 178 | if (animted) { 179 | CABasicAnimation *disappear = [CABasicAnimation animationWithKeyPath:@"position"]; 180 | disappear.duration = 0.3; 181 | disappear.fromValue = [NSValue valueWithCGPoint:point]; 182 | disappear.toValue = [NSValue valueWithCGPoint:finalPoint]; 183 | disappear.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; 184 | [item.layer addAnimation:disappear forKey:kStringMenuItemAppearKey]; 185 | } 186 | item.layer.position = finalPoint; 187 | } 188 | 189 | - (void)appearMenuItem:(TumblrLikeMenuItem *)item animated:(BOOL )animated 190 | { 191 | CGPoint point0 = item.center; 192 | CGPoint point1 = CGPointMake(point0.x, point0.y - CGRectGetHeight(self.bounds) / 2 - 120); 193 | CGPoint point2 = CGPointMake(point1.x, point1.y + 10); 194 | 195 | if (animated) 196 | { 197 | CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; 198 | animation.values = @[[NSValue valueWithCGPoint:point0], [NSValue valueWithCGPoint:point1], [NSValue valueWithCGPoint:point2]]; 199 | animation.keyTimes = @[@(0), @(0.6), @(1)]; 200 | animation.timingFunctions = @[[CAMediaTimingFunction functionWithControlPoints:0.10 :0.87 :0.68 :1.0], [CAMediaTimingFunction functionWithControlPoints:0.66 :0.37 :0.70 :0.95]]; 201 | animation.duration = kFloatMenuItemAppearDuration; 202 | [item.layer addAnimation:animation forKey:kStringMenuItemAppearKey]; 203 | } 204 | item.layer.position = point2; 205 | } 206 | 207 | - (void)tapped:(UIGestureRecognizer *)gesture 208 | { 209 | [self disappear]; 210 | } 211 | 212 | - (void)show 213 | { 214 | UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; 215 | [keyWindow addSubview:self]; 216 | [self appear]; 217 | } 218 | 219 | @end 220 | -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu/TumblrLikeMenuItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // TumblrLikeMenuItem.h 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/18/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class TumblrLikeMenuItem; 12 | 13 | typedef void (^TumblrLikeMenuItemSelectBlock)(TumblrLikeMenuItem *item); 14 | 15 | @interface TumblrLikeMenuItem : UIView 16 | 17 | @property (nonatomic, strong) UIImage *image; 18 | @property (nonatomic, strong) UIImage *highlightedImage; 19 | @property (nonatomic, copy) TumblrLikeMenuItemSelectBlock selectBlock; 20 | 21 | - (id)initWithImage:(UIImage *)image 22 | highlightedImage:(UIImage *)highlightedImage 23 | text:(NSString *)text; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu/TumblrLikeMenuItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // TumblrLikeMenuItem.m 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/18/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import "TumblrLikeMenuItem.h" 10 | 11 | @interface TumblrLikeMenuItem () 12 | 13 | @property (nonatomic, strong) UIButton *menuButton; 14 | @property (nonatomic, strong) UILabel *menuLabel; 15 | 16 | @end 17 | 18 | @implementation TumblrLikeMenuItem 19 | 20 | - (id)initWithImage:(UIImage *)image 21 | highlightedImage:(UIImage *)highlightedImage 22 | text:(NSString *)text 23 | { 24 | self = [super init]; 25 | if (self) 26 | { 27 | _image = image; 28 | _highlightedImage = highlightedImage; 29 | 30 | self.frame = [self bounds]; 31 | 32 | self.menuButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, self.image.size.width, self.image.size.height)]; 33 | [self.menuButton setImage:self.image forState:UIControlStateNormal]; 34 | [self.menuButton setImage:self.highlightedImage forState:UIControlStateHighlighted]; 35 | [self.menuButton addTarget:self action:@selector(tapAt:) forControlEvents:UIControlEventTouchUpInside]; 36 | 37 | self.menuLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.image.size.height + 5, self.frame.size.width, 18)]; 38 | self.menuLabel.textColor = [UIColor whiteColor]; 39 | self.menuLabel.font = [UIFont systemFontOfSize:13]; 40 | self.menuLabel.textAlignment = NSTextAlignmentCenter; 41 | self.menuLabel.backgroundColor = [UIColor clearColor]; 42 | self.menuLabel.text = text; 43 | 44 | [self addSubview:self.menuButton]; 45 | [self addSubview:self.menuLabel]; 46 | } 47 | return self; 48 | } 49 | 50 | - (void)tapAt:(UIButton *)sender 51 | { 52 | if (self.selectBlock) 53 | { 54 | self.selectBlock(self); 55 | } 56 | } 57 | 58 | - (void)setImage:(UIImage *)image 59 | { 60 | if (image != _image) 61 | { 62 | _image = nil; 63 | _image = image; 64 | [self.menuButton setImage:self.image forState:UIControlStateNormal]; 65 | } 66 | } 67 | 68 | - (void)setHighlightedImage:(UIImage *)highlightedImage 69 | { 70 | if (highlightedImage != _highlightedImage) 71 | { 72 | _highlightedImage = nil; 73 | _highlightedImage = highlightedImage; 74 | [self.menuButton setImage:self.highlightedImage forState:UIControlStateHighlighted]; 75 | } 76 | } 77 | 78 | - (CGRect)bounds 79 | { 80 | CGRect rect = CGRectZero; 81 | rect.size.width = self.image.size.width; 82 | rect.size.height = self.image.size.height + 20; 83 | return rect; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu/UIView+CommonAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+CommonAnimation.h 3 | // TumblrLikeMenu 4 | // 5 | // Created by xjz on 13-12-19. 6 | // Copyright (c) 2013年 Tu You. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (CommonAnimation) 12 | 13 | - (CABasicAnimation *)fadeIn; 14 | 15 | - (CABasicAnimation *)fadeOut; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /TumblrLikeMenu/TumblrLikeMenu/UIView+CommonAnimation.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+CommonAnimation.m 3 | // TumblrLikeMenu 4 | // 5 | // Created by xjz on 13-12-19. 6 | // Copyright (c) 2013年 Tu You. All rights reserved. 7 | // 8 | 9 | #import "UIView+CommonAnimation.h" 10 | 11 | @implementation UIView (CommonAnimation) 12 | 13 | 14 | - (CABasicAnimation *)fadeIn 15 | { 16 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"opacity"]; 17 | animation.duration = 0.35; 18 | animation.fromValue = [NSNumber numberWithFloat:0.0f]; 19 | animation.toValue = [NSNumber numberWithFloat:0.8f]; 20 | return animation; 21 | } 22 | 23 | - (CABasicAnimation *)fadeOut 24 | { 25 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"opacity"]; 26 | animation.duration = 0.2; 27 | animation.fromValue = [NSNumber numberWithFloat:0.8f]; 28 | animation.toValue = [NSNumber numberWithFloat:0.0f]; 29 | return animation; 30 | } 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /TumblrLikeMenu/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/13/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TumblrLikeMenu/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/13/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "TumblrLikeMenu.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) UIButton *startButton; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad 21 | { 22 | [super viewDidLoad]; 23 | // Do any additional setup after loading the view, typically from a nib. 24 | 25 | self.startButton = [UIButton buttonWithType:UIButtonTypeSystem]; 26 | [self.startButton setTitle:@"Share..." forState:UIControlStateNormal]; 27 | self.startButton.titleLabel.font = [UIFont boldSystemFontOfSize:18]; 28 | [self.startButton addTarget:self action:@selector(start:) forControlEvents:UIControlEventTouchUpInside]; 29 | self.startButton.frame = CGRectMake(0, 0, 80, 20); 30 | self.startButton.center = CGPointMake(CGRectGetWidth(self.view.bounds) / 2, CGRectGetHeight(self.view.bounds) / 2); 31 | [self.view addSubview:self.startButton]; 32 | } 33 | 34 | - (void)start:(id)sender 35 | { 36 | [self subtle]; 37 | } 38 | 39 | - (void)subtle 40 | { 41 | TumblrLikeMenuItem *menuItem0 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Twitter"] 42 | highlightedImage:[UIImage imageNamed:@"Twitter"] 43 | text:@"Twitter"]; 44 | TumblrLikeMenuItem *menuItem1 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Facebook"] 45 | highlightedImage:[UIImage imageNamed:@"Facebook"] 46 | text:@"Facebook"]; 47 | TumblrLikeMenuItem *menuItem2 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Youtube"] 48 | highlightedImage:[UIImage imageNamed:@"Youtube"] 49 | text:@"Youtube"]; 50 | TumblrLikeMenuItem *menuItem3 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Google+"] 51 | highlightedImage:[UIImage imageNamed:@"Google+"] 52 | text:@"Google+"]; 53 | TumblrLikeMenuItem *menuItem4 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"Tumblr"] 54 | highlightedImage:[UIImage imageNamed:@"Tumblr"] 55 | text:@"Tumblr"]; 56 | TumblrLikeMenuItem *menuItem5 = [[TumblrLikeMenuItem alloc] initWithImage:[UIImage imageNamed:@"LinkedIn"] 57 | highlightedImage:[UIImage imageNamed:@"LinkedIn"] 58 | text:@"LinkedIn"]; 59 | 60 | NSArray *subMenus = @[menuItem0, menuItem1, menuItem2, menuItem3, menuItem4, menuItem5]; 61 | 62 | TumblrLikeMenu *menu = [[TumblrLikeMenu alloc] initWithFrame:self.view.bounds 63 | subMenus:subMenus 64 | tip:@"Nevermind"]; 65 | menu.selectBlock = ^(NSUInteger index) { 66 | NSLog(@"item %ld index selected", index); 67 | }; 68 | [menu show]; 69 | } 70 | 71 | 72 | - (void)didReceiveMemoryWarning 73 | { 74 | [super didReceiveMemoryWarning]; 75 | // Dispose of any resourcesadfsfs that can be recreated. 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /TumblrLikeMenu/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /TumblrLikeMenu/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // TumblrLikeMenu 4 | // 5 | // Created by Tu You on 12/13/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /TumblrLikeMenuTests/TumblrLikeMenuTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | COM.TUYOU.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /TumblrLikeMenuTests/TumblrLikeMenuTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // TumblrLikeMenuTests.m 3 | // TumblrLikeMenuTests 4 | // 5 | // Created by Tu You on 12/13/13. 6 | // Copyright (c) 2013 Tu You. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TumblrLikeMenuTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation TumblrLikeMenuTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /TumblrLikeMenuTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------