├── KYShareMenu.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── KittenYang.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── KittenYang.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── KYShareMenu.xcscheme │ └── xcschememanagement.plist ├── KYShareMenu ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── douban.imageset │ │ ├── Contents.json │ │ ├── douban.png │ │ ├── douban@2x.png │ │ └── douban@3x.png │ ├── email.imageset │ │ ├── Contents.json │ │ ├── mail.png │ │ ├── mail@2x.png │ │ └── mail@3x.png │ ├── friend.imageset │ │ ├── Contents.json │ │ ├── friend.png │ │ ├── friend@2x.png │ │ └── friend@3x.png │ ├── qq.imageset │ │ ├── Contents.json │ │ ├── qq.png │ │ ├── qq@2x.png │ │ └── qq@3x.png │ ├── sina.imageset │ │ ├── Contents.json │ │ ├── sina.png │ │ ├── sina@2x.png │ │ └── sina@3x.png │ └── wechat.imageset │ │ ├── Contents.json │ │ ├── wechat.png │ │ ├── wechat@2x.png │ │ └── wechat@3x.png ├── Info.plist ├── KYShareViewController.h ├── KYShareViewController.m ├── VVBlurPresentation │ ├── LICENSE │ ├── README.md │ └── Source │ │ ├── VVBlurPresentationController.h │ │ ├── VVBlurPresentationController.m │ │ ├── VVBlurPresenter.h │ │ ├── VVBlurPresenter.m │ │ ├── VVBlurTransitioning.h │ │ ├── VVBlurTransitioning.m │ │ ├── VVBlurViewController.h │ │ └── VVBlurViewController.m ├── ViewController.h ├── ViewController.m └── main.m ├── KYShareMenuTests ├── Info.plist └── KYShareMenuTests.m ├── README.md ├── class ├── KYShareViewController.h └── KYShareViewController.m └── demo.gif /KYShareMenu.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5F5DE9201AC19E6300E0FE35 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE91F1AC19E6300E0FE35 /* main.m */; }; 11 | 5F5DE9231AC19E6300E0FE35 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE9221AC19E6300E0FE35 /* AppDelegate.m */; }; 12 | 5F5DE9261AC19E6300E0FE35 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE9251AC19E6300E0FE35 /* ViewController.m */; }; 13 | 5F5DE9291AC19E6300E0FE35 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F5DE9271AC19E6300E0FE35 /* Main.storyboard */; }; 14 | 5F5DE92B1AC19E6300E0FE35 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5F5DE92A1AC19E6300E0FE35 /* Images.xcassets */; }; 15 | 5F5DE92E1AC19E6300E0FE35 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F5DE92C1AC19E6300E0FE35 /* LaunchScreen.xib */; }; 16 | 5F5DE93A1AC19E6300E0FE35 /* KYShareMenuTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE9391AC19E6300E0FE35 /* KYShareMenuTests.m */; }; 17 | 5F5DE9461AC19E9F00E0FE35 /* KYShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE9441AC19E9F00E0FE35 /* KYShareViewController.m */; }; 18 | 5F5DE9541AC1A89500E0FE35 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 5F5DE9491AC1A89500E0FE35 /* LICENSE */; }; 19 | 5F5DE9551AC1A89500E0FE35 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE94A1AC1A89500E0FE35 /* README.md */; }; 20 | 5F5DE9561AC1A89500E0FE35 /* VVBlurPresentationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE94D1AC1A89500E0FE35 /* VVBlurPresentationController.m */; }; 21 | 5F5DE9571AC1A89500E0FE35 /* VVBlurPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE94F1AC1A89500E0FE35 /* VVBlurPresenter.m */; }; 22 | 5F5DE9581AC1A89500E0FE35 /* VVBlurTransitioning.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE9511AC1A89500E0FE35 /* VVBlurTransitioning.m */; }; 23 | 5F5DE9591AC1A89500E0FE35 /* VVBlurViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F5DE9531AC1A89500E0FE35 /* VVBlurViewController.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 5F5DE9341AC19E6300E0FE35 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 5F5DE9121AC19E6300E0FE35 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 5F5DE9191AC19E6300E0FE35; 32 | remoteInfo = KYShareMenu; 33 | }; 34 | /* End PBXContainerItemProxy section */ 35 | 36 | /* Begin PBXFileReference section */ 37 | 5F5DE91A1AC19E6300E0FE35 /* KYShareMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KYShareMenu.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 5F5DE91E1AC19E6300E0FE35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | 5F5DE91F1AC19E6300E0FE35 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 40 | 5F5DE9211AC19E6300E0FE35 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | 5F5DE9221AC19E6300E0FE35 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | 5F5DE9241AC19E6300E0FE35 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 43 | 5F5DE9251AC19E6300E0FE35 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 44 | 5F5DE9281AC19E6300E0FE35 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 5F5DE92A1AC19E6300E0FE35 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 46 | 5F5DE92D1AC19E6300E0FE35 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 47 | 5F5DE9331AC19E6300E0FE35 /* KYShareMenuTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KYShareMenuTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 5F5DE9381AC19E6300E0FE35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 5F5DE9391AC19E6300E0FE35 /* KYShareMenuTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYShareMenuTests.m; sourceTree = ""; }; 50 | 5F5DE9431AC19E9F00E0FE35 /* KYShareViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = KYShareViewController.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 51 | 5F5DE9441AC19E9F00E0FE35 /* KYShareViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = KYShareViewController.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; 52 | 5F5DE9491AC1A89500E0FE35 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 53 | 5F5DE94A1AC1A89500E0FE35 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 54 | 5F5DE94C1AC1A89500E0FE35 /* VVBlurPresentationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVBlurPresentationController.h; sourceTree = ""; }; 55 | 5F5DE94D1AC1A89500E0FE35 /* VVBlurPresentationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVBlurPresentationController.m; sourceTree = ""; }; 56 | 5F5DE94E1AC1A89500E0FE35 /* VVBlurPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVBlurPresenter.h; sourceTree = ""; }; 57 | 5F5DE94F1AC1A89500E0FE35 /* VVBlurPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVBlurPresenter.m; sourceTree = ""; }; 58 | 5F5DE9501AC1A89500E0FE35 /* VVBlurTransitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVBlurTransitioning.h; sourceTree = ""; }; 59 | 5F5DE9511AC1A89500E0FE35 /* VVBlurTransitioning.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVBlurTransitioning.m; sourceTree = ""; }; 60 | 5F5DE9521AC1A89500E0FE35 /* VVBlurViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VVBlurViewController.h; sourceTree = ""; }; 61 | 5F5DE9531AC1A89500E0FE35 /* VVBlurViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VVBlurViewController.m; sourceTree = ""; }; 62 | /* End PBXFileReference section */ 63 | 64 | /* Begin PBXFrameworksBuildPhase section */ 65 | 5F5DE9171AC19E6300E0FE35 /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | 5F5DE9301AC19E6300E0FE35 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | /* End PBXFrameworksBuildPhase section */ 80 | 81 | /* Begin PBXGroup section */ 82 | 5F5DE9111AC19E6300E0FE35 = { 83 | isa = PBXGroup; 84 | children = ( 85 | 5F5DE91C1AC19E6300E0FE35 /* KYShareMenu */, 86 | 5F5DE9361AC19E6300E0FE35 /* KYShareMenuTests */, 87 | 5F5DE91B1AC19E6300E0FE35 /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 5F5DE91B1AC19E6300E0FE35 /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 5F5DE91A1AC19E6300E0FE35 /* KYShareMenu.app */, 95 | 5F5DE9331AC19E6300E0FE35 /* KYShareMenuTests.xctest */, 96 | ); 97 | name = Products; 98 | sourceTree = ""; 99 | }; 100 | 5F5DE91C1AC19E6300E0FE35 /* KYShareMenu */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 5F5DE9211AC19E6300E0FE35 /* AppDelegate.h */, 104 | 5F5DE9221AC19E6300E0FE35 /* AppDelegate.m */, 105 | 5F5DE9241AC19E6300E0FE35 /* ViewController.h */, 106 | 5F5DE9251AC19E6300E0FE35 /* ViewController.m */, 107 | 5F5DE9271AC19E6300E0FE35 /* Main.storyboard */, 108 | 5F5DE95A1AC1A89E00E0FE35 /* KYShareMenu */, 109 | 5F5DE92A1AC19E6300E0FE35 /* Images.xcassets */, 110 | 5F5DE92C1AC19E6300E0FE35 /* LaunchScreen.xib */, 111 | 5F5DE9481AC1A89500E0FE35 /* VVBlurPresentation */, 112 | 5F5DE91D1AC19E6300E0FE35 /* Supporting Files */, 113 | ); 114 | path = KYShareMenu; 115 | sourceTree = ""; 116 | }; 117 | 5F5DE91D1AC19E6300E0FE35 /* Supporting Files */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 5F5DE91E1AC19E6300E0FE35 /* Info.plist */, 121 | 5F5DE91F1AC19E6300E0FE35 /* main.m */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | 5F5DE9361AC19E6300E0FE35 /* KYShareMenuTests */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 5F5DE9391AC19E6300E0FE35 /* KYShareMenuTests.m */, 130 | 5F5DE9371AC19E6300E0FE35 /* Supporting Files */, 131 | ); 132 | path = KYShareMenuTests; 133 | sourceTree = ""; 134 | }; 135 | 5F5DE9371AC19E6300E0FE35 /* Supporting Files */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 5F5DE9381AC19E6300E0FE35 /* Info.plist */, 139 | ); 140 | name = "Supporting Files"; 141 | sourceTree = ""; 142 | }; 143 | 5F5DE9481AC1A89500E0FE35 /* VVBlurPresentation */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 5F5DE9491AC1A89500E0FE35 /* LICENSE */, 147 | 5F5DE94A1AC1A89500E0FE35 /* README.md */, 148 | 5F5DE94B1AC1A89500E0FE35 /* Source */, 149 | ); 150 | path = VVBlurPresentation; 151 | sourceTree = ""; 152 | }; 153 | 5F5DE94B1AC1A89500E0FE35 /* Source */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 5F5DE94C1AC1A89500E0FE35 /* VVBlurPresentationController.h */, 157 | 5F5DE94D1AC1A89500E0FE35 /* VVBlurPresentationController.m */, 158 | 5F5DE94E1AC1A89500E0FE35 /* VVBlurPresenter.h */, 159 | 5F5DE94F1AC1A89500E0FE35 /* VVBlurPresenter.m */, 160 | 5F5DE9501AC1A89500E0FE35 /* VVBlurTransitioning.h */, 161 | 5F5DE9511AC1A89500E0FE35 /* VVBlurTransitioning.m */, 162 | 5F5DE9521AC1A89500E0FE35 /* VVBlurViewController.h */, 163 | 5F5DE9531AC1A89500E0FE35 /* VVBlurViewController.m */, 164 | ); 165 | path = Source; 166 | sourceTree = ""; 167 | }; 168 | 5F5DE95A1AC1A89E00E0FE35 /* KYShareMenu */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 5F5DE9431AC19E9F00E0FE35 /* KYShareViewController.h */, 172 | 5F5DE9441AC19E9F00E0FE35 /* KYShareViewController.m */, 173 | ); 174 | name = KYShareMenu; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXGroup section */ 178 | 179 | /* Begin PBXNativeTarget section */ 180 | 5F5DE9191AC19E6300E0FE35 /* KYShareMenu */ = { 181 | isa = PBXNativeTarget; 182 | buildConfigurationList = 5F5DE93D1AC19E6300E0FE35 /* Build configuration list for PBXNativeTarget "KYShareMenu" */; 183 | buildPhases = ( 184 | 5F5DE9161AC19E6300E0FE35 /* Sources */, 185 | 5F5DE9171AC19E6300E0FE35 /* Frameworks */, 186 | 5F5DE9181AC19E6300E0FE35 /* Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = KYShareMenu; 193 | productName = KYShareMenu; 194 | productReference = 5F5DE91A1AC19E6300E0FE35 /* KYShareMenu.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | 5F5DE9321AC19E6300E0FE35 /* KYShareMenuTests */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = 5F5DE9401AC19E6300E0FE35 /* Build configuration list for PBXNativeTarget "KYShareMenuTests" */; 200 | buildPhases = ( 201 | 5F5DE92F1AC19E6300E0FE35 /* Sources */, 202 | 5F5DE9301AC19E6300E0FE35 /* Frameworks */, 203 | 5F5DE9311AC19E6300E0FE35 /* Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | 5F5DE9351AC19E6300E0FE35 /* PBXTargetDependency */, 209 | ); 210 | name = KYShareMenuTests; 211 | productName = KYShareMenuTests; 212 | productReference = 5F5DE9331AC19E6300E0FE35 /* KYShareMenuTests.xctest */; 213 | productType = "com.apple.product-type.bundle.unit-test"; 214 | }; 215 | /* End PBXNativeTarget section */ 216 | 217 | /* Begin PBXProject section */ 218 | 5F5DE9121AC19E6300E0FE35 /* Project object */ = { 219 | isa = PBXProject; 220 | attributes = { 221 | LastUpgradeCheck = 0620; 222 | ORGANIZATIONNAME = "Kitten Yang"; 223 | TargetAttributes = { 224 | 5F5DE9191AC19E6300E0FE35 = { 225 | CreatedOnToolsVersion = 6.2; 226 | }; 227 | 5F5DE9321AC19E6300E0FE35 = { 228 | CreatedOnToolsVersion = 6.2; 229 | TestTargetID = 5F5DE9191AC19E6300E0FE35; 230 | }; 231 | }; 232 | }; 233 | buildConfigurationList = 5F5DE9151AC19E6300E0FE35 /* Build configuration list for PBXProject "KYShareMenu" */; 234 | compatibilityVersion = "Xcode 3.2"; 235 | developmentRegion = English; 236 | hasScannedForEncodings = 0; 237 | knownRegions = ( 238 | en, 239 | Base, 240 | ); 241 | mainGroup = 5F5DE9111AC19E6300E0FE35; 242 | productRefGroup = 5F5DE91B1AC19E6300E0FE35 /* Products */; 243 | projectDirPath = ""; 244 | projectRoot = ""; 245 | targets = ( 246 | 5F5DE9191AC19E6300E0FE35 /* KYShareMenu */, 247 | 5F5DE9321AC19E6300E0FE35 /* KYShareMenuTests */, 248 | ); 249 | }; 250 | /* End PBXProject section */ 251 | 252 | /* Begin PBXResourcesBuildPhase section */ 253 | 5F5DE9181AC19E6300E0FE35 /* Resources */ = { 254 | isa = PBXResourcesBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | 5F5DE9291AC19E6300E0FE35 /* Main.storyboard in Resources */, 258 | 5F5DE92E1AC19E6300E0FE35 /* LaunchScreen.xib in Resources */, 259 | 5F5DE92B1AC19E6300E0FE35 /* Images.xcassets in Resources */, 260 | 5F5DE9541AC1A89500E0FE35 /* LICENSE in Resources */, 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | 5F5DE9311AC19E6300E0FE35 /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXResourcesBuildPhase section */ 272 | 273 | /* Begin PBXSourcesBuildPhase section */ 274 | 5F5DE9161AC19E6300E0FE35 /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | 5F5DE9261AC19E6300E0FE35 /* ViewController.m in Sources */, 279 | 5F5DE9571AC1A89500E0FE35 /* VVBlurPresenter.m in Sources */, 280 | 5F5DE9581AC1A89500E0FE35 /* VVBlurTransitioning.m in Sources */, 281 | 5F5DE9461AC19E9F00E0FE35 /* KYShareViewController.m in Sources */, 282 | 5F5DE9551AC1A89500E0FE35 /* README.md in Sources */, 283 | 5F5DE9231AC19E6300E0FE35 /* AppDelegate.m in Sources */, 284 | 5F5DE9591AC1A89500E0FE35 /* VVBlurViewController.m in Sources */, 285 | 5F5DE9561AC1A89500E0FE35 /* VVBlurPresentationController.m in Sources */, 286 | 5F5DE9201AC19E6300E0FE35 /* main.m in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | 5F5DE92F1AC19E6300E0FE35 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 5F5DE93A1AC19E6300E0FE35 /* KYShareMenuTests.m in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXTargetDependency section */ 301 | 5F5DE9351AC19E6300E0FE35 /* PBXTargetDependency */ = { 302 | isa = PBXTargetDependency; 303 | target = 5F5DE9191AC19E6300E0FE35 /* KYShareMenu */; 304 | targetProxy = 5F5DE9341AC19E6300E0FE35 /* PBXContainerItemProxy */; 305 | }; 306 | /* End PBXTargetDependency section */ 307 | 308 | /* Begin PBXVariantGroup section */ 309 | 5F5DE9271AC19E6300E0FE35 /* Main.storyboard */ = { 310 | isa = PBXVariantGroup; 311 | children = ( 312 | 5F5DE9281AC19E6300E0FE35 /* Base */, 313 | ); 314 | name = Main.storyboard; 315 | sourceTree = ""; 316 | }; 317 | 5F5DE92C1AC19E6300E0FE35 /* LaunchScreen.xib */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | 5F5DE92D1AC19E6300E0FE35 /* Base */, 321 | ); 322 | name = LaunchScreen.xib; 323 | sourceTree = ""; 324 | }; 325 | /* End PBXVariantGroup section */ 326 | 327 | /* Begin XCBuildConfiguration section */ 328 | 5F5DE93B1AC19E6300E0FE35 /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_MODULES = YES; 335 | CLANG_ENABLE_OBJC_ARC = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_CONSTANT_CONVERSION = YES; 338 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_UNREACHABLE_CODE = YES; 344 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 346 | COPY_PHASE_STRIP = NO; 347 | ENABLE_STRICT_OBJC_MSGSEND = YES; 348 | GCC_C_LANGUAGE_STANDARD = gnu99; 349 | GCC_DYNAMIC_NO_PIC = NO; 350 | GCC_OPTIMIZATION_LEVEL = 0; 351 | GCC_PREPROCESSOR_DEFINITIONS = ( 352 | "DEBUG=1", 353 | "$(inherited)", 354 | ); 355 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 356 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 357 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 358 | GCC_WARN_UNDECLARED_SELECTOR = YES; 359 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 360 | GCC_WARN_UNUSED_FUNCTION = YES; 361 | GCC_WARN_UNUSED_VARIABLE = YES; 362 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 363 | MTL_ENABLE_DEBUG_INFO = YES; 364 | ONLY_ACTIVE_ARCH = YES; 365 | SDKROOT = iphoneos; 366 | }; 367 | name = Debug; 368 | }; 369 | 5F5DE93C1AC19E6300E0FE35 /* Release */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 374 | CLANG_CXX_LIBRARY = "libc++"; 375 | CLANG_ENABLE_MODULES = YES; 376 | CLANG_ENABLE_OBJC_ARC = YES; 377 | CLANG_WARN_BOOL_CONVERSION = YES; 378 | CLANG_WARN_CONSTANT_CONVERSION = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INT_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_UNREACHABLE_CODE = YES; 385 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 386 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 387 | COPY_PHASE_STRIP = NO; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 392 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 393 | GCC_WARN_UNDECLARED_SELECTOR = YES; 394 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 395 | GCC_WARN_UNUSED_FUNCTION = YES; 396 | GCC_WARN_UNUSED_VARIABLE = YES; 397 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 398 | MTL_ENABLE_DEBUG_INFO = NO; 399 | SDKROOT = iphoneos; 400 | VALIDATE_PRODUCT = YES; 401 | }; 402 | name = Release; 403 | }; 404 | 5F5DE93E1AC19E6300E0FE35 /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 408 | CODE_SIGN_IDENTITY = "iPhone Developer: Xinyu Li (XWYND9KE57)"; 409 | INFOPLIST_FILE = KYShareMenu/Info.plist; 410 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 411 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 412 | PRODUCT_NAME = "$(TARGET_NAME)"; 413 | }; 414 | name = Debug; 415 | }; 416 | 5F5DE93F1AC19E6300E0FE35 /* Release */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 420 | INFOPLIST_FILE = KYShareMenu/Info.plist; 421 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 422 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 423 | PRODUCT_NAME = "$(TARGET_NAME)"; 424 | }; 425 | name = Release; 426 | }; 427 | 5F5DE9411AC19E6300E0FE35 /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | buildSettings = { 430 | BUNDLE_LOADER = "$(TEST_HOST)"; 431 | FRAMEWORK_SEARCH_PATHS = ( 432 | "$(SDKROOT)/Developer/Library/Frameworks", 433 | "$(inherited)", 434 | ); 435 | GCC_PREPROCESSOR_DEFINITIONS = ( 436 | "DEBUG=1", 437 | "$(inherited)", 438 | ); 439 | INFOPLIST_FILE = KYShareMenuTests/Info.plist; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KYShareMenu.app/KYShareMenu"; 443 | }; 444 | name = Debug; 445 | }; 446 | 5F5DE9421AC19E6300E0FE35 /* Release */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | BUNDLE_LOADER = "$(TEST_HOST)"; 450 | FRAMEWORK_SEARCH_PATHS = ( 451 | "$(SDKROOT)/Developer/Library/Frameworks", 452 | "$(inherited)", 453 | ); 454 | INFOPLIST_FILE = KYShareMenuTests/Info.plist; 455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 456 | PRODUCT_NAME = "$(TARGET_NAME)"; 457 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KYShareMenu.app/KYShareMenu"; 458 | }; 459 | name = Release; 460 | }; 461 | /* End XCBuildConfiguration section */ 462 | 463 | /* Begin XCConfigurationList section */ 464 | 5F5DE9151AC19E6300E0FE35 /* Build configuration list for PBXProject "KYShareMenu" */ = { 465 | isa = XCConfigurationList; 466 | buildConfigurations = ( 467 | 5F5DE93B1AC19E6300E0FE35 /* Debug */, 468 | 5F5DE93C1AC19E6300E0FE35 /* Release */, 469 | ); 470 | defaultConfigurationIsVisible = 0; 471 | defaultConfigurationName = Release; 472 | }; 473 | 5F5DE93D1AC19E6300E0FE35 /* Build configuration list for PBXNativeTarget "KYShareMenu" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | 5F5DE93E1AC19E6300E0FE35 /* Debug */, 477 | 5F5DE93F1AC19E6300E0FE35 /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | }; 481 | 5F5DE9401AC19E6300E0FE35 /* Build configuration list for PBXNativeTarget "KYShareMenuTests" */ = { 482 | isa = XCConfigurationList; 483 | buildConfigurations = ( 484 | 5F5DE9411AC19E6300E0FE35 /* Debug */, 485 | 5F5DE9421AC19E6300E0FE35 /* Release */, 486 | ); 487 | defaultConfigurationIsVisible = 0; 488 | }; 489 | /* End XCConfigurationList section */ 490 | }; 491 | rootObject = 5F5DE9121AC19E6300E0FE35 /* Project object */; 492 | } 493 | -------------------------------------------------------------------------------- /KYShareMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /KYShareMenu.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /KYShareMenu.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /KYShareMenu.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /KYShareMenu.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/KYShareMenu.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /KYShareMenu.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | KYShareMenu.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 5F5DE9191AC19E6300E0FE35 16 | 17 | primary 18 | 19 | 20 | 5F5DE9321AC19E6300E0FE35 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /KYShareMenu/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // KYShareMenu 4 | // 5 | // Created by Kitten Yang on 3/24/15. 6 | // Copyright (c) 2015 Kitten Yang. 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 | -------------------------------------------------------------------------------- /KYShareMenu/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // KYShareMenu 4 | // 5 | // Created by Kitten Yang on 3/24/15. 6 | // Copyright (c) 2015 Kitten Yang. 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 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 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 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /KYShareMenu/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /KYShareMenu/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 | 69 | 79 | 88 | 99 | 109 | 119 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/douban.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "douban.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "douban@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "douban@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/douban.imageset/douban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/douban.imageset/douban.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/douban.imageset/douban@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/douban.imageset/douban@2x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/douban.imageset/douban@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/douban.imageset/douban@3x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/email.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "mail.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "mail@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "mail@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/email.imageset/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/email.imageset/mail.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/email.imageset/mail@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/email.imageset/mail@2x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/email.imageset/mail@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/email.imageset/mail@3x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/friend.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "friend.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "friend@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "friend@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/friend.imageset/friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/friend.imageset/friend.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/friend.imageset/friend@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/friend.imageset/friend@2x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/friend.imageset/friend@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/friend.imageset/friend@3x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/qq.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "qq.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "qq@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "qq@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/qq.imageset/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/qq.imageset/qq.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/qq.imageset/qq@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/qq.imageset/qq@2x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/qq.imageset/qq@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/qq.imageset/qq@3x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/sina.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "sina.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "sina@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "sina@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/sina.imageset/sina.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/sina.imageset/sina.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/sina.imageset/sina@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/sina.imageset/sina@2x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/sina.imageset/sina@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/sina.imageset/sina@3x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/wechat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "wechat.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "wechat@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "wechat@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/wechat.imageset/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/wechat.imageset/wechat.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/wechat.imageset/wechat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/wechat.imageset/wechat@2x.png -------------------------------------------------------------------------------- /KYShareMenu/Images.xcassets/wechat.imageset/wechat@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/KYShareMenu/Images.xcassets/wechat.imageset/wechat@3x.png -------------------------------------------------------------------------------- /KYShareMenu/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /KYShareMenu/KYShareViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // KYShareViewController.h 3 | // SideChef_iphone 4 | // 5 | // Created by Kitten Yang on 1/16/15. 6 | // Copyright (c) 2015 SideChef. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VVBlurViewController.h" 11 | 12 | @class KYShareViewController; 13 | 14 | //----通知RecipeDetailBoard_iPhone去dismiss当前VC 15 | @protocol KYShareDismissDelegate 16 | -(void)didDismissKYShareVC:(KYShareViewController *)viewController; 17 | @end 18 | 19 | 20 | 21 | 22 | @interface KYShareViewController : VVBlurViewController 23 | 24 | @property(nonatomic,weak)id delegate; 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /KYShareMenu/KYShareViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // KYShareViewController.m 3 | // SideChef_iphone 4 | // 5 | // Created by Kitten Yang on 1/16/15. 6 | // Copyright (c) 2015 SideChef. All rights reserved. 7 | // 8 | 9 | 10 | #import "KYShareViewController.h" 11 | 12 | 13 | #define ScreenWight [[UIScreen mainScreen]bounds].size.width 14 | #define ScreenHeight [[UIScreen mainScreen]bounds].size.height 15 | 16 | #define BtnWidth ([[UIScreen mainScreen]bounds].size.width - 140)/3 17 | #define kDelayTime 0.6f 18 | 19 | @interface KYShareViewController () 20 | @property (nonatomic,strong)UIDynamicAnimator *animator; 21 | 22 | @property (strong, nonatomic) IBOutlet UIButton *weibo; 23 | @property (strong, nonatomic) IBOutlet UIButton *wechat; 24 | @property (strong, nonatomic) IBOutlet UIButton *friendcircle; 25 | @property (strong, nonatomic) IBOutlet UIButton *qq; 26 | @property (strong, nonatomic) IBOutlet UIButton *douban; 27 | @property (strong, nonatomic) IBOutlet UIButton *tencent; 28 | 29 | @end 30 | 31 | @implementation KYShareViewController 32 | 33 | 34 | 35 | 36 | 37 | - (void)viewDidLoad { 38 | [super viewDidLoad]; 39 | [self bounceMenu]; 40 | } 41 | 42 | - (void)didReceiveMemoryWarning { 43 | [super didReceiveMemoryWarning]; 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | -(void)bounceMenu{ 48 | CGPoint point1 = CGPointMake(30+BtnWidth/2, (ScreenHeight / 2 -20)-BtnWidth/2); 49 | CGPoint point2 = CGPointMake(70 + 1.5*BtnWidth, (ScreenHeight / 2 -20)-BtnWidth/2); 50 | CGPoint point3 = CGPointMake(110 + 2.5*BtnWidth, (ScreenHeight / 2 -20)-BtnWidth/2); 51 | CGPoint point4 = CGPointMake(30+BtnWidth/2, (ScreenHeight / 2 + 20) + BtnWidth/2); 52 | CGPoint point5 = CGPointMake(70 + 1.5*BtnWidth,(ScreenHeight / 2 + 20) + BtnWidth/2); 53 | CGPoint point6 = CGPointMake(110 + 2.5*BtnWidth,(ScreenHeight / 2 + 20) + BtnWidth/2); 54 | 55 | 56 | UIDynamicAnimator *animator = [[UIDynamicAnimator alloc]initWithReferenceView:self.view]; 57 | 58 | UISnapBehavior *snap1 = [[UISnapBehavior alloc]initWithItem:self.weibo snapToPoint:point1]; 59 | [animator addBehavior:snap1]; 60 | UISnapBehavior *snap2 = [[UISnapBehavior alloc]initWithItem:self.wechat snapToPoint:point2]; 61 | [animator addBehavior:snap2]; 62 | UISnapBehavior *snap3 = [[UISnapBehavior alloc]initWithItem:self.friendcircle snapToPoint:point3]; 63 | [animator addBehavior:snap3]; 64 | UISnapBehavior *snap4 = [[UISnapBehavior alloc]initWithItem:self.qq snapToPoint:point4]; 65 | [animator addBehavior:snap4]; 66 | UISnapBehavior *snap5 = [[UISnapBehavior alloc]initWithItem:self.douban snapToPoint:point5]; 67 | [animator addBehavior:snap5]; 68 | UISnapBehavior *snap6 = [[UISnapBehavior alloc]initWithItem:self.tencent snapToPoint:point6]; 69 | [animator addBehavior:snap6]; 70 | 71 | self.animator = animator; 72 | } 73 | 74 | - (IBAction)dismissBt:(id)sender 75 | { 76 | if (self.delegate && [self.delegate respondsToSelector:@selector(didDismissKYShareVC:)]) { 77 | [self.delegate didDismissKYShareVC:self]; 78 | } 79 | } 80 | 81 | - (IBAction)shareBtnAction:(UIButton *)sender 82 | { 83 | switch (sender.tag) { 84 | case 101: //微博 85 | [self shareToWeibo]; 86 | break; 87 | case 102: //微信好友 88 | [self sharetoWechatFriends]; 89 | break; 90 | case 103: //朋友圈 91 | [self sharetoWechatFriendsCircle]; 92 | break; 93 | case 104: //QQ 94 | [self shareToQQ]; 95 | break; 96 | case 105: //豆瓣 97 | [self shareToDouban]; 98 | break; 99 | case 106: //EMail 100 | [self shareToEmail]; 101 | break; 102 | 103 | default: 104 | break; 105 | } 106 | } 107 | 108 | -(void)shareToWeibo{ 109 | 110 | NSLog(@"shareToWeibo"); 111 | } 112 | 113 | -(void)sharetoWechatFriends{ 114 | 115 | NSLog(@"sharetoWechatFriends"); 116 | } 117 | 118 | -(void)sharetoWechatFriendsCircle{ 119 | 120 | NSLog(@"sharetoWechatFriendsCircle"); 121 | } 122 | 123 | -(void)shareToQQ{ 124 | 125 | NSLog(@"shareToQQ"); 126 | } 127 | 128 | -(void)shareToDouban{ 129 | 130 | NSLog(@"shareToDouban"); 131 | } 132 | 133 | -(void)shareToEmail{ 134 | 135 | NSLog(@"shareToEmail"); 136 | } 137 | 138 | 139 | @end 140 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Wei Wang (http://onevcat.com) 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 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/README.md: -------------------------------------------------------------------------------- 1 | # VVBlurPresentation 2 | 3 | A simple way to present a view controller with keeping the blurred previous one. 4 | 5 | It uses `UIBlurEffectStyle` in iOS 8 SDK, so it is only compatibility with iOS 8 and later. 6 | 7 | ## Screenshot 8 | 9 | A demo is better than 100 words. 10 | 11 | ![Screenshot](https://raw.github.com/onevcat/VVBlurPresentation/master/Gif/screenshot.gif) 12 | 13 | ## How to Install 14 | 15 | ### CocoaPods 16 | 17 | The easiest way to integrate `VVBlurPresentation` into your project would be using [CocoaPods](http://cocoapods.org). Add the snippet to your Podfile under the correct target and run `pod install`. 18 | 19 | pod 'VVBlurPresentation' 20 | 21 | ### Manually 22 | 23 | Clone the repo and add files under `Source` folder to your project. 24 | 25 | ## How to Use 26 | 27 | Briefly, make your presented view controller as a subclass of `VVBlurViewController`, then present it as usual. 28 | 29 | You can use it with both code and storyboard. 30 | 31 | 1. Create or change your presented view controller as a subclass of `VVBlurViewController`. 32 | 33 | //PresentedViewController.h 34 | #import "VVBlurViewController.h" 35 | @interface PresentedViewController : VVBlurViewController 36 | 37 | @end 38 | 39 | //PresentedViewController.m 40 | //... 41 | 42 | 2. Create an instance of `PresentedViewController` and present it from your presenting view controller. 43 | 44 | //PresentingViewController.m 45 | 46 | #import "PresentedViewController.h" 47 | 48 | // 49 | - (void)present { 50 | PresentedViewController *pvc = [PresentedViewController new]; 51 | [self presentViewController:pvc animated:YES completion:nil]; 52 | } 53 | 54 | If you are using storyboard, change the class of your view controller to the subclass of `VVBlurViewController` (`PresentedViewController` here). Then use a "Present Modally" segue to present the new view controller. 55 | 56 | ## Blur Styles 57 | 58 | All three blur styles (`UIBlurEffectStyleExtraLight`, `UIBlurEffectStyleLight` and `UIBlurEffectStyleDark`) are supported. You can set the `blurStyle` property of presented view controller to change the style. The default is dark. 59 | 60 | ## License 61 | 62 | `VVBlurPresentation` is released under MIT license. 63 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurPresentationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VVBlurPresentationController.h 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | @interface VVBlurPresentationController : UIPresentationController 27 | 28 | @property (nonatomic, assign) UIBlurEffectStyle blurStyle; 29 | 30 | - (instancetype)initWithPresentedViewController:(UIViewController *)presentedViewController presentingViewController:(UIViewController *)presentingViewController style:(UIBlurEffectStyle)style; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurPresentationController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VVBlurPresentationController.m 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "VVBlurPresentationController.h" 25 | 26 | @interface VVBlurPresentationController () 27 | //We need an effect container view to suppress the annoying warning on alpha of a visual effect view. 28 | @property (nonatomic, strong) UIView *effectContainerView; 29 | @property (nonatomic, strong) UIVisualEffectView *dimmingView; 30 | @end 31 | 32 | @implementation VVBlurPresentationController 33 | 34 | - (instancetype)initWithPresentedViewController:(UIViewController *)presentedViewController presentingViewController:(UIViewController *)presentingViewController style:(UIBlurEffectStyle)style { 35 | self = [super initWithPresentedViewController:presentedViewController presentingViewController:presentingViewController]; 36 | if (self) { 37 | UIBlurEffect *effect = [UIBlurEffect effectWithStyle:style]; 38 | _dimmingView = [[UIVisualEffectView alloc] initWithEffect:effect]; 39 | _blurStyle = style; 40 | _effectContainerView = [UIView new]; 41 | _effectContainerView.alpha = 0.0; 42 | } 43 | return self; 44 | } 45 | 46 | - (void)presentationTransitionWillBegin { 47 | self.effectContainerView.frame = self.containerView.bounds; 48 | self.dimmingView.frame = self.containerView.bounds; 49 | 50 | [self.effectContainerView insertSubview:self.dimmingView atIndex:0]; 51 | [self.containerView insertSubview:self.effectContainerView atIndex:0]; 52 | 53 | self.effectContainerView.alpha = 0.0; 54 | 55 | id coordinator = [self.presentedViewController transitionCoordinator]; 56 | if (coordinator) { 57 | [coordinator animateAlongsideTransition:^(id context) { 58 | self.effectContainerView.alpha = 1.0; 59 | } completion:nil]; 60 | } else { 61 | self.effectContainerView.alpha = 1.0; 62 | } 63 | } 64 | 65 | - (void)dismissalTransitionWillBegin { 66 | id coordinator = [self.presentedViewController transitionCoordinator]; 67 | if (coordinator) { 68 | [coordinator animateAlongsideTransition:^(id context) { 69 | self.effectContainerView.alpha = 0.0; 70 | } completion:nil]; 71 | } else { 72 | self.effectContainerView.alpha = 0.0; 73 | } 74 | } 75 | 76 | - (void)containerViewWillLayoutSubviews { 77 | self.effectContainerView.frame = self.containerView.bounds; 78 | self.dimmingView.frame = self.containerView.bounds; 79 | self.presentedView.frame = self.containerView.bounds; 80 | } 81 | 82 | - (BOOL)shouldPresentInFullscreen { 83 | return YES; 84 | } 85 | 86 | - (UIModalPresentationStyle)adaptivePresentationStyle { 87 | return UIModalPresentationCustom; 88 | } 89 | 90 | - (void)setBlurStyle:(UIBlurEffectStyle)blurStyle { 91 | if (blurStyle != _blurStyle) { 92 | _blurStyle = blurStyle; 93 | 94 | UIView *previousDimmingView = _dimmingView; 95 | 96 | UIBlurEffect *effect = [UIBlurEffect effectWithStyle:blurStyle]; 97 | self.dimmingView = [[UIVisualEffectView alloc] initWithEffect:effect]; 98 | NSArray *subviews = [self.effectContainerView subviews]; 99 | for (UIView *view in subviews) { 100 | if (view == previousDimmingView) { 101 | self.dimmingView.frame = previousDimmingView.frame; 102 | [self.effectContainerView insertSubview:self.dimmingView aboveSubview:previousDimmingView]; 103 | [previousDimmingView removeFromSuperview]; 104 | } 105 | } 106 | } 107 | } 108 | 109 | @end 110 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurPresenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // VVBlurPresenter.h 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | @interface VVBlurPresenter : NSObject 27 | @property (nonatomic, assign) UIBlurEffectStyle blurStyle; 28 | @end 29 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurPresenter.m: -------------------------------------------------------------------------------- 1 | // 2 | // VVBlurPresenter.m 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "VVBlurPresenter.h" 25 | #import "VVBlurPresentationController.h" 26 | #import "VVBlurTransitioning.h" 27 | 28 | @interface VVBlurPresenter () 29 | @property (nonatomic, strong) VVBlurPresentationController *animationController; 30 | @end 31 | 32 | @implementation VVBlurPresenter 33 | 34 | - (instancetype)init { 35 | self = [super init]; 36 | if (self) { 37 | _blurStyle = UIBlurEffectStyleDark; 38 | } 39 | return self; 40 | } 41 | 42 | - (VVBlurPresentationController *)presentationControllerForPresentedViewController:(UIViewController *)presented 43 | presentingViewController:(UIViewController *)presenting 44 | sourceViewController:(UIViewController *)source { 45 | if (!self.animationController) { 46 | self.animationController = [[VVBlurPresentationController alloc] initWithPresentedViewController:presented presentingViewController:presenting style:self.blurStyle]; 47 | } 48 | return self.animationController; 49 | 50 | } 51 | 52 | - (id)animationControllerForPresentedController:(UIViewController *)presented 53 | presentingController:(UIViewController *)presenting 54 | sourceController:(UIViewController *)source { 55 | 56 | VVBlurTransitioning *transition = [VVBlurTransitioning new]; 57 | transition.isPresentation = YES; 58 | return transition; 59 | 60 | } 61 | 62 | //这个方法是当dismiss的时候会调用 63 | - (id)animationControllerForDismissedController:(UIViewController *)dismissed { 64 | 65 | VVBlurTransitioning *transition = [VVBlurTransitioning new]; 66 | transition.isPresentation = NO; 67 | return transition; 68 | } 69 | 70 | - (void)setBlurStyle:(UIBlurEffectStyle)blurStyle { 71 | if (_blurStyle != blurStyle) { 72 | _blurStyle = blurStyle; 73 | self.animationController.blurStyle = blurStyle; 74 | } 75 | } 76 | @end 77 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurTransitioning.h: -------------------------------------------------------------------------------- 1 | // 2 | // VVChromeTransitioner.h 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | @interface VVBlurTransitioning : NSObject 27 | @property (nonatomic, assign) BOOL isPresentation; 28 | @end 29 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurTransitioning.m: -------------------------------------------------------------------------------- 1 | // 2 | // VVChromeTransitioner.m 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "VVBlurTransitioning.h" 25 | 26 | @implementation VVBlurTransitioning 27 | 28 | -(NSTimeInterval)transitionDuration:(id)transitionContext { 29 | return 0.5f; 30 | } 31 | 32 | -(void)animateTransition:(id)transitionContext { 33 | UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 34 | UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 35 | 36 | UIView *fromView = [transitionContext viewForKey:UITransitionContextFromViewKey]; 37 | UIView *toView = [transitionContext viewForKey:UITransitionContextToViewKey]; 38 | 39 | UIView *containerView = [transitionContext containerView]; 40 | if (self.isPresentation) { 41 | [containerView addSubview:toView]; 42 | } 43 | 44 | UIViewController *animatingViewController = self.isPresentation ? toViewController : fromViewController; 45 | UIView *animatingView = self.isPresentation ? toView : fromView; 46 | 47 | CGRect onScreenFrame = [transitionContext finalFrameForViewController:animatingViewController]; 48 | CGRect offScreenFrame = CGRectOffset(onScreenFrame, 0, onScreenFrame.size.height); 49 | 50 | CGRect initialFrame = self.isPresentation ? offScreenFrame : onScreenFrame; 51 | CGRect finalFrame = self.isPresentation ? onScreenFrame : offScreenFrame; 52 | animatingView.frame = initialFrame; 53 | 54 | [UIView animateWithDuration:[self transitionDuration:transitionContext] delay:0.0 usingSpringWithDamping:300.0 initialSpringVelocity:5.0 options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionBeginFromCurrentState animations:^{ 55 | animatingView.frame = finalFrame; 56 | } completion:^(BOOL finished) { 57 | if (!self.isPresentation) { 58 | [fromView removeFromSuperview]; 59 | } 60 | [transitionContext completeTransition:YES]; 61 | }]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VVBlurViewController.h 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | 27 | @interface VVBlurViewController : UIViewController 28 | 29 | @property (nonatomic, assign) UIBlurEffectStyle blurStyle; 30 | @end 31 | 32 | -------------------------------------------------------------------------------- /KYShareMenu/VVBlurPresentation/Source/VVBlurViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VVBlurViewController.m 3 | // 4 | // Copyright (c) 2015 Wei Wang (http://onevcat.com) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "VVBlurViewController.h" 25 | #import "VVBlurPresenter.h" 26 | 27 | @interface VVBlurViewController () 28 | @property (nonatomic, strong) VVBlurPresenter *presenter; 29 | @end 30 | 31 | @implementation VVBlurViewController 32 | 33 | - (instancetype)initWithCoder:(NSCoder *)aDecoder { 34 | self = [super initWithCoder:aDecoder]; 35 | if (self) { 36 | [self vv_commonSetup]; 37 | } 38 | return self; 39 | } 40 | 41 | 42 | - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 43 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 44 | if (self) { 45 | [self vv_commonSetup]; 46 | } 47 | return self; 48 | } 49 | 50 | - (void)vv_commonSetup { 51 | self.modalPresentationStyle = UIModalPresentationCustom; 52 | 53 | _blurStyle = UIBlurEffectStyleDark; 54 | _presenter = [[VVBlurPresenter alloc] init]; 55 | _presenter.blurStyle = _blurStyle; 56 | 57 | self.transitioningDelegate = _presenter; 58 | } 59 | 60 | - (void)viewDidLoad { 61 | [super viewDidLoad]; 62 | self.view.backgroundColor = [UIColor clearColor]; 63 | } 64 | 65 | -(void)setBlurStyle:(UIBlurEffectStyle)blurStyle { 66 | if (blurStyle != _blurStyle) { 67 | _blurStyle = blurStyle; 68 | _presenter.blurStyle = blurStyle; 69 | } 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /KYShareMenu/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // KYShareMenu 4 | // 5 | // Created by Kitten Yang on 3/24/15. 6 | // Copyright (c) 2015 Kitten Yang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /KYShareMenu/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // KYShareMenu 4 | // 5 | // Created by Kitten Yang on 3/24/15. 6 | // Copyright (c) 2015 Kitten Yang. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "KYShareViewController.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | 21 | } 22 | 23 | - (void)didReceiveMemoryWarning { 24 | [super didReceiveMemoryWarning]; 25 | 26 | } 27 | -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ 28 | KYShareViewController *shareVC = segue.destinationViewController; 29 | shareVC.delegate = self; 30 | shareVC.blurStyle = UIBlurEffectStyleDark; 31 | } 32 | 33 | 34 | //设置主控制器去dismiss弹出的视图,而不是弹出的视图自己dismiss自己 35 | -(void)didDismissKYShareVC:(KYShareViewController *)viewController{ 36 | [self dismissViewControllerAnimated:YES completion:nil]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /KYShareMenu/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // KYShareMenu 4 | // 5 | // Created by Kitten Yang on 3/24/15. 6 | // Copyright (c) 2015 Kitten Yang. 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 | -------------------------------------------------------------------------------- /KYShareMenuTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /KYShareMenuTests/KYShareMenuTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // KYShareMenuTests.m 3 | // KYShareMenuTests 4 | // 5 | // Created by Kitten Yang on 3/24/15. 6 | // Copyright (c) 2015 Kitten Yang. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface KYShareMenuTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation KYShareMenuTests 17 | 18 | - (void)setUp { 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 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KYShareMenu 2 | 带弹性动画的分享菜单 3 | 4 | ![](demo.gif) 5 | 6 | ##Usage 7 | 8 | 本Demo使用了[onevcat](https://github.com/onevcat)的[VVBlurPresentation](https://github.com/onevcat/VVBlurPresentation)实现present之后背景模糊。 9 | 10 | 11 | ``` 12 | -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ 13 | KYShareViewController *shareVC = segue.destinationViewController; 14 | shareVC.delegate = self; 15 | shareVC.blurStyle = UIBlurEffectStyleDark; 16 | } 17 | ``` 18 | 19 | 或者 20 | 21 | ``` 22 | -(IBAction)showMenu:(id)sender{ 23 | KYShareViewController *shareVC = segue.destinationViewController; 24 | shareVC.delegate = self; 25 | shareVC.blurStyle = UIBlurEffectStyleDark; 26 | [self presentViewController:shareVC animated:YES completion:nil]; 27 | } 28 | ``` 29 | 30 | 31 | ##Required 32 | 33 | iOS8+ 34 | -------------------------------------------------------------------------------- /class/KYShareViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // KYShareViewController.h 3 | // SideChef_iphone 4 | // 5 | // Created by Kitten Yang on 1/16/15. 6 | // Copyright (c) 2015 SideChef. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "VVBlurViewController.h" 11 | 12 | @class KYShareViewController; 13 | 14 | //----通知RecipeDetailBoard_iPhone去dismiss当前VC 15 | @protocol KYShareDismissDelegate 16 | -(void)didDismissKYShareVC:(KYShareViewController *)viewController; 17 | @end 18 | 19 | 20 | 21 | 22 | @interface KYShareViewController : VVBlurViewController 23 | 24 | @property(nonatomic,weak)id delegate; 25 | 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /class/KYShareViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // KYShareViewController.m 3 | // SideChef_iphone 4 | // 5 | // Created by Kitten Yang on 1/16/15. 6 | // Copyright (c) 2015 SideChef. All rights reserved. 7 | // 8 | 9 | 10 | #import "KYShareViewController.h" 11 | 12 | 13 | #define ScreenWight [[UIScreen mainScreen]bounds].size.width 14 | #define ScreenHeight [[UIScreen mainScreen]bounds].size.height 15 | 16 | #define BtnWidth ([[UIScreen mainScreen]bounds].size.width - 140)/3 17 | #define kDelayTime 0.6f 18 | 19 | @interface KYShareViewController () 20 | @property (nonatomic,strong)UIDynamicAnimator *animator; 21 | 22 | @property (strong, nonatomic) IBOutlet UIButton *weibo; 23 | @property (strong, nonatomic) IBOutlet UIButton *wechat; 24 | @property (strong, nonatomic) IBOutlet UIButton *friendcircle; 25 | @property (strong, nonatomic) IBOutlet UIButton *qq; 26 | @property (strong, nonatomic) IBOutlet UIButton *douban; 27 | @property (strong, nonatomic) IBOutlet UIButton *tencent; 28 | 29 | @end 30 | 31 | @implementation KYShareViewController 32 | 33 | 34 | 35 | 36 | 37 | - (void)viewDidLoad { 38 | [super viewDidLoad]; 39 | [self bounceMenu]; 40 | } 41 | 42 | - (void)didReceiveMemoryWarning { 43 | [super didReceiveMemoryWarning]; 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | -(void)bounceMenu{ 48 | CGPoint point1 = CGPointMake(30+BtnWidth/2, (ScreenHeight / 2 -20)-BtnWidth/2); 49 | CGPoint point2 = CGPointMake(70 + 1.5*BtnWidth, (ScreenHeight / 2 -20)-BtnWidth/2); 50 | CGPoint point3 = CGPointMake(110 + 2.5*BtnWidth, (ScreenHeight / 2 -20)-BtnWidth/2); 51 | CGPoint point4 = CGPointMake(30+BtnWidth/2, (ScreenHeight / 2 + 20) + BtnWidth/2); 52 | CGPoint point5 = CGPointMake(70 + 1.5*BtnWidth,(ScreenHeight / 2 + 20) + BtnWidth/2); 53 | CGPoint point6 = CGPointMake(110 + 2.5*BtnWidth,(ScreenHeight / 2 + 20) + BtnWidth/2); 54 | 55 | 56 | UIDynamicAnimator *animator = [[UIDynamicAnimator alloc]initWithReferenceView:self.view]; 57 | 58 | UISnapBehavior *snap1 = [[UISnapBehavior alloc]initWithItem:self.weibo snapToPoint:point1]; 59 | [animator addBehavior:snap1]; 60 | UISnapBehavior *snap2 = [[UISnapBehavior alloc]initWithItem:self.wechat snapToPoint:point2]; 61 | [animator addBehavior:snap2]; 62 | UISnapBehavior *snap3 = [[UISnapBehavior alloc]initWithItem:self.friendcircle snapToPoint:point3]; 63 | [animator addBehavior:snap3]; 64 | UISnapBehavior *snap4 = [[UISnapBehavior alloc]initWithItem:self.qq snapToPoint:point4]; 65 | [animator addBehavior:snap4]; 66 | UISnapBehavior *snap5 = [[UISnapBehavior alloc]initWithItem:self.douban snapToPoint:point5]; 67 | [animator addBehavior:snap5]; 68 | UISnapBehavior *snap6 = [[UISnapBehavior alloc]initWithItem:self.tencent snapToPoint:point6]; 69 | [animator addBehavior:snap6]; 70 | 71 | self.animator = animator; 72 | } 73 | 74 | - (IBAction)dismissBt:(id)sender 75 | { 76 | if (self.delegate && [self.delegate respondsToSelector:@selector(didDismissKYShareVC:)]) { 77 | [self.delegate didDismissKYShareVC:self]; 78 | } 79 | } 80 | 81 | - (IBAction)shareBtnAction:(UIButton *)sender 82 | { 83 | switch (sender.tag) { 84 | case 101: //微博 85 | [self shareToWeibo]; 86 | break; 87 | case 102: //微信好友 88 | [self sharetoWechatFriends]; 89 | break; 90 | case 103: //朋友圈 91 | [self sharetoWechatFriendsCircle]; 92 | break; 93 | case 104: //QQ 94 | [self shareToQQ]; 95 | break; 96 | case 105: //豆瓣 97 | [self shareToDouban]; 98 | break; 99 | case 106: //EMail 100 | [self shareToEmail]; 101 | break; 102 | 103 | default: 104 | break; 105 | } 106 | } 107 | 108 | -(void)shareToWeibo{ 109 | 110 | NSLog(@"shareToWeibo"); 111 | } 112 | 113 | -(void)sharetoWechatFriends{ 114 | 115 | NSLog(@"sharetoWechatFriends"); 116 | } 117 | 118 | -(void)sharetoWechatFriendsCircle{ 119 | 120 | NSLog(@"sharetoWechatFriendsCircle"); 121 | } 122 | 123 | -(void)shareToQQ{ 124 | 125 | NSLog(@"shareToQQ"); 126 | } 127 | 128 | -(void)shareToDouban{ 129 | 130 | NSLog(@"shareToDouban"); 131 | } 132 | 133 | -(void)shareToEmail{ 134 | 135 | NSLog(@"shareToEmail"); 136 | } 137 | 138 | 139 | @end 140 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KittenYang/KYShareMenu/725d51a78f111f7acdf8ff91bd2b811b0a71e24a/demo.gif --------------------------------------------------------------------------------