From 5111e5863f521dc4e12d5f807e434ae8df7e8a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louren=C3=A7o=20Marinho?= Date: Mon, 25 May 2015 21:54:58 -0300 Subject: [PATCH] Initial commit --- Action Button.png | Bin 0 -> 17874 bytes ActionButton.podspec | 24 + Example/.DS_Store | Bin 0 -> 8196 bytes .../ActionButton.xcodeproj/project.pbxproj | 439 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/ActionButton.xccheckout | 41 ++ .../UserInterfaceState.xcuserstate | Bin 0 -> 21491 bytes .../xcschemes/ActionButton-Example.xcscheme | 112 +++++ .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 + .../xcschemes/xcschememanagement.plist | 19 + Example/ActionButton/.DS_Store | Bin 0 -> 6148 bytes Example/ActionButton/AppDelegate.swift | 46 ++ .../ActionButton/Base.lproj/Main.storyboard | 25 + .../AppIcon.appiconset/Contents.json | 38 ++ .../googleplus_icon.imageset/Contents.json | 21 + .../googleplus_icon.png | Bin 0 -> 4155 bytes .../twitter_icon.imageset/Contents.json | 21 + .../twitter_icon.imageset/twitter_icon.png | Bin 0 -> 3835 bytes Example/ActionButton/Info.plist | 39 ++ Example/ActionButton/LaunchScreen.xib | 41 ++ Example/ActionButton/ViewController.swift | 31 ++ Example/Podfile | 12 + Example/Source/.DS_Store | Bin 0 -> 6148 bytes Example/Source/ActionButton.swift | 204 ++++++++ Example/Source/ActionButtonItem.swift | 124 +++++ Example/Tests/.DS_Store | Bin 0 -> 6148 bytes Example/Tests/Info.plist | 24 + Example/Tests/Tests.swift | 28 ++ LICENSE | 19 + README.md | 58 +++ Source/.DS_Store | Bin 0 -> 6148 bytes Source/ActionButton.swift | 204 ++++++++ Source/ActionButtonItem.swift | 124 +++++ 33 files changed, 1706 insertions(+) create mode 100644 Action Button.png create mode 100644 ActionButton.podspec create mode 100644 Example/.DS_Store create mode 100644 Example/ActionButton.xcodeproj/project.pbxproj create mode 100644 Example/ActionButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Example/ActionButton.xcodeproj/project.xcworkspace/xcshareddata/ActionButton.xccheckout create mode 100644 Example/ActionButton.xcodeproj/project.xcworkspace/xcuserdata/lourencomarinho.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 Example/ActionButton.xcodeproj/xcshareddata/xcschemes/ActionButton-Example.xcscheme create mode 100644 Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist create mode 100644 Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 Example/ActionButton/.DS_Store create mode 100644 Example/ActionButton/AppDelegate.swift create mode 100644 Example/ActionButton/Base.lproj/Main.storyboard create mode 100644 Example/ActionButton/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Example/ActionButton/Images.xcassets/googleplus_icon.imageset/Contents.json create mode 100644 Example/ActionButton/Images.xcassets/googleplus_icon.imageset/googleplus_icon.png create mode 100644 Example/ActionButton/Images.xcassets/twitter_icon.imageset/Contents.json create mode 100644 Example/ActionButton/Images.xcassets/twitter_icon.imageset/twitter_icon.png create mode 100644 Example/ActionButton/Info.plist create mode 100644 Example/ActionButton/LaunchScreen.xib create mode 100644 Example/ActionButton/ViewController.swift create mode 100644 Example/Podfile create mode 100644 Example/Source/.DS_Store create mode 100755 Example/Source/ActionButton.swift create mode 100755 Example/Source/ActionButtonItem.swift create mode 100644 Example/Tests/.DS_Store create mode 100644 Example/Tests/Info.plist create mode 100644 Example/Tests/Tests.swift create mode 100644 LICENSE create mode 100644 README.md create mode 100644 Source/.DS_Store create mode 100755 Source/ActionButton.swift create mode 100755 Source/ActionButtonItem.swift diff --git a/Action Button.png b/Action Button.png new file mode 100644 index 0000000000000000000000000000000000000000..34277bf371c240972e6d4abd84f9cd6e5ec7ce04 GIT binary patch literal 17874 zcmYg&V_2r$_jcX6$*#$^ZQHiZ$+oS@t~=YdYpTg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i#{AD*%^^9(vZMBi9b7SKb0nbg%953DPDEm&! zQ)Xpy`7Sy^p7r^!DRQ4)B`#r13fi%}iR0oGxy%)lT)GypN-KtNs;F!5rV6dlzIp%t z`sWKjPn#w-wdWXcPyOPJ@0SaP{5%0`ABpfYE%jT{S1(jmfAZn;Q&Y87Wg@f`jD%FY z8*L{sNo%vtQk*3fvOqJ)z*NJrVuQYKgndwIiLd(vox2ZJWhcfjRz5M4Z9C7FtG#UO zGhH@JS`qA8+3Rr`xVPJ6f@N=~u;K|s#;s#XlbY!D^~f#KDQZmr "lourenco.pmarinho@gmail.com" } + s.source = { :git => "https://github.com/lourenco-marinho/ActionButton.git", :tag => s.version.to_s } + s.social_media_url = 'https://twitter.com/lopima' + + s.platform = :ios, '8.0' + s.requires_arc = true + s.source_files = 'Source/*.swift' +end diff --git a/Example/.DS_Store b/Example/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2ba162a5796709cfc4cf2a28f857964ebd1afc89 GIT binary patch literal 8196 zcmeI0&2G~`5XWbev~gPwMtmp|7au{2P?|JKb8|yM;(!#9suiLT?AR!-EIW!F0*WH# z3~#~rdmuP*M(`+{!p!crYEr@hBoxGqwfi62GaKi(YdaGF5RHMi2~Yq40~@Kif!$Ax z&Qm*M8GVFK3d{$HA%X@BAjOT12`~XBzyz286Iez9_|7IX7QFY>S?-wt6ZkI)(DT8< zMrv!FD3y;6>|_amn#04=(8oGJ=2%*7trMj(6~|Q7gV3o$ml#5&<9Un1QEjagr79hS zN(Z4oS?CHy$WO;SONN86m2%Gnn7~;AblaSR9q3@i9?aD5Sj*oIMpbqm{7 zY^&2L_P@w;he=Q8eRq3dkff#3H<8KaR#x-I+WH1<=K1vpt!_MQrA|6X8czSd+zUM4 z)qc}SyT|@s9ET^qfu2UdGW9j4jU0wthuESGA9)kxy^q`O4(H!j0m`||t8g?F< zGX616QwaWSw75&rQ)%eo6hRB42RL$PJ~s1^VzC)|n=1_mt z__7+`smOm8UZq0oeshb~eXUk1T3eMGuKO3iweI=-k1K?Y2`oE-th&Gg)&Dma|Np=2 zUxTlY2{3^_ARuzPt=$F=aQs_#ek`iBEo_glkx|@4sZ7C6mgA_h97m + + + + diff --git a/Example/ActionButton.xcodeproj/project.xcworkspace/xcshareddata/ActionButton.xccheckout b/Example/ActionButton.xcodeproj/project.xcworkspace/xcshareddata/ActionButton.xccheckout new file mode 100644 index 0000000..40fb5f4 --- /dev/null +++ b/Example/ActionButton.xcodeproj/project.xcworkspace/xcshareddata/ActionButton.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 694891F3-450D-4D72-B6B8-68A3A8B56506 + IDESourceControlProjectName + ActionButton + IDESourceControlProjectOriginsDictionary + + 8CED2B6590B31C3A38E6715AFB8326A2BB47FA3A + github.com:lourenco-marinho/ActionButton.git + + IDESourceControlProjectPath + Example/ActionButton.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + 8CED2B6590B31C3A38E6715AFB8326A2BB47FA3A + ../../.. + + IDESourceControlProjectURL + github.com:lourenco-marinho/ActionButton.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + 8CED2B6590B31C3A38E6715AFB8326A2BB47FA3A + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 8CED2B6590B31C3A38E6715AFB8326A2BB47FA3A + IDESourceControlWCCName + ActionButton + + + + diff --git a/Example/ActionButton.xcodeproj/project.xcworkspace/xcuserdata/lourencomarinho.xcuserdatad/UserInterfaceState.xcuserstate b/Example/ActionButton.xcodeproj/project.xcworkspace/xcuserdata/lourencomarinho.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..98a7120fa9c818c6909f583090115d8f0bca32ab GIT binary patch literal 21491 zcmdUX30zZ0_vp;s5D*9?Bm_l}EV2c{7D8A91f}8%?h8hU5Jf_hfZ{q=t+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*sCzKuy0{>VQitMFs?AMP*-RwG#8c>4lKN(a71Bc;h4hlg%b;J zDtxN&V&O-HUljgo_BTt+QnTEwG{=}#X018ioM_H48_c=pGV^eAg?Y4joOz15+C0r{ zH_tG;&9lra&G(tx%p1)Qo41*_n|GRboA;XcnGc&^HNRngr({UU@RD&QwIvNDO(ly; zR+ZdYvbtn#$$cdcmb8{UR`O)YQzcKAJX5l_WM9etlFJr1nJ1~`Tqe7Kc*1? literal 0 HcmV?d00001 diff --git a/Example/ActionButton.xcodeproj/xcshareddata/xcschemes/ActionButton-Example.xcscheme b/Example/ActionButton.xcodeproj/xcshareddata/xcschemes/ActionButton-Example.xcscheme new file mode 100644 index 0000000..3a92053 --- /dev/null +++ b/Example/ActionButton.xcodeproj/xcshareddata/xcschemes/ActionButton-Example.xcscheme @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..fe2b454 --- /dev/null +++ b/Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..a1575db --- /dev/null +++ b/Example/ActionButton.xcodeproj/xcuserdata/lourencomarinho.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,19 @@ + + + + + SuppressBuildableAutocreation + + 607FACCF1AFB9204008FA782 + + primary + + + 607FACE41AFB9204008FA782 + + primary + + + + + diff --git a/Example/ActionButton/.DS_Store b/Example/ActionButton/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..cb7a06e823421a4965b18e05b59080dafe2fed6e GIT binary patch literal 6148 zcmeHK!A=4(5Pd~r5D#MF!Q&o1k@yEIq6vv7NjxLCB4%X?3(@0#h9Bhz_&54y+912g zRgIY;?Q6U9X4+S>-2!l(<=rXJ0?=R)tnIP-#^kw_4XcHbU82(%2~s2&;}(kzZyWfF z3dr6a;tVtXy4<_3{Y%hBj%Q48k3}!dM#D54(p&y2mn+&aK#Ku@7#N z&up>AzDKJ~0aL&fSScXyhloWm4p?~9R|hM-0ubvQR%2T}5QP&3i~|-P`Gn>?mFTH1 zTrr%db36)ualpc(r^AKIhYOiqxS=@B&iIkK!^Ix0HU&(9vI0B4+miGDV*CBSOtPLS zU<&*z1zf$`?{>JPaJFtNPR`nhWxygPeuc*sg$+H5=_^O^F^d| Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(application: UIApplication) { + // 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. + // 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. + } + + func applicationDidEnterBackground(application: UIApplication) { + // 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. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(application: UIApplication) { + // 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. + } + + func applicationDidBecomeActive(application: UIApplication) { + // 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. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/Example/ActionButton/Base.lproj/Main.storyboard b/Example/ActionButton/Base.lproj/Main.storyboard new file mode 100644 index 0000000..52ea29e --- /dev/null +++ b/Example/ActionButton/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/ActionButton/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/ActionButton/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d3942e9 --- /dev/null +++ b/Example/ActionButton/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/Example/ActionButton/Images.xcassets/googleplus_icon.imageset/Contents.json b/Example/ActionButton/Images.xcassets/googleplus_icon.imageset/Contents.json new file mode 100644 index 0000000..8217e13 --- /dev/null +++ b/Example/ActionButton/Images.xcassets/googleplus_icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "googleplus_icon.png" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Example/ActionButton/Images.xcassets/googleplus_icon.imageset/googleplus_icon.png b/Example/ActionButton/Images.xcassets/googleplus_icon.imageset/googleplus_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..85bdfad2900c604d2d6773ea2792210c96b6bdb4 GIT binary patch literal 4155 zcmaJ^c{tQv8y;iJnzC;hRJP2*$iB>Cjck)OGG@jSW|$evkR?;EBzv-?>_t+M6xq@` zmJtyVA!`yz4N<<)_x66@A79@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opmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + + + diff --git a/Example/ActionButton/LaunchScreen.xib b/Example/ActionButton/LaunchScreen.xib new file mode 100644 index 0000000..4450587 --- /dev/null +++ b/Example/ActionButton/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/ActionButton/ViewController.swift b/Example/ActionButton/ViewController.swift new file mode 100644 index 0000000..bd7a903 --- /dev/null +++ b/Example/ActionButton/ViewController.swift @@ -0,0 +1,31 @@ +// +// ViewController.swift +// ActionButton +// +// Created by Lourenço Marinho on 05/25/2015. +// Copyright (c) 05/25/2015 Lourenço Marinho. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + var actionButton: ActionButton! + + override func viewDidLoad() { + super.viewDidLoad() + + let twitterImage = UIImage(named: "twitter_icon.png")! + let plusImage = UIImage(named: "googleplus_icon.png")! + + let twitter = ActionButtonItem(title: "Twitter", image: twitterImage) + twitter.action = { item in println("Twitter...") } + + let google = ActionButtonItem(title: "Google Plus", image: plusImage) + google.action = { item in println("Google Plus...") } + + actionButton = ActionButton(attachedToView: self.view, items: [twitter, google]) + actionButton.action = { button in button.toggleMenu() } + } +} + diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..b845014 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,12 @@ +source 'https://github.com/CocoaPods/Specs.git' +use_frameworks! + +target 'ActionButton_Example', :exclusive => true do + pod "ActionButton", :path => "../" +end + +target 'Tests', :exclusive => true do + pod "ActionButton", :path => "../" + + +end diff --git a/Example/Source/.DS_Store b/Example/Source/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4bba6c08df4feb17ac5e08a74578c4e061f868a1 GIT binary patch literal 6148 zcmeHKO-lno41K9R6ucA<;&G0i1pmRhRH0}8fV3(It$VP=>;6FhQ+;m|#p3EsK}kyT zGBZhL_Ce*4M2jsp{QV8l+K+I7C0G1_kL#Cz zh9^9;{~nw9s#`8r-GcEV>xz0x9qo3s!10$g=B#{&^*6O%n6FwEwNx)98At|_fn*>V z_$dZ>W=kfAj%kyDWFQ%MXF&Typ$eP8-mz{SG`c=(d@PjE*Y#Lf0-M0zks}oIRHCO^ zJTc7E*ioatUuN);zn_w= zWFQ&%XAIbQc0FtPQE|3@`aGSrg?dAkD6W@7p}%(tU_<-JNged@BA;aXd< Oya-f6(j)`Fz`!f%rzpMv literal 0 HcmV?d00001 diff --git a/Example/Source/ActionButton.swift b/Example/Source/ActionButton.swift new file mode 100755 index 0000000..67b60bd --- /dev/null +++ b/Example/Source/ActionButton.swift @@ -0,0 +1,204 @@ +// ActionButton.swift +// +// The MIT License (MIT) +// +// Copyright (c) 2015 ActionButton +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +typealias ActionButtonAction = (ActionButton) -> Void + +public class ActionButton: NSObject { + + var active: Bool = false + var action: ActionButtonAction? + var items: [ActionButtonItem]? + var backgroundColor: UIColor? { + willSet { + floatButton.backgroundColor = newValue + } + } + + private var floatButton: UIButton! + private var contentView: UIView! + private var parentView: UIView! + private var blurVisualEffect: UIVisualEffectView! + private let itemOffset = -55 + private let floatButtonRadius = 50 + + public init(attachedToView view: UIView, items: [ActionButtonItem]?) { + super.init() + + self.parentView = view + self.items = items + let bounds = self.parentView.bounds + + self.floatButton = UIButton.buttonWithType(.Custom) as! UIButton + self.floatButton.layer.cornerRadius = CGFloat(floatButtonRadius / 2) + self.floatButton.layer.shadowOpacity = 1 + self.floatButton.layer.shadowRadius = 2 + self.floatButton.layer.shadowOffset = CGSize(width: 1, height: 1) + self.floatButton.layer.shadowColor = UIColor.grayColor().CGColor + self.floatButton.setTitle("+", forState: .Normal) + self.floatButton.backgroundColor = UIColor(red: 238.0/255.0, green: 130.0/255.0, blue: 34.0/255.0, alpha:1.0) + self.floatButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 8, right: 0) + self.floatButton.titleLabel!.font = UIFont(name: "HelveticaNeue-Light", size: 35) + self.floatButton.userInteractionEnabled = true + self.floatButton.setTranslatesAutoresizingMaskIntoConstraints(false) + + self.floatButton.addTarget(self, action: Selector("buttonTapped:"), forControlEvents: .TouchUpInside) + self.floatButton.addTarget(self, action: Selector("buttonTouchDown:"), forControlEvents: .TouchDown) + self.parentView.addSubview(self.floatButton) + + self.contentView = UIView(frame: bounds) + self.blurVisualEffect = UIVisualEffectView(effect: UIBlurEffect(style: .ExtraLight)) + self.blurVisualEffect.frame = self.contentView.frame + self.contentView.addSubview(self.blurVisualEffect) + + let tap = UITapGestureRecognizer(target: self, action: Selector("backgroundTapped:")) + self.contentView.addGestureRecognizer(tap) + + self.installConstraints() + } + + required public init(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Auto Layout Methods + + private func installConstraints() { + let views = ["floatButton":self.floatButton, "parentView":self.parentView] + let width = NSLayoutConstraint.constraintsWithVisualFormat("H:[floatButton(\(floatButtonRadius))]", options: nil, metrics: nil, views: views) + let height = NSLayoutConstraint.constraintsWithVisualFormat("V:[floatButton(\(floatButtonRadius))]", options: nil, metrics: nil, views: views) + self.floatButton.addConstraints(width) + self.floatButton.addConstraints(height) + + let trailingSpacing = NSLayoutConstraint.constraintsWithVisualFormat("V:[floatButton]-15-|", options: nil, metrics: nil, views: views) + let bottomSpacing = NSLayoutConstraint.constraintsWithVisualFormat("H:[floatButton]-15-|", options: nil, metrics: nil, views: views) + self.parentView.addConstraints(trailingSpacing) + self.parentView.addConstraints(bottomSpacing) + } + + // MARK: - Button Actions Methods + + func buttonTapped(sender: UIControl) { + animatePressingWithScale(1.0) + + if let unwrappedAction = self.action { + unwrappedAction(self) + } + } + + func buttonTouchDown(sender: UIButton) { + animatePressingWithScale(0.9) + } + + // MARK: - Gesture Recognizer Methods + + func backgroundTapped(gesture: UIGestureRecognizer) { + if self.active { + self.toggle() + } + } + + // MARK: - Custom Methods + func toggleMenu() { + self.placeButtonItems() + self.toggle() + } + + // MARK: - Float Button Items Placement + + private func placeButtonItems() { + if let optionalItems = self.items { + for item in optionalItems { + item.view.center = CGPoint(x: self.floatButton.center.x - 83, y: self.floatButton.center.y) + item.view.removeFromSuperview() + + self.contentView.addSubview(item.view) + } + } + } + + // MARK - Float Menu Methods + + private func toggle() { + self.animateMenu() + self.showBlur() + + self.active = !self.active + } + + private func animateMenu() { + let rotation = self.active ? 0 : CGFloat(M_PI_4) + + UIView.animateWithDuration(0.3, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.1, options: nil, animations: { + self.floatButton.transform = CGAffineTransformMakeRotation(rotation) + + if self.active == false { + self.contentView.alpha = 1.0 + + if let optionalItems = self.items { + for (index, item) in enumerate(optionalItems) { + let offset = index + 1 + let translation = self.itemOffset * offset + item.view.transform = CGAffineTransformMakeTranslation(0, CGFloat(translation)) + item.view.alpha = 1 + } + } + } else { + self.contentView.alpha = 0.0 + + if let optionalItems = self.items { + for item in optionalItems { + item.view.transform = CGAffineTransformMakeTranslation(0, 0) + item.view.alpha = 0 + } + } + } + }, completion: {completed in + if self.active == false { + self.hideBlur() + } + }) + } + + private func animateClick() { + UIView.animateWithDuration(0.3, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.1, options: .Repeat | .Autoreverse, animations: { + self.floatButton.transform = CGAffineTransformMakeScale(1.2, 1.2) + }, completion: nil) + } + + private func showBlur() { + self.parentView.insertSubview(self.contentView, belowSubview: self.floatButton) + } + + private func hideBlur() { + self.contentView.removeFromSuperview() + } + + private func animatePressingWithScale(scale: CGFloat) { + UIView.animateWithDuration(0.2, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.1, options: nil, animations: { + self.floatButton.transform = CGAffineTransformMakeScale(scale, scale) + }, completion: nil) + } +} diff --git a/Example/Source/ActionButtonItem.swift b/Example/Source/ActionButtonItem.swift new file mode 100755 index 0000000..690b625 --- /dev/null +++ b/Example/Source/ActionButtonItem.swift @@ -0,0 +1,124 @@ +// ActionButton.swift +// +// The MIT License (MIT) +// +// Copyright (c) 2015 ActionButton +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +typealias ActionButtonItemAction = (ActionButtonItem) -> Void + +public class ActionButtonItem: NSObject { + + var action: ActionButtonItemAction? + var view: UIView! + var text: String { + get { + return self.label.text! + } + + set { + self.label.text = newValue + } + } + + private var label: UILabel! + private var button: UIButton! + private var image: UIImage! + private var labelBackground: UIView! + private let viewSize = CGSize(width: 200, height: 35) + private let buttonSize = CGSize(width: 35, height: 35) + private let backgroundInset = CGSize(width: 10, height: 10) + + public init(title optionalTitle: String?, image: UIImage?) { + super.init() + + self.view = UIView(frame: CGRect(origin: CGPointZero, size: self.viewSize)) + self.view.alpha = 0 + self.view.userInteractionEnabled = true + self.view.backgroundColor = UIColor.clearColor() + + self.button = UIButton.buttonWithType(.Custom) as! UIButton + self.button.frame = CGRect(origin: CGPoint(x: self.viewSize.width - self.buttonSize.width, y: 0), size: buttonSize) + self.button.layer.shadowOpacity = 1 + self.button.layer.shadowRadius = 2 + self.button.layer.shadowOffset = CGSize(width: 1, height: 1) + self.button.layer.shadowColor = UIColor.grayColor().CGColor + self.button.addTarget(self, action: "buttonPressed:", forControlEvents: .TouchUpInside) + + if let unwrappedImage = image { + self.button.setImage(unwrappedImage, forState: .Normal) + } + + if let text = optionalTitle where text.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()).isEmpty == false { + self.label = UILabel() + self.label.font = UIFont(name: "HelveticaNeue-Medium", size: 13) + self.label.textColor = UIColor.darkGrayColor() + self.label.textAlignment = .Right + self.label.text = text + self.label.addGestureRecognizer(UITapGestureRecognizer(target: self, action: Selector("labelTapped:"))) + self.label.sizeToFit() + + self.labelBackground = UIView() + self.labelBackground.frame = self.label.frame + self.labelBackground.backgroundColor = UIColor.whiteColor() + self.labelBackground.layer.cornerRadius = 3 + self.labelBackground.layer.shadowOpacity = 0.8 + self.labelBackground.layer.shadowOffset = CGSize(width: 0, height: 1) + self.labelBackground.layer.shadowRadius = 0.2 + self.labelBackground.layer.shadowColor = UIColor.lightGrayColor().CGColor + + // Adjust the label's background inset + self.labelBackground.frame.size.width = self.label.frame.size.width + backgroundInset.width + self.labelBackground.frame.size.height = self.label.frame.size.height + backgroundInset.height + self.label.frame.origin.x = self.label.frame.origin.x + backgroundInset.width / 2 + self.label.frame.origin.y = self.label.frame.origin.y + backgroundInset.height / 2 + + // Adjust label's background position + self.labelBackground.frame.origin.x = CGFloat(130 - self.label.frame.size.width) + self.labelBackground.center.y = self.view.center.y + self.labelBackground.addSubview(self.label) + + // Add Tap Gestures Recognizer + let tap = UITapGestureRecognizer(target: self, action: Selector("labelTapped:")) + self.view.addGestureRecognizer(tap) + + self.view.addSubview(self.labelBackground) + } + + self.view.addSubview(self.button) + } + + // MARK: - Button Action Methods + + func buttonPressed(sender: UIButton) { + if let unwrappedAction = self.action { + unwrappedAction(self) + } + } + + // MARK: - Gesture Recognizer Methods + func labelTapped(gesture: UIGestureRecognizer) { + if let unwrappedAction = self.action { + unwrappedAction(self) + } + } +} diff --git a/Example/Tests/.DS_Store b/Example/Tests/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a09b53ad25e5132c6a6b618f5011c83906f9b698 GIT binary patch literal 6148 zcmeHKyH3ME5S)b+5ouCVUP*<-ADp6qlo~z&1&D-X;Ybdmb;r-~PcZuc#WA!Luq*A( zJ$AhI6y7@kvUt9~0OkOubVa;s7@O{^kL)N`6vdu#jx8EIqQh>K{r!S+Pq4xhHfXWO zUp4LBx@p(k*O$AZpS_!L1k7-Q2dmSO)!~IzH`pDp-VRts&5#PD0;xbMkP7^31=zFI zrZdNksX!`_3VbP`|A#_Xtbx6w{W=)*_^$gCMKzA?E8&V5q>cPv_eIFX=zr|A(ZUr2?tIpHe_3 z%j@NWpA@}y^l{p23;mY + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.cocoapods.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift new file mode 100644 index 0000000..d670933 --- /dev/null +++ b/Example/Tests/Tests.swift @@ -0,0 +1,28 @@ +import UIKit +import XCTest + +class Tests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + XCTAssert(true, "Pass") + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock() { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a79c117 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Lourenço Marinho + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..1333eb3 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +![Action Button](Action Button.png) + +Action button is a Floating Action Button inspired from Google Inbox implemented in Swift + +Import +-- +You can use [CocoaPods](https://cocoapods.org/) to integrate Action Button in your project. +You can install it with the following command + +``` +$ gem install cocoapods +``` + +Update your ```Podfile``` to use Action Button + +``` +pod 'ActionButton' +``` +Then, run the following command + +``` +$ pod install +``` + +Usage +-- + +#### Define your actions +```swift +let share = ActionButtonItem(title: "share", image: shareImage) +share.action = { item in println("Sharing...") } + +let email = ActionButtonItem(title: "email", image: emailImage) +email.action = { item in println("Email...") } +``` + +#### Create a Action Button with your actions +```swift +actionButton = ActionButton(attachedToView: view, items: [share, email]) +actionButton.action = { button in button.toggleMenu() } +``` + +## Give it a try +You can try Action Button with CocoaPods +``` +$ pod try ActionButton +``` +Who to blame +-- +- [Lourenço Marinho](http://github.com/lourenco-marinho) ([@lopima](https://twitter.com/lopima)) + +More +-- +Action Button is a working in progress so feel free to fork this project and improve it! + +License +-- +Action Button is released under the MIT license. See LICENSE for details. diff --git a/Source/.DS_Store b/Source/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..02c143e730013aba18244f0daca1c1fe21c80f0d GIT binary patch literal 6148 zcmeHK%Sr=55UeqK2zUt|#N!-23I4&jL?LH?KoS*%#66hcbwAL5idECCxVU;#P`X2R z^~`kl%ob!G08+cVJqKn0rc_~)Ga~999Xjw}VX8GcJfg)8TmJrrXzfS1z=|t=z{mB= zKf@EA*?*7iV%@El>u$+-k#$8qr8fILEpYs0jRh;;Ve?I`7v`(h#A~TuNH7o#1Ovf9 zFz{0h@XVG>4-LZx1HnKr@XmnthfEa~$KJ4R9W=T=YrGLk=<9kc%#OveH{=K;kLk1?+oay|(j=kv~j{ zRxl6@{4)kpGryj<{3t(LKYgCg+DyHnN)*@2q0k>(0@%<#a#9CvJj-WXaqJCMMg29M P7#D#`NSI*Y7Z`X2L;@(n literal 0 HcmV?d00001 diff --git a/Source/ActionButton.swift b/Source/ActionButton.swift new file mode 100755 index 0000000..67b60bd --- /dev/null +++ b/Source/ActionButton.swift @@ -0,0 +1,204 @@ +// ActionButton.swift +// +// The MIT License (MIT) +// +// Copyright (c) 2015 ActionButton +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +typealias ActionButtonAction = (ActionButton) -> Void + +public class ActionButton: NSObject { + + var active: Bool = false + var action: ActionButtonAction? + var items: [ActionButtonItem]? + var backgroundColor: UIColor? { + willSet { + floatButton.backgroundColor = newValue + } + } + + private var floatButton: UIButton! + private var contentView: UIView! + private var parentView: UIView! + private var blurVisualEffect: UIVisualEffectView! + private let itemOffset = -55 + private let floatButtonRadius = 50 + + public init(attachedToView view: UIView, items: [ActionButtonItem]?) { + super.init() + + self.parentView = view + self.items = items + let bounds = self.parentView.bounds + + self.floatButton = UIButton.buttonWithType(.Custom) as! UIButton + self.floatButton.layer.cornerRadius = CGFloat(floatButtonRadius / 2) + self.floatButton.layer.shadowOpacity = 1 + self.floatButton.layer.shadowRadius = 2 + self.floatButton.layer.shadowOffset = CGSize(width: 1, height: 1) + self.floatButton.layer.shadowColor = UIColor.grayColor().CGColor + self.floatButton.setTitle("+", forState: .Normal) + self.floatButton.backgroundColor = UIColor(red: 238.0/255.0, green: 130.0/255.0, blue: 34.0/255.0, alpha:1.0) + self.floatButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 8, right: 0) + self.floatButton.titleLabel!.font = UIFont(name: "HelveticaNeue-Light", size: 35) + self.floatButton.userInteractionEnabled = true + self.floatButton.setTranslatesAutoresizingMaskIntoConstraints(false) + + self.floatButton.addTarget(self, action: Selector("buttonTapped:"), forControlEvents: .TouchUpInside) + self.floatButton.addTarget(self, action: Selector("buttonTouchDown:"), forControlEvents: .TouchDown) + self.parentView.addSubview(self.floatButton) + + self.contentView = UIView(frame: bounds) + self.blurVisualEffect = UIVisualEffectView(effect: UIBlurEffect(style: .ExtraLight)) + self.blurVisualEffect.frame = self.contentView.frame + self.contentView.addSubview(self.blurVisualEffect) + + let tap = UITapGestureRecognizer(target: self, action: Selector("backgroundTapped:")) + self.contentView.addGestureRecognizer(tap) + + self.installConstraints() + } + + required public init(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + // MARK: - Auto Layout Methods + + private func installConstraints() { + let views = ["floatButton":self.floatButton, "parentView":self.parentView] + let width = NSLayoutConstraint.constraintsWithVisualFormat("H:[floatButton(\(floatButtonRadius))]", options: nil, metrics: nil, views: views) + let height = NSLayoutConstraint.constraintsWithVisualFormat("V:[floatButton(\(floatButtonRadius))]", options: nil, metrics: nil, views: views) + self.floatButton.addConstraints(width) + self.floatButton.addConstraints(height) + + let trailingSpacing = NSLayoutConstraint.constraintsWithVisualFormat("V:[floatButton]-15-|", options: nil, metrics: nil, views: views) + let bottomSpacing = NSLayoutConstraint.constraintsWithVisualFormat("H:[floatButton]-15-|", options: nil, metrics: nil, views: views) + self.parentView.addConstraints(trailingSpacing) + self.parentView.addConstraints(bottomSpacing) + } + + // MARK: - Button Actions Methods + + func buttonTapped(sender: UIControl) { + animatePressingWithScale(1.0) + + if let unwrappedAction = self.action { + unwrappedAction(self) + } + } + + func buttonTouchDown(sender: UIButton) { + animatePressingWithScale(0.9) + } + + // MARK: - Gesture Recognizer Methods + + func backgroundTapped(gesture: UIGestureRecognizer) { + if self.active { + self.toggle() + } + } + + // MARK: - Custom Methods + func toggleMenu() { + self.placeButtonItems() + self.toggle() + } + + // MARK: - Float Button Items Placement + + private func placeButtonItems() { + if let optionalItems = self.items { + for item in optionalItems { + item.view.center = CGPoint(x: self.floatButton.center.x - 83, y: self.floatButton.center.y) + item.view.removeFromSuperview() + + self.contentView.addSubview(item.view) + } + } + } + + // MARK - Float Menu Methods + + private func toggle() { + self.animateMenu() + self.showBlur() + + self.active = !self.active + } + + private func animateMenu() { + let rotation = self.active ? 0 : CGFloat(M_PI_4) + + UIView.animateWithDuration(0.3, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.1, options: nil, animations: { + self.floatButton.transform = CGAffineTransformMakeRotation(rotation) + + if self.active == false { + self.contentView.alpha = 1.0 + + if let optionalItems = self.items { + for (index, item) in enumerate(optionalItems) { + let offset = index + 1 + let translation = self.itemOffset * offset + item.view.transform = CGAffineTransformMakeTranslation(0, CGFloat(translation)) + item.view.alpha = 1 + } + } + } else { + self.contentView.alpha = 0.0 + + if let optionalItems = self.items { + for item in optionalItems { + item.view.transform = CGAffineTransformMakeTranslation(0, 0) + item.view.alpha = 0 + } + } + } + }, completion: {completed in + if self.active == false { + self.hideBlur() + } + }) + } + + private func animateClick() { + UIView.animateWithDuration(0.3, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.1, options: .Repeat | .Autoreverse, animations: { + self.floatButton.transform = CGAffineTransformMakeScale(1.2, 1.2) + }, completion: nil) + } + + private func showBlur() { + self.parentView.insertSubview(self.contentView, belowSubview: self.floatButton) + } + + private func hideBlur() { + self.contentView.removeFromSuperview() + } + + private func animatePressingWithScale(scale: CGFloat) { + UIView.animateWithDuration(0.2, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0.1, options: nil, animations: { + self.floatButton.transform = CGAffineTransformMakeScale(scale, scale) + }, completion: nil) + } +} diff --git a/Source/ActionButtonItem.swift b/Source/ActionButtonItem.swift new file mode 100755 index 0000000..690b625 --- /dev/null +++ b/Source/ActionButtonItem.swift @@ -0,0 +1,124 @@ +// ActionButton.swift +// +// The MIT License (MIT) +// +// Copyright (c) 2015 ActionButton +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +typealias ActionButtonItemAction = (ActionButtonItem) -> Void + +public class ActionButtonItem: NSObject { + + var action: ActionButtonItemAction? + var view: UIView! + var text: String { + get { + return self.label.text! + } + + set { + self.label.text = newValue + } + } + + private var label: UILabel! + private var button: UIButton! + private var image: UIImage! + private var labelBackground: UIView! + private let viewSize = CGSize(width: 200, height: 35) + private let buttonSize = CGSize(width: 35, height: 35) + private let backgroundInset = CGSize(width: 10, height: 10) + + public init(title optionalTitle: String?, image: UIImage?) { + super.init() + + self.view = UIView(frame: CGRect(origin: CGPointZero, size: self.viewSize)) + self.view.alpha = 0 + self.view.userInteractionEnabled = true + self.view.backgroundColor = UIColor.clearColor() + + self.button = UIButton.buttonWithType(.Custom) as! UIButton + self.button.frame = CGRect(origin: CGPoint(x: self.viewSize.width - self.buttonSize.width, y: 0), size: buttonSize) + self.button.layer.shadowOpacity = 1 + self.button.layer.shadowRadius = 2 + self.button.layer.shadowOffset = CGSize(width: 1, height: 1) + self.button.layer.shadowColor = UIColor.grayColor().CGColor + self.button.addTarget(self, action: "buttonPressed:", forControlEvents: .TouchUpInside) + + if let unwrappedImage = image { + self.button.setImage(unwrappedImage, forState: .Normal) + } + + if let text = optionalTitle where text.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()).isEmpty == false { + self.label = UILabel() + self.label.font = UIFont(name: "HelveticaNeue-Medium", size: 13) + self.label.textColor = UIColor.darkGrayColor() + self.label.textAlignment = .Right + self.label.text = text + self.label.addGestureRecognizer(UITapGestureRecognizer(target: self, action: Selector("labelTapped:"))) + self.label.sizeToFit() + + self.labelBackground = UIView() + self.labelBackground.frame = self.label.frame + self.labelBackground.backgroundColor = UIColor.whiteColor() + self.labelBackground.layer.cornerRadius = 3 + self.labelBackground.layer.shadowOpacity = 0.8 + self.labelBackground.layer.shadowOffset = CGSize(width: 0, height: 1) + self.labelBackground.layer.shadowRadius = 0.2 + self.labelBackground.layer.shadowColor = UIColor.lightGrayColor().CGColor + + // Adjust the label's background inset + self.labelBackground.frame.size.width = self.label.frame.size.width + backgroundInset.width + self.labelBackground.frame.size.height = self.label.frame.size.height + backgroundInset.height + self.label.frame.origin.x = self.label.frame.origin.x + backgroundInset.width / 2 + self.label.frame.origin.y = self.label.frame.origin.y + backgroundInset.height / 2 + + // Adjust label's background position + self.labelBackground.frame.origin.x = CGFloat(130 - self.label.frame.size.width) + self.labelBackground.center.y = self.view.center.y + self.labelBackground.addSubview(self.label) + + // Add Tap Gestures Recognizer + let tap = UITapGestureRecognizer(target: self, action: Selector("labelTapped:")) + self.view.addGestureRecognizer(tap) + + self.view.addSubview(self.labelBackground) + } + + self.view.addSubview(self.button) + } + + // MARK: - Button Action Methods + + func buttonPressed(sender: UIButton) { + if let unwrappedAction = self.action { + unwrappedAction(self) + } + } + + // MARK: - Gesture Recognizer Methods + func labelTapped(gesture: UIGestureRecognizer) { + if let unwrappedAction = self.action { + unwrappedAction(self) + } + } +}