├── .gitignore ├── .travis.yml ├── BAShimmerButton.podspec ├── Example ├── BAShimmerButton.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── BAShimmerButton-Example.xcscheme ├── BAShimmerButton.xcworkspace │ └── contents.xcworkspacedata ├── BAShimmerButton │ ├── BAAppDelegate.h │ ├── BAAppDelegate.m │ ├── BABackgroundUIView.h │ ├── BABackgroundUIView.m │ ├── BAShimmerButton-Info.plist │ ├── BAShimmerButton-Prefix.pch │ ├── BAStrokeTextLabel.h │ ├── BAStrokeTextLabel.m │ ├── BAViewController.h │ ├── BAViewController.m │ ├── BebasNeue Bold.ttf │ ├── BebasNeue Book.ttf │ ├── BebasNeue Light.ttf │ ├── BebasNeue Regular.ttf │ ├── BebasNeue Thin.ttf │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-76.png │ │ │ ├── Icon-76@2x.png │ │ │ ├── Icon-Small-40.png │ │ │ ├── Icon-Small-40@2x-1.png │ │ │ ├── Icon-Small-40@2x.png │ │ │ ├── Icon-Small-40@3x.png │ │ │ ├── Icon-Small@2x-1.png │ │ │ ├── Icon.png │ │ │ └── Icon@2x.png │ │ ├── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── Screen Shot 2015-08-13 at 12.30.38 AM-1-1.png │ │ │ ├── Screen Shot 2015-08-13 at 12.30.38 AM-1-2.png │ │ │ └── Screen Shot 2015-08-13 at 12.30.38 AM-1.png │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Screen Shot 2015-08-13 at 12.30.38 AM-1.png │ │ │ ├── Screen Shot 2015-08-13 at 12.30.38 AM-2.png │ │ │ ├── Screen Shot 2015-08-13 at 12.30.38 AM-3.png │ │ │ ├── Screen Shot 2015-08-13 at 12.30.38 AM-4.png │ │ │ ├── Screen Shot 2015-08-13 at 12.30.38 AM-5.png │ │ │ └── Screen Shot 2015-08-13 at 12.30.38 AM.png │ │ └── icon.imageset │ │ │ ├── Contents.json │ │ │ ├── icon.png │ │ │ ├── icon@2x.png │ │ │ └── icon@3x.png │ ├── LaunchScreen.xib │ ├── Main.storyboard │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile ├── Podfile.lock ├── Pods │ ├── Headers │ │ ├── Private │ │ │ └── BAShimmerButton │ │ │ │ ├── BAShimmerButton.h │ │ │ │ └── UIColor+ColorWithHex.h │ │ └── Public │ │ │ └── BAShimmerButton │ │ │ ├── BAShimmerButton.h │ │ │ └── UIColor+ColorWithHex.h │ ├── Local Podspecs │ │ └── BAShimmerButton.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton-BAShimmerButton.xcscheme │ │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton.xcscheme │ │ │ ├── Pods-BAShimmerButton_Tests-BAShimmerButton-BAShimmerButton.xcscheme │ │ │ └── Pods-BAShimmerButton_Tests-BAShimmerButton.xcscheme │ └── Target Support Files │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton │ │ ├── Info.plist │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton-Private.xcconfig │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton-dummy.m │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton-prefix.pch │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton-umbrella.h │ │ ├── Pods-BAShimmerButton_Example-BAShimmerButton.modulemap │ │ └── Pods-BAShimmerButton_Example-BAShimmerButton.xcconfig │ │ ├── Pods-BAShimmerButton_Example │ │ ├── Info.plist │ │ ├── Pods-BAShimmerButton_Example-acknowledgements.markdown │ │ ├── Pods-BAShimmerButton_Example-acknowledgements.plist │ │ ├── Pods-BAShimmerButton_Example-dummy.m │ │ ├── Pods-BAShimmerButton_Example-environment.h │ │ ├── Pods-BAShimmerButton_Example-frameworks.sh │ │ ├── Pods-BAShimmerButton_Example-resources.sh │ │ ├── Pods-BAShimmerButton_Example-umbrella.h │ │ ├── Pods-BAShimmerButton_Example.debug.xcconfig │ │ ├── Pods-BAShimmerButton_Example.modulemap │ │ └── Pods-BAShimmerButton_Example.release.xcconfig │ │ ├── Pods-BAShimmerButton_Tests-BAShimmerButton │ │ ├── Info.plist │ │ ├── Pods-BAShimmerButton_Tests-BAShimmerButton-Private.xcconfig │ │ ├── Pods-BAShimmerButton_Tests-BAShimmerButton-dummy.m │ │ ├── Pods-BAShimmerButton_Tests-BAShimmerButton-prefix.pch │ │ ├── Pods-BAShimmerButton_Tests-BAShimmerButton-umbrella.h │ │ ├── Pods-BAShimmerButton_Tests-BAShimmerButton.modulemap │ │ └── Pods-BAShimmerButton_Tests-BAShimmerButton.xcconfig │ │ └── Pods-BAShimmerButton_Tests │ │ ├── Info.plist │ │ ├── Pods-BAShimmerButton_Tests-acknowledgements.markdown │ │ ├── Pods-BAShimmerButton_Tests-acknowledgements.plist │ │ ├── Pods-BAShimmerButton_Tests-dummy.m │ │ ├── Pods-BAShimmerButton_Tests-environment.h │ │ ├── Pods-BAShimmerButton_Tests-frameworks.sh │ │ ├── Pods-BAShimmerButton_Tests-resources.sh │ │ ├── Pods-BAShimmerButton_Tests-umbrella.h │ │ ├── Pods-BAShimmerButton_Tests.debug.xcconfig │ │ ├── Pods-BAShimmerButton_Tests.modulemap │ │ └── Pods-BAShimmerButton_Tests.release.xcconfig └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── BAShimmerButton.h │ ├── BAShimmerButton.m │ ├── UIColor+ColorWithHex.h │ └── UIColor+ColorWithHex.m ├── README.md ├── _Pods.xcodeproj └── readmeAssets ├── example1.gif ├── example10.gif ├── example11.gif ├── example2.gif ├── example3.gif ├── example4.gif ├── example5.gif ├── example6.gif ├── example7.gif ├── example8.gif ├── example9.gif ├── examplea.gif └── exampleb.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | install: 12 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 13 | script: 14 | - set -o pipefail && xcodebuild test -workspace Example/BAShimmerButton.xcworkspace -scheme BAShimmerButton-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c 15 | - pod lib lint --quick 16 | -------------------------------------------------------------------------------- /BAShimmerButton.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint BAShimmerButton.podspec' to ensure this is a 3 | # valid spec and remove all comments before submitting the spec. 4 | # 5 | # Any lines starting with a # are optional, but encouraged 6 | # 7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 8 | # 9 | 10 | Pod::Spec.new do |s| 11 | s.name = "BAShimmerButton" 12 | s.version = "0.1.0" 13 | s.summary = "A call-to-action button that offers shimmer, movement, and off/on functionality" 14 | s.description = <<-DESC 15 | A call-to-action button that offers shimmer, movement, and off/on functionality. Great for getting a users attention in multiple ways! 16 | more info at: [https://github.com/antiguab/BAShimmerButton(https://github.com/antiguab/BAShimmerButton) 17 | DESC 18 | s.homepage = "https://github.com/antiguab/BAShimmerButton" 19 | # s.screenshots = "", "" 20 | s.license = 'MIT' 21 | s.author = { "Bryan Antigua" => "antigua.b@gmail.com" } 22 | s.source = { :git => "https://github.com/antiguab/BAShimmerButton.git", :tag => s.version.to_s } 23 | s.platform = :ios 24 | s.requires_arc = true 25 | 26 | s.source_files = 'Pod/Classes' 27 | s.resource_bundles = { 28 | 'BAShimmerButton' => ['Pod/Assets/*.png'] 29 | } 30 | 31 | s.public_header_files = 'Pod/Classes/**/*.h' 32 | s.frameworks = 'UIKit' 33 | end 34 | -------------------------------------------------------------------------------- /Example/BAShimmerButton.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 53B16DB91AB9D67A2D900E87 /* Pods_BAShimmerButton_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 506DF02E95E71D415CB0FC4F /* Pods_BAShimmerButton_Tests.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 11 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 12 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 13 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 14 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; 15 | 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; 16 | 6003F59E195388D20070C39A /* BAAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* BAAppDelegate.m */; }; 17 | 6003F5A7195388D20070C39A /* BAViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* BAViewController.m */; }; 18 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; 19 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; 20 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 21 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; 22 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; 23 | 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; 24 | 7EC09564506E888565C639FA /* Pods_BAShimmerButton_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78BC8AC0C90EE624CD0C42D9 /* Pods_BAShimmerButton_Example.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 25 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; 26 | D063624C1B747D3600936DF2 /* BebasNeue Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D038B6C81B542992007B831E /* BebasNeue Bold.ttf */; }; 27 | D0CACE331B587BC700A82A76 /* BebasNeue Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D038B6CA1B542992007B831E /* BebasNeue Light.ttf */; }; 28 | D0CACE341B587BC700A82A76 /* BebasNeue Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D038B6CB1B542992007B831E /* BebasNeue Regular.ttf */; }; 29 | D0CACE351B587BC700A82A76 /* BebasNeue Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D038B6CC1B542992007B831E /* BebasNeue Thin.ttf */; }; 30 | D0F088A61B7C443E0088B2F2 /* BebasNeue Book.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D038B6C91B542992007B831E /* BebasNeue Book.ttf */; }; 31 | D0F088A91B7C47A50088B2F2 /* BAStrokeTextLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F088A81B7C47A50088B2F2 /* BAStrokeTextLabel.m */; }; 32 | D0F088B01B7C60FD0088B2F2 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0F088AF1B7C60FD0088B2F2 /* LaunchScreen.xib */; }; 33 | D0F088B31B7C61440088B2F2 /* BABackgroundUIView.m in Sources */ = {isa = PBXBuildFile; fileRef = D0F088B21B7C61440088B2F2 /* BABackgroundUIView.m */; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXContainerItemProxy section */ 37 | 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 6003F582195388D10070C39A /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 6003F589195388D20070C39A; 42 | remoteInfo = BAShimmerButton; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 183C77E8769A5F10D232F995 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 48 | 503E080BCA83F8B1A63452B4 /* Pods-BAShimmerButton_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BAShimmerButton_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example.debug.xcconfig"; sourceTree = ""; }; 49 | 506DF02E95E71D415CB0FC4F /* Pods_BAShimmerButton_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BAShimmerButton_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 6003F58A195388D20070C39A /* BAShimmerButton_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BAShimmerButton_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 52 | 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 53 | 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 54 | 6003F595195388D20070C39A /* BAShimmerButton-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BAShimmerButton-Info.plist"; sourceTree = ""; }; 55 | 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 56 | 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 57 | 6003F59B195388D20070C39A /* BAShimmerButton-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BAShimmerButton-Prefix.pch"; sourceTree = ""; }; 58 | 6003F59C195388D20070C39A /* BAAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BAAppDelegate.h; sourceTree = ""; }; 59 | 6003F59D195388D20070C39A /* BAAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BAAppDelegate.m; sourceTree = ""; }; 60 | 6003F5A5195388D20070C39A /* BAViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BAViewController.h; sourceTree = ""; }; 61 | 6003F5A6195388D20070C39A /* BAViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BAViewController.m; sourceTree = ""; }; 62 | 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 63 | 6003F5AE195388D20070C39A /* BAShimmerButton_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BAShimmerButton_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 64 | 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 65 | 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 66 | 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 67 | 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; 68 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; 69 | 760084862EC5D735388F8441 /* Pods-BAShimmerButton_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BAShimmerButton_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests.release.xcconfig"; sourceTree = ""; }; 70 | 78269F9317B09CAF8EDAF387 /* Pods-BAShimmerButton_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BAShimmerButton_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example.release.xcconfig"; sourceTree = ""; }; 71 | 78BC8AC0C90EE624CD0C42D9 /* Pods_BAShimmerButton_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_BAShimmerButton_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 72 | 82F72F31A7F8C03B108E7A40 /* BAShimmerButton.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = BAShimmerButton.podspec; path = ../BAShimmerButton.podspec; sourceTree = ""; }; 73 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 74 | 8F22888D0BE04147B58C999E /* Pods-BAShimmerButton_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BAShimmerButton_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests.debug.xcconfig"; sourceTree = ""; }; 75 | D038B6C81B542992007B831E /* BebasNeue Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "BebasNeue Bold.ttf"; sourceTree = ""; }; 76 | D038B6C91B542992007B831E /* BebasNeue Book.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "BebasNeue Book.ttf"; sourceTree = ""; }; 77 | D038B6CA1B542992007B831E /* BebasNeue Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "BebasNeue Light.ttf"; sourceTree = ""; }; 78 | D038B6CB1B542992007B831E /* BebasNeue Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "BebasNeue Regular.ttf"; sourceTree = ""; }; 79 | D038B6CC1B542992007B831E /* BebasNeue Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "BebasNeue Thin.ttf"; sourceTree = ""; }; 80 | D0F088A71B7C47A50088B2F2 /* BAStrokeTextLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BAStrokeTextLabel.h; sourceTree = ""; }; 81 | D0F088A81B7C47A50088B2F2 /* BAStrokeTextLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BAStrokeTextLabel.m; sourceTree = ""; }; 82 | D0F088AF1B7C60FD0088B2F2 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; 83 | D0F088B11B7C61440088B2F2 /* BABackgroundUIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BABackgroundUIView.h; sourceTree = ""; }; 84 | D0F088B21B7C61440088B2F2 /* BABackgroundUIView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BABackgroundUIView.m; sourceTree = ""; }; 85 | FC7BABED92535258080DBDEB /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 86 | /* End PBXFileReference section */ 87 | 88 | /* Begin PBXFrameworksBuildPhase section */ 89 | 6003F587195388D20070C39A /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, 94 | 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, 95 | 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, 96 | 7EC09564506E888565C639FA /* Pods_BAShimmerButton_Example.framework in Frameworks */, 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | 6003F5AB195388D20070C39A /* Frameworks */ = { 101 | isa = PBXFrameworksBuildPhase; 102 | buildActionMask = 2147483647; 103 | files = ( 104 | 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 105 | 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 106 | 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 107 | 53B16DB91AB9D67A2D900E87 /* Pods_BAShimmerButton_Tests.framework in Frameworks */, 108 | ); 109 | runOnlyForDeploymentPostprocessing = 0; 110 | }; 111 | /* End PBXFrameworksBuildPhase section */ 112 | 113 | /* Begin PBXGroup section */ 114 | 6003F581195388D10070C39A = { 115 | isa = PBXGroup; 116 | children = ( 117 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 118 | 6003F593195388D20070C39A /* Example for BAShimmerButton */, 119 | 6003F5B5195388D20070C39A /* Tests */, 120 | 6003F58C195388D20070C39A /* Frameworks */, 121 | 6003F58B195388D20070C39A /* Products */, 122 | CA90249ED99EBB2959E1A40D /* Pods */, 123 | ); 124 | sourceTree = ""; 125 | }; 126 | 6003F58B195388D20070C39A /* Products */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 6003F58A195388D20070C39A /* BAShimmerButton_Example.app */, 130 | 6003F5AE195388D20070C39A /* BAShimmerButton_Tests.xctest */, 131 | ); 132 | name = Products; 133 | sourceTree = ""; 134 | }; 135 | 6003F58C195388D20070C39A /* Frameworks */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 6003F58D195388D20070C39A /* Foundation.framework */, 139 | 6003F58F195388D20070C39A /* CoreGraphics.framework */, 140 | 6003F591195388D20070C39A /* UIKit.framework */, 141 | 6003F5AF195388D20070C39A /* XCTest.framework */, 142 | 78BC8AC0C90EE624CD0C42D9 /* Pods_BAShimmerButton_Example.framework */, 143 | 506DF02E95E71D415CB0FC4F /* Pods_BAShimmerButton_Tests.framework */, 144 | ); 145 | name = Frameworks; 146 | sourceTree = ""; 147 | }; 148 | 6003F593195388D20070C39A /* Example for BAShimmerButton */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 6003F59C195388D20070C39A /* BAAppDelegate.h */, 152 | 6003F59D195388D20070C39A /* BAAppDelegate.m */, 153 | 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, 154 | 6003F5A5195388D20070C39A /* BAViewController.h */, 155 | 6003F5A6195388D20070C39A /* BAViewController.m */, 156 | D0F088A71B7C47A50088B2F2 /* BAStrokeTextLabel.h */, 157 | D0F088A81B7C47A50088B2F2 /* BAStrokeTextLabel.m */, 158 | D0F088B11B7C61440088B2F2 /* BABackgroundUIView.h */, 159 | D0F088B21B7C61440088B2F2 /* BABackgroundUIView.m */, 160 | 6003F5A8195388D20070C39A /* Images.xcassets */, 161 | D0F088AF1B7C60FD0088B2F2 /* LaunchScreen.xib */, 162 | D038B6C81B542992007B831E /* BebasNeue Bold.ttf */, 163 | D038B6C91B542992007B831E /* BebasNeue Book.ttf */, 164 | D038B6CA1B542992007B831E /* BebasNeue Light.ttf */, 165 | D038B6CB1B542992007B831E /* BebasNeue Regular.ttf */, 166 | D038B6CC1B542992007B831E /* BebasNeue Thin.ttf */, 167 | 6003F594195388D20070C39A /* Supporting Files */, 168 | ); 169 | name = "Example for BAShimmerButton"; 170 | path = BAShimmerButton; 171 | sourceTree = ""; 172 | }; 173 | 6003F594195388D20070C39A /* Supporting Files */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | 6003F595195388D20070C39A /* BAShimmerButton-Info.plist */, 177 | 6003F596195388D20070C39A /* InfoPlist.strings */, 178 | 6003F599195388D20070C39A /* main.m */, 179 | 6003F59B195388D20070C39A /* BAShimmerButton-Prefix.pch */, 180 | ); 181 | name = "Supporting Files"; 182 | sourceTree = ""; 183 | }; 184 | 6003F5B5195388D20070C39A /* Tests */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 6003F5BB195388D20070C39A /* Tests.m */, 188 | 6003F5B6195388D20070C39A /* Supporting Files */, 189 | ); 190 | path = Tests; 191 | sourceTree = ""; 192 | }; 193 | 6003F5B6195388D20070C39A /* Supporting Files */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | 6003F5B7195388D20070C39A /* Tests-Info.plist */, 197 | 6003F5B8195388D20070C39A /* InfoPlist.strings */, 198 | 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, 199 | ); 200 | name = "Supporting Files"; 201 | sourceTree = ""; 202 | }; 203 | 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 82F72F31A7F8C03B108E7A40 /* BAShimmerButton.podspec */, 207 | 183C77E8769A5F10D232F995 /* README.md */, 208 | FC7BABED92535258080DBDEB /* LICENSE */, 209 | ); 210 | name = "Podspec Metadata"; 211 | sourceTree = ""; 212 | }; 213 | CA90249ED99EBB2959E1A40D /* Pods */ = { 214 | isa = PBXGroup; 215 | children = ( 216 | 503E080BCA83F8B1A63452B4 /* Pods-BAShimmerButton_Example.debug.xcconfig */, 217 | 78269F9317B09CAF8EDAF387 /* Pods-BAShimmerButton_Example.release.xcconfig */, 218 | 8F22888D0BE04147B58C999E /* Pods-BAShimmerButton_Tests.debug.xcconfig */, 219 | 760084862EC5D735388F8441 /* Pods-BAShimmerButton_Tests.release.xcconfig */, 220 | ); 221 | name = Pods; 222 | sourceTree = ""; 223 | }; 224 | /* End PBXGroup section */ 225 | 226 | /* Begin PBXNativeTarget section */ 227 | 6003F589195388D20070C39A /* BAShimmerButton_Example */ = { 228 | isa = PBXNativeTarget; 229 | buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "BAShimmerButton_Example" */; 230 | buildPhases = ( 231 | 313F98A4B4144E21A5ABE96A /* Check Pods Manifest.lock */, 232 | 6003F586195388D20070C39A /* Sources */, 233 | 6003F587195388D20070C39A /* Frameworks */, 234 | 6003F588195388D20070C39A /* Resources */, 235 | 0258A46EF00860B28F3506FE /* Embed Pods Frameworks */, 236 | CA0198D8F67485FF263C31E9 /* Copy Pods Resources */, 237 | ); 238 | buildRules = ( 239 | ); 240 | dependencies = ( 241 | ); 242 | name = BAShimmerButton_Example; 243 | productName = BAShimmerButton; 244 | productReference = 6003F58A195388D20070C39A /* BAShimmerButton_Example.app */; 245 | productType = "com.apple.product-type.application"; 246 | }; 247 | 6003F5AD195388D20070C39A /* BAShimmerButton_Tests */ = { 248 | isa = PBXNativeTarget; 249 | buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "BAShimmerButton_Tests" */; 250 | buildPhases = ( 251 | 793B407359A1A5AD409EBDDB /* Check Pods Manifest.lock */, 252 | 6003F5AA195388D20070C39A /* Sources */, 253 | 6003F5AB195388D20070C39A /* Frameworks */, 254 | 6003F5AC195388D20070C39A /* Resources */, 255 | 28F39752D5F6B8E33CCA8A8D /* Embed Pods Frameworks */, 256 | 27D7CB850921766DFFB28366 /* Copy Pods Resources */, 257 | ); 258 | buildRules = ( 259 | ); 260 | dependencies = ( 261 | 6003F5B4195388D20070C39A /* PBXTargetDependency */, 262 | ); 263 | name = BAShimmerButton_Tests; 264 | productName = BAShimmerButtonTests; 265 | productReference = 6003F5AE195388D20070C39A /* BAShimmerButton_Tests.xctest */; 266 | productType = "com.apple.product-type.bundle.unit-test"; 267 | }; 268 | /* End PBXNativeTarget section */ 269 | 270 | /* Begin PBXProject section */ 271 | 6003F582195388D10070C39A /* Project object */ = { 272 | isa = PBXProject; 273 | attributes = { 274 | CLASSPREFIX = BA; 275 | LastUpgradeCheck = 0510; 276 | ORGANIZATIONNAME = "Bryan Antigua"; 277 | TargetAttributes = { 278 | 6003F5AD195388D20070C39A = { 279 | TestTargetID = 6003F589195388D20070C39A; 280 | }; 281 | }; 282 | }; 283 | buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "BAShimmerButton" */; 284 | compatibilityVersion = "Xcode 3.2"; 285 | developmentRegion = English; 286 | hasScannedForEncodings = 0; 287 | knownRegions = ( 288 | en, 289 | Base, 290 | ); 291 | mainGroup = 6003F581195388D10070C39A; 292 | productRefGroup = 6003F58B195388D20070C39A /* Products */; 293 | projectDirPath = ""; 294 | projectRoot = ""; 295 | targets = ( 296 | 6003F589195388D20070C39A /* BAShimmerButton_Example */, 297 | 6003F5AD195388D20070C39A /* BAShimmerButton_Tests */, 298 | ); 299 | }; 300 | /* End PBXProject section */ 301 | 302 | /* Begin PBXResourcesBuildPhase section */ 303 | 6003F588195388D20070C39A /* Resources */ = { 304 | isa = PBXResourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | D0F088A61B7C443E0088B2F2 /* BebasNeue Book.ttf in Resources */, 308 | D063624C1B747D3600936DF2 /* BebasNeue Bold.ttf in Resources */, 309 | D0F088B01B7C60FD0088B2F2 /* LaunchScreen.xib in Resources */, 310 | D0CACE331B587BC700A82A76 /* BebasNeue Light.ttf in Resources */, 311 | D0CACE341B587BC700A82A76 /* BebasNeue Regular.ttf in Resources */, 312 | D0CACE351B587BC700A82A76 /* BebasNeue Thin.ttf in Resources */, 313 | 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, 314 | 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, 315 | 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, 316 | ); 317 | runOnlyForDeploymentPostprocessing = 0; 318 | }; 319 | 6003F5AC195388D20070C39A /* Resources */ = { 320 | isa = PBXResourcesBuildPhase; 321 | buildActionMask = 2147483647; 322 | files = ( 323 | 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | }; 327 | /* End PBXResourcesBuildPhase section */ 328 | 329 | /* Begin PBXShellScriptBuildPhase section */ 330 | 0258A46EF00860B28F3506FE /* Embed Pods Frameworks */ = { 331 | isa = PBXShellScriptBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | ); 335 | inputPaths = ( 336 | ); 337 | name = "Embed Pods Frameworks"; 338 | outputPaths = ( 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | shellPath = /bin/sh; 342 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-frameworks.sh\"\n"; 343 | showEnvVarsInLog = 0; 344 | }; 345 | 27D7CB850921766DFFB28366 /* Copy Pods Resources */ = { 346 | isa = PBXShellScriptBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | ); 350 | inputPaths = ( 351 | ); 352 | name = "Copy Pods Resources"; 353 | outputPaths = ( 354 | ); 355 | runOnlyForDeploymentPostprocessing = 0; 356 | shellPath = /bin/sh; 357 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-resources.sh\"\n"; 358 | showEnvVarsInLog = 0; 359 | }; 360 | 28F39752D5F6B8E33CCA8A8D /* Embed Pods Frameworks */ = { 361 | isa = PBXShellScriptBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | ); 365 | inputPaths = ( 366 | ); 367 | name = "Embed Pods Frameworks"; 368 | outputPaths = ( 369 | ); 370 | runOnlyForDeploymentPostprocessing = 0; 371 | shellPath = /bin/sh; 372 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-frameworks.sh\"\n"; 373 | showEnvVarsInLog = 0; 374 | }; 375 | 313F98A4B4144E21A5ABE96A /* Check Pods Manifest.lock */ = { 376 | isa = PBXShellScriptBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | ); 380 | inputPaths = ( 381 | ); 382 | name = "Check Pods Manifest.lock"; 383 | outputPaths = ( 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | shellPath = /bin/sh; 387 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 388 | showEnvVarsInLog = 0; 389 | }; 390 | 793B407359A1A5AD409EBDDB /* Check Pods Manifest.lock */ = { 391 | isa = PBXShellScriptBuildPhase; 392 | buildActionMask = 2147483647; 393 | files = ( 394 | ); 395 | inputPaths = ( 396 | ); 397 | name = "Check Pods Manifest.lock"; 398 | outputPaths = ( 399 | ); 400 | runOnlyForDeploymentPostprocessing = 0; 401 | shellPath = /bin/sh; 402 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 403 | showEnvVarsInLog = 0; 404 | }; 405 | CA0198D8F67485FF263C31E9 /* Copy Pods Resources */ = { 406 | isa = PBXShellScriptBuildPhase; 407 | buildActionMask = 2147483647; 408 | files = ( 409 | ); 410 | inputPaths = ( 411 | ); 412 | name = "Copy Pods Resources"; 413 | outputPaths = ( 414 | ); 415 | runOnlyForDeploymentPostprocessing = 0; 416 | shellPath = /bin/sh; 417 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-resources.sh\"\n"; 418 | showEnvVarsInLog = 0; 419 | }; 420 | /* End PBXShellScriptBuildPhase section */ 421 | 422 | /* Begin PBXSourcesBuildPhase section */ 423 | 6003F586195388D20070C39A /* Sources */ = { 424 | isa = PBXSourcesBuildPhase; 425 | buildActionMask = 2147483647; 426 | files = ( 427 | D0F088B31B7C61440088B2F2 /* BABackgroundUIView.m in Sources */, 428 | 6003F59E195388D20070C39A /* BAAppDelegate.m in Sources */, 429 | 6003F5A7195388D20070C39A /* BAViewController.m in Sources */, 430 | D0F088A91B7C47A50088B2F2 /* BAStrokeTextLabel.m in Sources */, 431 | 6003F59A195388D20070C39A /* main.m in Sources */, 432 | ); 433 | runOnlyForDeploymentPostprocessing = 0; 434 | }; 435 | 6003F5AA195388D20070C39A /* Sources */ = { 436 | isa = PBXSourcesBuildPhase; 437 | buildActionMask = 2147483647; 438 | files = ( 439 | 6003F5BC195388D20070C39A /* Tests.m in Sources */, 440 | ); 441 | runOnlyForDeploymentPostprocessing = 0; 442 | }; 443 | /* End PBXSourcesBuildPhase section */ 444 | 445 | /* Begin PBXTargetDependency section */ 446 | 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { 447 | isa = PBXTargetDependency; 448 | target = 6003F589195388D20070C39A /* BAShimmerButton_Example */; 449 | targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; 450 | }; 451 | /* End PBXTargetDependency section */ 452 | 453 | /* Begin PBXVariantGroup section */ 454 | 6003F596195388D20070C39A /* InfoPlist.strings */ = { 455 | isa = PBXVariantGroup; 456 | children = ( 457 | 6003F597195388D20070C39A /* en */, 458 | ); 459 | name = InfoPlist.strings; 460 | sourceTree = ""; 461 | }; 462 | 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { 463 | isa = PBXVariantGroup; 464 | children = ( 465 | 6003F5B9195388D20070C39A /* en */, 466 | ); 467 | name = InfoPlist.strings; 468 | sourceTree = ""; 469 | }; 470 | /* End PBXVariantGroup section */ 471 | 472 | /* Begin XCBuildConfiguration section */ 473 | 6003F5BD195388D20070C39A /* Debug */ = { 474 | isa = XCBuildConfiguration; 475 | buildSettings = { 476 | ALWAYS_SEARCH_USER_PATHS = NO; 477 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 478 | CLANG_CXX_LIBRARY = "libc++"; 479 | CLANG_ENABLE_MODULES = YES; 480 | CLANG_ENABLE_OBJC_ARC = YES; 481 | CLANG_WARN_BOOL_CONVERSION = YES; 482 | CLANG_WARN_CONSTANT_CONVERSION = YES; 483 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 484 | CLANG_WARN_EMPTY_BODY = YES; 485 | CLANG_WARN_ENUM_CONVERSION = YES; 486 | CLANG_WARN_INT_CONVERSION = YES; 487 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 488 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 489 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 490 | COPY_PHASE_STRIP = NO; 491 | GCC_C_LANGUAGE_STANDARD = gnu99; 492 | GCC_DYNAMIC_NO_PIC = NO; 493 | GCC_OPTIMIZATION_LEVEL = 0; 494 | GCC_PREPROCESSOR_DEFINITIONS = ( 495 | "DEBUG=1", 496 | "$(inherited)", 497 | ); 498 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 499 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 500 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 501 | GCC_WARN_UNDECLARED_SELECTOR = YES; 502 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 503 | GCC_WARN_UNUSED_FUNCTION = YES; 504 | GCC_WARN_UNUSED_VARIABLE = YES; 505 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 506 | ONLY_ACTIVE_ARCH = YES; 507 | SDKROOT = iphoneos; 508 | TARGETED_DEVICE_FAMILY = "1,2"; 509 | }; 510 | name = Debug; 511 | }; 512 | 6003F5BE195388D20070C39A /* Release */ = { 513 | isa = XCBuildConfiguration; 514 | buildSettings = { 515 | ALWAYS_SEARCH_USER_PATHS = NO; 516 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 517 | CLANG_CXX_LIBRARY = "libc++"; 518 | CLANG_ENABLE_MODULES = YES; 519 | CLANG_ENABLE_OBJC_ARC = YES; 520 | CLANG_WARN_BOOL_CONVERSION = YES; 521 | CLANG_WARN_CONSTANT_CONVERSION = YES; 522 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 523 | CLANG_WARN_EMPTY_BODY = YES; 524 | CLANG_WARN_ENUM_CONVERSION = YES; 525 | CLANG_WARN_INT_CONVERSION = YES; 526 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 527 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 528 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 529 | COPY_PHASE_STRIP = YES; 530 | ENABLE_NS_ASSERTIONS = NO; 531 | GCC_C_LANGUAGE_STANDARD = gnu99; 532 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 533 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 534 | GCC_WARN_UNDECLARED_SELECTOR = YES; 535 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 536 | GCC_WARN_UNUSED_FUNCTION = YES; 537 | GCC_WARN_UNUSED_VARIABLE = YES; 538 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 539 | SDKROOT = iphoneos; 540 | TARGETED_DEVICE_FAMILY = "1,2"; 541 | VALIDATE_PRODUCT = YES; 542 | }; 543 | name = Release; 544 | }; 545 | 6003F5C0195388D20070C39A /* Debug */ = { 546 | isa = XCBuildConfiguration; 547 | baseConfigurationReference = 503E080BCA83F8B1A63452B4 /* Pods-BAShimmerButton_Example.debug.xcconfig */; 548 | buildSettings = { 549 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 550 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 551 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 552 | GCC_PREFIX_HEADER = "BAShimmerButton/BAShimmerButton-Prefix.pch"; 553 | INFOPLIST_FILE = "BAShimmerButton/BAShimmerButton-Info.plist"; 554 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 555 | MODULE_NAME = ExampleApp; 556 | PRODUCT_NAME = "$(TARGET_NAME)"; 557 | WRAPPER_EXTENSION = app; 558 | }; 559 | name = Debug; 560 | }; 561 | 6003F5C1195388D20070C39A /* Release */ = { 562 | isa = XCBuildConfiguration; 563 | baseConfigurationReference = 78269F9317B09CAF8EDAF387 /* Pods-BAShimmerButton_Example.release.xcconfig */; 564 | buildSettings = { 565 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 566 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 567 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 568 | GCC_PREFIX_HEADER = "BAShimmerButton/BAShimmerButton-Prefix.pch"; 569 | INFOPLIST_FILE = "BAShimmerButton/BAShimmerButton-Info.plist"; 570 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 571 | MODULE_NAME = ExampleApp; 572 | PRODUCT_NAME = "$(TARGET_NAME)"; 573 | WRAPPER_EXTENSION = app; 574 | }; 575 | name = Release; 576 | }; 577 | 6003F5C3195388D20070C39A /* Debug */ = { 578 | isa = XCBuildConfiguration; 579 | baseConfigurationReference = 8F22888D0BE04147B58C999E /* Pods-BAShimmerButton_Tests.debug.xcconfig */; 580 | buildSettings = { 581 | BUNDLE_LOADER = "$(TEST_HOST)"; 582 | FRAMEWORK_SEARCH_PATHS = ( 583 | "$(SDKROOT)/Developer/Library/Frameworks", 584 | "$(inherited)", 585 | "$(DEVELOPER_FRAMEWORKS_DIR)", 586 | ); 587 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 588 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 589 | GCC_PREPROCESSOR_DEFINITIONS = ( 590 | "DEBUG=1", 591 | "$(inherited)", 592 | ); 593 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 594 | PRODUCT_NAME = "$(TARGET_NAME)"; 595 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BAShimmerButton_Example.app/BAShimmerButton_Example"; 596 | WRAPPER_EXTENSION = xctest; 597 | }; 598 | name = Debug; 599 | }; 600 | 6003F5C4195388D20070C39A /* Release */ = { 601 | isa = XCBuildConfiguration; 602 | baseConfigurationReference = 760084862EC5D735388F8441 /* Pods-BAShimmerButton_Tests.release.xcconfig */; 603 | buildSettings = { 604 | BUNDLE_LOADER = "$(TEST_HOST)"; 605 | FRAMEWORK_SEARCH_PATHS = ( 606 | "$(SDKROOT)/Developer/Library/Frameworks", 607 | "$(inherited)", 608 | "$(DEVELOPER_FRAMEWORKS_DIR)", 609 | ); 610 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 611 | GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; 612 | INFOPLIST_FILE = "Tests/Tests-Info.plist"; 613 | PRODUCT_NAME = "$(TARGET_NAME)"; 614 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BAShimmerButton_Example.app/BAShimmerButton_Example"; 615 | WRAPPER_EXTENSION = xctest; 616 | }; 617 | name = Release; 618 | }; 619 | /* End XCBuildConfiguration section */ 620 | 621 | /* Begin XCConfigurationList section */ 622 | 6003F585195388D10070C39A /* Build configuration list for PBXProject "BAShimmerButton" */ = { 623 | isa = XCConfigurationList; 624 | buildConfigurations = ( 625 | 6003F5BD195388D20070C39A /* Debug */, 626 | 6003F5BE195388D20070C39A /* Release */, 627 | ); 628 | defaultConfigurationIsVisible = 0; 629 | defaultConfigurationName = Release; 630 | }; 631 | 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "BAShimmerButton_Example" */ = { 632 | isa = XCConfigurationList; 633 | buildConfigurations = ( 634 | 6003F5C0195388D20070C39A /* Debug */, 635 | 6003F5C1195388D20070C39A /* Release */, 636 | ); 637 | defaultConfigurationIsVisible = 0; 638 | defaultConfigurationName = Release; 639 | }; 640 | 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "BAShimmerButton_Tests" */ = { 641 | isa = XCConfigurationList; 642 | buildConfigurations = ( 643 | 6003F5C3195388D20070C39A /* Debug */, 644 | 6003F5C4195388D20070C39A /* Release */, 645 | ); 646 | defaultConfigurationIsVisible = 0; 647 | defaultConfigurationName = Release; 648 | }; 649 | /* End XCConfigurationList section */ 650 | }; 651 | rootObject = 6003F582195388D10070C39A /* Project object */; 652 | } 653 | -------------------------------------------------------------------------------- /Example/BAShimmerButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/BAShimmerButton.xcodeproj/xcshareddata/xcschemes/BAShimmerButton-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 63 | 69 | 70 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /Example/BAShimmerButton.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAAppDelegate.h: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | @import UIKit; 24 | 25 | @interface BAAppDelegate : UIResponder 26 | 27 | @property (strong, nonatomic) UIWindow *window; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAAppDelegate.m: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | #import "BAAppDelegate.h" 24 | 25 | @implementation BAAppDelegate 26 | 27 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 28 | { 29 | // Override point for customization after application launch. 30 | return YES; 31 | } 32 | 33 | - (void)applicationWillResignActive:(UIApplication *)application 34 | { 35 | // 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. 36 | // 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. 37 | } 38 | 39 | - (void)applicationDidEnterBackground:(UIApplication *)application 40 | { 41 | // 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. 42 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 43 | } 44 | 45 | - (void)applicationWillEnterForeground:(UIApplication *)application 46 | { 47 | // 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. 48 | } 49 | 50 | - (void)applicationDidBecomeActive:(UIApplication *)application 51 | { 52 | // 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. 53 | } 54 | 55 | - (void)applicationWillTerminate:(UIApplication *)application 56 | { 57 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BABackgroundUIView.h: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | #import 24 | 25 | @interface BABackgroundUIView : UIView 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BABackgroundUIView.m: -------------------------------------------------------------------------------- 1 | // 2 | //The MIT License (MIT) 3 | // 4 | //Copyright (c) 2015 Bryan Antigua 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 all 14 | //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 THE 22 | //SOFTWARE. 23 | 24 | #import "BABackgroundUIView.h" 25 | #import "UIColor+colorWithHex.h" 26 | 27 | @implementation BABackgroundUIView 28 | 29 | #pragma mark - Lifecycle 30 | 31 | - (void)layoutSubviews { 32 | 33 | [super layoutSubviews]; 34 | //creates a neat gradient 35 | CAGradientLayer *tempLayer = [CAGradientLayer layer]; 36 | tempLayer.frame = self.bounds; 37 | tempLayer.colors = @[(id)[UIColor colorWithHex:0x61f5e3].CGColor, (id)[UIColor colorWithHex:0x74bfd4].CGColor,(id)[UIColor colorWithHex:0x79b6d2].CGColor,(id)[UIColor colorWithHex:0xa94eb8].CGColor]; 38 | tempLayer.locations = @[[NSNumber numberWithFloat:0.5f], [NSNumber numberWithFloat:0.7f], [NSNumber numberWithFloat:0.8f],[NSNumber numberWithFloat:1.0f]]; 39 | tempLayer.startPoint = CGPointMake(0, 0); 40 | tempLayer.endPoint = CGPointMake(0, 1); 41 | [self.layer insertSublayer:tempLayer atIndex:0]; 42 | } 43 | @end 44 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAShimmerButton-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UILaunchStoryboardName 6 | LaunchScreen 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleDisplayName 10 | ${PRODUCT_NAME} 11 | CFBundleExecutable 12 | ${EXECUTABLE_NAME} 13 | CFBundleIdentifier 14 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAShimmerButton-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAStrokeTextLabel.h: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | #import 23 | 24 | @interface BAStrokeTextLabel : UILabel 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAStrokeTextLabel.m: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | #import "BAStrokeTextLabel.h" 23 | 24 | @implementation BAStrokeTextLabel 25 | 26 | //creates the stroke border around the text 27 | - (void)drawTextInRect:(CGRect)rect { 28 | UIColor *borderColor = [UIColor blackColor]; 29 | UIColor *fillColor = self.textColor; 30 | CGContextRef context = UIGraphicsGetCurrentContext(); 31 | 32 | CGContextSetLineWidth(context, 2.0f); 33 | CGContextSetTextDrawingMode(context, kCGTextStroke); 34 | self.textColor = borderColor; 35 | [super drawTextInRect:rect]; 36 | 37 | CGContextSetLineWidth(context, 0.0f); 38 | CGContextSetTextDrawingMode(context, kCGTextFillStroke); 39 | self.textColor = fillColor; 40 | [super drawTextInRect:rect]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAViewController.h: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | @import UIKit; 24 | #import 25 | #import "BAStrokeTextLabel.h" 26 | 27 | @interface BAViewController : UIViewController 28 | @property (strong, nonatomic) IBOutlet UIView *OuterContainerView; 29 | @property (strong, nonatomic) IBOutlet UIView *InnerContainerView; 30 | 31 | @property (strong, nonatomic) IBOutlet BAStrokeTextLabel *titleLabel; 32 | @property (strong, nonatomic) IBOutletCollection(UIButton) NSArray *buttonExamples; 33 | 34 | - (IBAction)buttonPressed:(id)sender; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BAViewController.m: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | #import "BAViewController.h" 24 | #import "BAShimmerButton.h" 25 | #import "UIColor+ColorWithHex.h" 26 | 27 | @interface BAViewController () 28 | 29 | @property(assign, nonatomic) BOOL firstLoad; 30 | @property(strong, nonatomic) NSMutableArray *buttonArray; 31 | 32 | @end 33 | 34 | @implementation BAViewController 35 | 36 | #pragma mark - Lifecycle 37 | 38 | - (void)viewDidLoad { 39 | [super viewDidLoad]; 40 | self.buttonArray = [NSMutableArray array]; 41 | self.firstLoad = YES; 42 | 43 | [self configureTitle]; 44 | 45 | self.OuterContainerView.backgroundColor = [UIColor colorWithHex:0xebbf69]; 46 | self.InnerContainerView.backgroundColor = [UIColor clearColor]; 47 | self.InnerContainerView.layer.borderColor = [UIColor colorWithHex:0xe49642].CGColor; 48 | self.InnerContainerView.layer.borderWidth = 5.0f; 49 | 50 | } 51 | 52 | //- (void)hidebut { 53 | // BAShimmerButton * button = (BAShimmerButton*)[self.view viewWithTag:105]; 54 | // [self addCircularMask:button]; 55 | // [button wiggleButton];//@NO skips the animation 56 | //} 57 | - (void)viewDidLayoutSubviews { 58 | if(self.firstLoad && [self.buttonExamples count] > 0){ 59 | // NSInteger tag = 105; 60 | // BAShimmerButton * button = (BAShimmerButton*)[self.view viewWithTag:tag]; 61 | // [self addCircularMask:button]; 62 | // button.backgroundColor = [UIColor colorWithHex:0x22313F]; 63 | // button.shimmerColor = [UIColor colorWithHex:0x3498db]; 64 | // button.iconOffImageColor = [UIColor colorWithHex:0xfffffff]; 65 | // button.iconImage = [UIImage imageNamed:@"icon"]; 66 | // [button showButtonWithAnimation:@NO];//@NO skips the animation 67 | 68 | for(int i = 0; i < [self.buttonExamples count]; i++) { 69 | NSInteger tag = 101 + i; 70 | BAShimmerButton * button = (BAShimmerButton*)[self.view viewWithTag:tag]; 71 | NSArray *params= @[button,@YES]; 72 | switch (tag) { 73 | case 101: 74 | { 75 | [self addCircularMask:button]; 76 | break; 77 | } 78 | 79 | case 102: 80 | { 81 | [self addRoundedSquareMask:button]; 82 | button.backgroundColor = [UIColor colorWithHex:0x420013]; 83 | button.shimmerColor = [UIColor colorWithHex:0xe33550]; 84 | button.shimmerDirection = BAShimmerDirectionLeftToRight; 85 | break; 86 | } 87 | 88 | case 103: 89 | { 90 | [self addCircularMask:button]; 91 | button.backgroundColor = [UIColor colorWithHex:0x22313F]; 92 | button.shimmerColor = [UIColor colorWithHex:0x3498db]; 93 | button.shimmerDirection = BAShimmerDirectionTopToBottom; 94 | button.shimmerDuration = 1.0f; 95 | break; 96 | } 97 | 98 | case 104: 99 | { 100 | [self addCircularMask:button]; 101 | button.iconImage = [UIImage imageNamed:@"icon"]; 102 | break; 103 | } 104 | 105 | case 105: 106 | { 107 | [self addRoundedSquareMask:button]; 108 | button.backgroundColor = [UIColor colorWithHex:0x420013]; 109 | button.shimmerColor = [UIColor colorWithHex:0xe33550]; 110 | button.iconImage = [UIImage imageNamed:@"icon"]; 111 | button.shimmerDirection = BAShimmerDirectionLeftToRight; 112 | break; 113 | } 114 | 115 | case 106: 116 | { 117 | [self addCircularMask:button]; 118 | button.backgroundColor = [UIColor colorWithHex:0x22313F]; 119 | button.shimmerColor = [UIColor colorWithHex:0x3498db]; 120 | button.iconImage = [UIImage imageNamed:@"icon"]; 121 | button.shimmerDirection = BAShimmerDirectionTopToBottom; 122 | button.shimmerDuration = 1.0f; 123 | 124 | break; 125 | } 126 | 127 | case 107: 128 | { 129 | [self addCircularMask:button]; 130 | button.iconImage = [UIImage imageNamed:@"icon"]; 131 | break; 132 | } 133 | 134 | case 108: 135 | { 136 | [self addRoundedSquareMask:button]; 137 | button.backgroundColor = [UIColor colorWithHex:0x420013]; 138 | button.shimmerColor = [UIColor colorWithHex:0xe33550]; 139 | button.iconImage = [UIImage imageNamed:@"icon"]; 140 | button.shimmerDirection = BAShimmerDirectionLeftToRight; 141 | break; 142 | } 143 | 144 | case 109: 145 | { 146 | [self addCircularMask:button]; 147 | button.backgroundColor = [UIColor colorWithHex:0x22313F]; 148 | button.shimmerColor = [UIColor colorWithHex:0x3498db]; 149 | button.iconImage = [UIImage imageNamed:@"icon"]; 150 | button.shimmerDirection = BAShimmerDirectionTopToBottom; 151 | button.shimmerDuration = 1.0f; 152 | break; 153 | } 154 | 155 | default: 156 | break; 157 | } 158 | [self performSelector:@selector(showButtonWithAnimation:) withObject:params afterDelay:0.02*i]; 159 | } 160 | 161 | [NSTimer scheduledTimerWithTimeInterval:2.0 162 | target:self 163 | selector:@selector(wiggleButtons) 164 | userInfo:nil 165 | repeats:YES]; 166 | self.firstLoad = NO; 167 | } 168 | } 169 | 170 | - (void)didReceiveMemoryWarning { 171 | [super didReceiveMemoryWarning]; 172 | // Dispose of any resources that can be recreated. 173 | } 174 | 175 | 176 | #pragma mark - IBActions 177 | 178 | - (IBAction)buttonPressed:(id)sender { 179 | BAShimmerButton *button = (BAShimmerButton*)sender; 180 | [button toggleButton]; 181 | } 182 | 183 | #pragma mark - Private 184 | 185 | - (void)configureTitle { 186 | 187 | //adding two fonts to one text label (Makes shimmer bolder) 188 | NSMutableAttributedString *title = [[NSMutableAttributedString alloc] initWithString:self.titleLabel.text]; 189 | [title addAttribute:NSFontAttributeName 190 | value:[UIFont fontWithName:@"BebasNeueBold" size:self.titleLabel.font.pointSize] 191 | range:NSMakeRange(2, 7)]; 192 | self.titleLabel.attributedText = title; 193 | self.titleLabel.layer.shadowColor = [UIColor blackColor].CGColor; 194 | self.titleLabel.layer.shadowOffset = CGSizeMake(1.0f,1.0f); 195 | self.titleLabel.layer.masksToBounds = NO; 196 | self.titleLabel.layer.shadowRadius = 3.0f; 197 | self.titleLabel.layer.shadowOpacity = 0.5; 198 | 199 | } 200 | 201 | - (void)addCircularMask:(BAShimmerButton*)button { 202 | //make a circle layer for the button outline 203 | CAShapeLayer *circle = [CAShapeLayer layer]; 204 | 205 | //create a circular path 206 | UIBezierPath *circularPath=[UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, button.frame.size.width,button.frame.size.height) cornerRadius:MAX(button.frame.size.width/2,button.frame.size.height/2)]; 207 | 208 | //set the circles path to the UIBezierPath's path 209 | circle.path = circularPath.CGPath; 210 | button.layer.mask = circle; 211 | } 212 | 213 | - (void)addRoundedSquareMask:(BAShimmerButton*)button { 214 | //make a rounded square layer for the button outline 215 | CAShapeLayer *roudedSquare = [CAShapeLayer layer]; 216 | 217 | //create a rounded square path 218 | UIBezierPath *roudedSquarePath=[UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, button.frame.size.width,button.frame.size.height) cornerRadius:5]; 219 | 220 | //set the square path to the UIBezierPath's path 221 | roudedSquare.path = roudedSquarePath.CGPath; 222 | button.layer.mask = roudedSquare; 223 | } 224 | 225 | - (void)showButtonWithAnimation:(NSArray*)params { 226 | 227 | //show all buttons 228 | BAShimmerButton *button = (BAShimmerButton*)[params objectAtIndex:0]; 229 | BOOL animate = [[params objectAtIndex:1] boolValue]; 230 | [button showButtonWithAnimation:animate]; 231 | } 232 | 233 | - (void)wiggleButtons { 234 | 235 | BAShimmerButton * firstButton = (BAShimmerButton*)[self.view viewWithTag:107]; 236 | [firstButton wiggleButton]; 237 | BAShimmerButton * secondButton = (BAShimmerButton*)[self.view viewWithTag:108]; 238 | [NSTimer scheduledTimerWithTimeInterval:0.1 239 | target:secondButton 240 | selector:@selector(wiggleButton) 241 | userInfo:nil 242 | repeats:NO]; 243 | BAShimmerButton * thirdButton = (BAShimmerButton*)[self.view viewWithTag:109]; 244 | [NSTimer scheduledTimerWithTimeInterval:0.2 245 | target:thirdButton 246 | selector:@selector(wiggleButton) 247 | userInfo:nil 248 | repeats:NO]; 249 | } 250 | @end 251 | 252 | 253 | 254 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/BebasNeue Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/BebasNeue Bold.ttf -------------------------------------------------------------------------------- /Example/BAShimmerButton/BebasNeue Book.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/BebasNeue Book.ttf -------------------------------------------------------------------------------- /Example/BAShimmerButton/BebasNeue Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/BebasNeue Light.ttf -------------------------------------------------------------------------------- /Example/BAShimmerButton/BebasNeue Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/BebasNeue Regular.ttf -------------------------------------------------------------------------------- /Example/BAShimmerButton/BebasNeue Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/BebasNeue Thin.ttf -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-Small@2x-1.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "40x40", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-Small-40@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "60x60", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-Small-40@3x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "60x60", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-60@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "ipad", 30 | "filename" : "Icon.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "29x29", 35 | "idiom" : "ipad", 36 | "filename" : "Icon@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "ipad", 42 | "filename" : "Icon-Small-40.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "40x40", 47 | "idiom" : "ipad", 48 | "filename" : "Icon-Small-40@2x-1.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "76x76", 53 | "idiom" : "ipad", 54 | "filename" : "Icon-76.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "76x76", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-76@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x-1.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/AppIcon.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-1.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-1-1.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-1-2.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.imageset/Screen Shot 2015-08-13 at 12.30.38 AM-1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.imageset/Screen Shot 2015-08-13 at 12.30.38 AM-1-1.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.imageset/Screen Shot 2015-08-13 at 12.30.38 AM-1-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.imageset/Screen Shot 2015-08-13 at 12.30.38 AM-1-2.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.imageset/Screen Shot 2015-08-13 at 12.30.38 AM-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.imageset/Screen Shot 2015-08-13 at 12.30.38 AM-1.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM.png", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-1.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | }, 20 | { 21 | "orientation" : "portrait", 22 | "idiom" : "ipad", 23 | "extent" : "full-screen", 24 | "minimum-system-version" : "7.0", 25 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-5.png", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "orientation" : "landscape", 30 | "idiom" : "ipad", 31 | "extent" : "full-screen", 32 | "minimum-system-version" : "7.0", 33 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-2.png", 34 | "scale" : "1x" 35 | }, 36 | { 37 | "orientation" : "portrait", 38 | "idiom" : "ipad", 39 | "extent" : "full-screen", 40 | "minimum-system-version" : "7.0", 41 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-4.png", 42 | "scale" : "2x" 43 | }, 44 | { 45 | "orientation" : "landscape", 46 | "idiom" : "ipad", 47 | "extent" : "full-screen", 48 | "minimum-system-version" : "7.0", 49 | "filename" : "Screen Shot 2015-08-13 at 12.30.38 AM-3.png", 50 | "scale" : "2x" 51 | } 52 | ], 53 | "info" : { 54 | "version" : 1, 55 | "author" : "xcode" 56 | } 57 | } -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-1.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-2.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-3.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-4.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM-5.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/LaunchImage.launchimage/Screen Shot 2015-08-13 at 12.30.38 AM.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "icon.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "icon@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "icon@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/icon.imageset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/icon.imageset/icon.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/icon.imageset/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/icon.imageset/icon@2x.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/Images.xcassets/icon.imageset/icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Example/BAShimmerButton/Images.xcassets/icon.imageset/icon@3x.png -------------------------------------------------------------------------------- /Example/BAShimmerButton/LaunchScreen.xib: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | BebasNeueBold 10 | 11 | 12 | BebasNeueBook 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 69 | 83 | 97 | 111 | 125 | 139 | 153 | 167 | 181 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/BAShimmerButton/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BAShimmerButton 4 | // 5 | // Created by Bryan Antigua on 07/12/2015. 6 | // Copyright (c) 2015 Bryan Antigua. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "BAAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([BAAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | use_frameworks! 3 | 4 | target 'BAShimmerButton_Example', :exclusive => true do 5 | pod "BAShimmerButton", :path => "../" 6 | end 7 | 8 | target 'BAShimmerButton_Tests', :exclusive => true do 9 | pod "BAShimmerButton", :path => "../" 10 | 11 | 12 | end 13 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BAShimmerButton (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - BAShimmerButton (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | BAShimmerButton: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | BAShimmerButton: c19236adf26760c4632e45cbbdc4a630051efb48 13 | 14 | COCOAPODS: 0.37.2 15 | -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAShimmerButton/BAShimmerButton.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/BAShimmerButton.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Private/BAShimmerButton/UIColor+ColorWithHex.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/UIColor+ColorWithHex.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAShimmerButton/BAShimmerButton.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/BAShimmerButton.h -------------------------------------------------------------------------------- /Example/Pods/Headers/Public/BAShimmerButton/UIColor+ColorWithHex.h: -------------------------------------------------------------------------------- 1 | ../../../../../Pod/Classes/UIColor+ColorWithHex.h -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/BAShimmerButton.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BAShimmerButton", 3 | "version": "0.1.0", 4 | "summary": "A call-to-action button that offers shimmer, movement, and off/on functionality", 5 | "description": " A call-to-action button that offers shimmer, movement, and off/on functionality. Great for getting a users attention in multiple ways!\n more info at: [https://github.com/antiguab/BAShimmerButton(https://github.com/antiguab/BAShimmerButton)\n", 6 | "homepage": "https://github.com/antiguab/BAShimmerButton", 7 | "license": "MIT", 8 | "authors": { 9 | "Bryan Antigua": "antigua.b@gmail.com" 10 | }, 11 | "source": { 12 | "git": "https://github.com/antiguab/BAShimmerButton.git", 13 | "tag": "0.1.0" 14 | }, 15 | "platforms": { 16 | "ios": null 17 | }, 18 | "requires_arc": true, 19 | "source_files": "Pod/Classes", 20 | "resource_bundles": { 21 | "BAShimmerButton": [ 22 | "Pod/Assets/*.png" 23 | ] 24 | }, 25 | "public_header_files": "Pod/Classes/**/*.h", 26 | "frameworks": "UIKit" 27 | } 28 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - BAShimmerButton (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - BAShimmerButton (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | BAShimmerButton: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | BAShimmerButton: c19236adf26760c4632e45cbbdc4a630051efb48 13 | 14 | COCOAPODS: 0.37.2 15 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-BAShimmerButton_Example-BAShimmerButton-BAShimmerButton.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-BAShimmerButton_Example-BAShimmerButton.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-BAShimmerButton_Tests-BAShimmerButton-BAShimmerButton.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-BAShimmerButton_Tests-BAShimmerButton.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 42 | 43 | 44 | 45 | 51 | 52 | 54 | 55 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example-BAShimmerButton/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example-BAShimmerButton/Pods-BAShimmerButton_Example-BAShimmerButton-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-BAShimmerButton_Example-BAShimmerButton.xcconfig" 2 | CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH 3 | FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BAShimmerButton" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BAShimmerButton" 6 | OTHER_LDFLAGS = ${PODS_BASHIMMERBUTTON_EXAMPLE_BASHIMMERBUTTON_OTHER_LDFLAGS} -ObjC 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-BAShimmerButton_Example 8 | PODS_ROOT = ${SRCROOT} 9 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example-BAShimmerButton/Pods-BAShimmerButton_Example-BAShimmerButton-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BAShimmerButton_Example_BAShimmerButton : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BAShimmerButton_Example_BAShimmerButton 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example-BAShimmerButton/Pods-BAShimmerButton_Example-BAShimmerButton-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-BAShimmerButton_Example-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example-BAShimmerButton/Pods-BAShimmerButton_Example-BAShimmerButton-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "BAShimmerButton.h" 4 | #import "UIColor+ColorWithHex.h" 5 | 6 | FOUNDATION_EXPORT double BAShimmerButtonVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char BAShimmerButtonVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example-BAShimmerButton/Pods-BAShimmerButton_Example-BAShimmerButton.modulemap: -------------------------------------------------------------------------------- 1 | framework module BAShimmerButton { 2 | umbrella header "Pods-BAShimmerButton_Example-BAShimmerButton-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example-BAShimmerButton/Pods-BAShimmerButton_Example-BAShimmerButton.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_BASHIMMERBUTTON_EXAMPLE_BASHIMMERBUTTON_OTHER_LDFLAGS = -framework "UIKit" -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## BAShimmerButton 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015 Bryan Antigua 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - http://cocoapods.org 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2015 Bryan Antigua <antigua.b@gmail.com> 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | Title 40 | BAShimmerButton 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - http://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BAShimmerButton_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BAShimmerButton_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // BAShimmerButton 10 | #define COCOAPODS_POD_AVAILABLE_BAShimmerButton 11 | #define COCOAPODS_VERSION_MAJOR_BAShimmerButton 0 12 | #define COCOAPODS_VERSION_MINOR_BAShimmerButton 1 13 | #define COCOAPODS_VERSION_PATCH_BAShimmerButton 0 14 | 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | local source="${BUILT_PRODUCTS_DIR}/Pods-BAShimmerButton_Example/$1" 12 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | 14 | if [ -L "${source}" ]; then 15 | echo "Symlinked..." 16 | source=$(readlink "${source}") 17 | fi 18 | 19 | # use filter instead of exclude so missing patterns dont' throw errors 20 | echo "rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" --filter "- Modules/" ${source} ${destination}" 21 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" --filter "- Modules/" "${source}" "${destination}" 22 | # Resign the code if required by the build settings to avoid unstable apps 23 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 24 | code_sign "${destination}/$1" 25 | fi 26 | 27 | # Embed linked Swift runtime libraries 28 | local basename 29 | basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]}) 30 | local swift_runtime_libs 31 | swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 32 | for lib in $swift_runtime_libs; do 33 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 34 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 35 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 36 | code_sign "${destination}/${lib}" 37 | fi 38 | done 39 | } 40 | 41 | # Signs a framework with the provided identity 42 | code_sign() { 43 | # Use the current code_sign_identitiy 44 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 45 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" 46 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 47 | } 48 | 49 | 50 | if [[ "$CONFIGURATION" == "Debug" ]]; then 51 | install_framework 'BAShimmerButton.framework' 52 | fi 53 | if [[ "$CONFIGURATION" == "Release" ]]; then 54 | install_framework 'BAShimmerButton.framework' 55 | fi 56 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY=$(cd "${1%/*}" && pwd) 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | if [[ "${ACTION}" == "install" ]]; then 63 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 64 | fi 65 | rm -f "$RESOURCES_TO_COPY" 66 | 67 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 68 | then 69 | case "${TARGETED_DEVICE_FAMILY}" in 70 | 1,2) 71 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 72 | ;; 73 | 1) 74 | TARGET_DEVICE_ARGS="--target-device iphone" 75 | ;; 76 | 2) 77 | TARGET_DEVICE_ARGS="--target-device ipad" 78 | ;; 79 | *) 80 | TARGET_DEVICE_ARGS="--target-device mac" 81 | ;; 82 | esac 83 | 84 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 85 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 86 | while read line; do 87 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 88 | XCASSET_FILES+=("$line") 89 | fi 90 | done <<<"$OTHER_XCASSETS" 91 | 92 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 93 | fi 94 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_BAShimmerButton_ExampleVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_BAShimmerButton_ExampleVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_FRAMEWORK_BUILD_PATH" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/BAShimmerButton.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "BAShimmerButton" 6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-BAShimmerButton_Example 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_BAShimmerButton_Example { 2 | umbrella header "Pods-BAShimmerButton_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Example/Pods-BAShimmerButton_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_FRAMEWORK_BUILD_PATH" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/BAShimmerButton.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "BAShimmerButton" 6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-BAShimmerButton_Example 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests-BAShimmerButton/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests-BAShimmerButton/Pods-BAShimmerButton_Tests-BAShimmerButton-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods-BAShimmerButton_Tests-BAShimmerButton.xcconfig" 2 | CONFIGURATION_BUILD_DIR = $PODS_FRAMEWORK_BUILD_PATH 3 | FRAMEWORK_SEARCH_PATHS = "$PODS_FRAMEWORK_BUILD_PATH" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/BAShimmerButton" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BAShimmerButton" 6 | OTHER_LDFLAGS = ${PODS_BASHIMMERBUTTON_TESTS_BASHIMMERBUTTON_OTHER_LDFLAGS} -ObjC 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-BAShimmerButton_Tests 8 | PODS_ROOT = ${SRCROOT} 9 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests-BAShimmerButton/Pods-BAShimmerButton_Tests-BAShimmerButton-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BAShimmerButton_Tests_BAShimmerButton : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BAShimmerButton_Tests_BAShimmerButton 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests-BAShimmerButton/Pods-BAShimmerButton_Tests-BAShimmerButton-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Pods-BAShimmerButton_Tests-environment.h" 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests-BAShimmerButton/Pods-BAShimmerButton_Tests-BAShimmerButton-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "BAShimmerButton.h" 4 | #import "UIColor+ColorWithHex.h" 5 | 6 | FOUNDATION_EXPORT double BAShimmerButtonVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char BAShimmerButtonVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests-BAShimmerButton/Pods-BAShimmerButton_Tests-BAShimmerButton.modulemap: -------------------------------------------------------------------------------- 1 | framework module BAShimmerButton { 2 | umbrella header "Pods-BAShimmerButton_Tests-BAShimmerButton-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests-BAShimmerButton/Pods-BAShimmerButton_Tests-BAShimmerButton.xcconfig: -------------------------------------------------------------------------------- 1 | PODS_BASHIMMERBUTTON_TESTS_BASHIMMERBUTTON_OTHER_LDFLAGS = -framework "UIKit" -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## BAShimmerButton 5 | 6 | The MIT License (MIT) 7 | 8 | Copyright (c) 2015 Bryan Antigua 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - http://cocoapods.org 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | The MIT License (MIT) 18 | 19 | Copyright (c) 2015 Bryan Antigua <antigua.b@gmail.com> 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | Title 40 | BAShimmerButton 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - http://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BAShimmerButton_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BAShimmerButton_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-environment.h: -------------------------------------------------------------------------------- 1 | 2 | // To check if a library is compiled with CocoaPods you 3 | // can use the `COCOAPODS` macro definition which is 4 | // defined in the xcconfigs so it is available in 5 | // headers also when they are imported in the client 6 | // project. 7 | 8 | 9 | // BAShimmerButton 10 | #define COCOAPODS_POD_AVAILABLE_BAShimmerButton 11 | #define COCOAPODS_VERSION_MAJOR_BAShimmerButton 0 12 | #define COCOAPODS_VERSION_MINOR_BAShimmerButton 1 13 | #define COCOAPODS_VERSION_PATCH_BAShimmerButton 0 14 | 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | local source="${BUILT_PRODUCTS_DIR}/Pods-BAShimmerButton_Tests/$1" 12 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 13 | 14 | if [ -L "${source}" ]; then 15 | echo "Symlinked..." 16 | source=$(readlink "${source}") 17 | fi 18 | 19 | # use filter instead of exclude so missing patterns dont' throw errors 20 | echo "rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" --filter "- Modules/" ${source} ${destination}" 21 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers/" --filter "- PrivateHeaders/" --filter "- Modules/" "${source}" "${destination}" 22 | # Resign the code if required by the build settings to avoid unstable apps 23 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 24 | code_sign "${destination}/$1" 25 | fi 26 | 27 | # Embed linked Swift runtime libraries 28 | local basename 29 | basename=$(echo $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]}) 30 | local swift_runtime_libs 31 | swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/$1/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 32 | for lib in $swift_runtime_libs; do 33 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 34 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 35 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 36 | code_sign "${destination}/${lib}" 37 | fi 38 | done 39 | } 40 | 41 | # Signs a framework with the provided identity 42 | code_sign() { 43 | # Use the current code_sign_identitiy 44 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 45 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" 46 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 47 | } 48 | 49 | 50 | if [[ "$CONFIGURATION" == "Debug" ]]; then 51 | install_framework 'BAShimmerButton.framework' 52 | fi 53 | if [[ "$CONFIGURATION" == "Release" ]]; then 54 | install_framework 'BAShimmerButton.framework' 55 | fi 56 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY=$(cd "${1%/*}" && pwd) 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | if [[ "${ACTION}" == "install" ]]; then 63 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 64 | fi 65 | rm -f "$RESOURCES_TO_COPY" 66 | 67 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 68 | then 69 | case "${TARGETED_DEVICE_FAMILY}" in 70 | 1,2) 71 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 72 | ;; 73 | 1) 74 | TARGET_DEVICE_ARGS="--target-device iphone" 75 | ;; 76 | 2) 77 | TARGET_DEVICE_ARGS="--target-device ipad" 78 | ;; 79 | *) 80 | TARGET_DEVICE_ARGS="--target-device mac" 81 | ;; 82 | esac 83 | 84 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 85 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 86 | while read line; do 87 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 88 | XCASSET_FILES+=("$line") 89 | fi 90 | done <<<"$OTHER_XCASSETS" 91 | 92 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 93 | fi 94 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_BAShimmerButton_TestsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_BAShimmerButton_TestsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_FRAMEWORK_BUILD_PATH" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/BAShimmerButton.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "BAShimmerButton" 6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-BAShimmerButton_Tests 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_BAShimmerButton_Tests { 2 | umbrella header "Pods-BAShimmerButton_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-BAShimmerButton_Tests/Pods-BAShimmerButton_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_FRAMEWORK_BUILD_PATH" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_FRAMEWORK_BUILD_PATH/BAShimmerButton.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "BAShimmerButton" 6 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS) 7 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-BAShimmerButton_Tests 8 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BAShimmerButtonTests.m 3 | // BAShimmerButtonTests 4 | // 5 | // Created by Bryan Antigua on 07/12/2015. 6 | // Copyright (c) 2015 Bryan Antigua. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Bryan Antigua 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 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/BAShimmerButton.h: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | #import 24 | 25 | /** 26 | Enum for different shimmering orientation and direction 27 | */ 28 | typedef NS_ENUM(NSInteger,BAShimmerDirection) { 29 | BAShimmerDirectionTopToBottom, 30 | BAShimmerDirectionBottomToTop, 31 | BAShimmerDirectionLeftToRight, 32 | BAShimmerDirectionDiagonalLeftToRight, 33 | BAShimmerDirectionRightToLeft, 34 | BAShimmerDirectionDiagonalRightToLeft 35 | }; 36 | 37 | @interface BAShimmerButton : UIButton 38 | 39 | /** 40 | UIColor for the Main portion of the gradient (goes from clear -> color -> clear) 41 | */ 42 | @property (strong, nonatomic) UIColor *shimmerColor; 43 | 44 | /** 45 | Image that can be used in the center of the button, also used as the mask for the off state 46 | */ 47 | @property (strong, nonatomic) UIImage *iconImage; 48 | 49 | /** 50 | UIColor for the off state mask, if available 51 | */ 52 | @property (strong, nonatomic) UIColor *iconOffImageColor; 53 | 54 | /** 55 | Duration for one shimmer 56 | */ 57 | @property (assign, nonatomic) CGFloat shimmerDuration; 58 | 59 | /** 60 | Enum value for shimmering orientation and direction 61 | */ 62 | @property (assign, nonatomic) BAShimmerDirection shimmerDirection; 63 | 64 | /** 65 | CGFloat to determine the total width of the gradient (between 0 - 1) 66 | */ 67 | @property (assign, nonatomic) CGFloat gradientSize; 68 | 69 | /** 70 | Turns the button from the on position to off or vice versa. The off -> on state involves turning off the shimmer and animating an icon if avaiable. The off -> on state involved turning on the shimmer and animating the icon in the reverse diretion 71 | */ 72 | - (void)toggleButton; 73 | 74 | /** 75 | Starts a growing animation for showing the button. You can choose to skip the animation 76 | 77 | @param animated 78 | Boolean for determining whether to animate and show or just show the button 79 | */ 80 | - (void)showButtonWithAnimation:(bool)animated; 81 | 82 | /** 83 | Starts a shrinking animation for hiding the button. You can choose to skip the animation 84 | 85 | @param animated 86 | Boolean for determining whether to animate and hide or hide show the button 87 | */ 88 | - (void)hideButtonWithAnimation:(bool)animated; 89 | 90 | /** 91 | Animation that makes the button wiggle up and down 92 | */ 93 | - (void)wiggleButton; 94 | @end 95 | -------------------------------------------------------------------------------- /Pod/Classes/BAShimmerButton.m: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | #import "BAShimmerButton.h" 24 | #import "UIColor+ColorWithHex.h" 25 | 26 | @interface BAShimmerButton () 27 | 28 | //main shimmer layer 29 | @property (strong, nonatomic) CAGradientLayer *gradientLayer; 30 | 31 | //tracking for whether the button is on or off 32 | @property (assign, nonatomic) bool onState; 33 | 34 | //Properties for icon on and off states 35 | @property (strong, nonatomic) CALayer *iconOffLayer; 36 | @property (strong, nonatomic) CALayer *iconOnLayer; 37 | @property (strong, nonatomic) CAShapeLayer *innerOnIconLayer; 38 | 39 | //Properties for button on and off states 40 | @property (strong, nonatomic) CABasicAnimation *shimmerAnimation; 41 | @property (strong, nonatomic) CAAnimationGroup *showButtonAnimationGroup; 42 | @property (strong, nonatomic) CAAnimationGroup *groupHideAnimationGroup; 43 | 44 | //Properties for wiggle 45 | @property(strong, nonatomic) UIDynamicAnimator *animator; 46 | 47 | @end 48 | 49 | @implementation BAShimmerButton 50 | 51 | #pragma mark - Lifecycle 52 | 53 | - (id)initWithFrame:(CGRect)aRect { 54 | self = [super initWithFrame:aRect]; 55 | 56 | if (self) 57 | { 58 | //sets defaults values 59 | [self initialize]; 60 | 61 | } 62 | return self; 63 | } 64 | 65 | - (id)initWithCoder:(NSCoder *)aDecoder { 66 | self = [super initWithCoder:aDecoder]; 67 | 68 | if (self) 69 | { 70 | //sets defaults values 71 | [self initialize]; 72 | } 73 | return self; 74 | } 75 | 76 | #pragma mark - Custom Accessors 77 | 78 | - (void)setShimmerDuration:(CGFloat)shimmerDuration { 79 | _shimmerDuration = shimmerDuration; 80 | [self createShimmerAnimation]; 81 | } 82 | 83 | - (void)setShimmerColor:(UIColor *)shimmerColor { 84 | _shimmerColor = shimmerColor; 85 | self.gradientLayer.colors = @[(id)[UIColor clearColor].CGColor, (id)_shimmerColor.CGColor,(id)[UIColor clearColor].CGColor]; 86 | [self createShimmerAnimation]; 87 | } 88 | 89 | - (void)setShimmerDirection:(BAShimmerDirection)shimmerDirection { 90 | _shimmerDirection = shimmerDirection; 91 | [self setGradientDirection]; 92 | [self createShimmerAnimation]; 93 | } 94 | 95 | - (void)setGradientSize:(CGFloat)gradientSize { 96 | _gradientSize = gradientSize; 97 | [self setGradientDirection]; 98 | [self createShimmerAnimation]; 99 | 100 | } 101 | 102 | - (void)setIconOffImageColor:(UIColor *)iconOffImageColor { 103 | _iconOffImageColor = iconOffImageColor; 104 | } 105 | 106 | - (void)setIconImage:(UIImage *)iconImage { 107 | _iconImage = iconImage; 108 | [self createIconImages]; 109 | [self.layer addSublayer:self.iconOffLayer]; 110 | [self.layer addSublayer:self.iconOnLayer]; 111 | 112 | //BUG 113 | //For some reason just changing the transform causing the initial animation to glitch 114 | //Doesn't seem to be setting the correct tranform scale factor 115 | if (!self.onState) { 116 | self.innerOnIconLayer.opacity = 0.0f; 117 | CABasicAnimation *transformHotFix; 118 | transformHotFix=[CABasicAnimation animationWithKeyPath:@"transform.scale"]; 119 | transformHotFix.duration=0.0f; 120 | transformHotFix.fillMode = kCAFillModeForwards; 121 | transformHotFix.removedOnCompletion = NO; 122 | transformHotFix.toValue= @0.0f; 123 | [CATransaction begin]; 124 | [CATransaction setCompletionBlock:^{ 125 | self.innerOnIconLayer.opacity = 1.0f; 126 | }]; 127 | [self.innerOnIconLayer addAnimation:transformHotFix forKey:@"shrinkingInner"]; 128 | [CATransaction commit]; 129 | } 130 | } 131 | 132 | #pragma mark - Private 133 | 134 | - (void)createShimmerAnimation { 135 | if (self.gradientLayer) { 136 | [self shimmerOff]; 137 | self.gradientLayer= nil; 138 | } 139 | self.gradientLayer = [CAGradientLayer layer]; 140 | self.gradientLayer.frame = self.bounds; 141 | 142 | //assign the shimmer the color chosen and vary opacity 143 | self.gradientLayer.colors = @[(id)[UIColor clearColor].CGColor, (id)self.shimmerColor.CGColor, (id)[UIColor clearColor].CGColor]; 144 | 145 | //spaces out the gradient based on width 146 | NSArray *startLocations = @[@0.0f, @(self.gradientSize / 2), @(self.gradientSize)]; 147 | NSArray *endLocations = @[@(1.0f - self.gradientSize), @(1.0f - (self.gradientSize / 2)), @1.0f]; 148 | self.gradientLayer.locations = startLocations; 149 | 150 | //choose orientation 151 | [self setGradientDirection]; 152 | 153 | self.shimmerAnimation = [CABasicAnimation animationWithKeyPath:@"locations"]; 154 | self.shimmerAnimation.fromValue = startLocations; 155 | self.shimmerAnimation.toValue = endLocations; 156 | self.shimmerAnimation.duration = self.shimmerDuration; 157 | self.shimmerAnimation.repeatCount = HUGE_VALF; 158 | } 159 | 160 | - (void)initialize { 161 | 162 | //default values 163 | _shimmerDuration = 2.0f; 164 | _shimmerDirection = BAShimmerDirectionDiagonalLeftToRight; 165 | _shimmerColor = [UIColor colorWithHex:0x5A6363]; 166 | _gradientSize = 0.5; 167 | self.onState = NO; 168 | [self setGradientDirection]; 169 | [self createShimmerAnimation]; 170 | 171 | [self shimmerOn]; 172 | 173 | 174 | //hide initially 175 | self.alpha = 0.0f; 176 | 177 | //showButton Animations 178 | CABasicAnimation *growAnimation=[CABasicAnimation animationWithKeyPath:@"transform.scale"]; 179 | growAnimation.duration=0.2f; 180 | growAnimation.beginTime = 0.0f; 181 | growAnimation.fromValue= @0.2; 182 | growAnimation.fillMode = kCAFillModeForwards; 183 | growAnimation.toValue=@1.0; 184 | 185 | CABasicAnimation *growPopAnimation=[CABasicAnimation animationWithKeyPath:@"transform.scale"]; 186 | growPopAnimation.duration=0.2f; 187 | growPopAnimation.beginTime = growAnimation.duration; 188 | growPopAnimation.fromValue=@1.0; 189 | growPopAnimation.toValue=@1.4; 190 | growPopAnimation.autoreverses = YES; 191 | 192 | self.showButtonAnimationGroup = [CAAnimationGroup animation]; 193 | self.showButtonAnimationGroup.duration = growAnimation.duration + growPopAnimation.duration*2.0f; 194 | self.showButtonAnimationGroup.removedOnCompletion = NO; 195 | self.showButtonAnimationGroup.fillMode = kCAFillModeForwards; 196 | self.showButtonAnimationGroup.animations = @[growAnimation,growPopAnimation]; 197 | 198 | //hideButton Animations 199 | CABasicAnimation *shrinkPopAnimation=[CABasicAnimation animationWithKeyPath:@"transform.scale"]; 200 | shrinkPopAnimation.duration=0.2f; 201 | shrinkPopAnimation.beginTime = 0.0f; 202 | shrinkPopAnimation.fromValue=@1.0; 203 | shrinkPopAnimation.toValue=@1.4; 204 | shrinkPopAnimation.autoreverses = YES; 205 | 206 | CABasicAnimation *shrinkAnimation; 207 | shrinkAnimation=[CABasicAnimation animationWithKeyPath:@"transform.scale"]; 208 | shrinkAnimation.duration=0.2f; 209 | shrinkAnimation.beginTime = shrinkPopAnimation.duration*2; 210 | shrinkAnimation.fromValue= @1.0; 211 | shrinkAnimation.fillMode = kCAFillModeForwards; 212 | shrinkAnimation.toValue= @0.1; 213 | 214 | 215 | self.groupHideAnimationGroup = [CAAnimationGroup animation]; 216 | self.groupHideAnimationGroup.duration = shrinkPopAnimation.duration*2.0f + shrinkAnimation.duration; 217 | self.groupHideAnimationGroup.removedOnCompletion = YES; 218 | self.groupHideAnimationGroup.fillMode = kCAFillModeForwards; 219 | self.groupHideAnimationGroup.animations = @[shrinkPopAnimation,shrinkAnimation]; 220 | 221 | } 222 | 223 | - (void)shimmerOn { 224 | //make sure to insert layer UNDER icon (only when off) 225 | if (self.iconOffLayer) { 226 | [self.layer insertSublayer:self.gradientLayer below:self.iconOffLayer]; 227 | } 228 | else { 229 | [self.layer addSublayer:self.gradientLayer]; 230 | } 231 | [self.gradientLayer addAnimation:self.shimmerAnimation forKey:@"animateGradient"]; 232 | } 233 | 234 | - (void)shimmerOff { 235 | [self.gradientLayer removeAnimationForKey:@"animateGradient"]; 236 | [self.gradientLayer removeFromSuperlayer]; 237 | } 238 | 239 | - (void)createIconImages { 240 | 241 | CALayer *maskLayer = [CALayer layer]; 242 | maskLayer.frame = CGRectMake(0,0, self.iconImage.size.width, self.iconImage.size.height); 243 | maskLayer.position = CGPointMake(CGRectGetWidth(self.bounds)/2,CGRectGetHeight(self.bounds)/2); 244 | maskLayer.contents = (id)self.iconImage.CGImage; 245 | 246 | //creating off icon 247 | self.iconOffLayer = [CAShapeLayer layer]; 248 | self.iconOffLayer.frame = CGRectMake(0,0, self.iconImage.size.width, self.iconImage.size.height); 249 | self.iconOffLayer.backgroundColor = [UIColor blackColor].CGColor; 250 | 251 | if (self.iconOffImageColor) { 252 | self.iconOffLayer.backgroundColor = self.iconOffImageColor.CGColor; 253 | } 254 | self.iconOffLayer.mask = maskLayer; 255 | 256 | 257 | //creating on icon 258 | self.iconOnLayer = [CAShapeLayer layer]; 259 | self.iconOnLayer.frame = CGRectMake(0,0, self.iconImage.size.width, self.iconImage.size.height); 260 | self.iconOnLayer.position = CGPointMake(CGRectGetWidth(self.bounds)/2,CGRectGetHeight(self.bounds)/2); 261 | self.iconOnLayer.contents = (id)self.iconImage.CGImage; 262 | 263 | //this serves as more of a mask and serves as the animation 264 | self.innerOnIconLayer = [CAShapeLayer layer]; 265 | UIBezierPath *circularPath=[UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, CGRectGetWidth(self.frame),CGRectGetHeight(self.frame)) cornerRadius:MAX(CGRectGetWidth(self.frame)/2,CGRectGetHeight(self.frame)/2)]; 266 | self.innerOnIconLayer.path = circularPath.CGPath; 267 | 268 | self.innerOnIconLayer.frame = self.frame; 269 | self.innerOnIconLayer.position = CGPointMake(CGRectGetWidth(self.iconOnLayer.frame)/2,CGRectGetHeight(self.iconOnLayer.frame)/2); 270 | self.iconOnLayer.mask = self.innerOnIconLayer; 271 | } 272 | 273 | - (void)setGradientDirection { 274 | switch (self.shimmerDirection) { 275 | case BAShimmerDirectionTopToBottom: 276 | { 277 | self.gradientLayer.startPoint = CGPointMake(0 ,-(self.gradientSize * 2)); 278 | self.gradientLayer.endPoint = CGPointMake(0, 2); 279 | break; 280 | } 281 | case BAShimmerDirectionBottomToTop: 282 | { 283 | self.gradientLayer.startPoint = CGPointMake(0 ,2); 284 | self.gradientLayer.endPoint = CGPointMake(0, -(self.gradientSize * 2)); 285 | break; 286 | } 287 | case BAShimmerDirectionLeftToRight: 288 | { 289 | self.gradientLayer.startPoint = CGPointMake(-(self.gradientSize * 2), 0); 290 | self.gradientLayer.endPoint = CGPointMake(2, 0); 291 | break; 292 | } 293 | case BAShimmerDirectionDiagonalLeftToRight: 294 | { 295 | self.gradientLayer.startPoint = CGPointMake(-(self.gradientSize * 2), 0); 296 | self.gradientLayer.endPoint = CGPointMake(1 + self.gradientSize, 1.5); 297 | break; 298 | } 299 | case BAShimmerDirectionRightToLeft: 300 | { 301 | self.gradientLayer.startPoint = CGPointMake(2, 0); 302 | self.gradientLayer.endPoint =CGPointMake(-(self.gradientSize * 2), 0); 303 | break; 304 | } 305 | case BAShimmerDirectionDiagonalRightToLeft: 306 | { 307 | self.gradientLayer.startPoint = CGPointMake(1 + self.gradientSize, 1.5); 308 | self.gradientLayer.endPoint = CGPointMake(-(self.gradientSize * 2), 0); 309 | break; 310 | } 311 | 312 | default: 313 | { 314 | break; 315 | } 316 | } 317 | } 318 | 319 | #pragma mark - Public 320 | 321 | - (void)showButtonWithAnimation:(bool)animated { 322 | self.alpha = 1.0f; 323 | if(animated){ 324 | [CATransaction begin]; 325 | [CATransaction setCompletionBlock:^{ 326 | [self shimmerOn]; 327 | }]; 328 | [self.layer addAnimation:self.showButtonAnimationGroup forKey:@"showButton"]; 329 | [CATransaction commit]; 330 | } 331 | } 332 | 333 | - (void)hideButtonWithAnimation:(bool)animated { 334 | if(animated){ 335 | [CATransaction begin]; 336 | [CATransaction setCompletionBlock:^{ 337 | self.alpha = 0.0f; 338 | }]; 339 | [self.layer addAnimation:self.groupHideAnimationGroup forKey:@"hideButton"]; 340 | [CATransaction commit]; 341 | } 342 | else { 343 | self.alpha = 0.0f; 344 | } 345 | } 346 | 347 | - (void)wiggleButton { 348 | self.animator = [[UIDynamicAnimator alloc] init]; 349 | UIAttachmentBehavior *buttonAnchor = [[UIAttachmentBehavior alloc] initWithItem:self attachedToAnchor:self.center]; 350 | buttonAnchor.damping = 0.2f; 351 | buttonAnchor.frequency = 2.0f; 352 | [self.animator addBehavior:buttonAnchor]; 353 | UIPushBehavior *buttonPushBehavior = [[UIPushBehavior alloc] initWithItems:@[self] mode:UIPushBehaviorModeInstantaneous]; 354 | buttonPushBehavior.pushDirection = CGVectorMake(0.0f, -1.5f); 355 | [self.animator addBehavior:buttonPushBehavior]; 356 | 357 | UIDynamicItemBehavior *buttonProperties = [[UIDynamicItemBehavior alloc] initWithItems:@[self]]; 358 | buttonProperties.resistance = 1.3f; 359 | [self.animator addBehavior:buttonProperties]; 360 | } 361 | 362 | 363 | 364 | - (void)toggleButton { 365 | 366 | //In case button gets pressed mid animation 367 | CGFloat currentScaleValue = [[self.innerOnIconLayer.presentationLayer valueForKeyPath: @"transform.scale"] floatValue]; 368 | 369 | //if on, turn off 370 | if (self.onState) { 371 | [self.innerOnIconLayer removeAnimationForKey:@"growingInner"]; 372 | CABasicAnimation *shrinkAnimation; 373 | shrinkAnimation=[CABasicAnimation animationWithKeyPath:@"transform.scale"]; 374 | shrinkAnimation.duration=1.0f; 375 | shrinkAnimation.fromValue= @(currentScaleValue); 376 | shrinkAnimation.fillMode = kCAFillModeForwards; 377 | shrinkAnimation.removedOnCompletion = NO; 378 | shrinkAnimation.toValue= @0.0; 379 | 380 | [self.innerOnIconLayer addAnimation:shrinkAnimation forKey:@"shrinkingInner"]; 381 | self.onState = NO; 382 | [self shimmerOn]; 383 | } 384 | 385 | //if off turn on 386 | else { 387 | [self shimmerOff]; 388 | CABasicAnimation *growAnimation; 389 | [self.innerOnIconLayer removeAnimationForKey:@"shrinkingInner"]; 390 | growAnimation=[CABasicAnimation animationWithKeyPath:@"transform.scale"]; 391 | growAnimation.duration=1.0f; 392 | growAnimation.fromValue= @(currentScaleValue); 393 | growAnimation.fillMode = kCAFillModeForwards; 394 | growAnimation.removedOnCompletion = NO; 395 | growAnimation.toValue= @1.0; 396 | 397 | self.onState = YES; 398 | [self.innerOnIconLayer addAnimation:growAnimation forKey:@"growingInner"]; 399 | } 400 | 401 | 402 | } 403 | @end 404 | -------------------------------------------------------------------------------- /Pod/Classes/UIColor+ColorWithHex.h: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | #import 24 | #import 25 | 26 | @interface UIColor (ColorFromHex) 27 | 28 | +(UIColor*)colorWithHex:(int)hex; 29 | 30 | @end -------------------------------------------------------------------------------- /Pod/Classes/UIColor+ColorWithHex.m: -------------------------------------------------------------------------------- 1 | //The MIT License (MIT) 2 | // 3 | //Copyright (c) 2015 Bryan Antigua 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 | 23 | #import "UIColor+ColorWithHex.h" 24 | #import 25 | 26 | #define UIColorFromRGB(rgbValue) [UIColor \ 27 | colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ 28 | green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \ 29 | blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] 30 | 31 | @implementation UIColor (ColorFromHex) 32 | 33 | +(UIColor*)colorWithHex:(int)hex 34 | { 35 | return UIColorFromRGB(hex); 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BAShimmerButton 2 | 3 | [![CI Status](http://img.shields.io/travis/Bryan Antigua/BAShimmerButton.svg?style=flat)](https://travis-ci.org/Bryan Antigua/BAShimmerButton) 4 | [![Version](https://img.shields.io/cocoapods/v/BAShimmerButton.svg?style=flat)](http://cocoapods.org/pods/BAShimmerButton) 5 | [![License](https://img.shields.io/cocoapods/l/BAShimmerButton.svg?style=flat)](http://cocoapods.org/pods/BAShimmerButton) 6 | [![Platform](https://img.shields.io/cocoapods/p/BAShimmerButton.svg?style=flat)](http://cocoapods.org/pods/BAShimmerButton) 7 | 8 | ## Overview 9 | **Note:GIF QUALITY MAKES THE SHIMMER LESS SMOOTH (run the code for best display)** 10 |

11 | 12 |

13 |
14 | ![example1](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example1.gif) 15 | ![example4](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example4.gif) 16 | ![example6](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example10.gif) 17 | 18 | A call-to-action button that offers shimmer, movement, and off/on functionality. Great for getting a users attention in multiple ways! 19 | 20 |
21 | 22 | ## Requirements 23 | * Works on any iOS device 24 | 25 |
26 | 27 | ## Example 28 | 29 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 30 | 31 |
32 | 33 | ## Getting Started 34 | ### Installation 35 | 36 | BAShimmerButton is available through [CocoaPods](http://cocoapods.org). To install 37 | it, simply add the following line to your Podfile: 38 | 39 | ``` 40 | pod "BAShimmerButton" 41 | ``` 42 | 43 | ### Simple Usage 44 | 45 | 46 | #### Basic 47 | To add a `BAShimmerButton` to your app, add the line: 48 | 49 | ```objc 50 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 51 | [self addCircularMask:button]; 52 | [button showButtonWithAnimation:@YES];//@NO skips the animation 53 | ``` 54 | **Note: circular mask added beforehand** 55 | **Note: You can skip the first line, if you added the button in IB** 56 | 57 | This creates the following animation/button: 58 | 59 | ![example1](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example1.gif) 60 | 61 | 62 | ### Advanced Usage 63 | Listed below are examples of several properties that you can control. 64 | 65 | #### Init 66 | You can use `initWithFrame:` or simply adding the view in Interface Builder to use this button. 67 | 68 | ####showButtonWithAnimation:(bool)animated 69 | Calling this method shows the button, by passing in `@NO`, you will simply show the button. If you pass `@YES`, you'll see the following animation (same code in the **basic** section): 70 | 71 | ![example1](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example1.gif) 72 | 73 | ####hideButtonWithAnimation:(bool)animated 74 | Similar to the one above, but the reverse: 75 | 76 | ![example2](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example2.gif) 77 | 78 | ####toggleButton 79 | This will transiton the button from the on to off state, or vice versa. The IB action can be done like the example below: 80 | 81 | ```objc 82 | - (IBAction)buttonPressed:(id)sender { 83 | BAShimmerButton *button = (BAShimmerButton*)sender; 84 | [button toggleButton]; 85 | } 86 | ``` 87 | 88 | You can then produce the following: 89 | 90 | ![example3](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example3.gif) 91 | ![example4](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example4.gif) 92 | 93 | 94 | ####wiggleButton 95 | To draw attention to your button, try this method: 96 | ```objc 97 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 98 | [self addCircularMask:button]; 99 | [button showButtonWithAnimation:@NO]; 100 | [button wiggleButton]; 101 | ``` 102 | which results in the following: 103 | 104 | ![example5](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example5.gif) 105 | 106 | 107 | #### Icon Image 108 | 109 | An icon image can be set for the button with the `iconImage` property. This also results in a mask of the image for the off state (color of your choosing). 110 | 111 | ```objc 112 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 113 | [self addCircularMask:button]; 114 | button.backgroundColor = [UIColor colorWithHex:0x420013]; 115 | button.shimmerColor = [UIColor colorWithHex:0xe33550]; 116 | button.iconImage = [UIImage imageNamed:@"icon"]; 117 | [button showButtonWithAnimation:@NO];//@NO skips the animation 118 | ``` 119 | This creates this button: 120 | 121 | ![example10](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example10.gif) 122 | 123 | #### IconOff ImageColor 124 | 125 | For the off state of the icon above, you can set different off colors: 126 | 127 | ```objc 128 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 129 | button.gradientSize = 0.3f; 130 | button.backgroundColor = [UIColor colorWithHex:0x420013]; 131 | button.shimmerColor = [UIColor colorWithHex:0xe33550]; 132 | button.iconOffImageColor = [UIColor colorWithHex:0xfffffff]; 133 | button.iconImage = [UIImage imageNamed:@"icon"]; 134 | [button showButtonWithAnimation:@NO]; 135 | ``` 136 | **Note: Set before you set iconImage** 137 | This creates the following view: 138 | 139 | ![example11](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example11.gif) 140 | 141 | #### Shimmer Duration 142 | If you want the shimmering to last longer/shorter, you can edit the `shimmerDuration` property: 143 | 144 | ```objc 145 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 146 | button.shimmerDuration = 1.0f; 147 | [button showButtonWithAnimation:@NO]; 148 | ``` 149 | 150 | This results in the following: 151 | 152 | ![example6](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example6.gif) 153 | 154 | #### Shimmer Color 155 | You can also change the overall color of the shimmer by editing the `shimmerColor` property: 156 | 157 | ```objc 158 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 159 | [self addRoundedSquareMask:button]; 160 | button.backgroundColor = [UIColor colorWithHex:0x22313F]; 161 | button.shimmerColor = [UIColor colorWithHex:0x3498db]; 162 | [button showButtonWithAnimation:@NO]; 163 | ``` 164 | 165 | This creates the following effect: 166 | 167 | ![example7](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example7.gif) 168 | 169 | #### Shimmer Direction 170 | 171 | By default, the animation goes from left to right in a diagonal direction. You can change the direction by setting the `shimmerDirection` property with any of the following: 172 | 173 | * BAShimmerDirectionTopToBottom 174 | * BAShimmerDirectionBottomToTop 175 | * BAShimmerDirectionLeftToRight 176 | * BAShimmerDirectionDiagonalLeftToRight 177 | * BAShimmerDirectionRightToLeft 178 | * BAShimmerDirectionDiagonalRightToLeft 179 | 180 | Setting a new direction can be done like so: 181 | 182 | ```objc 183 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 184 | button.shimmerDuration = BAShimmerDirectionTopToBottom; 185 | [button showButtonWithAnimation:@NO]; 186 | ``` 187 | This creates the following view: 188 | 189 | ![example8](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example8.gif) 190 | 191 | #### Gradient Size 192 | 193 | the gradient size can be adjust with the `gradientSize` property. This value is betwee 0 and 1 and determines how wide the entire shimmer should be: 194 | 195 | ```objc 196 | BAShimmerButton *button = [[BAShimmerButton alloc] initWithFrame:self.view.frame]; 197 | button.gradientSize = 0.3f; 198 | [button showButtonWithAnimation:@NO]; 199 | ``` 200 | This creates the following button: 201 | 202 | ![example9](https://github.com/antiguab/BAShimmerButton/blob/master/readmeAssets/example9.gif) 203 | 204 | ## Author 205 | 206 | Bryan Antigua, antigua.B@gmail.com - [bryanantigua.com](bryanantigua.com) 207 | 208 | 209 | ## License 210 | 211 | BAShimmerButton is available under the MIT license. See the LICENSE file for more info. 212 | 213 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /readmeAssets/example1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example1.gif -------------------------------------------------------------------------------- /readmeAssets/example10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example10.gif -------------------------------------------------------------------------------- /readmeAssets/example11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example11.gif -------------------------------------------------------------------------------- /readmeAssets/example2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example2.gif -------------------------------------------------------------------------------- /readmeAssets/example3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example3.gif -------------------------------------------------------------------------------- /readmeAssets/example4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example4.gif -------------------------------------------------------------------------------- /readmeAssets/example5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example5.gif -------------------------------------------------------------------------------- /readmeAssets/example6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example6.gif -------------------------------------------------------------------------------- /readmeAssets/example7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example7.gif -------------------------------------------------------------------------------- /readmeAssets/example8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example8.gif -------------------------------------------------------------------------------- /readmeAssets/example9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/example9.gif -------------------------------------------------------------------------------- /readmeAssets/examplea.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/examplea.gif -------------------------------------------------------------------------------- /readmeAssets/exampleb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antiguab/BAShimmerButton/77945d4209011a7a3b84eddd064c07297d191e14/readmeAssets/exampleb.gif --------------------------------------------------------------------------------