├── Pods ├── Headers │ ├── Private │ │ └── Expecta │ │ │ ├── Expecta.h │ │ │ ├── EXPExpect.h │ │ │ ├── EXPDefines.h │ │ │ ├── EXPMatcher.h │ │ │ ├── EXPDoubleTuple.h │ │ │ ├── EXPFloatTuple.h │ │ │ ├── ExpectaSupport.h │ │ │ ├── EXPMatchers.h │ │ │ ├── NSObject+Expecta.h │ │ │ ├── NSValue+Expecta.h │ │ │ ├── EXPBlockDefinedMatcher.h │ │ │ ├── EXPMatcherHelpers.h │ │ │ ├── EXPMatchers+beNil.h │ │ │ ├── EXPMatchers+equal.h │ │ │ ├── EXPMatchers+raise.h │ │ │ ├── EXPUnsupportedObject.h │ │ │ ├── EXPBackwardCompatibility.h │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ ├── EXPMatchers+contain.h │ │ │ ├── EXPMatchers+endWith.h │ │ │ ├── EXPMatchers+notify.h │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ ├── EXPMatchers+beginWith.h │ │ │ ├── EXPMatchers+conformTo.h │ │ │ ├── EXPMatchers+respondTo.h │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ └── EXPMatchers+beGreaterThanOrEqualTo.h │ └── Public │ │ └── Expecta │ │ ├── Expecta.h │ │ ├── EXPDefines.h │ │ ├── EXPExpect.h │ │ ├── EXPMatcher.h │ │ ├── EXPDoubleTuple.h │ │ ├── EXPFloatTuple.h │ │ ├── ExpectaSupport.h │ │ ├── NSValue+Expecta.h │ │ ├── EXPMatchers.h │ │ ├── NSObject+Expecta.h │ │ ├── EXPUnsupportedObject.h │ │ ├── EXPBlockDefinedMatcher.h │ │ ├── EXPMatcherHelpers.h │ │ ├── EXPMatchers+beNil.h │ │ ├── EXPMatchers+equal.h │ │ ├── EXPMatchers+notify.h │ │ ├── EXPMatchers+raise.h │ │ ├── EXPBackwardCompatibility.h │ │ ├── EXPMatchers+beFalsy.h │ │ ├── EXPMatchers+beKindOf.h │ │ ├── EXPMatchers+beTruthy.h │ │ ├── EXPMatchers+contain.h │ │ ├── EXPMatchers+endWith.h │ │ ├── EXPMatchers+beCloseTo.h │ │ ├── EXPMatchers+beLessThan.h │ │ ├── EXPMatchers+beginWith.h │ │ ├── EXPMatchers+conformTo.h │ │ ├── EXPMatchers+haveCountOf.h │ │ ├── EXPMatchers+respondTo.h │ │ ├── EXPMatchers+beGreaterThan.h │ │ ├── EXPMatchers+beIdenticalTo.h │ │ ├── EXPMatchers+beInstanceOf.h │ │ ├── EXPMatchers+beSubclassOf.h │ │ ├── EXPMatchers+beSupersetOf.h │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ ├── EXPMatchers+raiseWithReason.h │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ └── EXPMatchers+beGreaterThanOrEqualTo.h ├── Expecta │ ├── src │ │ ├── matchers │ │ │ ├── EXPMatchers+beFalsy.h │ │ │ ├── EXPMatchers+beTruthy.h │ │ │ ├── EXPMatchers+endWith.h │ │ │ ├── EXPMatchers+respondTo.h │ │ │ ├── EXPMatchers+beSupersetOf.h │ │ │ ├── EXPMatchers+conformTo.h │ │ │ ├── EXPMatchers+notify.h │ │ │ ├── EXPMatchers+beNil.h │ │ │ ├── EXPMatchers+beKindOf.h │ │ │ ├── EXPMatchers+beginWith.h │ │ │ ├── EXPMatcherHelpers.h │ │ │ ├── EXPMatchers+raise.h │ │ │ ├── EXPMatchers+beSubclassOf.h │ │ │ ├── EXPMatchers+raiseWithReason.h │ │ │ ├── EXPMatchers+beInstanceOf.h │ │ │ ├── EXPMatchers+equal.h │ │ │ ├── EXPMatchers+beLessThan.h │ │ │ ├── EXPMatchers+contain.h │ │ │ ├── EXPMatchers+beGreaterThan.h │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h │ │ │ ├── EXPMatcherHelpers.m │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h │ │ │ ├── EXPMatchers+haveCountOf.h │ │ │ ├── EXPMatchers+beCloseTo.h │ │ │ ├── EXPMatchers+beIdenticalTo.h │ │ │ ├── EXPMatchers+beInTheRangeOf.h │ │ │ ├── EXPMatchers+beNil.m │ │ │ ├── EXPMatchers+beLessThan.m │ │ │ ├── EXPMatchers+beIdenticalTo.m │ │ │ ├── EXPMatchers+beGreaterThan.m │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.m │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.m │ │ │ ├── EXPMatchers+beFalsy.m │ │ │ ├── EXPMatchers+beTruthy.m │ │ │ ├── EXPMatchers.h │ │ │ ├── EXPMatchers+equal.m │ │ │ ├── EXPMatchers+beInstanceOf.m │ │ │ ├── EXPMatchers+beSubclassOf.m │ │ │ ├── EXPMatchers+respondTo.m │ │ │ ├── EXPMatchers+beKindOf.m │ │ │ ├── EXPMatchers+conformTo.m │ │ │ ├── EXPMatchers+raise.m │ │ │ ├── EXPMatchers+beInTheRangeOf.m │ │ │ ├── EXPMatchers+haveCountOf.m │ │ │ ├── EXPMatchers+contain.m │ │ │ ├── EXPMatchers+raiseWithReason.m │ │ │ ├── EXPMatchers+beCloseTo.m │ │ │ ├── EXPMatchers+beSupersetOf.m │ │ │ ├── EXPMatchers+notify.m │ │ │ ├── EXPMatchers+beginWith.m │ │ │ └── EXPMatchers+endWith.m │ │ ├── NSValue+Expecta.h │ │ ├── EXPUnsupportedObject.h │ │ ├── EXPFloatTuple.h │ │ ├── EXPBackwardCompatibility.m │ │ ├── EXPDoubleTuple.h │ │ ├── Expecta.m │ │ ├── EXPUnsupportedObject.m │ │ ├── EXPDefines.h │ │ ├── NSObject+Expecta.h │ │ ├── EXPMatcher.h │ │ ├── NSValue+Expecta.m │ │ ├── EXPBlockDefinedMatcher.h │ │ ├── Expecta.h │ │ ├── EXPBlockDefinedMatcher.m │ │ ├── EXPFloatTuple.m │ │ ├── EXPDoubleTuple.m │ │ ├── EXPExpect.h │ │ ├── EXPBackwardCompatibility.h │ │ ├── ExpectaSupport.h │ │ ├── EXPExpect.m │ │ └── ExpectaSupport.m │ ├── LICENSE │ └── README.md ├── Target Support Files │ ├── Expecta │ │ ├── Expecta-prefix.pch │ │ ├── Expecta-dummy.m │ │ └── Expecta.xcconfig │ ├── Pods-BFPaperButton │ │ ├── Pods-BFPaperButton-dummy.m │ │ ├── Pods-BFPaperButton-acknowledgements.markdown │ │ ├── Pods-BFPaperButton.debug.xcconfig │ │ ├── Pods-BFPaperButton.release.xcconfig │ │ ├── Pods-BFPaperButton-acknowledgements.plist │ │ ├── Pods-BFPaperButton-frameworks.sh │ │ └── Pods-BFPaperButton-resources.sh │ └── Pods-BFPaperButtonTests │ │ ├── Pods-BFPaperButtonTests-dummy.m │ │ ├── Pods-BFPaperButtonTests.debug.xcconfig │ │ ├── Pods-BFPaperButtonTests.release.xcconfig │ │ ├── Pods-BFPaperButtonTests-acknowledgements.markdown │ │ ├── Pods-BFPaperButtonTests-acknowledgements.plist │ │ ├── Pods-BFPaperButtonTests-frameworks.sh │ │ └── Pods-BFPaperButtonTests-resources.sh └── Manifest.lock ├── frame1.png ├── frame2.png ├── frame3.png ├── frame4.png ├── frame5.png ├── frame6.png ├── BFPaperButton ├── en.lproj │ └── InfoPlist.strings ├── Images.xcassets │ ├── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── BFPaperButton-Prefix.pch ├── main.m ├── BFPaperButton-Info.plist ├── BFPaperViewController.h ├── BFPaperAppDelegate.h ├── LaunchScreen.storyboard ├── Base.lproj │ └── Main.storyboard ├── BFPaperAppDelegate.m └── BFPaperViewController.m ├── BFPaperButtonTests ├── en.lproj │ └── InfoPlist.strings ├── BFPaperButtonTests-Info.plist └── BFPaperButtonTests.m ├── ImageAndBGImageDemo.gif ├── BFPaperButtonDemoGif2.gif ├── BFPaperButton.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── BFPaperButton.xccheckout ├── Podfile ├── Podfile.lock ├── .gitignore ├── BFPaperButton.podspec ├── LICENSE.md ├── CHANGELOG.md ├── Classes └── BFPaperButton.h └── README.md /Pods/Headers/Private/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPExpect.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPDefines.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPExpect.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPMatcher.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPDefines.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPMatcher.h -------------------------------------------------------------------------------- /frame1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/frame1.png -------------------------------------------------------------------------------- /frame2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/frame2.png -------------------------------------------------------------------------------- /frame3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/frame3.png -------------------------------------------------------------------------------- /frame4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/frame4.png -------------------------------------------------------------------------------- /frame5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/frame5.png -------------------------------------------------------------------------------- /frame6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/frame6.png -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPDoubleTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPFloatTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/ExpectaSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPDoubleTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPFloatTuple.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/ExpectaSupport.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/NSValue+Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/NSObject+Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/NSValue+Expecta.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/NSObject+Expecta.h -------------------------------------------------------------------------------- /BFPaperButton/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPUnsupportedObject.h -------------------------------------------------------------------------------- /BFPaperButtonTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPBlockDefinedMatcher.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatcherHelpers.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beNil.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+equal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+raise.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPUnsupportedObject.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPBlockDefinedMatcher.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatcherHelpers.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beNil.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+equal.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+notify.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+notify.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+raise.h -------------------------------------------------------------------------------- /ImageAndBGImageDemo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/ImageAndBGImageDemo.gif -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPBackwardCompatibility.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPBackwardCompatibility.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beFalsy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beKindOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beTruthy.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+contain.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+endWith.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+notify.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+notify.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPBackwardCompatibility.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/EXPBackwardCompatibility.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beFalsy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beKindOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beTruthy.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+contain.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+endWith.h -------------------------------------------------------------------------------- /BFPaperButtonDemoGif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bfeher/BFPaperButton/HEAD/BFPaperButtonDemoGif2.gif -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beCloseTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beLessThan.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beginWith.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+conformTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+respondTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beCloseTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beLessThan.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beginWith.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+conformTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+haveCountOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+respondTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beGreaterThan.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beIdenticalTo.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beInstanceOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beSubclassOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beSupersetOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+haveCountOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beGreaterThan.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beIdenticalTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beInstanceOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beSubclassOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beSupersetOf.h -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beFalsy.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beFalsy, (void)); 4 | -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+raiseWithReason.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+raiseWithReason.h -------------------------------------------------------------------------------- /Pods/Target Support Files/Expecta/Expecta-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beTruthy.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beTruthy, (void)); 4 | -------------------------------------------------------------------------------- /BFPaperButton/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+endWith.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(endWith, (id expected)); 4 | -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+respondTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(respondTo, (SEL expected)); 4 | -------------------------------------------------------------------------------- /Pods/Headers/Private/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Headers/Public/Expecta/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | ../../../Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beSupersetOf, (id subset)); 4 | 5 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+conformTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(conformTo, (Protocol *expected)); 4 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+notify.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(notify, (id expectedNotification)); 4 | 5 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beNil.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beNil, (void)); 4 | 5 | #define beNull beNil 6 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beKindOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beKindOf, (Class expected)); 4 | 5 | #define beAKindOf beKindOf 6 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beginWith.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beginWith, (id expected)); 4 | 5 | #define startWith beginWith 6 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | BOOL EXPIsValuePointer(NSValue *value); 4 | BOOL EXPIsNumberFloat(NSNumber *number); 5 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+raise.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(raise, (NSString *expectedExceptionName)); 4 | #define raiseAny() raise(nil) 5 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beSubclassOf, (Class expected)); 4 | 5 | #define beASubclassOf beSubclassOf 6 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)); 4 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Expecta/Expecta-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Expecta : NSObject 3 | @end 4 | @implementation PodsDummy_Expecta 5 | @end 6 | -------------------------------------------------------------------------------- /BFPaperButton.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Pods/Expecta/src/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSValue (Expecta) 4 | 5 | - (const char *)_EXP_objCType; 6 | - (void)set_EXP_objCType:(const char *)_EXP_objCType; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButton/Pods-BFPaperButton-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BFPaperButton : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BFPaperButton 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButton/Pods-BFPaperButton-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | platform:ios, '7.0' 3 | 4 | target :BFPaperButton do 5 | target :BFPaperButtonTests do 6 | inherit! :search_paths 7 | pod 'Expecta', '~> 0.2.4' 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButtonTests/Pods-BFPaperButtonTests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BFPaperButtonTests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BFPaperButtonTests 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(beInstanceOf, (Class expected)); 4 | 5 | #define beAnInstanceOf beInstanceOf 6 | #define beMemberOf beInstanceOf 7 | #define beAMemberOf beInstanceOf 8 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+equal.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_equal, (id expected)); 4 | EXPMatcherInterface(equal, (id expected)); // to aid code completion 5 | #define equal(...) _equal(EXPObjectify((__VA_ARGS__))) 6 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beLessThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beLessThan, (id expected)); 4 | EXPMatcherInterface(beLessThan, (id expected)); 5 | 6 | #define beLessThan(expected) _beLessThan(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+contain.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_contain, (id expected)); 4 | EXPMatcherInterface(contain, (id expected)); // to aid code completion 5 | #define contain(expected) _contain(EXPObjectify((expected))) 6 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beGreaterThan, (id expected)); 4 | EXPMatcherInterface(beGreaterThan, (id expected)); 5 | 6 | #define beGreaterThan(expected) _beGreaterThan(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Expecta (0.2.4) 3 | 4 | DEPENDENCIES: 5 | - Expecta (~> 0.2.4) 6 | 7 | SPEC CHECKSUMS: 8 | Expecta: cfaf1d3e2e194ca704a25e997093d30a1ce70b61 9 | 10 | PODFILE CHECKSUM: de1c32b747514d9017b61f83c22f1ce6d9a9dca6 11 | 12 | COCOAPODS: 1.0.0 13 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPUnsupportedObject : NSObject { 4 | NSString *_type; 5 | } 6 | 7 | @property (nonatomic, retain) NSString *type; 8 | 9 | - (id)initWithType:(NSString *)type; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Expecta (0.2.4) 3 | 4 | DEPENDENCIES: 5 | - Expecta (~> 0.2.4) 6 | 7 | SPEC CHECKSUMS: 8 | Expecta: cfaf1d3e2e194ca704a25e997093d30a1ce70b61 9 | 10 | PODFILE CHECKSUM: de1c32b747514d9017b61f83c22f1ce6d9a9dca6 11 | 12 | COCOAPODS: 1.0.0 13 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beLessThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(beLessThanOrEqualTo, (id expected)); 5 | 6 | #define beLessThanOrEqualTo(expected) _beLessThanOrEqualTo(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatcherHelpers.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatcherHelpers.h" 2 | 3 | BOOL EXPIsValuePointer(NSValue *value) { 4 | return [value objCType][0] == @encode(void *)[0]; 5 | } 6 | 7 | BOOL EXPIsNumberFloat(NSNumber *number) { 8 | return strcmp([number objCType], @encode(float)) == 0; 9 | } 10 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beGreaterThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(beGreaterThanOrEqualTo, (id expected)); 5 | 6 | #define beGreaterThanOrEqualTo(expected) _beGreaterThanOrEqualTo(EXPObjectify((expected))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPFloatTuple.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPFloatTuple : NSObject { 4 | float *_values; 5 | size_t _size; 6 | } 7 | 8 | @property (nonatomic, assign) float *values; 9 | @property (nonatomic, assign) size_t size; 10 | 11 | - (id)initWithFloatValues:(float *)values size:(size_t)size; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPBackwardCompatibility.m: -------------------------------------------------------------------------------- 1 | #import "EXPBackwardCompatibility.h" 2 | 3 | @implementation EXPExpect (BackwardCompatiblity) 4 | 5 | - (EXPExpect *)Not { 6 | return self.toNot; 7 | } 8 | 9 | - (EXPExpect *)isGoing { 10 | return self.will; 11 | } 12 | 13 | - (EXPExpect *)isNotGoing { 14 | return self.willNot; 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPDoubleTuple.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface EXPDoubleTuple : NSObject { 4 | double *_values; 5 | size_t _size; 6 | } 7 | 8 | @property (nonatomic, assign) double *values; 9 | @property (nonatomic, assign) size_t size; 10 | 11 | - (id)initWithDoubleValues:(double *)values size:(size_t)size; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Pods/Expecta/src/Expecta.m: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | @implementation Expecta 4 | 5 | static NSTimeInterval _asynchronousTestTimeout = 1.0; 6 | 7 | + (NSTimeInterval)asynchronousTestTimeout { 8 | return _asynchronousTestTimeout; 9 | } 10 | 11 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout { 12 | _asynchronousTestTimeout = timeout; 13 | } 14 | 15 | @end -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(haveCountOf, (NSUInteger expected)); 4 | 5 | #define haveCount haveCountOf 6 | #define haveACountOf haveCountOf 7 | #define haveLength haveCountOf 8 | #define haveLengthOf haveCountOf 9 | #define haveALengthOf haveCountOf 10 | #define beEmpty() haveCountOf(0) 11 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beCloseToWithin, (id expected, id within)); 4 | EXPMatcherInterface(beCloseToWithin, (id expected, id within)); 5 | 6 | #define beCloseTo(expected) _beCloseToWithin(EXPObjectify((expected)), nil) 7 | #define beCloseToWithin(expected, range) _beCloseToWithin(EXPObjectify((expected)), EXPObjectify((range))) 8 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beIdenticalTo, (void *expected)); 4 | EXPMatcherInterface(beIdenticalTo, (void *expected)); // to aid code completion 5 | 6 | #if __has_feature(objc_arc) 7 | #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected) 8 | #else 9 | #define beIdenticalTo _beIdenticalTo 10 | #endif 11 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPUnsupportedObject.m: -------------------------------------------------------------------------------- 1 | #import "EXPUnsupportedObject.h" 2 | 3 | @implementation EXPUnsupportedObject 4 | 5 | @synthesize type=_type; 6 | 7 | - (id)initWithType:(NSString *)type { 8 | self = [super init]; 9 | if(self) { 10 | self.type = type; 11 | } 12 | return self; 13 | } 14 | 15 | - (void)dealloc { 16 | self.type = nil; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 4 | EXPMatcherInterface(beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 5 | 6 | #define beInTheRangeOf(expectedLowerBound, expectedUpperBound) _beInTheRangeOf(EXPObjectify((expectedLowerBound)), EXPObjectify((expectedUpperBound))) 7 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPDefines.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPDefines.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #ifndef Expecta_EXPDefines_h 10 | #define Expecta_EXPDefines_h 11 | 12 | typedef void (^EXPBasicBlock)(); 13 | typedef id (^EXPIdBlock)(); 14 | typedef BOOL (^EXPBoolBlock)(); 15 | typedef NSString *(^EXPStringBlock)(); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /BFPaperButton/BFPaperButton-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /BFPaperButton/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BFPaperButton 4 | // 5 | // Created by Bence Feher on 7/16/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "BFPaperAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([BFPaperAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Pods/Expecta/src/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSObject (Expecta) 4 | 5 | #ifdef USE_XCTEST 6 | - (void)recordFailureWithDescription:(NSString *)description 7 | inFile:(NSString *)filename 8 | atLine:(NSUInteger)lineNumber 9 | expected:(BOOL)expected; 10 | #else 11 | - (void)failWithException:(NSException *)exception; 12 | #endif 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPMatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPMatcher.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol EXPMatcher 12 | 13 | - (BOOL)matches:(id)actual; 14 | 15 | @optional 16 | - (BOOL)meetsPrerequesiteFor:(id)actual; 17 | - (NSString *)failureMessageForTo:(id)actual; 18 | - (NSString *)failureMessageForNotTo:(id)actual; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButton/Pods-BFPaperButton.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButton/Pods-BFPaperButton.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" 4 | OTHER_LDFLAGS = $(inherited) -ObjC 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beNil.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beNil.h" 2 | 3 | EXPMatcherImplementationBegin(beNil, (void)) { 4 | match(^BOOL{ 5 | return actual == nil; 6 | }); 7 | 8 | failureMessageForTo(^NSString *{ 9 | return [NSString stringWithFormat:@"expected: nil/null, got: %@", EXPDescribeObject(actual)]; 10 | }); 11 | 12 | failureMessageForNotTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: not nil/null, got: %@", EXPDescribeObject(actual)]; 14 | }); 15 | } 16 | EXPMatcherImplementationEnd 17 | -------------------------------------------------------------------------------- /BFPaperButton.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = "BFPaperButton" 4 | s.version = "2.1.2" 5 | s.summary = "A flat button inspired by Google Material Design's Paper theme." 6 | s.homepage = "https://github.com/bfeher/BFPaperButton" 7 | s.license = { :type => 'MIT', :file => 'LICENSE.md' } 8 | s.author = { "Bence Feher" => "ben.feher@gmail.com" } 9 | s.source = { :git => "https://github.com/bfeher/BFPaperButton.git", :tag => "2.1.2" } 10 | s.platform = :ios, '7.0' 11 | 12 | 13 | s.source_files = 'Classes/*.{h,m}' 14 | s.requires_arc = true 15 | 16 | end 17 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Expecta/Expecta.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Expecta 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Expecta" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" 4 | OTHER_LDFLAGS = -framework "Foundation" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButtonTests/Pods-BFPaperButtonTests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -framework "Foundation" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButtonTests/Pods-BFPaperButtonTests.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Expecta" 3 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" 4 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Expecta" 5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"Expecta" -framework "Foundation" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Pods/Expecta/src/NSValue+Expecta.m: -------------------------------------------------------------------------------- 1 | #import "NSValue+Expecta.h" 2 | #import 3 | #import "Expecta.h" 4 | 5 | EXPFixCategoriesBug(NSValue_Expecta); 6 | 7 | @implementation NSValue (Expecta) 8 | 9 | static char _EXP_typeKey; 10 | 11 | - (const char *)_EXP_objCType { 12 | return [(NSString *)objc_getAssociatedObject(self, &_EXP_typeKey) cStringUsingEncoding:NSASCIIStringEncoding]; 13 | } 14 | 15 | - (void)set_EXP_objCType:(const char *)_EXP_objCType { 16 | objc_setAssociatedObject(self, &_EXP_typeKey, 17 | [NSString stringWithCString:_EXP_objCType encoding:NSASCIIStringEncoding], 18 | OBJC_ASSOCIATION_COPY_NONATOMIC); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /BFPaperButton/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /BFPaperButtonTests/BFPaperButtonTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beLessThan.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beLessThan.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beLessThan, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] == NSOrderedAscending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPBlockDefinedMatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXPRuntimeMatcher.h 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "EXPMatcher.h" 11 | #import "EXPDefines.h" 12 | 13 | @interface EXPBlockDefinedMatcher : NSObject { 14 | EXPBoolBlock prerequisiteBlock; 15 | EXPBoolBlock matchBlock; 16 | EXPStringBlock failureMessageForToBlock; 17 | EXPStringBlock failureMessageForNotToBlock; 18 | } 19 | 20 | @property(nonatomic, copy) EXPBoolBlock prerequisiteBlock; 21 | @property(nonatomic, copy) EXPBoolBlock matchBlock; 22 | @property(nonatomic, copy) EXPStringBlock failureMessageForToBlock; 23 | @property(nonatomic, copy) EXPStringBlock failureMessageForNotToBlock; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beIdenticalTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+equal.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beIdenticalTo, (void *expected)) { 5 | match(^BOOL{ 6 | if(actual == expected) { 7 | return YES; 8 | } else if([actual isKindOfClass:[NSValue class]] && EXPIsValuePointer((NSValue *)actual)) { 9 | if([(NSValue *)actual pointerValue] == expected) { 10 | return YES; 11 | } 12 | } 13 | return NO; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: <%p>, got: <%p>", expected, actual]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: not <%p>, got: <%p>", expected, actual]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beGreaterThan.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beGreaterThan.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beGreaterThan, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] == NSOrderedDescending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beLessThanOrEqualTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beLessThanOrEqualTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beLessThanOrEqualTo, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] != NSOrderedDescending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beGreaterThanOrEqualTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beGreaterThanOrEqualTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beGreaterThanOrEqualTo, (id expected)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | return [actual compare:expected] != NSOrderedAscending; 8 | } 9 | return NO; 10 | }); 11 | 12 | failureMessageForTo(^NSString *{ 13 | return [NSString stringWithFormat:@"expected: %@ to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 14 | }); 15 | 16 | failureMessageForNotTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 18 | }); 19 | } 20 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beFalsy.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beFalsy.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beFalsy, (void)) { 5 | match(^BOOL{ 6 | if([actual isKindOfClass:[NSNumber class]]) { 7 | return ![(NSNumber *)actual boolValue]; 8 | } else if([actual isKindOfClass:[NSValue class]]) { 9 | if(EXPIsValuePointer((NSValue *)actual)) { 10 | return ![(NSValue *)actual pointerValue]; 11 | } 12 | } 13 | return !actual; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: a falsy value, got: %@, which is truthy", EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: a non-falsy value, got: %@, which is falsy", EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beTruthy.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beTruthy.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(beTruthy, (void)) { 5 | match(^BOOL{ 6 | if([actual isKindOfClass:[NSNumber class]]) { 7 | return !![(NSNumber *)actual boolValue]; 8 | } else if([actual isKindOfClass:[NSValue class]]) { 9 | if(EXPIsValuePointer((NSValue *)actual)) { 10 | return !![(NSValue *)actual pointerValue]; 11 | } 12 | } 13 | return !!actual; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: a truthy value, got: %@, which is falsy", EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: a non-truthy value, got: %@, which is truthy", EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beNil.h" 2 | #import "EXPMatchers+equal.h" 3 | #import "EXPMatchers+beInstanceOf.h" 4 | #import "EXPMatchers+beKindOf.h" 5 | #import "EXPMatchers+beSubclassOf.h" 6 | #import "EXPMatchers+conformTo.h" 7 | #import "EXPMatchers+beTruthy.h" 8 | #import "EXPMatchers+beFalsy.h" 9 | #import "EXPMatchers+contain.h" 10 | #import "EXPMatchers+beSupersetOf.h" 11 | #import "EXPMatchers+haveCountOf.h" 12 | #import "EXPMatchers+beIdenticalTo.h" 13 | #import "EXPMatchers+beGreaterThan.h" 14 | #import "EXPMatchers+beGreaterThanOrEqualTo.h" 15 | #import "EXPMatchers+beLessThan.h" 16 | #import "EXPMatchers+beLessThanOrEqualTo.h" 17 | #import "EXPMatchers+beInTheRangeOf.h" 18 | #import "EXPMatchers+beCloseTo.h" 19 | #import "EXPMatchers+raise.h" 20 | #import "EXPMatchers+raiseWithReason.h" 21 | #import "EXPMatchers+respondTo.h" 22 | #import "EXPMatchers+notify.h" 23 | #import "EXPMatchers+beginWith.h" 24 | #import "EXPMatchers+endWith.h" 25 | -------------------------------------------------------------------------------- /Pods/Expecta/src/Expecta.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ExpectaSupport.h" 3 | 4 | #define EXPObjectify(value) _EXPObjectify(@encode(__typeof__((value))), (value)) 5 | 6 | #define EXP_expect(actual) _EXP_expect(self, __LINE__, __FILE__, ^id{ return EXPObjectify((actual)); }) 7 | 8 | #define EXPMatcherInterface(matcherName, matcherArguments) _EXPMatcherInterface(matcherName, matcherArguments) 9 | #define EXPMatcherImplementationBegin(matcherName, matcherArguments) _EXPMatcherImplementationBegin(matcherName, matcherArguments) 10 | #define EXPMatcherImplementationEnd _EXPMatcherImplementationEnd 11 | 12 | #import "EXPMatchers.h" 13 | 14 | #ifdef EXP_SHORTHAND 15 | # define expect(actual) EXP_expect((actual)) 16 | #endif 17 | 18 | #ifdef EXP_OLD_SYNTAX 19 | # import "EXPBackwardCompatibility.h" 20 | #endif 21 | 22 | @interface Expecta : NSObject 23 | 24 | + (NSTimeInterval)asynchronousTestTimeout; 25 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButton/Pods-BFPaperButton-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 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+equal.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+equal.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_equal, (id expected)) { 5 | match(^BOOL{ 6 | if((actual == expected) || [actual isEqual:expected]) { 7 | return YES; 8 | } else if([actual isKindOfClass:[NSNumber class]] && [expected isKindOfClass:[NSNumber class]]) { 9 | if(EXPIsNumberFloat((NSNumber *)actual) || EXPIsNumberFloat((NSNumber *)expected)) { 10 | return [(NSNumber *)actual floatValue] == [(NSNumber *)expected floatValue]; 11 | } 12 | } 13 | return NO; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | return [NSString stringWithFormat:@"expected: %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; 18 | }); 19 | 20 | failureMessageForNotTo(^NSString *{ 21 | return [NSString stringWithFormat:@"expected: not %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)]; 22 | }); 23 | } 24 | EXPMatcherImplementationEnd 25 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beInstanceOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beInstanceOf.h" 2 | 3 | EXPMatcherImplementationBegin(beInstanceOf, (Class expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return !(actualIsNil || expectedIsNil); 9 | }); 10 | 11 | match(^BOOL{ 12 | return [actual isMemberOfClass:expected]; 13 | }); 14 | 15 | failureMessageForTo(^NSString *{ 16 | if(actualIsNil) return @"the actual value is nil/null"; 17 | if(expectedIsNil) return @"the expected value is nil/null"; 18 | return [NSString stringWithFormat:@"expected: an instance of %@, got: an instance of %@", [expected class], [actual class]]; 19 | }); 20 | 21 | failureMessageForNotTo(^NSString *{ 22 | if(actualIsNil) return @"the actual value is nil/null"; 23 | if(expectedIsNil) return @"the expected value is nil/null"; 24 | return [NSString stringWithFormat:@"expected: not an instance of %@, got: an instance of %@", [expected class], [actual class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beSubclassOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beSubclassOf.h" 2 | #import "NSValue+Expecta.h" 3 | #import 4 | 5 | EXPMatcherImplementationBegin(beSubclassOf, (Class expected)) { 6 | __block BOOL actualIsClass = YES; 7 | 8 | prerequisite(^BOOL { 9 | actualIsClass = class_isMetaClass(object_getClass(actual)); 10 | return actualIsClass; 11 | }); 12 | 13 | match(^BOOL{ 14 | return [actual isSubclassOfClass:expected]; 15 | }); 16 | 17 | failureMessageForTo(^NSString *{ 18 | if(!actualIsClass) return @"the actual value is not a Class"; 19 | return [NSString stringWithFormat:@"expected: a subclass of %@, got: a class %@, which is not a subclass of %@", [expected class], actual, [expected class]]; 20 | }); 21 | 22 | failureMessageForNotTo(^NSString *{ 23 | if(!actualIsClass) return @"the actual value is not a Class"; 24 | return [NSString stringWithFormat:@"expected: not a subclass of %@, got: a class %@, which is a subclass of %@", [expected class], actual, [expected class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+respondTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+respondTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(respondTo, (SEL expected)) { 5 | BOOL actualIsNil = (actual == nil); 6 | BOOL expectedIsNull = (expected == NULL); 7 | 8 | prerequisite (^BOOL { 9 | return !(actualIsNil || expectedIsNull); 10 | }); 11 | 12 | match(^BOOL { 13 | return [actual respondsToSelector:expected]; 14 | }); 15 | 16 | failureMessageForTo(^NSString *{ 17 | if (actualIsNil) return @"the object is nil/null"; 18 | if (expectedIsNull) return @"the selector is null"; 19 | return [NSString stringWithFormat:@"expected: %@ to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; 20 | }); 21 | 22 | failureMessageForNotTo(^NSString *{ 23 | if (actualIsNil) return @"the object is nil/null"; 24 | if (expectedIsNull) return @"the selector is null"; 25 | return [NSString stringWithFormat:@"expected: %@ not to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)]; 26 | }); 27 | } 28 | EXPMatcherImplementationEnd 29 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © (c) 2015-2017 Bence Feher 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beKindOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beKindOf.h" 2 | 3 | EXPMatcherImplementationBegin(beKindOf, (Class expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return !(actualIsNil || expectedIsNil); 9 | }); 10 | 11 | match(^BOOL{ 12 | return [actual isKindOfClass:expected]; 13 | }); 14 | 15 | failureMessageForTo(^NSString *{ 16 | if(actualIsNil) return @"the actual value is nil/null"; 17 | if(expectedIsNil) return @"the expected value is nil/null"; 18 | return [NSString stringWithFormat:@"expected: a kind of %@, got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]]; 19 | }); 20 | 21 | failureMessageForNotTo(^NSString *{ 22 | if(actualIsNil) return @"the actual value is nil/null"; 23 | if(expectedIsNil) return @"the expected value is nil/null"; 24 | return [NSString stringWithFormat:@"expected: not a kind of %@, got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]]; 25 | }); 26 | } 27 | EXPMatcherImplementationEnd 28 | -------------------------------------------------------------------------------- /Pods/Expecta/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012 Specta Team - https://github.com/specta 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+conformTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+conformTo.h" 2 | #import "NSValue+Expecta.h" 3 | #import 4 | 5 | EXPMatcherImplementationBegin(conformTo, (Protocol *expected)) { 6 | BOOL actualIsNil = (actual == nil); 7 | BOOL expectedIsNil = (expected == nil); 8 | 9 | prerequisite(^BOOL{ 10 | return !(actualIsNil || expectedIsNil); 11 | }); 12 | 13 | match(^BOOL{ 14 | return [actual conformsToProtocol:expected]; 15 | }); 16 | 17 | failureMessageForTo(^NSString *{ 18 | if(actualIsNil) return @"the object is nil/null"; 19 | if(expectedIsNil) return @"the protocol is nil/null"; 20 | 21 | NSString *name = NSStringFromProtocol(expected); 22 | return [NSString stringWithFormat:@"expected: %@ to conform to %@", actual, name]; 23 | }); 24 | 25 | failureMessageForNotTo(^NSString *{ 26 | if(actualIsNil) return @"the object is nil/null"; 27 | if(expectedIsNil) return @"the protocol is nil/null"; 28 | 29 | NSString *name = NSStringFromProtocol(expected); 30 | return [NSString stringWithFormat:@"expected: %@ not to conform to %@", actual, name]; 31 | }); 32 | } 33 | EXPMatcherImplementationEnd 34 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+raise.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+raise.h" 2 | #import "EXPDefines.h" 3 | 4 | EXPMatcherImplementationBegin(raise, (NSString *expectedExceptionName)) { 5 | __block NSException *exceptionCaught = nil; 6 | 7 | match(^BOOL{ 8 | BOOL expectedExceptionCaught = NO; 9 | @try { 10 | ((EXPBasicBlock)actual)(); 11 | } @catch(NSException *e) { 12 | exceptionCaught = e; 13 | expectedExceptionCaught = (expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]; 14 | } 15 | return expectedExceptionCaught; 16 | }); 17 | 18 | failureMessageForTo(^NSString *{ 19 | return [NSString stringWithFormat:@"expected: %@, got: %@", 20 | expectedExceptionName ? expectedExceptionName : @"any exception", 21 | exceptionCaught ? [exceptionCaught name] : @"no exception"]; 22 | }); 23 | 24 | failureMessageForNotTo(^NSString *{ 25 | return [NSString stringWithFormat:@"expected: %@, got: %@", 26 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", 27 | exceptionCaught ? [exceptionCaught name] : @"no exception"]; 28 | }); 29 | } 30 | EXPMatcherImplementationEnd 31 | -------------------------------------------------------------------------------- /BFPaperButton/BFPaperButton-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 2.1 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 2 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPBlockDefinedMatcher.m: -------------------------------------------------------------------------------- 1 | // 2 | // EXPRuntimeMatcher.m 3 | // Expecta 4 | // 5 | // Created by Luke Redpath on 26/03/2012. 6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved. 7 | // 8 | 9 | #import "EXPBlockDefinedMatcher.h" 10 | 11 | @implementation EXPBlockDefinedMatcher 12 | 13 | - (void)dealloc 14 | { 15 | self.prerequisiteBlock = nil; 16 | self.matchBlock = nil; 17 | self.failureMessageForToBlock = nil; 18 | self.failureMessageForNotToBlock = nil; 19 | 20 | [super dealloc]; 21 | } 22 | 23 | @synthesize prerequisiteBlock; 24 | @synthesize matchBlock; 25 | @synthesize failureMessageForToBlock; 26 | @synthesize failureMessageForNotToBlock; 27 | 28 | - (BOOL)meetsPrerequesiteFor:(id)actual 29 | { 30 | if (self.prerequisiteBlock) { 31 | return self.prerequisiteBlock(); 32 | } 33 | return YES; 34 | } 35 | 36 | - (BOOL)matches:(id)actual 37 | { 38 | if (self.matchBlock) { 39 | return self.matchBlock(); 40 | } 41 | return YES; 42 | } 43 | 44 | - (NSString *)failureMessageForTo:(id)actual 45 | { 46 | if (self.failureMessageForToBlock) { 47 | return self.failureMessageForToBlock(); 48 | } 49 | return nil; 50 | } 51 | 52 | - (NSString *)failureMessageForNotTo:(id)actual 53 | { 54 | if (self.failureMessageForNotToBlock) { 55 | return self.failureMessageForNotToBlock(); 56 | } 57 | return nil; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPFloatTuple.m: -------------------------------------------------------------------------------- 1 | #import "EXPFloatTuple.h" 2 | 3 | @implementation EXPFloatTuple 4 | 5 | @synthesize values = _values, size = _size; 6 | 7 | - (id)initWithFloatValues:(float *)values size:(size_t)size { 8 | if ((self = [super init])) { 9 | self.values = malloc(sizeof(float) * size); 10 | memcpy(self.values, values, sizeof(float) * size); 11 | self.size = size; 12 | } 13 | return self; 14 | } 15 | 16 | - (void)dealloc { 17 | free(self.values); 18 | [super dealloc]; 19 | } 20 | 21 | - (BOOL)isEqual:(id)object { 22 | if (![object isKindOfClass:[EXPFloatTuple class]]) return NO; 23 | EXPFloatTuple *other = (EXPFloatTuple *)object; 24 | if (self.size == other.size) { 25 | for (int i = 0; i < self.size; ++i) { 26 | if (self.values[i] != other.values[i]) return NO; 27 | } 28 | return YES; 29 | } 30 | return NO; 31 | } 32 | 33 | - (NSString *)description { 34 | if (self.size == 2) { 35 | return [NSString stringWithFormat:@"Float tuple: {%f, %f}", self.values[0], self.values[1]]; 36 | } else if (self.size == 4) { 37 | return [NSString stringWithFormat:@"Float tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]]; 38 | } 39 | return [NSString stringWithFormat:@"Float tuple of unexpected size %zd, sadly", self.size]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPDoubleTuple.m: -------------------------------------------------------------------------------- 1 | #import "EXPDoubleTuple.h" 2 | 3 | @implementation EXPDoubleTuple 4 | 5 | @synthesize values = _values, size = _size; 6 | 7 | - (id)initWithDoubleValues:(double *)values size:(size_t)size { 8 | if ((self = [super init])) { 9 | self.values = malloc(sizeof(double) * size); 10 | memcpy(self.values, values, sizeof(double) * size); 11 | self.size = size; 12 | } 13 | return self; 14 | } 15 | 16 | - (void)dealloc { 17 | free(self.values); 18 | [super dealloc]; 19 | } 20 | 21 | - (BOOL)isEqual:(id)object { 22 | if (![object isKindOfClass:[EXPDoubleTuple class]]) return NO; 23 | EXPDoubleTuple *other = (EXPDoubleTuple *)object; 24 | if (self.size == other.size) { 25 | for (int i = 0; i < self.size; ++i) { 26 | if (self.values[i] != other.values[i]) return NO; 27 | } 28 | return YES; 29 | } 30 | return NO; 31 | } 32 | 33 | - (NSString *)description { 34 | if (self.size == 2) { 35 | return [NSString stringWithFormat:@"Double tuple: {%f, %f}", self.values[0], self.values[1]]; 36 | } else if (self.size == 4) { 37 | return [NSString stringWithFormat:@"Double tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]]; 38 | } 39 | return [NSString stringWithFormat:@"Double tuple of unexpected size %zd, sadly", self.size]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButtonTests/Pods-BFPaperButtonTests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Expecta 5 | 6 | Copyright (c) 2011-2012 Specta Team - https://github.com/specta 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beInTheRangeOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beInTheRangeOf.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)) { 5 | match(^BOOL{ 6 | if ([actual respondsToSelector:@selector(compare:)]) { 7 | NSComparisonResult compareLowerBound = [expectedLowerBound compare: actual]; 8 | NSComparisonResult compareUpperBound = [expectedUpperBound compare: actual]; 9 | if (compareLowerBound == NSOrderedSame) { 10 | return YES; 11 | } 12 | if (compareUpperBound == NSOrderedSame) { 13 | return YES; 14 | } 15 | if ((compareLowerBound == NSOrderedAscending) && (compareUpperBound == NSOrderedDescending)) { 16 | return YES; 17 | } 18 | } 19 | return NO; 20 | }); 21 | 22 | failureMessageForTo(^NSString *{ 23 | return [NSString stringWithFormat:@"expected: %@ to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; 24 | }); 25 | 26 | failureMessageForNotTo(^NSString *{ 27 | return [NSString stringWithFormat:@"expected: %@ not to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)]; 28 | }); 29 | } 30 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /BFPaperButton/BFPaperViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperViewController.h 3 | // BFPaperButton 4 | // 5 | // Created by Bence Feher on 7/16/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 13 | // this software and associated documentation files (the "Software"), to deal in 14 | // the Software without restriction, including without limitation the rights to 15 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 16 | // the Software, and to permit persons to whom the Software is furnished to do so, 17 | // subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 24 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 25 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 26 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | 30 | #import 31 | 32 | @interface BFPaperViewController : UIViewController 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPExpect.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "EXPMatcher.h" 3 | #import "EXPDefines.h" 4 | 5 | @interface EXPExpect : NSObject { 6 | EXPIdBlock _actualBlock; 7 | id _testCase; 8 | int _lineNumber; 9 | char *_fileName; 10 | BOOL _negative; 11 | BOOL _asynchronous; 12 | } 13 | 14 | @property(nonatomic, copy) EXPIdBlock actualBlock; 15 | @property(nonatomic, readonly) id actual; 16 | @property(nonatomic, assign) id testCase; 17 | @property(nonatomic) int lineNumber; 18 | @property(nonatomic) const char *fileName; 19 | @property(nonatomic) BOOL negative; 20 | @property(nonatomic) BOOL asynchronous; 21 | 22 | @property(nonatomic, readonly) EXPExpect *to; 23 | @property(nonatomic, readonly) EXPExpect *toNot; 24 | @property(nonatomic, readonly) EXPExpect *notTo; 25 | @property(nonatomic, readonly) EXPExpect *will; 26 | @property(nonatomic, readonly) EXPExpect *willNot; 27 | 28 | - (id)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName; 29 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName; 30 | 31 | - (void)applyMatcher:(id)matcher; 32 | - (void)applyMatcher:(id)matcher to:(NSObject **)actual; 33 | 34 | @end 35 | 36 | @interface EXPDynamicPredicateMatcher : NSObject { 37 | EXPExpect *_expectation; 38 | SEL _selector; 39 | } 40 | - (id)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector; 41 | - (void (^)(void))dispatch; 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+haveCountOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+haveCountOf.h" 2 | 3 | EXPMatcherImplementationBegin(haveCountOf, (NSUInteger expected)) { 4 | BOOL actualIsStringy = [actual isKindOfClass:[NSString class]] || [actual isKindOfClass:[NSAttributedString class]]; 5 | BOOL actualIsCompatible = actualIsStringy || [actual respondsToSelector:@selector(count)]; 6 | 7 | prerequisite(^BOOL{ 8 | return actualIsCompatible; 9 | }); 10 | 11 | NSUInteger (^count)(id) = ^(id actual) { 12 | if(actualIsStringy) { 13 | return [actual length]; 14 | } else { 15 | return [actual count]; 16 | } 17 | }; 18 | 19 | match(^BOOL{ 20 | if(actualIsCompatible) { 21 | return count(actual) == expected; 22 | } 23 | return NO; 24 | }); 25 | 26 | failureMessageForTo(^NSString *{ 27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; 28 | return [NSString stringWithFormat:@"expected %@ to have a count of %zi but got %zi", EXPDescribeObject(actual), expected, count(actual)]; 29 | }); 30 | 31 | failureMessageForNotTo(^NSString *{ 32 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)]; 33 | return [NSString stringWithFormat:@"expected %@ not to have a count of %zi", EXPDescribeObject(actual), expected]; 34 | }); 35 | } 36 | EXPMatcherImplementationEnd 37 | -------------------------------------------------------------------------------- /BFPaperButton/BFPaperAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperAppDelegate.h 3 | // BFPaperButton 4 | // 5 | // Created by Bence Feher on 7/16/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 13 | // this software and associated documentation files (the "Software"), to deal in 14 | // the Software without restriction, including without limitation the rights to 15 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 16 | // the Software, and to permit persons to whom the Software is furnished to do so, 17 | // subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 24 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 25 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 26 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | 30 | #import 31 | 32 | @interface BFPaperAppDelegate : UIResponder 33 | 34 | @property (strong, nonatomic) UIWindow *window; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+contain.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+contain.h" 2 | 3 | EXPMatcherImplementationBegin(_contain, (id expected)) { 4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSString class]] || [actual conformsToProtocol:@protocol(NSFastEnumeration)]; 5 | BOOL expectedIsNil = (expected == nil); 6 | 7 | prerequisite(^BOOL{ 8 | return actualIsCompatible && !expectedIsNil; 9 | }); 10 | 11 | match(^BOOL{ 12 | if(actualIsCompatible) { 13 | if([actual isKindOfClass:[NSString class]]) { 14 | return [(NSString *)actual rangeOfString:[expected description]].location != NSNotFound; 15 | } else { 16 | for (id object in actual) { 17 | if ([object isEqual:expected]) { 18 | return YES; 19 | } 20 | } 21 | } 22 | } 23 | return NO; 24 | }); 25 | 26 | failureMessageForTo(^NSString *{ 27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; 28 | if(expectedIsNil) return @"the expected value is nil/null"; 29 | return [NSString stringWithFormat:@"expected %@ to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 30 | }); 31 | 32 | failureMessageForNotTo(^NSString *{ 33 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)]; 34 | if(expectedIsNil) return @"the expected value is nil/null"; 35 | return [NSString stringWithFormat:@"expected %@ not to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 36 | }); 37 | } 38 | EXPMatcherImplementationEnd 39 | -------------------------------------------------------------------------------- /BFPaperButton.xcworkspace/xcshareddata/BFPaperButton.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 81040C42-6648-4518-B005-D9028B5D14B0 9 | IDESourceControlProjectName 10 | BFPaperButton 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 37DA6020AA3BBC1B7E24EED372416FCD9E002028 14 | https://github.com/bfeher/BFPaperButton.git 15 | 16 | IDESourceControlProjectPath 17 | BFPaperButton.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 37DA6020AA3BBC1B7E24EED372416FCD9E002028 21 | .. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/bfeher/BFPaperButton.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 37DA6020AA3BBC1B7E24EED372416FCD9E002028 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 37DA6020AA3BBC1B7E24EED372416FCD9E002028 36 | IDESourceControlWCCName 37 | BFPaperButton 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /BFPaperButton/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "8.0", 8 | "subtype" : "736h", 9 | "scale" : "3x" 10 | }, 11 | { 12 | "orientation" : "landscape", 13 | "idiom" : "iphone", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "8.0", 16 | "subtype" : "736h", 17 | "scale" : "3x" 18 | }, 19 | { 20 | "orientation" : "portrait", 21 | "idiom" : "iphone", 22 | "extent" : "full-screen", 23 | "minimum-system-version" : "8.0", 24 | "subtype" : "667h", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "orientation" : "portrait", 29 | "idiom" : "iphone", 30 | "extent" : "full-screen", 31 | "minimum-system-version" : "7.0", 32 | "scale" : "2x" 33 | }, 34 | { 35 | "orientation" : "portrait", 36 | "idiom" : "iphone", 37 | "extent" : "full-screen", 38 | "minimum-system-version" : "7.0", 39 | "subtype" : "retina4", 40 | "scale" : "2x" 41 | }, 42 | { 43 | "orientation" : "portrait", 44 | "idiom" : "iphone", 45 | "extent" : "full-screen", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "orientation" : "portrait", 50 | "idiom" : "iphone", 51 | "extent" : "full-screen", 52 | "scale" : "2x" 53 | }, 54 | { 55 | "orientation" : "portrait", 56 | "idiom" : "iphone", 57 | "extent" : "full-screen", 58 | "subtype" : "retina4", 59 | "scale" : "2x" 60 | } 61 | ], 62 | "info" : { 63 | "version" : 1, 64 | "author" : "xcode" 65 | } 66 | } -------------------------------------------------------------------------------- /BFPaperButton/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+raiseWithReason.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+raiseWithReason.h" 2 | #import "EXPDefines.h" 3 | 4 | EXPMatcherImplementationBegin(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)) { 5 | __block NSException *exceptionCaught = nil; 6 | 7 | match(^BOOL{ 8 | BOOL expectedExceptionCaught = NO; 9 | @try { 10 | ((EXPBasicBlock)actual)(); 11 | } @catch(NSException *e) { 12 | exceptionCaught = e; 13 | expectedExceptionCaught = (((expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]) && 14 | ((expectedReason == nil) || ([[exceptionCaught reason] isEqualToString:expectedReason]))); 15 | } 16 | return expectedExceptionCaught; 17 | }); 18 | 19 | failureMessageForTo(^NSString *{ 20 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", 21 | expectedExceptionName ?: @"any exception", 22 | expectedReason ?: @"any reason", 23 | exceptionCaught ? [exceptionCaught name] : @"no exception", 24 | exceptionCaught ? [exceptionCaught reason] : @""]; 25 | }); 26 | 27 | failureMessageForNotTo(^NSString *{ 28 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)", 29 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception", 30 | expectedReason ? [NSString stringWithFormat:@"not '%@'", expectedReason] : @"no reason", 31 | exceptionCaught ? [exceptionCaught name] : @"no exception", 32 | exceptionCaught ? [exceptionCaught reason] : @"no reason"]; 33 | }); 34 | } 35 | EXPMatcherImplementationEnd 36 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | BFPaperButton 2 | ============= 3 | [![CocoaPods](https://img.shields.io/cocoapods/v/BFPaperButton.svg?style=flat)](https://github.com/bfeher/BFPaperButton) 4 | 5 | > Note that this changelog was started very late, at roughly the time between version 2.0.17 and 2.0.18. Non consecutive jumps in changelog mean that there were incremental builds that weren't released as a pod, typically while solving a problem. 6 | 7 | 8 | 2.1.2 9 | --------- 10 | * (^) Removed warnings about CAAnimationDelegate in Xcode 8 (thanks [Nicola](https://github.com/ndebei) and [h-umus](https://github.com/h-umus)). [Pull Request 9](https://github.com/bfeher/BFPaperButton/pull/31) 11 | 12 | 13 | 2.1.1 14 | --------- 15 | * (^) Fixed bug where '.enabled' property was not being taken into account during sizeToFit and layoutSubviews calls. [Issue 28](https://github.com/bfeher/BFPaperButton/issues/28) 16 | 17 | 18 | 2.1.0 19 | --------- 20 | * (+) Added IB_DESIGNABLE/IBInspectable attributes to properties courtesy of github user [Bhargav Mogra](https://github.com/bhargavms) 21 | * (^) Updated README to be more readable courtesy of github user [Bhargav Mogra](https://github.com/bhargavms) 22 | * (-) Removed BFPaperColor dependency courtesy of github user [Bhargav Mogra](https://github.com/bhargavms) 23 | 24 | 25 | 2.0.29 26 | --------- 27 | * (+) Migrated to Cocoapods 1.0. 28 | 29 | 30 | 2.0.27 31 | --------- 32 | * (+) Added LaunchScreen.xib to get fullscreen for iPhone 5 and up. (Lazy demo app doesn't scroll so iPhone 4 and down won't fit everything on screen.) 33 | * (^) Modified BFPaperButton.m to check if tapCircles are nil first (credit goes to github user [Adam Szeptycki](https://github.com/adamszeptycki)) 34 | 35 | 36 | 2.0.18 37 | --------- 38 | * (^) Fixed bug where loweredShadowOffset property wasn't being utilized and instead was ignored for a hardcoded default value. 39 | -------------------------------------------------------------------------------- /BFPaperButton/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPBackwardCompatibility.h: -------------------------------------------------------------------------------- 1 | #import "EXPExpect.h" 2 | 3 | @interface EXPExpect (BackwardCompatiblity) 4 | 5 | @property(nonatomic, readonly) EXPExpect *Not; 6 | @property(nonatomic, readonly) EXPExpect *isGoing; 7 | @property(nonatomic, readonly) EXPExpect *isNotGoing; 8 | 9 | @end 10 | 11 | #define toBeFalsy beFalsy 12 | #define toBeGreaterThan beGreaterThan 13 | #define toBeGreaterThanOrEqualTo beGreaterThanOrEqualTo 14 | #define toBeIdenticalTo beIdenticalTo 15 | #define toBeInTheRangeOf beInTheRangeOf 16 | #define toBeInstanceOf beInstanceOf 17 | #define toBeAnInstanceOf beInstanceOf 18 | #define toBeMemberOf beInstanceOf 19 | #define toBeAMemberOf beInstanceOf 20 | #define toBeKindOf beKindOf 21 | #define toBeAKindOf beKindOf 22 | #define toBeLessThan beLessThan 23 | #define toBeLessThanOrEqualTo beLessThanOrEqualTo 24 | #define toBeNil beNil 25 | #define toBeNull beNil 26 | #define toBeSubclassOf beSubclassOf 27 | #define toBeASubclassOf beSubclassOf 28 | #define toBeTruthy beTruthy 29 | #define toBeFalsy beFalsy 30 | #define toContain contain 31 | #define toEqual equal 32 | #define toBeCloseTo beCloseTo 33 | #define toBeCloseToWithin beCloseToWithin 34 | #define toHaveCount haveCountOf 35 | #define toHaveCountOf haveCountOf 36 | #define toHaveACountOf haveCountOf 37 | #define toHaveLength haveCountOf 38 | #define toHaveLengthOf haveCountOf 39 | #define toHaveALengthOf haveCountOf 40 | #define toBeEmpty beEmpty 41 | #define toRaise raise 42 | #define toRaiseAny raiseAny 43 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beCloseTo.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beCloseTo.h" 2 | #import "EXPMatcherHelpers.h" 3 | 4 | EXPMatcherImplementationBegin(_beCloseToWithin, (id expected, id within)) { 5 | prerequisite(^BOOL{ 6 | return [actual isKindOfClass:[NSNumber class]] && 7 | [expected isKindOfClass:[NSNumber class]] && 8 | ([within isKindOfClass:[NSNumber class]] || (within == nil)); 9 | }); 10 | 11 | match(^BOOL{ 12 | double actualValue = [actual doubleValue]; 13 | double expectedValue = [expected doubleValue]; 14 | 15 | if (within != nil) { 16 | double withinValue = [within doubleValue]; 17 | double lowerBound = expectedValue - withinValue; 18 | double upperBound = expectedValue + withinValue; 19 | return (actualValue >= lowerBound) && (actualValue <= upperBound); 20 | } else { 21 | double diff = fabs(actualValue - expectedValue); 22 | actualValue = fabs(actualValue); 23 | expectedValue = fabs(expectedValue); 24 | double largest = (expectedValue > actualValue) ? expectedValue : actualValue; 25 | return (diff <= largest * FLT_EPSILON); 26 | } 27 | }); 28 | 29 | failureMessageForTo(^NSString *{ 30 | if (within) { 31 | return [NSString stringWithFormat:@"expected %@ to be close to %@ within %@", 32 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; 33 | } else { 34 | return [NSString stringWithFormat:@"expected %@ to be close to %@", 35 | EXPDescribeObject(actual), EXPDescribeObject(expected)]; 36 | } 37 | }); 38 | 39 | failureMessageForNotTo(^NSString *{ 40 | if (within) { 41 | return [NSString stringWithFormat:@"expected %@ not to be close to %@ within %@", 42 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)]; 43 | } else { 44 | return [NSString stringWithFormat:@"expected %@ not to be close to %@", 45 | EXPDescribeObject(actual), EXPDescribeObject(expected)]; 46 | } 47 | }); 48 | } 49 | EXPMatcherImplementationEnd -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beSupersetOf.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+contain.h" 2 | 3 | EXPMatcherImplementationBegin(beSupersetOf, (id subset)) { 4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSDictionary class]] || [actual respondsToSelector:@selector(containsObject:)]; 5 | BOOL subsetIsNil = (subset == nil); 6 | BOOL classMatches = [subset isKindOfClass:[actual class]]; 7 | 8 | prerequisite(^BOOL{ 9 | return actualIsCompatible && !subsetIsNil && classMatches; 10 | }); 11 | 12 | match(^BOOL{ 13 | if(!actualIsCompatible) return NO; 14 | 15 | if([actual isKindOfClass:[NSDictionary class]]) { 16 | for (id key in subset) { 17 | id actualValue = [actual valueForKey:key]; 18 | id subsetValue = [subset valueForKey:key]; 19 | 20 | if (![subsetValue isEqual:actualValue]) return NO; 21 | } 22 | } else { 23 | for (id object in subset) { 24 | if (![actual containsObject:object]) return NO; 25 | } 26 | } 27 | 28 | return YES; 29 | }); 30 | 31 | failureMessageForTo(^NSString *{ 32 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; 33 | 34 | if(subsetIsNil) return @"the expected value is nil/null"; 35 | 36 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; 37 | 38 | return [NSString stringWithFormat:@"expected %@ to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; 39 | }); 40 | 41 | failureMessageForNotTo(^NSString *{ 42 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)]; 43 | 44 | if(subsetIsNil) return @"the expected value is nil/null"; 45 | 46 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)]; 47 | 48 | return [NSString stringWithFormat:@"expected %@ not to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)]; 49 | }); 50 | } 51 | EXPMatcherImplementationEnd 52 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButtonTests/Pods-BFPaperButtonTests-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 | Copyright (c) 2011-2012 Specta Team - https://github.com/specta 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | Expecta 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - https://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+notify.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+notify.h" 2 | 3 | EXPMatcherImplementationBegin(notify, (id expected)){ 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | BOOL isNotification = [expected isKindOfClass:[NSNotification class]]; 7 | BOOL isName = [expected isKindOfClass:[NSString class]]; 8 | 9 | __block NSString *expectedName; 10 | __block BOOL expectedNotificationOccurred = NO; 11 | __block id observer; 12 | 13 | prerequisite(^BOOL{ 14 | expectedNotificationOccurred = NO; 15 | if (actualIsNil || expectedIsNil) return NO; 16 | if (isNotification) { 17 | expectedName = [expected name]; 18 | }else if(isName) { 19 | expectedName = expected; 20 | }else{ 21 | return NO; 22 | } 23 | 24 | observer = [[NSNotificationCenter defaultCenter] addObserverForName:expectedName object:nil queue:nil usingBlock:^(NSNotification *note){ 25 | if (isNotification) { 26 | expectedNotificationOccurred |= [expected isEqual:note]; 27 | }else{ 28 | expectedNotificationOccurred = YES; 29 | } 30 | }]; 31 | ((EXPBasicBlock)actual)(); 32 | return YES; 33 | }); 34 | 35 | match(^BOOL{ 36 | if(expectedNotificationOccurred) { 37 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 38 | } 39 | return expectedNotificationOccurred; 40 | }); 41 | 42 | failureMessageForTo(^NSString *{ 43 | if (observer) { 44 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 45 | } 46 | if(actualIsNil) return @"the actual value is nil/null"; 47 | if(expectedIsNil) return @"the expected value is nil/null"; 48 | if(!(isNotification || isName)) return @"the actual value is not a notification or string"; 49 | return [NSString stringWithFormat:@"expected: %@, got: none",expectedName]; 50 | }); 51 | 52 | failureMessageForNotTo(^NSString *{ 53 | if (observer) { 54 | [[NSNotificationCenter defaultCenter] removeObserver:observer]; 55 | } 56 | if(actualIsNil) return @"the actual value is nil/null"; 57 | if(expectedIsNil) return @"the expected value is nil/null"; 58 | if(!(isNotification || isName)) return @"the actual value is not a notification or string"; 59 | return [NSString stringWithFormat:@"expected: none, got: %@", expectedName]; 60 | }); 61 | } 62 | 63 | EXPMatcherImplementationEnd 64 | -------------------------------------------------------------------------------- /Pods/Expecta/src/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | #import "EXPExpect.h" 2 | #import "EXPBlockDefinedMatcher.h" 3 | 4 | id _EXPObjectify(const char *type, ...); 5 | EXPExpect *_EXP_expect(id testCase, int lineNumber, const char *fileName, EXPIdBlock actualBlock); 6 | 7 | void EXPFail(id testCase, int lineNumber, const char *fileName, NSString *message); 8 | NSString *EXPDescribeObject(id obj); 9 | 10 | void EXP_prerequisite(EXPBoolBlock block); 11 | void EXP_match(EXPBoolBlock block); 12 | void EXP_failureMessageForTo(EXPStringBlock block); 13 | void EXP_failureMessageForNotTo(EXPStringBlock block); 14 | 15 | #if __has_feature(objc_arc) 16 | #define _EXP_release(x) 17 | #define _EXP_autorelease(x) (x) 18 | 19 | #else 20 | #define _EXP_release(x) [x release] 21 | #define _EXP_autorelease(x) [x autorelease] 22 | #endif 23 | 24 | // workaround for the categories bug: http://developer.apple.com/library/mac/#qa/qa1490/_index.html 25 | #define EXPFixCategoriesBug(name) \ 26 | __attribute__((constructor)) static void EXPFixCategoriesBug##name() {} 27 | 28 | #define _EXPMatcherInterface(matcherName, matcherArguments) \ 29 | @interface EXPExpect (matcherName##Matcher) \ 30 | @property (nonatomic, readonly) void(^ matcherName) matcherArguments; \ 31 | @end 32 | 33 | #define _EXPMatcherImplementationBegin(matcherName, matcherArguments) \ 34 | EXPFixCategoriesBug(EXPMatcher##matcherName##Matcher); \ 35 | @implementation EXPExpect (matcherName##Matcher) \ 36 | @dynamic matcherName;\ 37 | - (void(^) matcherArguments) matcherName { \ 38 | EXPBlockDefinedMatcher *matcher = [[EXPBlockDefinedMatcher alloc] init]; \ 39 | [[[NSThread currentThread] threadDictionary] setObject:matcher forKey:@"EXP_currentMatcher"]; \ 40 | __block id actual = self.actual; \ 41 | __block void (^prerequisite)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_prerequisite(block); }; \ 42 | __block void (^match)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_match(block); }; \ 43 | __block void (^failureMessageForTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForTo(block); }; \ 44 | __block void (^failureMessageForNotTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForNotTo(block); }; \ 45 | prerequisite(nil); match(nil); failureMessageForTo(nil); failureMessageForNotTo(nil); \ 46 | void (^matcherBlock) matcherArguments = [^ matcherArguments { \ 47 | { 48 | 49 | #define _EXPMatcherImplementationEnd \ 50 | } \ 51 | [self applyMatcher:matcher to:&actual]; \ 52 | } copy]; \ 53 | _EXP_release(matcher); \ 54 | return _EXP_autorelease(matcherBlock); \ 55 | } \ 56 | @end 57 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+beginWith.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+beginWith.h" 2 | 3 | EXPMatcherImplementationBegin(beginWith, (id expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same 7 | BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) 8 | || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) 9 | || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); 10 | 11 | prerequisite(^BOOL { 12 | return actualAndExpectedAreCompatible; 13 | }); 14 | 15 | match(^BOOL { 16 | if ([actual isKindOfClass:[NSString class]]) { 17 | return [actual hasPrefix:expected]; 18 | } else if ([actual isKindOfClass:[NSArray class]]) { 19 | if ([expected count] > [actual count] || [expected count] == 0) { 20 | return NO; 21 | } 22 | NSArray *subArray = [actual subarrayWithRange:NSMakeRange(0, [expected count])]; 23 | return [subArray isEqualToArray:expected]; 24 | } else { 25 | if ([expected count] > [actual count] || [expected count] == 0) { 26 | return NO; 27 | } 28 | 29 | NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange(0, [expected count]) copyItems:NO]; 30 | return [subset isEqualToOrderedSet:expected]; 31 | } 32 | }); 33 | 34 | failureMessageForTo(^NSString *{ 35 | if (actualIsNil) return @"the object is nil/null"; 36 | if (expectedIsNil) return @"the expected value is nil/null"; 37 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 38 | return [NSString stringWithFormat:@"expected: %@ to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 39 | }); 40 | 41 | failureMessageForNotTo(^NSString *{ 42 | if (actualIsNil) return @"the object is nil/null"; 43 | if (expectedIsNil) return @"the expected value is nil/null"; 44 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 45 | 46 | return [NSString stringWithFormat:@"expected: %@ not to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 47 | }); 48 | } 49 | EXPMatcherImplementationEnd 50 | -------------------------------------------------------------------------------- /Pods/Expecta/src/matchers/EXPMatchers+endWith.m: -------------------------------------------------------------------------------- 1 | #import "EXPMatchers+endWith.h" 2 | 3 | EXPMatcherImplementationBegin(endWith, (id expected)) { 4 | BOOL actualIsNil = (actual == nil); 5 | BOOL expectedIsNil = (expected == nil); 6 | //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same 7 | BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]]) 8 | || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]]) 9 | || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]])); 10 | 11 | prerequisite(^BOOL { 12 | return actualAndExpectedAreCompatible; 13 | }); 14 | 15 | match(^BOOL { 16 | if ([actual isKindOfClass:[NSString class]]) { 17 | return [actual hasSuffix:expected]; 18 | } else if ([actual isKindOfClass:[NSArray class]]) { 19 | if ([expected count] > [actual count] || [expected count] == 0) { 20 | return NO; 21 | } 22 | NSArray *subArray = [actual subarrayWithRange:NSMakeRange([actual count] - [expected count], [expected count])]; 23 | return [subArray isEqualToArray:expected]; 24 | } else { 25 | if ([expected count] > [actual count] || [expected count] == 0) { 26 | return NO; 27 | } 28 | 29 | NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange([actual count] - [expected count], [expected count]) copyItems:NO]; 30 | return [subset isEqualToOrderedSet:expected]; 31 | } 32 | }); 33 | 34 | failureMessageForTo(^NSString *{ 35 | if (actualIsNil) return @"the object is nil/null"; 36 | if (expectedIsNil) return @"the expected value is nil/null"; 37 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 38 | return [NSString stringWithFormat:@"expected: %@ to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 39 | }); 40 | 41 | failureMessageForNotTo(^NSString *{ 42 | if (actualIsNil) return @"the object is nil/null"; 43 | if (expectedIsNil) return @"the expected value is nil/null"; 44 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]]; 45 | 46 | return [NSString stringWithFormat:@"expected: %@ not to end with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)]; 47 | }); 48 | } 49 | EXPMatcherImplementationEnd 50 | -------------------------------------------------------------------------------- /BFPaperButton/BFPaperAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperAppDelegate.m 3 | // BFPaperButton 4 | // 5 | // Created by Bence Feher on 7/16/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 13 | // this software and associated documentation files (the "Software"), to deal in 14 | // the Software without restriction, including without limitation the rights to 15 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 16 | // the Software, and to permit persons to whom the Software is furnished to do so, 17 | // subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 24 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 25 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 26 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | 30 | #import "BFPaperAppDelegate.h" 31 | 32 | @implementation BFPaperAppDelegate 33 | 34 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 35 | { 36 | // Override point for customization after application launch. 37 | return YES; 38 | } 39 | 40 | - (void)applicationWillResignActive:(UIApplication *)application 41 | { 42 | // 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. 43 | // 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. 44 | } 45 | 46 | - (void)applicationDidEnterBackground:(UIApplication *)application 47 | { 48 | // 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. 49 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 50 | } 51 | 52 | - (void)applicationWillEnterForeground:(UIApplication *)application 53 | { 54 | // 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. 55 | } 56 | 57 | - (void)applicationDidBecomeActive:(UIApplication *)application 58 | { 59 | // 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. 60 | } 61 | 62 | - (void)applicationWillTerminate:(UIApplication *)application 63 | { 64 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButton/Pods-BFPaperButton-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 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButtonTests/Pods-BFPaperButtonTests-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 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | -------------------------------------------------------------------------------- /BFPaperButtonTests/BFPaperButtonTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperButtonTests.m 3 | // BFPaperButtonTests 4 | // 5 | // Created by Bence Feher on 7/16/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | 9 | #import 10 | #define EXP_SHORTHAND 11 | #import 12 | #import "BFPaperButton.h" 13 | 14 | @interface BFPaperButton (Tests) 15 | 16 | - (void)paperTouchDown:(id)sender; 17 | 18 | @end 19 | 20 | @interface BFPaperButtonTests : XCTestCase 21 | 22 | @property (nonatomic) BFPaperButton *button; 23 | 24 | @end 25 | 26 | @implementation BFPaperButtonTests 27 | 28 | - (void)setUp 29 | { 30 | [super setUp]; 31 | self.button = [[BFPaperButton alloc] init]; 32 | // Put setup code here. This method is called before the invocation of each test method in the class. 33 | } 34 | 35 | - (void)tearDown 36 | { 37 | // Put teardown code here. This method is called after the invocation of each test method in the class. 38 | self.button = nil; 39 | [super tearDown]; 40 | } 41 | 42 | #pragma mark - Initialisers 43 | 44 | - (void)testRaisedButton 45 | { 46 | BFPaperButton *raisedButton = [[BFPaperButton alloc] initWithRaised:YES]; 47 | expect(raisedButton.isRaised).to.beTruthy(); 48 | } 49 | 50 | - (void)testCustomFrameRaisedButton 51 | { 52 | CGRect customFrame = CGRectMake(99, 99, 99, 99); 53 | BFPaperButton *raisedFramedButton = [[BFPaperButton alloc] initWithFrame:customFrame raised:YES]; 54 | expect(raisedFramedButton.frame).to.equal(customFrame); 55 | expect(raisedFramedButton.isRaised).to.beTruthy(); 56 | } 57 | 58 | - (void)testCustomFrameFlatButton 59 | { 60 | CGRect customFrame = CGRectMake(999, 999, 999, 999); 61 | BFPaperButton *flatFramedButton = [[BFPaperButton alloc] initWithFrame:customFrame raised:NO]; 62 | expect(flatFramedButton.frame).to.equal(customFrame); 63 | expect(flatFramedButton.isRaised).to.beFalsy(); 64 | } 65 | 66 | - (void)testFlatButton 67 | { 68 | BFPaperButton *flatButton = [[BFPaperButton alloc] initWithRaised:NO]; 69 | expect(flatButton.isRaised).to.beFalsy(); 70 | } 71 | 72 | #pragma mark - Animation 73 | 74 | - (void)testTouchUpDurationWithTouchDownDurationAnimation 75 | { 76 | CGFloat animationDuration = 1.0; 77 | BFPaperButton *button = [[BFPaperButton alloc] initWithRaised:YES]; 78 | button.touchDownAnimationDuration = animationDuration; 79 | 80 | expect(button.touchUpAnimationDuration).to.equal(2 * animationDuration); 81 | } 82 | 83 | - (void)testSmartColorsAppliesToTapCircleAfterButtonTouchDown 84 | { 85 | CGFloat smartColorAlpha = 0.12f; 86 | UIColor *textColor = [UIColor redColor]; 87 | UIColor *smartColor = [textColor colorWithAlphaComponent:smartColorAlpha]; 88 | 89 | expect(self.button.usesSmartColor).to.beTruthy(); 90 | expect(self.button.tapCircleColor).to.beNil(); 91 | self.button.titleLabel.textColor = textColor; 92 | [self.button paperTouchDown:self.button]; 93 | expect(self.button.tapCircleColor).equal(smartColor); 94 | } 95 | 96 | - (void)testSmartColorsAppliesToTapCircleOpagueBackgroundAfterButtonTouchDown 97 | { 98 | CGFloat smartColorAlpha = 0.16f; 99 | UIColor *textColor = [UIColor redColor]; 100 | UIColor *smartColor = [textColor colorWithAlphaComponent:smartColorAlpha]; 101 | 102 | expect(self.button.usesSmartColor).to.beTruthy(); 103 | expect(self.button.tapCircleColor).to.beNil(); 104 | self.button.titleLabel.textColor = textColor; 105 | self.button.backgroundColor = [UIColor redColor]; 106 | [self.button paperTouchDown:self.button]; 107 | expect(self.button.tapCircleColor).equal(smartColor); 108 | } 109 | 110 | - (void)testSmartColorsAppliesToBackgroundFadeColorAfterButtonTouchDown 111 | { 112 | CGFloat smartColorAlpha = 0.12f; 113 | UIColor *textColor = [UIColor redColor]; 114 | UIColor *smartColor = [textColor colorWithAlphaComponent:smartColorAlpha]; 115 | 116 | expect(self.button.usesSmartColor).to.beTruthy(); 117 | expect(self.button.tapCircleColor).to.beNil(); 118 | self.button.titleLabel.textColor = textColor; 119 | [self.button paperTouchDown:self.button]; 120 | expect(self.button.backgroundFadeColor).equal(smartColor); 121 | } 122 | 123 | @end 124 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButton/Pods-BFPaperButton-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_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 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | realpath() { 27 | DIRECTORY="$(cd "${1%/*}" && pwd)" 28 | FILENAME="${1##*/}" 29 | echo "$DIRECTORY/$FILENAME" 30 | } 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BFPaperButtonTests/Pods-BFPaperButtonTests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_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 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | realpath() { 27 | DIRECTORY="$(cd "${1%/*}" && pwd)" 28 | FILENAME="${1##*/}" 29 | echo "$DIRECTORY/$FILENAME" 30 | } 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Pods/Expecta/src/EXPExpect.m: -------------------------------------------------------------------------------- 1 | #import "EXPExpect.h" 2 | #import "NSObject+Expecta.h" 3 | #import "Expecta.h" 4 | #import "EXPUnsupportedObject.h" 5 | #import "EXPMatcher.h" 6 | #import "EXPBlockDefinedMatcher.h" 7 | #import 8 | 9 | @implementation EXPExpect 10 | 11 | @dynamic 12 | actual, 13 | to, 14 | toNot, 15 | notTo, 16 | will, 17 | willNot; 18 | 19 | @synthesize 20 | actualBlock=_actualBlock, 21 | testCase=_testCase, 22 | negative=_negative, 23 | asynchronous=_asynchronous, 24 | lineNumber=_lineNumber, 25 | fileName=_fileName; 26 | 27 | - (id)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName { 28 | self = [super init]; 29 | if(self) { 30 | self.actualBlock = actualBlock; 31 | self.testCase = testCase; 32 | self.negative = NO; 33 | self.asynchronous = NO; 34 | self.lineNumber = lineNumber; 35 | self.fileName = fileName; 36 | } 37 | return self; 38 | } 39 | 40 | - (void)dealloc 41 | { 42 | self.actualBlock = nil; 43 | [super dealloc]; 44 | } 45 | 46 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName { 47 | return [[[EXPExpect alloc] initWithActualBlock:actualBlock testCase:(id)testCase lineNumber:lineNumber fileName:fileName] autorelease]; 48 | } 49 | 50 | #pragma mark - 51 | 52 | - (EXPExpect *)to { 53 | return self; 54 | } 55 | 56 | - (EXPExpect *)toNot { 57 | self.negative = !self.negative; 58 | return self; 59 | } 60 | 61 | - (EXPExpect *)notTo { 62 | return [self toNot]; 63 | } 64 | 65 | - (EXPExpect *)will { 66 | self.asynchronous = YES; 67 | return self; 68 | } 69 | 70 | - (EXPExpect *)willNot { 71 | return self.will.toNot; 72 | } 73 | 74 | #pragma mark - 75 | 76 | - (id)actual { 77 | if(self.actualBlock) { 78 | return self.actualBlock(); 79 | } 80 | return nil; 81 | } 82 | 83 | - (void)applyMatcher:(id)matcher 84 | { 85 | id actual = [self actual]; 86 | [self applyMatcher:matcher to:&actual]; 87 | } 88 | 89 | - (void)applyMatcher:(id)matcher to:(NSObject **)actual { 90 | if([*actual isKindOfClass:[EXPUnsupportedObject class]]) { 91 | EXPFail(self.testCase, self.lineNumber, self.fileName, 92 | [NSString stringWithFormat:@"expecting a %@ is not supported", ((EXPUnsupportedObject *)*actual).type]); 93 | } else { 94 | BOOL failed = NO; 95 | if([matcher respondsToSelector:@selector(meetsPrerequesiteFor:)] && 96 | ![matcher meetsPrerequesiteFor:*actual]) { 97 | failed = YES; 98 | } else { 99 | BOOL matchResult = NO; 100 | if(self.asynchronous) { 101 | NSTimeInterval timeOut = [Expecta asynchronousTestTimeout]; 102 | NSDate *expiryDate = [NSDate dateWithTimeIntervalSinceNow:timeOut]; 103 | while(1) { 104 | matchResult = [matcher matches:*actual]; 105 | failed = self.negative ? matchResult : !matchResult; 106 | if(!failed || ([(NSDate *)[NSDate date] compare:expiryDate] == NSOrderedDescending)) { 107 | break; 108 | } 109 | [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]]; 110 | OSMemoryBarrier(); 111 | *actual = self.actual; 112 | } 113 | } else { 114 | matchResult = [matcher matches:*actual]; 115 | } 116 | failed = self.negative ? matchResult : !matchResult; 117 | } 118 | if(failed) { 119 | NSString *message = nil; 120 | 121 | if(self.negative) { 122 | if ([matcher respondsToSelector:@selector(failureMessageForNotTo:)]) { 123 | message = [matcher failureMessageForNotTo:*actual]; 124 | } 125 | } else { 126 | if ([matcher respondsToSelector:@selector(failureMessageForTo:)]) { 127 | message = [matcher failureMessageForTo:*actual]; 128 | } 129 | } 130 | if (message == nil) { 131 | message = @"Match Failed."; 132 | } 133 | 134 | EXPFail(self.testCase, self.lineNumber, self.fileName, message); 135 | } 136 | } 137 | self.negative = NO; 138 | } 139 | 140 | #pragma mark - Dynamic predicate dispatch 141 | 142 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector 143 | { 144 | if ([self.actual respondsToSelector:aSelector]) { 145 | return [self.actual methodSignatureForSelector:aSelector]; 146 | } 147 | return [super methodSignatureForSelector:aSelector]; 148 | } 149 | 150 | - (void)forwardInvocation:(NSInvocation *)anInvocation 151 | { 152 | if ([self.actual respondsToSelector:anInvocation.selector]) { 153 | EXPDynamicPredicateMatcher *matcher = [[EXPDynamicPredicateMatcher alloc] initWithExpectation:self selector:anInvocation.selector]; 154 | [anInvocation setSelector:@selector(dispatch)]; 155 | [anInvocation invokeWithTarget:matcher]; 156 | [matcher release]; 157 | } 158 | else { 159 | [super forwardInvocation:anInvocation]; 160 | } 161 | } 162 | 163 | @end 164 | 165 | @implementation EXPDynamicPredicateMatcher 166 | 167 | - (id)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector 168 | { 169 | if ((self = [super init])) { 170 | _expectation = expectation; 171 | _selector = selector; 172 | } 173 | return self; 174 | } 175 | 176 | - (BOOL)matches:(id)actual 177 | { 178 | return (BOOL)[actual performSelector:_selector]; 179 | } 180 | 181 | - (NSString *)failureMessageForTo:(id)actual 182 | { 183 | return [NSString stringWithFormat:@"expected %@ to be true", NSStringFromSelector(_selector)]; 184 | } 185 | 186 | - (NSString *)failureMessageForNotTo:(id)actual 187 | { 188 | return [NSString stringWithFormat:@"expected %@ to be false", NSStringFromSelector(_selector)]; 189 | } 190 | 191 | - (void (^)(void))dispatch 192 | { 193 | __block id blockExpectation = _expectation; 194 | 195 | return [[^{ 196 | [blockExpectation applyMatcher:self]; 197 | } copy] autorelease]; 198 | } 199 | 200 | @end 201 | -------------------------------------------------------------------------------- /Classes/BFPaperButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperButton.h 3 | // BFPaperKit 4 | // 5 | // Created by Bence Feher on 7/11/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 13 | // this software and associated documentation files (the "Software"), to deal in 14 | // the Software without restriction, including without limitation the rights to 15 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 16 | // the Software, and to permit persons to whom the Software is furnished to do so, 17 | // subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 24 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 25 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 26 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | 30 | #import 31 | 32 | #pragma mark - Useful constants 33 | // Nice circle diameter constants with ugly names: 34 | extern CGFloat const bfPaperButton_tapCircleDiameterMedium; 35 | extern CGFloat const bfPaperButton_tapCircleDiameterSmall; 36 | extern CGFloat const bfPaperButton_tapCircleDiameterLarge; 37 | extern CGFloat const bfPaperButton_tapCircleDiameterFull; 38 | extern CGFloat const bfPaperButton_tapCircleDiameterDefault; 39 | 40 | IB_DESIGNABLE 41 | @interface BFPaperButton : UIButton 42 | 43 | /* Notes on RAISED vs FLAT and SMART COLOR vs NON SMART COLOR: 44 | * 45 | * RAISED 46 | * Has a shadow, so a clear background will look silly. 47 | * It has only a tap-circle color. No background-fade. 48 | * 49 | * FLAT 50 | * Has no shadow, therefore clear backgrounds look fine. 51 | * If the background is clear, it also has a background-fade 52 | * color to help visualize the button and its frame. 53 | * 54 | * SMART COLOR 55 | * Will use the titleLabel's font color to pick 56 | * a tap circle color and, if the background is clear, will 57 | * also pick a lighter background fade color. 58 | * 59 | * NON SMART COLOR 60 | * Will use a translucent gray tap-circle 61 | * and, if the background is clear, a lighter translucent 62 | * graybackground-fade color. 63 | */ 64 | 65 | #pragma mark - Initializers 66 | /** 67 | * Initializes a BFPaperButton without a frame. Can be Raised of Flat. 68 | * 69 | * @param raised A BOOL flag to determine whether or not this instance should be raised or flat. YES = Raised, NO = Flat. 70 | * 71 | * @return A (Raised or Flat) BFPaperButton without a frame! 72 | */ 73 | - (instancetype)initWithRaised:(BOOL)raised; 74 | 75 | /** 76 | * Initializes a BFPaperButton with a frame. Can be Raised of Flat. 77 | * 78 | * @param frame A CGRect to use as the button's frame. 79 | * @param raised A BOOL flag to determine whether or not this instance should be raised or flat. YES = Raised, NO = Flat. 80 | * 81 | * @return A (Raised or Flat) BFPaperButton with a frame! 82 | */ 83 | - (instancetype)initWithFrame:(CGRect)frame raised:(BOOL)raised; 84 | 85 | 86 | #pragma mark - Properties 87 | #pragma mark Shadow 88 | /** The UIColor for the shadow of a raised button. An alpha value of 1 is recommended as shadowOpacity overwrites the alpha of this color. */ 89 | @property IBInspectable UIColor *shadowColor; 90 | 91 | #pragma mark Shadow - Down 92 | /** A CGFLoat representing the opacity of the shadow of RAISED buttons when they are lowered (idle). Default is 0.5f. */ 93 | @property IBInspectable CGFloat loweredShadowOpacity; 94 | /** A CGFLoat representing the radius of the shadow of RAISED buttons when they are lowered (idle). Default is 1.5f. */ 95 | @property IBInspectable CGFloat loweredShadowRadius; 96 | /** A CGSize representing the offset of the shadow of RAISED buttons when they are lowered (idle). Default is (0, 1). */ 97 | @property IBInspectable CGSize loweredShadowOffset; 98 | 99 | #pragma mark Shadow - Up 100 | /** A CGFLoat representing the opacity of the shadow of RAISED buttons when they are lifted (on touch down). Default is 0.5f. */ 101 | @property IBInspectable CGFloat liftedShadowOpacity; 102 | /** A CGFLoat representing the radius of the shadow of RAISED buttons when they are lifted (on touch down). Default is 4.5f. */ 103 | @property IBInspectable CGFloat liftedShadowRadius; 104 | /** A CGSize representing the offset of the shadow of RAISED buttons when they are lifted (on touch down). Default is (2, 4). */ 105 | @property IBInspectable CGSize liftedShadowOffset; 106 | 107 | 108 | #pragma mark Animation 109 | /** A CGFLoat representing the duration of the animations which take place on touch DOWN! Default is 0.25f seconds. (Go Steelers) */ 110 | @property IBInspectable CGFloat touchDownAnimationDuration; 111 | /** A CGFLoat representing the duration of the animations which take place on touch UP! Default is 2 * touchDownAnimationDuration seconds. */ 112 | @property IBInspectable CGFloat touchUpAnimationDuration; 113 | 114 | 115 | #pragma mark Prettyness and Behaviour 116 | /** The corner radius which propagates through to the sub layers. Default is 0. */ 117 | @property (nonatomic) IBInspectable CGFloat cornerRadius; 118 | 119 | /** A CGFLoat representing the diameter of the tap-circle as soon as it spawns, before it grows. Default is 5.f. */ 120 | @property IBInspectable CGFloat tapCircleDiameterStartValue; 121 | 122 | /** The CGFloat value representing the Diameter of the tap-circle. By default it will be the result of MAX(self.frame.width, self.frame.height). tapCircleDiameterFull will calculate a circle that always fills the entire view. Any value less than or equal to tapCircleDiameterFull will result in default being used. The constants: tapCircleDiameterLarge, tapCircleDiameterMedium, and tapCircleDiameterSmall are also available for use. */ 123 | @property IBInspectable CGFloat tapCircleDiameter; 124 | 125 | /** The CGFloat value representing how much we should increase the diameter of the tap-circle by when we burst it. Default is 100.f. */ 126 | @property IBInspectable CGFloat tapCircleBurstAmount; 127 | 128 | /** The UIColor to use for the circle which appears where you tap. NOTE: Setting this defeats the "Smart Color" ability of the tap circle. Alpha values less than 1 are recommended. */ 129 | @property IBInspectable UIColor *tapCircleColor; 130 | 131 | /** The UIColor to fade clear backgrounds to. NOTE: Setting this defeats the "Smart Color" ability of the background fade. Alpha values less than 1 are recommended. */ 132 | @property IBInspectable UIColor *backgroundFadeColor; 133 | 134 | /** A flag to set to YES to have the tap-circle ripple from point of touch. If this is set to NO, the tap-circle will always ripple from the center of the tab. Default is YES. */ 135 | @property (nonatomic) IBInspectable BOOL rippleFromTapLocation; 136 | 137 | /** A flag to set to YES to have the tap-circle ripple beyond the bounds of the view. If this is set to NO, the tap-circle will be clipped to the view's bounds. Default is NO. */ 138 | @property (nonatomic) IBInspectable BOOL rippleBeyondBounds; 139 | 140 | /** A flag to set to YES to CHANGE a flat view to raised, or set to NO to CHANGE a raised view to flat. If you used one of the provided custom initializers, you should probably leave this parameter alone. If you instantiated via storyboard or IB and want to change from riased to flat, this is the parameter for you! Default is YES. */ 141 | @property (nonatomic) IBInspectable BOOL isRaised; 142 | 143 | /** A flag to set to YES to use Smart Color, or NO to use a custom color scheme. While Smart Color is the default (usesSmartColor = YES), customization is cool too. */ 144 | @property (nonatomic) IBInspectable BOOL usesSmartColor; 145 | 146 | /** A property governing the title font. It is settable via UIAppearance! */ 147 | @property (nonatomic) IBInspectable UIFont *titleFont UI_APPEARANCE_SELECTOR; 148 | 149 | 150 | @end 151 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BFPaperButton 2 | ============= 3 | [![CocoaPods](https://img.shields.io/cocoapods/v/BFPaperButton.svg?style=flat)](https://github.com/bfeher/BFPaperButton) 4 | 5 | > A flat button inspired by Google Material Design's Paper theme. 6 | 7 | ![Animated Screenshot](https://raw.githubusercontent.com/bfeher/BFPaperButton/master/BFPaperButtonDemoGif2.gif "Animated Screenshot") 8 | 9 | 10 | About 11 | --------- 12 | ### Now with smoother animations and more public properties for even easier customization! 13 | 14 | _BFPaperButton_ is a subclass of UIButton that behaves much like the new paper buttons from Google's Material Design Labs. 15 | All animation are asynchronous and are performed on sublayers. 16 | BFPaperButtons work right away with pleasing default behaviors, however they can be easily customized! The corner radius, tap-circle color, background fade color, and tap-circle diameter are all readily customizable via public properties. 17 | 18 | BFPaperButtons come in 2 flavors, Flat or Raised. 19 | Flat BFPaperButtons have no shadow and will remain flat through all animations. Flat buttons can be transparent, in which case the background will also fade a little when tapped. 20 | Raised BFPaperButtons have a drop shadow that animates along with a tap, giving it the feeling of raising up with your touch. Raised BFPaperButtons do not look good with a clear background color since it will expose their shadow layer underneath. 21 | 22 | By default, BFPaperButtons use "Smart Color" which will match the tap-circle and background fade colors to the color of the `titleLabel`. 23 | You can turn off Smart Color by setting the property, `.usesSmartColor` to `NO`. If you disable Smart Color, a gray color will be used by default for both the tap-circle and the background color fade. 24 | You can set your own colors via: `.tapCircleColor` and `.backgroundFadeColor`. Note that setting these disables Smart Color. 25 | 26 | ***Note*** *that setting the button type to Custom in the Storyboard is required to prevent the title from fading out on UIControlStateHighlighted.* 27 | 28 | ## Properties 29 | 30 | `UIColor *shadowColor` 31 | > The UIColor for the shadow of a raised button. An alpha value of `1` is recommended as shadowOpacity overwrites the alpha of this color. 32 | 33 | `CGFloat loweredShadowOpacity` 34 | > A CGFLoat representing the opacity of the shadow of RAISED buttons when they are lowered (idle). Default is `0.5f`. 35 | 36 | `CGFloat loweredShadowRadius` 37 | 38 | > A CGFLoat representing the radius of the shadow of RAISED buttons when they are lowered (idle). Default is `1.5f`. 39 | 40 | `CGSize loweredShadowOffset` 41 | 42 | > A CGSize representing the offset of the shadow of RAISED buttons when they are lowered (idle). Default is `(0, 1)`. 43 | 44 | `CGFloat liftedShadowOpacity` 45 | 46 | > A CGFLoat representing the opacity of the shadow of RAISED buttons when they are lifted (on touch down). Default is `0.5f`. 47 | 48 | `CGFloat liftedShadowRadius` 49 | 50 | > A CGFLoat representing the radius of the shadow of RAISED buttons when they are lifted (on touch down). Default is `4.5f`. 51 | 52 | `CGSize liftedShadowOffset` 53 | 54 | > A CGSize representing the offset of the shadow of RAISED buttons when they are lifted (on touch down). Default is `(2, 4)`. 55 | 56 | `CGFloat touchDownAnimationDuration` 57 | 58 | > A CGFLoat representing the duration of the animations which take place on touch DOWN! Default is `0.25f` seconds. (Go Steelers) 59 | 60 | `CGFloat touchUpAnimationDuration` 61 | 62 | > A CGFLoat representing the duration of the animations which take place on touch UP! Default is `2 * touchDownAnimationDuration` seconds. 63 | 64 | `CGFloat tapCircleDiameterStartValue` 65 | 66 | > A CGFLoat representing the diameter of the tap-circle as soon as it spawns, before it grows. Default is `5.f`. 67 | 68 | `CGFloat tapCircleDiameter` 69 | 70 | > The CGFloat value representing the Diameter of the tap-circle. By default it will be the result of `MAX(self.frame.width, self.frame.height)`. `tapCircleDiameterFull` will calculate a circle that always fills the entire view. Any value less than or equal to `tapCircleDiameterFull` will result in default being used. The constants: `tapCircleDiameterLarge`, `tapCircleDiameterMedium`, and `tapCircleDiameterSmall` are also available for use. */ 71 | 72 | `CGFloat tapCircleBurstAmount` 73 | 74 | > The CGFloat value representing how much we should increase the diameter of the tap-circle by when we burst it. Default is `100.f`. 75 | 76 | `CGFloat cornerRadius` 77 | 78 | > The corner radius which propagates through to the sub layers. Default is `0`. 79 | 80 | `UIColor *tapCircleColor` 81 | 82 | > The UIColor to use for the circle which appears where you tap. NOTE: Setting this defeats the "Smart Color" ability of the tap circle. Alpha values less than `1` are recommended. 83 | 84 | `UIColor *backgroundFadeColor` 85 | > The UIColor to fade clear backgrounds to. NOTE: Setting this defeats the "Smart Color" ability of the background fade. Alpha values less than `1` are recommended. 86 | 87 | `BOOL rippleFromTapLocation` 88 | > A flag to set to `YES` to have the tap-circle ripple from point of touch. If this is set to `NO`, the tap-circle will always ripple from the center of the view. Default is `YES`. 89 | 90 | `BOOL rippleBeyondBounds` 91 | > A flag to set to `YES` to have the tap-circle ripple beyond the bounds of the view. If this is set to `NO`, the tap-circle will be clipped to the view's bounds. Default is `NO`. 92 | 93 | `BOOL isRaised` 94 | > A flag to set to `YES` to CHANGE a flat view to raised, or set to `NO` to CHANGE a raised view to flat. If you used one of the provided custom initializers, you should probably leave this parameter alone. If you instantiated via storyboard or IB and want to CHANGE from riased to flat, this is the parameter for you! Default is `YES`. 95 | 96 | `BOOL usesSmartColor` 97 | > A flag to set YES to use Smart Color, or NO to use a custom color scheme. While Smart Color is the default (usesSmartColor = YES), customization is cool too. 98 | 99 | 100 | ### Notes on RAISED vs FLAT and SMART COLOR vs NON SMART COLOR: 101 | ##### RAISED 102 | Has a shadow, so a clear background will look silly. It has only a tap-circle color. No background-fade. 103 | 104 | ##### FLAT 105 | Has no shadow, therefore clear backgrounds look fine. If the background is clear, it also has a background-fade color to help visualize the button and its frame. 106 | 107 | ##### SMART COLOR 108 | Will use the titleLabel's font color to pick a tap circle color and, if the background is clear, will also pick a lighter background fade color. 109 | 110 | ##### NON SMART COLOR 111 | Will use a translucent gray tap-circle and, if the background is clear, a lighter translucent gray background-fade color. 112 | 113 | 114 | Usage 115 | --------- 116 | Add the _BFPaperButton_ header and implementation file to your project. (.h & .m) 117 | 118 | ### Creating a Flat BFPaperButton 119 | ```objective-c 120 | BFPaperButton *flatPaperButton = [[BFPaperButton alloc] initWithFrame:rect raised:NO]; 121 | ``` 122 | 123 | ### Creating a Raised BFPaperButton 124 | ```objective-c 125 | BFPaperButton *raisedPaperButton = [[BFPaperButton alloc] initWithFrame:rect raised:YES]; 126 | ``` 127 | 128 | ### Working Example 129 | *(Taken directly from example project.)*
130 | ```objective-c 131 | BFPaperButton *bfFlatSmart = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 20, 280, 43) raised:NO]; 132 | [bfFlatSmart setTitle:@"BFPaperButton Flat: Smart Color" forState:UIControlStateNormal]; 133 | bfFlatSmart.backgroundColor = [UIColor paperColorGray600]; // You can find this from my other library, BFPaperColors :) 134 | [bfFlatSmart setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 135 | [bfFlatSmart setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; 136 | [bfFlatSmart addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 137 | [self.view addSubview:bfFlatSmart]; 138 | ``` 139 | 140 | ### Customized Example 141 | *(Taken directly from example project.)*
142 | ```objective-c 143 | BFPaperButton *circle2 = [[BFPaperButton alloc] initWithFrame:CGRectMake(116, 468, 86, 86) raised:YES]; 144 | [circle2 setTitle:@"Custom" forState:UIControlStateNormal]; 145 | [circle2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 146 | [circle2 setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; 147 | [circle2 addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 148 | circle2.backgroundColor = [UIColor colorWithRed:0.3 green:0 blue:1 alpha:1]; 149 | circle2.tapCircleColor = [UIColor colorWithRed:1 green:0 blue:1 alpha:0.6]; // Setting this color overrides "Smart Color". 150 | circle2.cornerRadius = circle2.frame.size.width / 2; 151 | circle2.rippleFromTapLocation = NO; 152 | circle2.rippleBeyondBounds = YES; 153 | circle2.tapCircleDiameter = MAX(circle2.frame.size.width, circle2.frame.size.height) * 1.3; 154 | [self.view addSubview:circle2]; 155 | ``` 156 | 157 | CocoaPods 158 | ------- 159 | 160 | CocoaPods are the best way to manage library dependencies in Objective-C projects. 161 | Learn more at http://cocoapods.org 162 | 163 | Add this to your podfile to add BFPaperButton to your project. 164 | ```ruby 165 | platform :ios, '7.0' 166 | pod 'BFPaperButton' 167 | ``` 168 | 169 | 170 | License 171 | -------- 172 | _BFPaperButton_ uses the MIT License: 173 | 174 | > Please see included [LICENSE file](https://raw.githubusercontent.com/bfeher/BFPaperButton/master/LICENSE.md). 175 | -------------------------------------------------------------------------------- /Pods/Expecta/src/ExpectaSupport.m: -------------------------------------------------------------------------------- 1 | #import "ExpectaSupport.h" 2 | #import "NSValue+Expecta.h" 3 | #import "NSObject+Expecta.h" 4 | #import "EXPUnsupportedObject.h" 5 | #import "EXPFloatTuple.h" 6 | #import "EXPDoubleTuple.h" 7 | #import "EXPDefines.h" 8 | #import 9 | 10 | @interface NSException (ExpectaSenTestFailure) 11 | 12 | + (NSException *)failureInFile:(NSString *)filename atLine:(int)lineNumber withDescription:(NSString *)formatString, ...; 13 | 14 | @end 15 | 16 | @interface NSObject (ExpectaXCTestRecordFailure) 17 | 18 | // suppress warning 19 | - (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected; 20 | 21 | @end 22 | 23 | id _EXPObjectify(const char *type, ...) { 24 | va_list v; 25 | va_start(v, type); 26 | id obj = nil; 27 | if(strcmp(type, @encode(char)) == 0) { 28 | char actual = (char)va_arg(v, int); 29 | obj = [NSNumber numberWithChar:actual]; 30 | } else if(strcmp(type, @encode(_Bool)) == 0) { 31 | _Static_assert(sizeof(_Bool) <= sizeof(int), "Expected _Bool to be subject to vararg type promotion"); 32 | _Bool actual = (_Bool)va_arg(v, int); 33 | obj = [NSNumber numberWithBool:actual]; 34 | } else if(strcmp(type, @encode(double)) == 0) { 35 | double actual = (double)va_arg(v, double); 36 | obj = [NSNumber numberWithDouble:actual]; 37 | } else if(strcmp(type, @encode(float)) == 0) { 38 | float actual = (float)va_arg(v, double); 39 | obj = [NSNumber numberWithFloat:actual]; 40 | } else if(strcmp(type, @encode(int)) == 0) { 41 | int actual = (int)va_arg(v, int); 42 | obj = [NSNumber numberWithInt:actual]; 43 | } else if(strcmp(type, @encode(long)) == 0) { 44 | long actual = (long)va_arg(v, long); 45 | obj = [NSNumber numberWithLong:actual]; 46 | } else if(strcmp(type, @encode(long long)) == 0) { 47 | long long actual = (long long)va_arg(v, long long); 48 | obj = [NSNumber numberWithLongLong:actual]; 49 | } else if(strcmp(type, @encode(short)) == 0) { 50 | short actual = (short)va_arg(v, int); 51 | obj = [NSNumber numberWithShort:actual]; 52 | } else if(strcmp(type, @encode(unsigned char)) == 0) { 53 | unsigned char actual = (unsigned char)va_arg(v, unsigned int); 54 | obj = [NSNumber numberWithUnsignedChar:actual]; 55 | } else if(strcmp(type, @encode(unsigned int)) == 0) { 56 | unsigned int actual = (int)va_arg(v, unsigned int); 57 | obj = [NSNumber numberWithUnsignedInt:actual]; 58 | } else if(strcmp(type, @encode(unsigned long)) == 0) { 59 | unsigned long actual = (unsigned long)va_arg(v, unsigned long); 60 | obj = [NSNumber numberWithUnsignedLong:actual]; 61 | } else if(strcmp(type, @encode(unsigned long long)) == 0) { 62 | unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); 63 | obj = [NSNumber numberWithUnsignedLongLong:actual]; 64 | } else if(strcmp(type, @encode(unsigned short)) == 0) { 65 | unsigned short actual = (unsigned short)va_arg(v, unsigned int); 66 | obj = [NSNumber numberWithUnsignedShort:actual]; 67 | } else if(strstr(type, @encode(EXPBasicBlock)) != NULL) { 68 | // @encode(EXPBasicBlock) returns @? as of clang 4.1. 69 | // This condition must occur before the test for id/class type, 70 | // otherwise blocks will be treated as vanilla objects. 71 | id actual = va_arg(v, EXPBasicBlock); 72 | obj = [[actual copy] autorelease]; 73 | } else if((strstr(type, @encode(id)) != NULL) || (strstr(type, @encode(Class)) != 0)) { 74 | id actual = va_arg(v, id); 75 | obj = actual; 76 | } else if(strcmp(type, @encode(__typeof__(nil))) == 0) { 77 | obj = nil; 78 | } else if(strstr(type, "ff}{") != NULL) { //TODO: of course this only works for a 2x2 e.g. CGRect 79 | obj = [[[EXPFloatTuple alloc] initWithFloatValues:(float *)va_arg(v, float[4]) size:4] autorelease]; 80 | } else if(strstr(type, "=ff}") != NULL) { 81 | obj = [[[EXPFloatTuple alloc] initWithFloatValues:(float *)va_arg(v, float[2]) size:2] autorelease]; 82 | } else if(strstr(type, "=ffff}") != NULL) { 83 | obj = [[[EXPFloatTuple alloc] initWithFloatValues:(float *)va_arg(v, float[4]) size:4] autorelease]; 84 | } else if(strstr(type, "dd}{") != NULL) { //TODO: same here 85 | obj = [[[EXPDoubleTuple alloc] initWithDoubleValues:(double *)va_arg(v, double[4]) size:4] autorelease]; 86 | } else if(strstr(type, "=dd}") != NULL) { 87 | obj = [[[EXPDoubleTuple alloc] initWithDoubleValues:(double *)va_arg(v, double[2]) size:2] autorelease]; 88 | } else if(strstr(type, "=dddd}") != NULL) { 89 | obj = [[[EXPDoubleTuple alloc] initWithDoubleValues:(double *)va_arg(v, double[4]) size:4] autorelease]; 90 | } else if(type[0] == '{') { 91 | EXPUnsupportedObject *actual = [[[EXPUnsupportedObject alloc] initWithType:@"struct"] autorelease]; 92 | obj = actual; 93 | } else if(type[0] == '(') { 94 | EXPUnsupportedObject *actual = [[[EXPUnsupportedObject alloc] initWithType:@"union"] autorelease]; 95 | obj = actual; 96 | } else { 97 | void *actual = va_arg(v, void *); 98 | obj = (actual == NULL ? nil :[NSValue valueWithPointer:actual]); 99 | } 100 | if([obj isKindOfClass:[NSValue class]] && ![obj isKindOfClass:[NSNumber class]]) { 101 | [(NSValue *)obj set_EXP_objCType:type]; 102 | } 103 | va_end(v); 104 | return obj; 105 | } 106 | 107 | EXPExpect *_EXP_expect(id testCase, int lineNumber, const char *fileName, EXPIdBlock actualBlock) { 108 | return [EXPExpect expectWithActualBlock:actualBlock testCase:testCase lineNumber:lineNumber fileName:fileName]; 109 | } 110 | 111 | void EXPFail(id testCase, int lineNumber, const char *fileName, NSString *message) { 112 | NSLog(@"%s:%d %@", fileName, lineNumber, message); 113 | NSString *reason = [NSString stringWithFormat:@"%s:%d %@", fileName, lineNumber, message]; 114 | NSException *exception = [NSException exceptionWithName:@"Expecta Error" reason:reason userInfo:nil]; 115 | 116 | if(testCase && [testCase respondsToSelector:@selector(failWithException:)]) { 117 | if([[(Class)objc_getMetaClass("NSException") class] instancesRespondToSelector:@selector(failureInFile:atLine:withDescription:)]) { 118 | exception = [NSException failureInFile:[NSString stringWithUTF8String:fileName] atLine:lineNumber withDescription:message]; 119 | } 120 | [testCase failWithException:exception]; 121 | } else if(testCase && [testCase respondsToSelector:@selector(recordFailureWithDescription:inFile:atLine:expected:)]){ 122 | [testCase recordFailureWithDescription:message 123 | inFile:[NSString stringWithUTF8String:fileName] 124 | atLine:lineNumber 125 | expected:NO]; 126 | } else { 127 | [exception raise]; 128 | } 129 | } 130 | 131 | NSString *EXPDescribeObject(id obj) { 132 | if(obj == nil) { 133 | return @"nil/null"; 134 | } else if([obj isKindOfClass:[NSValue class]] && ![obj isKindOfClass:[NSNumber class]]) { 135 | const char *type = [(NSValue *)obj _EXP_objCType]; 136 | if(type) { 137 | if(strcmp(type, @encode(SEL)) == 0) { 138 | return [NSString stringWithFormat:@"@selector(%@)", NSStringFromSelector([obj pointerValue])]; 139 | } else if(strcmp(type, @encode(Class)) == 0) { 140 | return NSStringFromClass([obj pointerValue]); 141 | } 142 | } 143 | } 144 | NSString *description = [obj description]; 145 | if([obj isKindOfClass:[NSArray class]]) { 146 | NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[obj count]]; 147 | for(id o in obj) { 148 | [arr addObject:EXPDescribeObject(o)]; 149 | } 150 | description = [NSString stringWithFormat:@"(%@)", [arr componentsJoinedByString:@", "]]; 151 | } else if([obj isKindOfClass:[NSSet class]] || [obj isKindOfClass:[NSOrderedSet class]]) { 152 | NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[obj count]]; 153 | for(id o in obj) { 154 | [arr addObject:EXPDescribeObject(o)]; 155 | } 156 | description = [NSString stringWithFormat:@"{(%@)}", [arr componentsJoinedByString:@", "]]; 157 | } else if([obj isKindOfClass:[NSDictionary class]]) { 158 | NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[obj count]]; 159 | for(id k in obj) { 160 | id v = [obj objectForKey:k]; 161 | [arr addObject:[NSString stringWithFormat:@"%@ = %@;",EXPDescribeObject(k), EXPDescribeObject(v)]]; 162 | } 163 | description = [NSString stringWithFormat:@"{%@}", [arr componentsJoinedByString:@" "]]; 164 | } else if([obj isKindOfClass:[NSAttributedString class]]) { 165 | description = [obj string]; 166 | } else { 167 | description = [description stringByReplacingOccurrencesOfString:@"\n" withString:@"\\n"]; 168 | } 169 | return description; 170 | } 171 | 172 | void EXP_prerequisite(EXPBoolBlock block) { 173 | [[[[NSThread currentThread] threadDictionary] objectForKey:@"EXP_currentMatcher"] setPrerequisiteBlock:block]; 174 | } 175 | 176 | void EXP_match(EXPBoolBlock block) { 177 | [[[[NSThread currentThread] threadDictionary] objectForKey:@"EXP_currentMatcher"] setMatchBlock:block]; 178 | } 179 | 180 | void EXP_failureMessageForTo(EXPStringBlock block) { 181 | [[[[NSThread currentThread] threadDictionary] objectForKey:@"EXP_currentMatcher"] setFailureMessageForToBlock:block]; 182 | } 183 | 184 | void EXP_failureMessageForNotTo(EXPStringBlock block) { 185 | [[[[NSThread currentThread] threadDictionary] objectForKey:@"EXP_currentMatcher"] setFailureMessageForNotToBlock:block]; 186 | } 187 | 188 | -------------------------------------------------------------------------------- /BFPaperButton/BFPaperViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // BFPaperViewController.m 3 | // BFPaperButton 4 | // 5 | // Created by Bence Feher on 7/16/14. 6 | // Copyright (c) 2014 Bence Feher. All rights reserved. 7 | // 8 | // The MIT License (MIT) 9 | // 10 | // Copyright (c) 2014 Bence Feher 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 13 | // this software and associated documentation files (the "Software"), to deal in 14 | // the Software without restriction, including without limitation the rights to 15 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 16 | // the Software, and to permit persons to whom the Software is furnished to do so, 17 | // subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included in all 20 | // copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 24 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 25 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 26 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 27 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | 29 | 30 | #import "BFPaperViewController.h" 31 | #import "BFPaperButton.h" 32 | 33 | @interface BFPaperViewController () 34 | 35 | @end 36 | 37 | @implementation BFPaperViewController 38 | 39 | - (void)viewDidLoad 40 | { 41 | [super viewDidLoad]; 42 | // Do any additional setup after loading the view, typically from a nib. 43 | 44 | BFPaperButton *bfFlatSmart = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 20, 280, 43) raised:NO]; 45 | [bfFlatSmart setTitle:@"BFPaperButton Flat: Smart Color" forState:UIControlStateNormal]; 46 | [bfFlatSmart setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 47 | bfFlatSmart.backgroundColor = [UIColor colorWithRed:117.f/255.f green:117.f/255.f blue:117.f/255.f alpha:1]; 48 | [bfFlatSmart setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 49 | [bfFlatSmart setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; 50 | [bfFlatSmart addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 51 | [self.view addSubview:bfFlatSmart]; 52 | 53 | BFPaperButton *bfFlatDumb = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 71, 280, 43) raised:NO]; 54 | bfFlatDumb.usesSmartColor = NO; 55 | [bfFlatDumb setTitle:@"BFPaperButton Flat: !Smart Color" forState:UIControlStateNormal]; 56 | [bfFlatDumb setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 57 | bfFlatDumb.backgroundColor = [UIColor colorWithRed:117.f/255.f green:117.f/255.f blue:117.f/255.f alpha:1]; 58 | [bfFlatDumb setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 59 | [bfFlatDumb setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; 60 | [bfFlatDumb addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 61 | [self.view addSubview:bfFlatDumb]; 62 | 63 | BFPaperButton *bfFlatClearSmart = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 122, 280, 43) raised:NO]; 64 | [bfFlatClearSmart setTitle:@"BFPaperButton Flat: Clear, Smart Color" forState:UIControlStateNormal]; 65 | [bfFlatClearSmart setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 66 | [bfFlatClearSmart setTitleColor:[UIColor colorWithRed:33.f/255.f green:150.f/255.f blue:243.f/255.f alpha:1] forState:UIControlStateNormal]; 67 | [bfFlatClearSmart addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 68 | [self.view addSubview:bfFlatClearSmart]; 69 | 70 | BFPaperButton *bfFlatClearDumb = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 173, 280, 43) raised:NO]; 71 | bfFlatClearDumb.usesSmartColor = NO; 72 | [bfFlatClearDumb setTitle:@"BFPaperButton Flat: Clear, !Smart Color" forState:UIControlStateNormal]; 73 | [bfFlatClearDumb setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 74 | [bfFlatClearDumb setTitleColor:[UIColor colorWithRed:33.f/255.f green:150.f/255.f blue:243.f/255.f alpha:1] forState:UIControlStateNormal]; 75 | [bfFlatClearDumb addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 76 | [self.view addSubview:bfFlatClearDumb]; 77 | 78 | 79 | 80 | BFPaperButton *bfRaisedSmart = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 239, 280, 43) raised:YES]; 81 | [bfRaisedSmart setBackgroundColor:[UIColor colorWithRed:33.f/255.f green:150.f/255.f blue:243.f/255.f alpha:1]]; 82 | [bfRaisedSmart setTitle:@"BFPaperButton Raised: Smart Color" forState:UIControlStateNormal]; 83 | [bfRaisedSmart setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 84 | [bfRaisedSmart addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 85 | [self.view addSubview:bfRaisedSmart]; 86 | 87 | BFPaperButton *bfRaisedDumb = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 307, 280, 43) raised:YES]; 88 | bfRaisedDumb.usesSmartColor = NO; 89 | [bfRaisedDumb setBackgroundColor:[UIColor colorWithRed:33.f/255.f green:150.f/255.f blue:243.f/255.f alpha:1]]; 90 | [bfRaisedDumb setTitle:@"BFPaperButton Raised: !Smart Color" forState:UIControlStateNormal]; 91 | [bfRaisedDumb setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 92 | [bfRaisedDumb addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 93 | [self.view addSubview:bfRaisedDumb]; 94 | 95 | BFPaperButton *bfRaisedSmartSmall = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 375, 135, 83) raised:YES]; 96 | [bfRaisedSmartSmall setBackgroundColor:[UIColor colorWithRed:33.f/255.f green:150.f/255.f blue:243.f/255.f alpha:1]]; 97 | bfRaisedSmartSmall.titleLabel.numberOfLines = 0; 98 | bfRaisedSmartSmall.titleLabel.font = [UIFont systemFontOfSize:10.f]; 99 | [bfRaisedSmartSmall setTitle:@"BFPaperButton Raised: Smart Color" forState:UIControlStateNormal]; 100 | [bfRaisedSmartSmall setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 101 | [bfRaisedSmartSmall addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 102 | [self.view addSubview:bfRaisedSmartSmall]; 103 | 104 | BFPaperButton *bfRaisedDumbSmall = [[BFPaperButton alloc] initWithFrame:CGRectMake(163, 375, 135, 83) raised:YES]; 105 | bfRaisedDumbSmall.usesSmartColor = NO; 106 | [bfRaisedDumbSmall setBackgroundColor:[UIColor colorWithRed:33.f/255.f green:150.f/255.f blue:243.f/255.f alpha:1]]; 107 | bfRaisedDumbSmall.titleLabel.numberOfLines = 0; 108 | bfRaisedDumbSmall.titleLabel.font = [UIFont systemFontOfSize:10.f]; 109 | bfRaisedDumbSmall.tapCircleDiameter = bfPaperButton_tapCircleDiameterFull; 110 | [bfRaisedDumbSmall setTitle:@"BFPaperButton Raised: !Smart Color, large circle" forState:UIControlStateNormal]; 111 | [bfRaisedDumbSmall setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 112 | [bfRaisedDumbSmall addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 113 | [self.view addSubview:bfRaisedDumbSmall]; 114 | 115 | 116 | 117 | BFPaperButton *circle1 = [[BFPaperButton alloc] initWithFrame:CGRectMake(20, 468, 86, 86) raised:YES]; 118 | [circle1 setBackgroundColor:[UIColor colorWithRed:33.f/255.f green:150.f/255.f blue:243.f/255.f alpha:1]]; 119 | [circle1 setTitle:@"Center" forState:UIControlStateNormal]; 120 | [circle1 setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 121 | [circle1 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 122 | [circle1 setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; 123 | [circle1 addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 124 | circle1.cornerRadius = circle1.frame.size.width / 2; 125 | circle1.rippleFromTapLocation = NO; 126 | [self.view addSubview:circle1]; 127 | 128 | BFPaperButton *circle2 = [[BFPaperButton alloc] initWithFrame:CGRectMake(116, 468, 86, 86) raised:YES]; 129 | [circle2 setTitle:@"Custom" forState:UIControlStateNormal]; 130 | [circle2 setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 131 | [circle2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 132 | [circle2 setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; 133 | [circle2 addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 134 | circle2.backgroundColor = [UIColor colorWithRed:0.3 green:0 blue:1 alpha:1]; 135 | circle2.tapCircleColor = [UIColor colorWithRed:1 green:0 blue:1 alpha:0.6]; // Setting this color overrides "Smart Color". 136 | circle2.cornerRadius = circle2.frame.size.width / 2; 137 | circle2.rippleFromTapLocation = NO; 138 | circle2.rippleBeyondBounds = YES; 139 | circle2.tapCircleDiameter = MAX(circle2.frame.size.width, circle2.frame.size.height) * 1.3; 140 | [self.view addSubview:circle2]; 141 | 142 | BFPaperButton *circle3 = [[BFPaperButton alloc] initWithFrame:CGRectMake(212, 468, 86, 86) raised:NO]; 143 | [circle3 setTitle:@"Custom" forState:UIControlStateNormal]; 144 | [circle3 setTitleFont:[UIFont fontWithName:@"HelveticaNeue-Light" size:15.f]]; 145 | [circle3 setTitleColor:[UIColor colorWithRed:33.f/255.f green:33.f/255.f blue:33.f/255.f alpha:1] forState:UIControlStateNormal]; 146 | [circle3 setTitleColor:[UIColor colorWithRed:33.f/255.f green:33.f/255.f blue:33.f/255.f alpha:1] forState:UIControlStateHighlighted]; 147 | [circle3 addTarget:self action:@selector(buttonWasPressed:) forControlEvents:UIControlEventTouchUpInside]; 148 | circle3.cornerRadius = circle3.frame.size.width / 2; 149 | circle3.tapCircleDiameter = 53; 150 | circle3.tapCircleColor = [UIColor colorWithRed:0.3 green:0 blue:1 alpha:0.6]; // Setting this color overrides "Smart Color". 151 | circle3.backgroundFadeColor = [UIColor colorWithRed:0 green:0 blue:1 alpha:0.3f]; // Setting this color overrides "Smart Color". 152 | [self.view addSubview:circle3]; 153 | } 154 | 155 | - (void)didReceiveMemoryWarning 156 | { 157 | [super didReceiveMemoryWarning]; 158 | // Dispose of any resources that can be recreated. 159 | } 160 | 161 | - (void)buttonWasPressed:(id)sender 162 | { 163 | NSLog(@"%@ was pressed!", ((UIButton *)sender).titleLabel.text); 164 | } 165 | 166 | @end 167 | -------------------------------------------------------------------------------- /Pods/Expecta/README.md: -------------------------------------------------------------------------------- 1 | # Expecta 2 | 3 | A Matcher Framework for Objective-C/Cocoa 4 | 5 | ## NOTICE 6 | 7 | Expecta 0.2.x has a new syntax that is slightly different from Expecta 0.1.x. For example `expect(x).toEqual(y)` should now be written as `expect(x).to.equal(y)`. You can do `#define EXP_OLD_SYNTAX` before importing `Expecta.h` to enable backward-compatiblity mode, but keep in mind that the old syntax is deprecated. 8 | 9 | ## INTRODUCTION 10 | 11 | The main advantage of using Expecta over other matcher frameworks is that you do not have to specify the data types. Also, the syntax of Expecta matchers is much more readable and does not suffer from parenthesitis. 12 | 13 | **OCHamcrest** 14 | 15 | ```objective-c 16 | assertThat(@"foo", is(equalTo(@"foo"))); 17 | assertThatUnsignedInteger(foo, isNot(equalToUnsignedInteger(1))); 18 | assertThatBool([bar isBar], is(equalToBool(YES))); 19 | assertThatDouble(baz, is(equalToDouble(3.14159))); 20 | ``` 21 | 22 | vs. 23 | 24 | **Expecta** 25 | 26 | ```objective-c 27 | expect(@"foo").to.equal(@"foo"); // `to` is a syntatic sugar and can be safely omitted. 28 | expect(foo).notTo.equal(1); 29 | expect([bar isBar]).to.equal(YES); 30 | expect(baz).to.equal(3.14159); 31 | ``` 32 | 33 | ## SETUP 34 | 35 | Use [CocoaPods](https://github.com/CocoaPods/CocoaPods) 36 | 37 | ```ruby 38 | target :MyApp do 39 | # your app dependencies 40 | end 41 | 42 | target :MyAppTests do 43 | pod 'Expecta', '~> 0.2.3' # expecta matchers 44 | # pod 'Specta', '~> 0.1.11' # specta bdd framework 45 | end 46 | ``` 47 | 48 | or 49 | 50 | 1. Clone from Github. 51 | 2. Run `rake` in project root to build. 52 | 3. Copy and add all header files in `products` folder to the Spec/Test target in your Xcode project. 53 | 4. For **OS X projects**, copy and add `libExpecta-macosx.a` in `products` folder to the Spec/Test target in your Xcode project. 54 | For **iOS projects**, copy and add `libExpecta-ios-universal.a` in `products` folder to the Spec/Test target in your Xcode project. 55 | 5. Add `-ObjC` to the "Other Linker Flags" build setting for the Spec/Test target in your Xcode project. 56 | 6. Add the following to your test code. 57 | 58 | ```objective-c 59 | // #define EXP_OLD_SYNTAX // enable backward-compatibility 60 | #define EXP_SHORTHAND 61 | # import "Expecta.h" 62 | ``` 63 | 64 | If `EXP_SHORTHAND` is not defined, expectations must be written with `EXP_expect` instead of `expect`. 65 | 66 | Expecta is framework-agnostic. It works well with OCUnit (SenTestingKit) and OCUnit-compatible test frameworks such as [Specta](http://github.com/petejkim/specta/), [GHUnit](http://github.com/gabriel/gh-unit/) and [GTMUnit](http://code.google.com/p/google-toolbox-for-mac/). Expecta also supports [Cedar](http://pivotal.github.com/cedar/). 67 | 68 | ## BUILT-IN MATCHERS 69 | 70 | >`expect(x).to.equal(y);` compares objects or primitives x and y and passes if they are identical (==) or equivalent (isEqual:). 71 | > 72 | >`expect(x).to.beIdenticalTo(y);` compares objects x and y and passes if they are identical and have the same memory address. 73 | > 74 | >`expect(x).to.beNil();` passes if x is nil. 75 | > 76 | >`expect(x).to.beTruthy();` passes if x evaluates to true (non-zero). 77 | > 78 | >`expect(x).to.beFalsy();` passes if x evaluates to false (zero). 79 | > 80 | >`expect(x).to.contain(y);` passes if an instance of NSArray or NSString x contains y. 81 | > 82 | >`expect(x).to.beSupersetOf(y);` passes if an instance of NSArray, NSSet, NSDictionary or NSOrderedSet x contains all elements of y. 83 | > 84 | >`expect(x).to.haveCountOf(y);` passes if an instance of NSArray, NSSet, NSDictionary or NSString x has a count or length of y. 85 | > 86 | >`expect(x).to.beEmpty();` passes if an instance of NSArray, NSSet, NSDictionary or NSString x has a count or length of 0. 87 | > 88 | >`expect(x).to.beInstanceOf([Foo class]);` passes if x is an instance of a class Foo. 89 | > 90 | >`expect(x).to.beKindOf([Foo class]);` passes if x is an instance of a class Foo or if x is an instance of any class that inherits from the class Foo. 91 | > 92 | >`expect([Foo class]).to.beSubclassOf([Bar class]);` passes if the class Foo is a subclass of the class Bar or if it is identical to the class Bar. Use beKindOf() for class clusters. 93 | > 94 | >`expect(x).to.beLessThan(y);` passes if `x` is less than `y`. 95 | > 96 | >`expect(x).to.beLessThanOrEqualTo(y);` passes if `x` is less than or equal to `y`. 97 | > 98 | >`expect(x).to.beGreaterThan(y);` passes if `x` is greater than `y`. 99 | > 100 | >`expect(x).to.beGreaterThanOrEqualTo(y);` passes if `x` is greater than or equal to `y`. 101 | > 102 | >`expect(x).to.beInTheRangeOf(y,z);` passes if `x` is in the range of `y` and `z`. 103 | > 104 | >`expect(x).to.beCloseTo(y);` passes if `x` is close to `y`. 105 | > 106 | >`expect(x).to.beCloseToWithin(y, z);` passes if `x` is close to `y` within `z`. 107 | > 108 | >`expect(^{ /* code */ }).to.raise(@"ExceptionName");` passes if a given block of code raises an exception named `ExceptionName`. 109 | > 110 | >`expect(^{ /* code */ }).to.raiseAny();` passes if a given block of code raises any exception. 111 | > 112 | >`expect(x).to.conformTo(y);` passes if `x` conforms to the protocol `y`. 113 | > 114 | >`expect(x).to.respondTo(y);` passes if `x` responds to the selector `y`. 115 | > 116 | >`expect( /* code */ ).to.notify(@"NotificationName");` passes if a given block of code generates an NSNotification named `NotificationName`. 117 | > 118 | >`expect( /* code */ ).to.notify(notification);` passes if a given block of code generates an NSNotification equal to the passed `notification`. 119 | > 120 | >`expect(x).to.beginWith(y);` passes if an instance of NSString, NSArray, or NSOrderedSet `x` begins with `y`. Also aliased by `startWith` 121 | > 122 | >`expect(x).to.endWith(y);` passes if an instance of NSString, NSArray, or NSOrderedSet `x` ends with `y`. 123 | 124 | **Please contribute more matchers.** 125 | 126 | ## INVERTING MATCHERS 127 | 128 | Every matcher's criteria can be inverted by prepending `.notTo` or `.toNot`: 129 | 130 | >`expect(x).notTo.equal(y);` compares objects or primitives x and y and passes if they are *not* equivalent. 131 | 132 | ## ASYNCHRONOUS TESTING 133 | 134 | Every matcher can be made to perform asynchronous testing by prepending `.will` or `.willNot`: 135 | 136 | >`expect(x).will.beNil();` passes if x becomes nil before the timeout. 137 | > 138 | >`expect(x).willNot.beNil();` passes if x becomes non-nil before the timeout. 139 | 140 | Default timeout is 1.0 second. This setting can be changed by calling `[Expecta setAsynchronousTestTimeout:x]`, where x is the desired timeout. 141 | 142 | ## WRITING NEW MATCHERS 143 | 144 | Writing a new matcher is easy with special macros provided by Expecta. Take a look at how `.beKindOf()` matcher is defined: 145 | 146 | `EXPMatchers+beKindOf.h` 147 | 148 | ```objective-c 149 | # import "Expecta.h" 150 | 151 | EXPMatcherInterface(beKindOf, (Class expected)); 152 | // 1st argument is the name of the matcher function 153 | // 2nd argument is the list of arguments that may be passed in the function call. 154 | // Multiple arguments are fine. (e.g. (int foo, float bar)) 155 | 156 | #define beAKindOf beKindOf 157 | ``` 158 | 159 | `EXPMatchers+beKindOf.m` 160 | 161 | ```objective-c 162 | # import "EXPMatchers+beKindOf.h" 163 | 164 | EXPMatcherImplementationBegin(beKindOf, (Class expected)) { 165 | BOOL actualIsNil = (actual == nil); 166 | BOOL expectedIsNil = (expected == nil); 167 | 168 | prerequisite(^BOOL{ 169 | return !(actualIsNil || expectedIsNil); 170 | // Return `NO` if matcher should fail whether or not the result is inverted using `.Not`. 171 | }); 172 | 173 | match(^BOOL{ 174 | return [actual isKindOfClass:expected]; 175 | // Return `YES` if the matcher should pass, `NO` if it should not. 176 | // The actual value/object is passed as `actual`. 177 | // Please note that primitive values will be wrapped in NSNumber/NSValue. 178 | }); 179 | 180 | failureMessageForTo(^NSString *{ 181 | if(actualIsNil) return @"the actual value is nil/null"; 182 | if(expectedIsNil) return @"the expected value is nil/null"; 183 | return [NSString stringWithFormat:@"expected: a kind of %@, " 184 | "got: an instance of %@, which is not a kind of %@", 185 | [expected class], [actual class], [expected class]]; 186 | // Return the message to be displayed when the match function returns `YES`. 187 | }); 188 | 189 | failureMessageForNotTo(^NSString *{ 190 | if(actualIsNil) return @"the actual value is nil/null"; 191 | if(expectedIsNil) return @"the expected value is nil/null"; 192 | return [NSString stringWithFormat:@"expected: not a kind of %@, " 193 | "got: an instance of %@, which is a kind of %@", 194 | [expected class], [actual class], [expected class]]; 195 | // Return the message to be displayed when the match function returns `NO`. 196 | }); 197 | } 198 | EXPMatcherImplementationEnd 199 | ``` 200 | 201 | ## DYNAMIC PREDICATE MATCHERS 202 | 203 | It is possible to add predicate matchers by simply defining the matcher interface, with the matcher implementation being handled at runtime by delegating to the predicate method on your object. 204 | 205 | For instance, if you have the following class: 206 | 207 | ```objc 208 | @interface LightSwitch : NSObject 209 | @property (nonatomic, assign, getter=isTurnedOn) BOOL turnedOn; 210 | @end 211 | 212 | @implementation LightSwitch 213 | @synthesize turnedOn; 214 | @end 215 | ``` 216 | 217 | The normal way to write an assertion that the switch is turned on would be: 218 | 219 | ```objc 220 | expect([lightSwitch isTurnedOn]).to.beTruthy(); 221 | ``` 222 | 223 | However, if we define a custom predicate matcher: 224 | 225 | ```objc 226 | EXPMatcherInterface(isTurnedOn, (void)); 227 | ``` 228 | 229 | (Note: we haven't defined the matcher implementation, just it's interface) 230 | 231 | You can now write your assertion as follows: 232 | 233 | ```objc 234 | expect(lightSwitch).isTurnedOn(); 235 | ``` 236 | 237 | ## CONTRIBUTION 238 | 239 | You can find the public Tracker project [here](https://www.pivotaltracker.com/projects/323267). 240 | 241 | ### CONTRIBUTION GUIDELINES 242 | 243 | * Please use only spaces and indent 2 spaces at a time. 244 | * Please prefix instance variable names with a single underscore (`_`). 245 | * Please prefix custom classes and functions defined in the global scope with `EXP`. 246 | 247 | ## CREDITS 248 | 249 | Expecta is brought to you by [Peter Jihoon Kim](http://github.com/petejkim) and the [Specta team](https://github.com/specta?tab=members). 250 | 251 | ### CONTRIBUTORS 252 | 253 | * [Alan Rogers](https://github.com/alanjrogers) 254 | * [Andrew Kitchen](https://github.com/akitchen) 255 | * [Blake Watters](https://github.com/blakewatters) 256 | * [Christopher Pickslay](https://github.com/twobitlabs) 257 | * [Chris Devereux](https://github.com/chrisdevereux) 258 | * [David Hart](https://github.com/TrahDivad) 259 | * [Jacob Gorban](https://github.com/apparentsoft) 260 | * [Jon Cooper](https://github.com/joncooper) 261 | * [Justin Spahr-Summers](https://github.com/jspahrsummers) 262 | * [Kurtis Seebaldt](https://github.com/kseebaldt) 263 | * [Luke Redpath](https://github.com/lukeredpath) 264 | * [Nicholas Hutchinson](https://github.com/nickhutchinson) 265 | * [Rob Rix](https://github.com/robrix) 266 | * [Samuel Giddins](https://github.com/segiddins) 267 | * [Zack Waugh](https://github.com/zachwaugh) 268 | 269 | ## LICENSE 270 | 271 | Expecta is licensed under the [MIT License](http://github.com/petejkim/expecta/raw/master/LICENSE). 272 | --------------------------------------------------------------------------------