├── .gitignore ├── .travis.yml ├── AXPopoverView.podspec ├── AXPopoverView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcshareddata │ └── xcschemes │ │ └── AXPopoverView.xcscheme └── xcuserdata │ └── ai.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── AXPopoverView.xcworkspace └── contents.xcworkspacedata ├── AXPopoverView ├── AXPopoverView │ ├── AXPopoverKit.h │ ├── AXPopoverView+Animation.h │ ├── AXPopoverView+Animation.m │ ├── AXPopoverView.bundle │ │ ├── ax_button.png │ │ ├── ax_error@2x.png │ │ ├── ax_error@3x.png │ │ ├── ax_success@2x.png │ │ └── ax_success@3x.png │ ├── AXPopoverView.h │ └── AXPopoverView.m ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── share.imageset │ │ ├── Contents.json │ │ ├── more_icon_share@2x.png │ │ └── more_icon_share@3x.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── ScrollViewController.h ├── ScrollViewController.m ├── TableViewController.h ├── TableViewController.m ├── ViewController.h ├── ViewController.m ├── main.m └── test.jpg ├── LICENSE ├── Podfile ├── Podfile.lock ├── Pods ├── AGGeometryKit+POP │ ├── LICENSE │ ├── README.md │ └── Source │ │ ├── POPAnimatableProperty+AGGeometryKit.h │ │ └── POPAnimatableProperty+AGGeometryKit.m ├── AGGeometryKit │ ├── AGGeometryKit │ │ ├── AGGeometryKit.h │ │ ├── AGKBaseDefines.h │ │ ├── AGKBitOperations.h │ │ ├── AGKCorner.h │ │ ├── AGKCorner.m │ │ ├── AGKLine.h │ │ ├── AGKLine.m │ │ ├── AGKMath.h │ │ ├── AGKMath.m │ │ ├── AGKQuad.h │ │ ├── AGKQuad.m │ │ ├── AGKVector3D.h │ │ ├── AGKVector3D.m │ │ ├── Categories │ │ │ ├── AGGeometryKitCategories.h │ │ │ ├── AGKMatrix+AGKVector3D.h │ │ │ ├── AGKMatrix+AGKVector3D.m │ │ │ ├── AGKMatrix+CATransform3D.h │ │ │ ├── AGKMatrix+CATransform3D.m │ │ │ ├── AGKMatrix+GLKit.h │ │ │ ├── AGKMatrix+GLKit.m │ │ │ ├── CALayer+AGK+Methods.h │ │ │ ├── CALayer+AGK+Methods.m │ │ │ ├── CALayer+AGK+Properties.h │ │ │ ├── CALayer+AGK+Properties.m │ │ │ ├── CALayer+AGKQuad.h │ │ │ ├── CALayer+AGKQuad.m │ │ │ ├── NSValue+AGKQuad.h │ │ │ ├── NSValue+AGKQuad.m │ │ │ ├── UIBezierPath+AGKQuad.h │ │ │ ├── UIBezierPath+AGKQuad.m │ │ │ ├── UIImage+AGK+CATransform3D.h │ │ │ ├── UIImage+AGK+CATransform3D.m │ │ │ ├── UIImage+AGKQuad.h │ │ │ ├── UIImage+AGKQuad.m │ │ │ ├── UIScrollView+AGK+Properties.h │ │ │ ├── UIScrollView+AGK+Properties.m │ │ │ ├── UIView+AGK+AngleConverter.h │ │ │ ├── UIView+AGK+AngleConverter.m │ │ │ ├── UIView+AGK+Properties.h │ │ │ └── UIView+AGK+Properties.m │ │ ├── Classes │ │ │ ├── AGGeometryKitClasses.h │ │ │ ├── AGKCALayerAnimationBlockDelegate.h │ │ │ ├── AGKCALayerAnimationBlockDelegate.m │ │ │ ├── AGKMatrix.h │ │ │ ├── AGKMatrix.m │ │ │ ├── AGKTransformPixelMapper.h │ │ │ └── AGKTransformPixelMapper.m │ │ └── CoreGraphics_Extensions │ │ │ ├── AGGeometryKitCoreGraphics.h │ │ │ ├── CGGeometry+AGGeometryKit.h │ │ │ ├── CGGeometry+AGGeometryKit.m │ │ │ ├── CGImageRef+AGK+CATransform3D.h │ │ │ └── CGImageRef+AGK+CATransform3D.m │ ├── LICENSE │ └── README.md ├── AXAttributedLabel │ ├── AXAttributedLabel │ │ └── AXAttributedLabel │ │ │ ├── AXAttributedLabel.h │ │ │ └── AXAttributedLabel.m │ ├── LICENSE │ └── README.md ├── Headers │ ├── Private │ │ ├── AGGeometryKit+POP │ │ │ └── POPAnimatableProperty+AGGeometryKit.h │ │ ├── AGGeometryKit │ │ │ ├── AGGeometryKit.h │ │ │ ├── AGGeometryKitCategories.h │ │ │ ├── AGGeometryKitClasses.h │ │ │ ├── AGGeometryKitCoreGraphics.h │ │ │ ├── AGKBaseDefines.h │ │ │ ├── AGKBitOperations.h │ │ │ ├── AGKCALayerAnimationBlockDelegate.h │ │ │ ├── AGKCorner.h │ │ │ ├── AGKLine.h │ │ │ ├── AGKMath.h │ │ │ ├── AGKMatrix+AGKVector3D.h │ │ │ ├── AGKMatrix+CATransform3D.h │ │ │ ├── AGKMatrix+GLKit.h │ │ │ ├── AGKMatrix.h │ │ │ ├── AGKQuad.h │ │ │ ├── AGKTransformPixelMapper.h │ │ │ ├── AGKVector3D.h │ │ │ ├── CALayer+AGK+Methods.h │ │ │ ├── CALayer+AGK+Properties.h │ │ │ ├── CALayer+AGKQuad.h │ │ │ ├── CGGeometry+AGGeometryKit.h │ │ │ ├── CGImageRef+AGK+CATransform3D.h │ │ │ ├── NSValue+AGKQuad.h │ │ │ ├── UIBezierPath+AGKQuad.h │ │ │ ├── UIImage+AGK+CATransform3D.h │ │ │ ├── UIImage+AGKQuad.h │ │ │ ├── UIScrollView+AGK+Properties.h │ │ │ ├── UIView+AGK+AngleConverter.h │ │ │ └── UIView+AGK+Properties.h │ │ ├── AXAttributedLabel │ │ │ └── AXAttributedLabel.h │ │ └── pop │ │ │ ├── FloatConversion.h │ │ │ ├── POP.h │ │ │ ├── POPAction.h │ │ │ ├── POPAnimatableProperty.h │ │ │ ├── POPAnimation.h │ │ │ ├── POPAnimationEvent.h │ │ │ ├── POPAnimationEventInternal.h │ │ │ ├── POPAnimationExtras.h │ │ │ ├── POPAnimationInternal.h │ │ │ ├── POPAnimationPrivate.h │ │ │ ├── POPAnimationRuntime.h │ │ │ ├── POPAnimationTracer.h │ │ │ ├── POPAnimationTracerInternal.h │ │ │ ├── POPAnimator.h │ │ │ ├── POPAnimatorPrivate.h │ │ │ ├── POPBasicAnimation.h │ │ │ ├── POPBasicAnimationInternal.h │ │ │ ├── POPCGUtils.h │ │ │ ├── POPCustomAnimation.h │ │ │ ├── POPDecayAnimation.h │ │ │ ├── POPDecayAnimationInternal.h │ │ │ ├── POPDefines.h │ │ │ ├── POPGeometry.h │ │ │ ├── POPLayerExtras.h │ │ │ ├── POPMath.h │ │ │ ├── POPPropertyAnimation.h │ │ │ ├── POPPropertyAnimationInternal.h │ │ │ ├── POPSpringAnimation.h │ │ │ ├── POPSpringAnimationInternal.h │ │ │ ├── POPSpringSolver.h │ │ │ ├── POPVector.h │ │ │ ├── TransformationMatrix.h │ │ │ └── UnitBezier.h │ └── Public │ │ ├── AGGeometryKit+POP │ │ └── POPAnimatableProperty+AGGeometryKit.h │ │ ├── AGGeometryKit │ │ ├── AGGeometryKit.h │ │ ├── AGGeometryKitCategories.h │ │ ├── AGGeometryKitClasses.h │ │ ├── AGGeometryKitCoreGraphics.h │ │ ├── AGKBaseDefines.h │ │ ├── AGKBitOperations.h │ │ ├── AGKCALayerAnimationBlockDelegate.h │ │ ├── AGKCorner.h │ │ ├── AGKLine.h │ │ ├── AGKMath.h │ │ ├── AGKMatrix+AGKVector3D.h │ │ ├── AGKMatrix+CATransform3D.h │ │ ├── AGKMatrix+GLKit.h │ │ ├── AGKMatrix.h │ │ ├── AGKQuad.h │ │ ├── AGKTransformPixelMapper.h │ │ ├── AGKVector3D.h │ │ ├── CALayer+AGK+Methods.h │ │ ├── CALayer+AGK+Properties.h │ │ ├── CALayer+AGKQuad.h │ │ ├── CGGeometry+AGGeometryKit.h │ │ ├── CGImageRef+AGK+CATransform3D.h │ │ ├── NSValue+AGKQuad.h │ │ ├── UIBezierPath+AGKQuad.h │ │ ├── UIImage+AGK+CATransform3D.h │ │ ├── UIImage+AGKQuad.h │ │ ├── UIScrollView+AGK+Properties.h │ │ ├── UIView+AGK+AngleConverter.h │ │ └── UIView+AGK+Properties.h │ │ ├── AXAttributedLabel │ │ └── AXAttributedLabel.h │ │ └── pop │ │ ├── POP.h │ │ ├── POPAnimatableProperty.h │ │ ├── POPAnimation.h │ │ ├── POPAnimationEvent.h │ │ ├── POPAnimationExtras.h │ │ ├── POPAnimationTracer.h │ │ ├── POPAnimator.h │ │ ├── POPBasicAnimation.h │ │ ├── POPCustomAnimation.h │ │ ├── POPDecayAnimation.h │ │ ├── POPDefines.h │ │ ├── POPGeometry.h │ │ ├── POPLayerExtras.h │ │ ├── POPPropertyAnimation.h │ │ └── POPSpringAnimation.h ├── Manifest.lock ├── Pods.xcodeproj │ └── project.pbxproj ├── Target Support Files │ ├── AGGeometryKit+POP │ │ ├── AGGeometryKit+POP-dummy.m │ │ ├── AGGeometryKit+POP-prefix.pch │ │ └── AGGeometryKit+POP.xcconfig │ ├── AGGeometryKit │ │ ├── AGGeometryKit-dummy.m │ │ ├── AGGeometryKit-prefix.pch │ │ └── AGGeometryKit.xcconfig │ ├── AXAttributedLabel │ │ ├── AXAttributedLabel-dummy.m │ │ ├── AXAttributedLabel-prefix.pch │ │ └── AXAttributedLabel.xcconfig │ ├── Pods-AXPopoverView │ │ ├── Pods-AXPopoverView-acknowledgements.markdown │ │ ├── Pods-AXPopoverView-acknowledgements.plist │ │ ├── Pods-AXPopoverView-dummy.m │ │ ├── Pods-AXPopoverView-frameworks.sh │ │ ├── Pods-AXPopoverView-resources.sh │ │ ├── Pods-AXPopoverView.debug.xcconfig │ │ └── Pods-AXPopoverView.release.xcconfig │ └── pop │ │ ├── pop-dummy.m │ │ ├── pop-prefix.pch │ │ └── pop.xcconfig └── pop │ ├── LICENSE │ ├── README.md │ └── pop │ ├── POP.h │ ├── POPAction.h │ ├── POPAnimatableProperty.h │ ├── POPAnimatableProperty.mm │ ├── POPAnimation.h │ ├── POPAnimation.mm │ ├── POPAnimationEvent.h │ ├── POPAnimationEvent.mm │ ├── POPAnimationEventInternal.h │ ├── POPAnimationExtras.h │ ├── POPAnimationExtras.mm │ ├── POPAnimationInternal.h │ ├── POPAnimationPrivate.h │ ├── POPAnimationRuntime.h │ ├── POPAnimationRuntime.mm │ ├── POPAnimationTracer.h │ ├── POPAnimationTracer.mm │ ├── POPAnimationTracerInternal.h │ ├── POPAnimator.h │ ├── POPAnimator.mm │ ├── POPAnimatorPrivate.h │ ├── POPBasicAnimation.h │ ├── POPBasicAnimation.mm │ ├── POPBasicAnimationInternal.h │ ├── POPCGUtils.h │ ├── POPCGUtils.mm │ ├── POPCustomAnimation.h │ ├── POPCustomAnimation.mm │ ├── POPDecayAnimation.h │ ├── POPDecayAnimation.mm │ ├── POPDecayAnimationInternal.h │ ├── POPDefines.h │ ├── POPGeometry.h │ ├── POPGeometry.mm │ ├── POPLayerExtras.h │ ├── POPLayerExtras.mm │ ├── POPMath.h │ ├── POPMath.mm │ ├── POPPropertyAnimation.h │ ├── POPPropertyAnimation.mm │ ├── POPPropertyAnimationInternal.h │ ├── POPSpringAnimation.h │ ├── POPSpringAnimation.mm │ ├── POPSpringAnimationInternal.h │ ├── POPSpringSolver.h │ ├── POPVector.h │ ├── POPVector.mm │ └── WebCore │ ├── FloatConversion.h │ ├── TransformationMatrix.cpp │ ├── TransformationMatrix.h │ └── UnitBezier.h └── README.md /.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 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode7.3 2 | language: objective-c 3 | xcode_workspace: AXPopoverView.xcworkspace 4 | xcode_scheme: AXPopoverView 5 | xcode_sdk: iphonesimulator -------------------------------------------------------------------------------- /AXPopoverView.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | 4 | s.name = "AXPopoverView" 5 | s.version = "0.6.3" 6 | s.summary = "`AXPopoverView` is an iOS customizable view that displays a bubble style view." 7 | 8 | s.description = <<-DESC 9 | `AXPopoverView` is an iOS customizable view that displays a bubble style view with a custom view when some messages need to show from a target view or a target rect. `AXPopoverView` contains how to use custom view to customize the popover view. The popover view (mostly used as `Label` or `Other`) is a convenient and hommization way for developer to use. 10 | DESC 11 | s.homepage = "https://github.com/devedbox/AXPopoverView" 12 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 13 | s.license = "MIT" 14 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 15 | s.author = { "艾星" => "862099730@qq.com" } 16 | # Or just: s.author = "aiXing" 17 | # s.authors = { "aiXing" => "862099730@qq.com" } 18 | # s.social_media_url = "http://twitter.com/aiXing" 19 | # s.platform = :ios 20 | s.platform = :ios, "7.0" 21 | # s.ios.deployment_target = “7.0” 22 | # s.osx.deployment_target = "10.7" 23 | # s.watchos.deployment_target = "2.0" 24 | s.source = { :git => "https://github.com/devedbox/AXPopoverView.git", :tag => s.version } 25 | s.source_files = "AXPopoverView/AXPopoverView/*.{h,m}" 26 | #s.exclude_files = "Classes/Exclude" 27 | # s.public_header_files = "Classes/**/*.h" 28 | s.resource = "AXPopoverView/AXPopoverView/AXPopoverView.bundle" 29 | # s.resources = "Resources/*.png" 30 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 31 | # s.framework = "SomeFramework" 32 | s.frameworks = "UIKit", "Foundation" 33 | # s.library = "iconv" 34 | # s.libraries = "iconv", "xml2" 35 | s.requires_arc = true 36 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 37 | s.dependency 'AGGeometryKit+POP' 38 | s.dependency 'AXAttributedLabel' 39 | s.dependency 'pop', '~> 1.0.4' 40 | s.dependency 'AGGeometryKit', '~> 1.0' 41 | 42 | end 43 | -------------------------------------------------------------------------------- /AXPopoverView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AXPopoverView.xcodeproj/xcshareddata/xcschemes/AXPopoverView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /AXPopoverView.xcodeproj/xcuserdata/ai.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AXPopoverView.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 01E7EA931BFB6DC3001176A2 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /AXPopoverView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AXPopoverView/AXPopoverView/AXPopoverKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AXPopoverKit.h 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/12/25. 6 | // Copyright © 2015年 AiXing. All rights reserved. 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 all 16 | // 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 THE 24 | // SOFTWARE. 25 | 26 | #ifndef AXPopoverKit_h 27 | #define AXPopoverKit_h 28 | 29 | #import "AXPopoverView.h" 30 | #import "AXPopoverView+Animation.h" 31 | 32 | #endif /* AXPopoverKit_h */ 33 | -------------------------------------------------------------------------------- /AXPopoverView/AXPopoverView/AXPopoverView+Animation.h: -------------------------------------------------------------------------------- 1 | // 2 | // AXPopoverView+Animation.h 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/12/24. 6 | // Copyright © 2015年 AiXing. All rights reserved. 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 all 16 | // 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 THE 24 | // SOFTWARE. 25 | 26 | #import "AXPopoverView.h" 27 | 28 | @interface AXPopoverView (Animation) 29 | + (AXPopoverViewAnimator *)turnFlipAnimator; 30 | + (AXPopoverViewAnimator *)flipSpringAnimator; 31 | + (AXPopoverViewAnimator *)popFlipSpringAnimator; 32 | @end 33 | -------------------------------------------------------------------------------- /AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_button.png -------------------------------------------------------------------------------- /AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_error@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_error@2x.png -------------------------------------------------------------------------------- /AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_error@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_error@3x.png -------------------------------------------------------------------------------- /AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_success@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_success@2x.png -------------------------------------------------------------------------------- /AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_success@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/AXPopoverView/AXPopoverView.bundle/ax_success@3x.png -------------------------------------------------------------------------------- /AXPopoverView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/11/17. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /AXPopoverView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/11/17. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "AXPopoverKit.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | [[AXPopoverView appearance] setBackgroundColor:[UIColor colorWithRed:0.165f green:0.639f blue:0.937f alpha:1.00f]]; 21 | [[AXPopoverView appearance] setBackgroundDrawingColor:[UIColor colorWithRed:0.165f green:0.639f blue:0.937f alpha:1.00f]]; 22 | [[AXPopoverView appearance] setPreferredArrowDirection:AXPopoverArrowDirectionTop]; 23 | [[AXPopoverView appearance] setTitleTextColor:[UIColor whiteColor]]; 24 | [[AXPopoverView appearance] setDetailTextColor:[UIColor whiteColor]]; 25 | [[AXPopoverView appearance] setArrowConstant:6]; 26 | [[AXPopoverView appearance] setTranslucentStyle:AXPopoverTranslucentDefault]; 27 | [[AXPopoverView appearance] setItemTintColor:[[UIColor blackColor] colorWithAlphaComponent:0.8]]; 28 | // [[AXPopoverView appearance] setAnimator:[AXPopoverView popFlipSpringAnimator]]; 29 | // [[AXPopoverView appearance] setAnimator:[AXPopoverView turnFlipAnimator]]; 30 | [[AXPopoverView appearance] setAnimator:[AXPopoverView flipSpringAnimator]]; 31 | // [[AXPopoverView appearance] setAnimator:[AXPopoverViewAnimator animatorWithShowing:[AXPopoverView flipSpringAnimator].showing hiding:NULL]]; 32 | [[AXPopoverView appearance] setPreferredArrowDirection:AXPopoverArrowDirectionTop]; 33 | if (!_window) { 34 | _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 35 | } 36 | [_window makeKeyAndVisible]; 37 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:_window.bounds]; 38 | imageView.contentMode = UIViewContentModeScaleAspectFill; 39 | imageView.image = [UIImage imageNamed:@"test.jpg"]; 40 | [_window addSubview:imageView]; 41 | [_window insertSubview:imageView atIndex:0]; 42 | return YES; 43 | } 44 | 45 | - (void)applicationWillResignActive:(UIApplication *)application { 46 | // 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. 47 | // 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. 48 | } 49 | 50 | - (void)applicationDidEnterBackground:(UIApplication *)application { 51 | // 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. 52 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 53 | } 54 | 55 | - (void)applicationWillEnterForeground:(UIApplication *)application { 56 | // 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. 57 | } 58 | 59 | - (void)applicationDidBecomeActive:(UIApplication *)application { 60 | // 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. 61 | } 62 | 63 | - (void)applicationWillTerminate:(UIApplication *)application { 64 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /AXPopoverView/Assets.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 | } -------------------------------------------------------------------------------- /AXPopoverView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AXPopoverView/Assets.xcassets/share.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "more_icon_share@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "more_icon_share@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | }, 22 | "properties" : { 23 | "template-rendering-intent" : "original" 24 | } 25 | } -------------------------------------------------------------------------------- /AXPopoverView/Assets.xcassets/share.imageset/more_icon_share@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/Assets.xcassets/share.imageset/more_icon_share@2x.png -------------------------------------------------------------------------------- /AXPopoverView/Assets.xcassets/share.imageset/more_icon_share@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/Assets.xcassets/share.imageset/more_icon_share@3x.png -------------------------------------------------------------------------------- /AXPopoverView/Base.lproj/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 | -------------------------------------------------------------------------------- /AXPopoverView/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 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /AXPopoverView/ScrollViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ScrollViewController.h 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/11/25. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ScrollViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AXPopoverView/ScrollViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ScrollViewController.m 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/11/25. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import "ScrollViewController.h" 10 | #import "AXPopoverKit.h" 11 | 12 | @interface ScrollViewController () 13 | @property(weak, nonatomic) IBOutlet UIView *showsView; 14 | @property(weak, nonatomic) IBOutlet UIScrollView *scrollView; 15 | @property(strong, nonatomic) AXPopoverView *popoverView; 16 | @end 17 | 18 | @implementation ScrollViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | _scrollView.contentInset = UIEdgeInsetsMake(64, 20, 64, 20); 24 | } 25 | 26 | - (void)didReceiveMemoryWarning { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | - (void)viewWillDisappear:(BOOL)animated { 32 | [super viewWillDisappear:animated]; 33 | [AXPopoverView hideVisiblePopoverViewsAnimated:NO fromView:self.scrollView]; 34 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(showPopoverView) object:nil]; 35 | } 36 | 37 | - (void)viewDidAppear:(BOOL)animated { 38 | [super viewDidAppear:animated]; 39 | [self performSelector:@selector(showPopoverView) withObject:nil afterDelay:1.0]; 40 | } 41 | 42 | - (IBAction)registering:(UISwitch *)sender { 43 | if (sender.isOn) { 44 | [_popoverView registerScrollView:_scrollView]; 45 | } else { 46 | [_popoverView unregisterScrollView]; 47 | } 48 | } 49 | 50 | #pragma mark - Shows 51 | - (void)showPopoverView { 52 | _popoverView = [AXPopoverView showLabelFromView:_showsView inView:self.scrollView animated:YES duration:CGFLOAT_MAX title:@"法国" detail:@"法国警方抓获巴黎血案isis恐怖袭击嫌犯的场面,十分惊险的!上面2架直升机,下面二三十部車" configuration:^(AXPopoverView *popoverView) { 53 | popoverView.preferredWidth = 200; 54 | popoverView.hideOnTouch = NO; 55 | // [popoverView registerScrollView:_scrollView]; 56 | }]; 57 | } 58 | @end 59 | -------------------------------------------------------------------------------- /AXPopoverView/TableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.h 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/11/25. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AXPopoverView/TableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.m 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/11/25. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import "TableViewController.h" 10 | #import "AXPopoverKit.h" 11 | 12 | @interface TableViewController () 13 | 14 | @end 15 | 16 | @implementation TableViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | 21 | // Uncomment the following line to preserve selection between presentations. 22 | // self.clearsSelectionOnViewWillAppear = NO; 23 | 24 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller. 25 | // self.navigationItem.rightBarButtonItem = self.editButtonItem; 26 | 27 | } 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | #pragma mark - Table view delegate 35 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 36 | { 37 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 38 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; 39 | [AXPopoverView showLabelFromView:cell.detailTextLabel inView:self.tableView animated:YES duration:2.5 title:@"法国" detail:@"法国警方抓获巴黎血案isis恐怖袭击嫌犯的场面,十分惊险的!上面2架直升机,下面二三十部車" configuration:^(AXPopoverView *popoverView) { 40 | popoverView.preferredWidth = 200; 41 | // [popoverView registerScrollView:tableView]; 42 | popoverView.hideOnTouch = NO; 43 | popoverView.translucent = YES; 44 | switch (indexPath.row) { 45 | case 0:// 上边显示 46 | popoverView.preferredArrowDirection = AXPopoverArrowDirectionBottom; 47 | break; 48 | case 1:// 下边显示 49 | popoverView.preferredArrowDirection = AXPopoverArrowDirectionTop; 50 | break; 51 | case 2:// 左边显示 52 | popoverView.preferredArrowDirection = AXPopoverArrowDirectionRight; 53 | break; 54 | case 3:// 右边显示 55 | popoverView.preferredArrowDirection = AXPopoverArrowDirectionLeft; 56 | break; 57 | default:// 任意方向显示 58 | popoverView.preferredArrowDirection = AXPopoverArrowDirectionAny; 59 | break; 60 | } 61 | }]; 62 | } 63 | @end 64 | -------------------------------------------------------------------------------- /AXPopoverView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AXComponents 4 | // 5 | // Created by ai on 15/11/17. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AXPopoverView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AXPopoverView 4 | // 5 | // Created by ai on 15/11/17. 6 | // Copyright © 2015年 AiXing. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AXPopoverView/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devedbox/AXPopoverView/22e7f7f23d82c08dc9af841a385d28609cdf8c62/AXPopoverView/test.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 xing Ai 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '7.0' 2 | 3 | inhibit_all_warnings! 4 | 5 | target 'AXPopoverView' do 6 | pod 'AGGeometryKit+POP' 7 | pod 'AXAttributedLabel' 8 | end -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AGGeometryKit (1.2.4): 3 | - AGGeometryKit/CALayerProperties (= 1.2.4) 4 | - AGGeometryKit/UIViewProperties (= 1.2.4) 5 | - AGGeometryKit+POP (0.1): 6 | - AGGeometryKit+POP/Default (= 0.1) 7 | - AGGeometryKit+POP/Default (0.1): 8 | - AGGeometryKit (~> 1.0) 9 | - pop (~> 1.0.4) 10 | - AGGeometryKit/CALayerProperties (1.2.4) 11 | - AGGeometryKit/UIViewProperties (1.2.4) 12 | - AXAttributedLabel (0.2.9) 13 | - pop (1.0.9) 14 | 15 | DEPENDENCIES: 16 | - AGGeometryKit+POP 17 | - AXAttributedLabel 18 | 19 | SPEC CHECKSUMS: 20 | AGGeometryKit: 2c2c39c9f99eb7a966f0aa16b2a97027dacc4761 21 | AGGeometryKit+POP: 72c980191db0646c31bed0b1ffd571e05f9ad029 22 | AXAttributedLabel: 038ca8a876b3811a6e3e0471386a3592ccf68537 23 | pop: f667631a5108a2e60d9e8797c9b32ddaf2080bce 24 | 25 | PODFILE CHECKSUM: 34e9dff85e41243faab89a2451625fb4dcc7dceb 26 | 27 | COCOAPODS: 1.1.0.beta.2 28 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit+POP/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Author: Håvard Fossli 3 | 4 | Copyright (c) 2013 Agens AS (http://agens.no/) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/AGGeometryKit+POP/README.md: -------------------------------------------------------------------------------- 1 | ![AGGeometryKit](/logo.png?raw=true "AGGeometryKit") 2 | 3 | Bridging [AGGeometryKit](https://github.com/hfossli/AGGeometryKit) with [POP](https://github.com/facebook/pop) for amazing dynamics and animations. 4 | 5 | See [this interesting video](https://vimeo.com/93206523) about animation principles by Cento Lodigiani. If you like what you see and want to mimic step #1 and #5 - then this kit is here to help you. 6 | 7 | 8 | ### Installation 9 | 10 | New-school: Use the cocoa pod named `AGGeometryKit+POP`. 11 | Old-school: Grab the files found in `Source`. 12 | 13 | 14 | 15 | 16 | ## Demo 17 | 18 | [![Demo video](/video-aggeometrykit-pop.png)](https://vimeo.com/95383807) 19 | [See the video on vimeo ](https://vimeo.com/95383807) 20 | 21 | ## Interface 22 | 23 | Animate each corner independently using these new POPAnimatableProperty's. 24 | 25 | extern NSString * const kPOPLayerAGKQuadTopLeft; 26 | extern NSString * const kPOPLayerAGKQuadTopLeftX; 27 | extern NSString * const kPOPLayerAGKQuadTopLeftY; 28 | 29 | extern NSString * const kPOPLayerAGKQuadTopRight; 30 | extern NSString * const kPOPLayerAGKQuadTopRightX; 31 | extern NSString * const kPOPLayerAGKQuadTopRightY; 32 | 33 | extern NSString * const kPOPLayerAGKQuadBottomLeft; 34 | extern NSString * const kPOPLayerAGKQuadBottomLeftX; 35 | extern NSString * const kPOPLayerAGKQuadBottomLeftY; 36 | 37 | extern NSString * const kPOPLayerAGKQuadBottomRight; 38 | extern NSString * const kPOPLayerAGKQuadBottomRightX; 39 | extern NSString * const kPOPLayerAGKQuadBottomRightY; 40 | 41 | @interface POPAnimatableProperty (AGK_POP) 42 | 43 | + (instancetype)AGKPropertyWithName:(NSString *)aName; 44 | 45 | @end 46 | 47 | 48 | 49 | 50 | ## Keywords 51 | 52 | Convex quadrilateral, simple quadrilateral, tangential, kite, rhombus, square, trapezium, trapezoid, parallelogram, bicentric, cyclic, POP, facebook, animation, dynamics, simulation 53 | 54 | 55 | 56 | 57 | ## Who's behind this? 58 | 59 | Agens.no a company situated in Oslo, Norway with some help from some very clever stackoverflow.com guys. 60 | 61 | 62 | [![Agens | Digital craftsmanship](http://static.agens.no/images/agens_logo_w_slogan_avenir_small.png)](http://agens.no/) 63 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit+POP/Source/POPAnimatableProperty+AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | extern NSString * const kPOPLayerAGKQuadTopLeft; 27 | extern NSString * const kPOPLayerAGKQuadTopLeftX; 28 | extern NSString * const kPOPLayerAGKQuadTopLeftY; 29 | 30 | extern NSString * const kPOPLayerAGKQuadTopRight; 31 | extern NSString * const kPOPLayerAGKQuadTopRightX; 32 | extern NSString * const kPOPLayerAGKQuadTopRightY; 33 | 34 | extern NSString * const kPOPLayerAGKQuadBottomLeft; 35 | extern NSString * const kPOPLayerAGKQuadBottomLeftX; 36 | extern NSString * const kPOPLayerAGKQuadBottomLeftY; 37 | 38 | extern NSString * const kPOPLayerAGKQuadBottomRight; 39 | extern NSString * const kPOPLayerAGKQuadBottomRightX; 40 | extern NSString * const kPOPLayerAGKQuadBottomRightY; 41 | 42 | @interface POPAnimatableProperty (AGK_POP) 43 | 44 | + (instancetype)AGKPropertyWithName:(NSString *)aName; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | // Agens Geometry Kit (AGK) 25 | 26 | #import "AGKBitOperations.h" 27 | #import "AGKCorner.h" 28 | #import "AGKLine.h" 29 | #import "AGKMath.h" 30 | #import "AGKQuad.h" 31 | #import "AGKVector3D.h" 32 | 33 | #import "AGGeometryKitCategories.h" 34 | #import "AGGeometryKitClasses.h" 35 | #import "AGGeometryKitCoreGraphics.h" 36 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGKBaseDefines.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #ifndef AGKBaseDefines 26 | #define AGKBaseDefines 27 | 28 | // The C++ compiler mangles C function names. extern "C" { /* your C functions */ } prevents this. 29 | // You should wrap all C function prototypes declared in headers with ASDISPLAYNODE_EXTERN_C_BEGIN/END, even if 30 | // they are included only from .m (Objective-C) files. It's common for .m files to start using C++ 31 | // features and become .mm (Objective-C++) files. Always wrapping the prototypes with 32 | // AGK_EXTERN_C_BEGIN/END will save someone a headache once they need to do this. You do not need to 33 | // wrap constants, only C functions. See StackOverflow for more details: 34 | // http://stackoverflow.com/questions/1041866/in-c-source-what-is-the-effect-of-extern-c 35 | #ifdef __cplusplus 36 | # define AGK_EXTERN_C_BEGIN extern "C" { 37 | # define AGK_EXTERN_C_END } 38 | #else 39 | # define AGK_EXTERN_C_BEGIN 40 | # define AGK_EXTERN_C_END 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGKBitOperations.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | // For general purpose 25 | 26 | #ifndef AGK_BIT_ENABLE 27 | # define AGK_BIT_ENABLE(x, b) ((x) |= (b)) 28 | #endif 29 | 30 | #ifndef AGK_BIT_CLEAR 31 | # define AGK_BIT_CLEAR(x, b) ((x) &= ~(b)) 32 | #endif 33 | 34 | #ifndef AGK_BIT_TEST_ENABLED 35 | # define AGK_BIT_TEST_ENABLED(x, b) (((x) & (b)) != 0) 36 | #endif 37 | 38 | #ifndef AGK_BIT_TEST_DISABLED 39 | # define AGK_BIT_TEST_DISABLED(x, b) (((x) & (b)) == 0) 40 | #endif 41 | 42 | #ifndef AGK_BIT_TEST_ALL_ENABLED 43 | # define AGK_BIT_TEST_ALL_ENABLED(x, b) ({\ 44 | __typeof__(b) __b = (b);\ 45 | ((x) & __b) == __b;\ 46 | }) 47 | #endif 48 | 49 | // For NS_OPTION 50 | 51 | #ifndef NS_OPTION_ENABLE 52 | # define NS_OPTION_ENABLE(x, b) ((x) |= (b)) 53 | #endif 54 | 55 | #ifndef NS_OPTION_CLEAR 56 | # define NS_OPTION_CLEAR(x, b) ((x) &= ~(b)) 57 | #endif 58 | 59 | #ifndef NS_OPTION_ENABLED 60 | # define NS_OPTION_ENABLED(x, b) (((x) & (b)) != 0) 61 | #endif 62 | 63 | #ifndef NS_OPTION_DISABLED 64 | # define NS_OPTION_DISABLED(x, b) (((x) & (b)) == 0) 65 | #endif 66 | 67 | #ifndef NS_OPTION_ALL_ENABLED 68 | # define NS_OPTION_ALL_ENABLED(x, b) ({\ 69 | __typeof__(b) __b = (b);\ 70 | ((x) & __b) == __b;\ 71 | }) 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGKCorner.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import 26 | #import 27 | 28 | #import "AGKBaseDefines.h" 29 | 30 | AGK_EXTERN_C_BEGIN 31 | 32 | typedef enum AGKSide { 33 | AGKSideTop = 1 << 0, 34 | AGKSideBottom = 1 << 1, 35 | AGKSideLeft = 1 << 2, 36 | AGKSideRight = 1 << 3, 37 | } AGKSide; 38 | 39 | typedef enum { 40 | AGKCornerTopLeft = AGKSideTop | AGKSideLeft, 41 | AGKCornerTopRight = AGKSideTop | AGKSideRight, 42 | AGKCornerBottomLeft = AGKSideBottom | AGKSideLeft, 43 | AGKCornerBottomRight = AGKSideBottom | AGKSideRight, 44 | } AGKCorner; 45 | 46 | BOOL AGKCornerIsOnSide(AGKCorner corner, AGKSide side); 47 | CGPoint AGKCornerConvertToAnchorPoint(AGKCorner corner); 48 | CGPoint AGKCornerConvertToPointForRect(AGKCorner corner, CGRect rect); 49 | 50 | AGK_EXTERN_C_END -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGKCorner.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "AGKCorner.h" 25 | #import "CGGeometry+AGGeometryKit.h" 26 | 27 | BOOL AGKCornerIsOnSide(AGKCorner corner, AGKSide side) 28 | { 29 | return (corner & side) == side; 30 | } 31 | 32 | CGPoint AGKCornerConvertToAnchorPoint(AGKCorner corner) 33 | { 34 | switch (corner) { 35 | case AGKCornerTopLeft: 36 | return CGPointMake(0, 0); 37 | break; 38 | case AGKCornerTopRight: 39 | return CGPointMake(1, 0); 40 | break; 41 | case AGKCornerBottomLeft: 42 | return CGPointMake(0, 1); 43 | break; 44 | case AGKCornerBottomRight: 45 | return CGPointMake(1, 1); 46 | break; 47 | } 48 | } 49 | 50 | CGPoint AGKCornerConvertToPointForRect(AGKCorner corner, CGRect rect) 51 | { 52 | CGPoint anchor = AGKCornerConvertToAnchorPoint(corner); 53 | CGPoint p = CGPointConvertFromAnchorPoint_AGK(anchor, rect); 54 | return p; 55 | } 56 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGKLine.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import 26 | #import 27 | 28 | #import "AGKBaseDefines.h" 29 | 30 | AGK_EXTERN_C_BEGIN 31 | 32 | typedef struct AGKLine { 33 | CGPoint start, end; 34 | } AGKLine; 35 | 36 | extern const AGKLine AGKLineZero; 37 | AGKLine AGKLineMake(CGPoint start, CGPoint end); 38 | double AGKLineLength(AGKLine l); 39 | BOOL AGKLineIntersection(AGKLine l1, AGKLine l2, CGPoint *out_pointOfIntersection); 40 | 41 | AGK_EXTERN_C_END -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGKLine.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "AGKLine.h" 25 | #import "CGGeometry+AGGeometryKit.h" 26 | 27 | const AGKLine AGKLineZero = (AGKLine){(CGPoint){0.0, 0.0}, (CGPoint){0.0, 0.0}}; 28 | 29 | AGKLine AGKLineMake(CGPoint start, CGPoint end) 30 | { 31 | return (AGKLine){start, end}; 32 | } 33 | 34 | double AGKLineLength(AGKLine l) 35 | { 36 | return CGPointLengthBetween_AGK(l.start, l.end); 37 | } 38 | 39 | BOOL AGKLineIntersection(AGKLine l1, AGKLine l2, CGPoint *out_pointOfIntersection) 40 | { 41 | // http://stackoverflow.com/a/565282/202451 42 | 43 | CGPoint p = l1.start; 44 | CGPoint q = l2.start; 45 | CGPoint r = CGPointSubtract_AGK(l1.end, l1.start); 46 | CGPoint s = CGPointSubtract_AGK(l2.end, l2.start); 47 | 48 | double s_r_crossProduct = CGPointCrossProductZComponent_AGK(r, s); 49 | double t = CGPointCrossProductZComponent_AGK(CGPointSubtract_AGK(q, p), s) / s_r_crossProduct; 50 | double u = CGPointCrossProductZComponent_AGK(CGPointSubtract_AGK(q, p), r) / s_r_crossProduct; 51 | 52 | if(t < 0 || t > 1.0 || u < 0 || u > 1.0) 53 | { 54 | if(out_pointOfIntersection != NULL) 55 | { 56 | *out_pointOfIntersection = CGPointZero; 57 | } 58 | return NO; 59 | } 60 | else 61 | { 62 | if(out_pointOfIntersection != NULL) 63 | { 64 | CGPoint i = CGPointAdd_AGK(p, CGPointMultiply_AGK(r, t)); 65 | *out_pointOfIntersection = i; 66 | } 67 | return YES; 68 | } 69 | } -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/AGKVector3D.h: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Håvard Fossli 4 | // Marcus Eckert 5 | // 6 | // Copyright (c) 2013 Agens AS (http://agens.no/) 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 | #import 27 | #import 28 | #import "GLKit/GLKVector3.h" 29 | #import "AGKBaseDefines.h" 30 | 31 | AGK_EXTERN_C_BEGIN 32 | 33 | struct AGKVector3D { 34 | CGFloat x; 35 | CGFloat y; 36 | CGFloat z; 37 | }; 38 | typedef struct AGKVector3D AGKVector3D; 39 | 40 | extern const AGKVector3D AGKVector3DZero; 41 | 42 | AGKVector3D AGKVector3DMake(CGFloat x, CGFloat y, CGFloat z); 43 | AGKVector3D AGKVector3DWithGLKVector3(GLKVector3); 44 | CGFloat AGKVector3DGetLength(AGKVector3D v); 45 | AGKVector3D AGKVector3DAdd(AGKVector3D v1, AGKVector3D v2); 46 | AGKVector3D AGKVector3DSubtract(AGKVector3D v1, AGKVector3D v2); 47 | AGKVector3D AGKVector3DNegate(AGKVector3D v); 48 | AGKVector3D AGKVector3DNormalize(AGKVector3D v); 49 | CGFloat AGKVector3DDotProduct(AGKVector3D v1, AGKVector3D v2); 50 | AGKVector3D AGKVector3DCrossProduct(AGKVector3D v1, AGKVector3D v2); 51 | AGKVector3D AGKVector3DGetTriangleNormal(AGKVector3D v1, AGKVector3D v2, AGKVector3D v3); 52 | AGKVector3D AGKVector3DPositionFromTransform(CATransform3D m); 53 | AGKVector3D AGKVector3DApplyTransform(AGKVector3D vector, CATransform3D m); 54 | AGKVector3D AGKVector3DApplyTransformWithNoTranslate(AGKVector3D vector, CATransform3D m); 55 | 56 | AGK_EXTERN_C_END 57 | 58 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/AGGeometryKitCategories.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "AGKMatrix+AGKVector3D.h" 25 | #import "AGKMatrix+CATransform3D.h" 26 | #import "AGKMatrix+GLKit.h" 27 | #import "CALayer+AGKQuad.h" 28 | #import "CALayer+AGK+Properties.h" 29 | #import "CALayer+AGK+Methods.h" 30 | #import "NSValue+AGKQuad.h" 31 | #import "UIBezierPath+AGKQuad.h" 32 | #import "UIImage+AGKQuad.h" 33 | #import "UIImage+AGK+CATransform3D.h" 34 | #import "UIView+AGK+AngleConverter.h" 35 | #import "UIView+AGK+Properties.h" 36 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+AGKVector3D.h: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Logan Holmes @snown 4 | // 5 | // Copyright (c) 2013 Agens AS (http://agens.no/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "AGKMatrix.h" 26 | #import "AGKVector3D.h" 27 | 28 | @interface AGKMatrix (AGKVector3D) 29 | 30 | /** 31 | * Creates and returns a 1x3 matrix containing the members and from the given 32 | * vector. 33 | * 34 | * @param vector The vector with which to initialize the matrix's members. 35 | * 36 | * @return A new matrix containing the values found in `vector` 37 | */ 38 | + (instancetype)matrixWithVector3D:(AGKVector3D)vector; 39 | 40 | /** 41 | * Returns a matrix multiplied by the given 3D vector. 42 | * 43 | * @param vector The vector to multiply against. 44 | * 45 | * @return A 1x3 matrix resulting from multiplying the receiver with the 46 | * specified vector. 47 | */ 48 | - (AGKMatrix *)matrixByMultiplyingWithVector3D:(AGKVector3D)vector; 49 | 50 | - (AGKVector3D)agkVector3DValue; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+AGKVector3D.m: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Logan Holmes @snown 4 | // 5 | // Copyright (c) 2013 Agens AS (http://agens.no/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "AGKMatrix+AGKVector3D.h" 26 | 27 | @implementation AGKMatrix (AGKVector3D) 28 | 29 | + (instancetype)matrixWithVector3D:(AGKVector3D)vector 30 | { 31 | return [(AGKMatrix *)[self alloc] initWithColumns:1 rows:3 members:@[@(vector.x), @(vector.y), @(vector.z)]]; 32 | } 33 | 34 | - (AGKMatrix *)matrixByMultiplyingWithVector3D:(AGKVector3D)vector 35 | { 36 | if (self.columnCount != 3) 37 | { 38 | return nil; 39 | } 40 | 41 | AGKMatrix *vectorMatrix = [[AGKMatrix alloc] initWithColumns:1 rows:3 members:@[@(vector.x), @(vector.y), @(vector.z)]]; 42 | return [self matrixByMultiplyingWithMatrix:vectorMatrix]; 43 | } 44 | 45 | - (AGKVector3D)agkVector3DValue 46 | { 47 | return AGKVector3DMake([self[0] doubleValue], [self[1] doubleValue], [self[2] doubleValue]); 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+CATransform3D.h: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Logan Holmes @snown 4 | // 5 | // Copyright (c) 2013 Agens AS (http://agens.no/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | #import 27 | #import 28 | 29 | #import "AGKMatrix.h" 30 | 31 | @interface AGKMatrix (CATransform3D) 32 | 33 | + (instancetype)matrixWithCATransform3D:(CATransform3D)transform; 34 | 35 | - (CATransform3D)caTransform3DValue; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+GLKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Logan Holmes @snown 4 | // 5 | // Copyright (c) 2013 Agens AS (http://agens.no/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "AGKMatrix.h" 26 | #import 27 | 28 | @interface AGKMatrix (GLKit) 29 | 30 | + (instancetype)matrixWithGLKMatrix2:(GLKMatrix2)glkMatrix; 31 | + (instancetype)matrixWithGLKMatrix3:(GLKMatrix3)glkMatrix; 32 | + (instancetype)matrixWithGLKMatrix4:(GLKMatrix4)glkMatrix; 33 | 34 | - (GLKMatrix2)glkMatrix2Value; 35 | - (GLKMatrix3)glkMatrix3Value; 36 | - (GLKMatrix4)glkMatrix4Value; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+GLKit.m: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Logan Holmes @snown 4 | // 5 | // Copyright (c) 2013 Agens AS (http://agens.no/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "AGKMatrix+GLKit.h" 26 | 27 | @implementation AGKMatrix (GLKit) 28 | 29 | + (instancetype)matrixWithGLKMatrix2:(GLKMatrix2)glkMatrix 30 | { 31 | AGKMatrix *myself = [(AGKMatrix *)[self alloc] initWithColumns:2 rows:2 members:nil]; 32 | for (NSUInteger memberIndex = 0; memberIndex < (2 * 2); memberIndex++) 33 | { 34 | myself[memberIndex] = @(glkMatrix.m[memberIndex]); 35 | } 36 | 37 | return myself; 38 | } 39 | 40 | + (instancetype)matrixWithGLKMatrix3:(GLKMatrix3)glkMatrix 41 | { 42 | AGKMatrix *myself = [(AGKMatrix *)[self alloc] initWithColumns:3 rows:3 members:nil]; 43 | for (NSUInteger memberIndex = 0; memberIndex < (3 * 3); memberIndex++) 44 | { 45 | myself[memberIndex] = @(glkMatrix.m[memberIndex]); 46 | } 47 | 48 | return myself; 49 | } 50 | 51 | + (instancetype)matrixWithGLKMatrix4:(GLKMatrix4)glkMatrix 52 | { 53 | AGKMatrix *myself = [(AGKMatrix *)[self alloc] initWithColumns:4 rows:4 members:nil]; 54 | for (NSUInteger memberIndex = 0; memberIndex < (4 * 4); memberIndex++) 55 | { 56 | myself[memberIndex] = @(glkMatrix.m[memberIndex]); 57 | } 58 | 59 | return myself; 60 | } 61 | 62 | - (GLKMatrix2)glkMatrix2Value 63 | { 64 | GLKMatrix2 glkMatrix; 65 | 66 | for (NSUInteger absoluteIndex = 0; absoluteIndex < (2 * 2); absoluteIndex++) 67 | { 68 | double mValue; 69 | if (absoluteIndex < self.count) 70 | { 71 | mValue = [self[absoluteIndex] floatValue]; 72 | } 73 | else 74 | { 75 | mValue = [self.defaultMember floatValue]; 76 | } 77 | 78 | glkMatrix.m[absoluteIndex] = mValue; 79 | } 80 | 81 | return glkMatrix; 82 | } 83 | 84 | - (GLKMatrix3)glkMatrix3Value 85 | { 86 | GLKMatrix3 glkMatrix; 87 | 88 | for (NSUInteger absoluteIndex = 0; absoluteIndex < (3 * 3); absoluteIndex++) 89 | { 90 | double mValue; 91 | if (absoluteIndex < self.count) 92 | { 93 | mValue = [self[absoluteIndex] floatValue]; 94 | } 95 | else 96 | { 97 | mValue = [self.defaultMember floatValue]; 98 | } 99 | 100 | glkMatrix.m[absoluteIndex] = mValue; 101 | } 102 | 103 | return glkMatrix; 104 | } 105 | 106 | - (GLKMatrix4)glkMatrix4Value 107 | { 108 | GLKMatrix4 glkMatrix; 109 | 110 | for (NSUInteger absoluteIndex = 0; absoluteIndex < (4 * 4); absoluteIndex++) 111 | { 112 | double mValue; 113 | if (absoluteIndex < self.count) 114 | { 115 | mValue = [self[absoluteIndex] floatValue]; 116 | } 117 | else 118 | { 119 | mValue = [self.defaultMember floatValue]; 120 | } 121 | 122 | glkMatrix.m[absoluteIndex] = mValue; 123 | } 124 | 125 | return glkMatrix; 126 | } 127 | 128 | @end 129 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/CALayer+AGK+Methods.h: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Håvard Fossli 4 | // Marcus Eckert 5 | // 6 | // Copyright (c) 2013 Agens AS (http://agens.no/) 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 | #import 27 | 28 | @interface CALayer (AGK_Methods) 29 | 30 | - (void)setNullAsActionForKeys:(NSArray *)keys; 31 | - (void)removeAllSublayers; 32 | - (void)ensureAnchorPointIsSetToZero; 33 | - (void)ensureAnchorPointIs:(CGPoint)point; 34 | 35 | - (CATransform3D)transformToOffsetRotationWithVirtualAnchorPoint:(CGPoint)virtualAnchor; 36 | - (void)applyTransformToOffsetRotationWithVirtualAnchorPoint:(CGPoint)virtualAnchor; 37 | - (CGPoint)offsetForXRotation:(CGFloat)angle virtualAnchorPoint:(CGPoint)virtualAnchor; 38 | - (CGPoint)offsetForYRotation:(CGFloat)angle virtualAnchorPoint:(CGPoint)virtualAnchor; 39 | 40 | @end 41 | 42 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/CALayer+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Håvard Fossli 4 | // Marcus Eckert 5 | // 6 | // Copyright (c) 2013 Agens AS (http://agens.no/) 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 | #import 27 | 28 | @interface CALayer (AGK_Properties) 29 | 30 | @property (nonatomic, assign) CGSize frameSize; 31 | @property (nonatomic, readonly) CGSize frameSizeHalf; 32 | @property (nonatomic, readonly) CGFloat frameWidthHalf; 33 | @property (nonatomic, readonly) CGFloat frameHeightHalf; 34 | 35 | @property (nonatomic, assign) CGPoint frameOrigin; 36 | @property (nonatomic, assign) CGFloat frameMinX; 37 | @property (nonatomic, assign) CGFloat frameMinY; 38 | @property (nonatomic, assign) CGFloat frameMidX; 39 | @property (nonatomic, assign) CGFloat frameMidY; 40 | @property (nonatomic, assign) CGFloat frameMaxX; 41 | @property (nonatomic, assign) CGFloat frameMaxY; 42 | @property (nonatomic, assign) CGFloat frameWidth; 43 | @property (nonatomic, assign) CGFloat frameHeight; 44 | 45 | @property (nonatomic, readonly) CGRect frameAsIfNoTransformIsApplied; 46 | 47 | @property (nonatomic, assign) CGPoint boundsOrigin; 48 | @property (nonatomic, assign) CGSize boundsSize; 49 | @property (nonatomic, assign) CGFloat boundsWidth; 50 | @property (nonatomic, assign) CGFloat boundsHeight; 51 | 52 | @property (nonatomic, readonly) CGPoint boundsCenter; 53 | @property (nonatomic, readonly) CGSize boundsSizeHalf; 54 | @property (nonatomic, readonly) CGFloat boundsWidthHalf; 55 | @property (nonatomic, readonly) CGFloat boundsHeightHalf; 56 | 57 | @property (nonatomic, assign) CGFloat positionX; 58 | @property (nonatomic, assign) CGFloat positionY; 59 | 60 | @property (nonatomic, assign) CGFloat anchorPointX; 61 | @property (nonatomic, assign) CGFloat anchorPointY; 62 | 63 | @end 64 | 65 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/CALayer+AGKQuad.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import "AGKQuad.h" 26 | 27 | @interface CALayer (AGKQuad) 28 | 29 | /** 30 | * @property AGKQuad quadrilateral 31 | * Updating this property will update property 'transform' unless it is set to AGKQuadZero 32 | * @abstract 33 | * If transform is set to CATransform3DIdentity the quad returned will be similar to frame. 34 | * @discussion 35 | * It is only possible to make convex transforms with quadrilaterals. 36 | * So make sure your quadrilateral is convex by using `AGKQuadIsValid` 37 | * http://upload.wikimedia.org/wikipedia/commons/f/f1/Quadrilateral_hierarchy.png 38 | */ 39 | @property (nonatomic, assign) AGKQuad quadrilateral; 40 | 41 | - (AGKQuad)convertAGKQuad:(AGKQuad)quad fromLayer:(CALayer *)l; 42 | - (AGKQuad)convertAGKQuad:(AGKQuad)quad toLayer:(CALayer *)l; 43 | 44 | 45 | // These animation methods are provided since you can't just interpolate 46 | // between the CATransform3D's generated by the quadrilaterals. 47 | 48 | - (void)animateFromQuadrilateral:(AGKQuad)quad1 49 | toQuadrilateral:(AGKQuad)quad2 50 | forNumberOfFrames:(NSUInteger)numberOfFrames 51 | duration:(NSTimeInterval)duration 52 | delay:(NSTimeInterval)delay 53 | animKey:(NSString *)animKey 54 | easeFunction:(double(^)(double p))progressFunction 55 | onComplete:(void(^)(BOOL finished))onComplete; 56 | 57 | - (void)animateFromPresentedStateToQuadrilateral:(AGKQuad)quad 58 | forNumberOfFrames:(NSUInteger)numberOfFrames 59 | duration:(NSTimeInterval)duration 60 | delay:(NSTimeInterval)delay 61 | animKey:(NSString *)animKey 62 | easeFunction:(double(^)(double p))progressFunction 63 | onComplete:(void(^)(BOOL finished))onComplete; 64 | 65 | @end -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/NSValue+AGKQuad.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import "AGKQuad.h" 26 | 27 | @interface NSValue (AGKQuad) 28 | 29 | + (NSValue *)valueWithAGKQuad:(AGKQuad)q; 30 | - (AGKQuad)AGKQuadValue; 31 | 32 | @end 33 | 34 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/NSValue+AGKQuad.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "NSValue+AGKQuad.h" 25 | 26 | @implementation NSValue (AGKQuad) 27 | 28 | + (NSValue *)valueWithAGKQuad:(AGKQuad)q 29 | { 30 | CGFloat values[8]; 31 | for(int i = 0; i < 4; i++) 32 | { 33 | CGPoint p = AGKQuadGet(q, i); 34 | values[(i*2)] = p.x; 35 | values[(i*2)+1] = p.y; 36 | } 37 | NSValue *value = [NSValue value:&q withObjCType:@encode(CGFloat[8])]; 38 | return value; 39 | } 40 | 41 | - (AGKQuad)AGKQuadValue 42 | { 43 | CGPoint points[4]; 44 | CGFloat values[8]; 45 | [self getValue:values]; 46 | for(int i = 0; i < 4; i++) 47 | { 48 | CGPoint p = CGPointMake(values[(i*2)], values[(i*2)+1]); 49 | points[i] = p; 50 | } 51 | return AGKQuadMakeWithPoints(points); 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIBezierPath+AGKQuad.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import "AGKQuad.h" 26 | 27 | @interface UIBezierPath (AGKQuad) 28 | 29 | + (UIBezierPath *)bezierPathWithAGKQuad:(AGKQuad)q; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIBezierPath+AGKQuad.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "UIBezierPath+AGKQuad.h" 25 | 26 | @implementation UIBezierPath (AGKQuad) 27 | 28 | + (UIBezierPath *)bezierPathWithAGKQuad:(AGKQuad)q 29 | { 30 | UIBezierPath *path = [UIBezierPath bezierPath]; 31 | [path moveToPoint:AGKQuadGet(q, 0)]; 32 | 33 | for (int i = 1; i < 4; i++) 34 | { 35 | [path addLineToPoint:AGKQuadGet(q, i)]; 36 | } 37 | 38 | [path closePath]; 39 | 40 | return path; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIImage+AGK+CATransform3D.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | @interface UIImage (CATransform3D) 27 | 28 | - (UIImage *)imageWithTransform:(CATransform3D)transform anchorPoint:(CGPoint)anchorPoint; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIImage+AGK+CATransform3D.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "UIImage+AGK+CATransform3D.h" 26 | #import "CGImageRef+AGK+CATransform3D.h" 27 | 28 | @implementation UIImage (CATransform3D) 29 | 30 | - (UIImage *)imageWithTransform:(CATransform3D)transform anchorPoint:(CGPoint)anchorPoint 31 | { 32 | CGImageRef imageRef = CGImageDrawWithCATransform3D_AGK(self.CGImage, transform, anchorPoint, self.size, self.scale); 33 | UIImage* image = [UIImage imageWithCGImage:imageRef]; 34 | CGImageRelease(imageRef); 35 | return image; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIImage+AGKQuad.h: -------------------------------------------------------------------------------- 1 | // 2 | // Authors: 3 | // Håvard Fossli 4 | // Logan Holmes @snown 5 | // 6 | // Copyright (c) 2013 Agens AS (http://agens.no/) 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 | #import 27 | #import "AGKQuad.h" 28 | #import "UIImage+AGK+CATransform3D.h" 29 | 30 | @interface UIImage (AGKQuad) 31 | 32 | - (UIImage *)imageByCroppingToQuad:(AGKQuad)quad destinationSize:(CGSize)destinationSize; 33 | - (UIImage *)imageByCroppingToRect:(CGRect)rect; 34 | - (UIImage *)imageWithPerspectiveCorrectionFromQuad:(AGKQuad)quad; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIScrollView+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Jørund Almås 3 | // 4 | // Copyright (c) 2015 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import 26 | #import 27 | 28 | @interface UIScrollView (AGGeometryKit) 29 | 30 | @property (nonatomic, assign) CGFloat contentSizeWidth; 31 | @property (nonatomic, assign) CGFloat contentSizeHeight; 32 | @property (nonatomic, assign) CGFloat contentOffsetX; 33 | @property (nonatomic, assign) CGFloat contentOffsetY; 34 | @property (nonatomic, assign) CGFloat contentInsetTop; 35 | @property (nonatomic, assign) CGFloat contentInsetLeft; 36 | @property (nonatomic, assign) CGFloat contentInsetBottom; 37 | @property (nonatomic, assign) CGFloat contentInsetRight; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIScrollView+AGK+Properties.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Jørund Almås 3 | // 4 | // Copyright (c) 2015 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "UIScrollView+AGK+Properties.h" 25 | 26 | @implementation UIScrollView (AGGeometryKit) 27 | 28 | - (CGFloat)contentSizeWidth 29 | { 30 | return self.contentSize.width; 31 | } 32 | 33 | - (void)setContentSizeWidth:(CGFloat)contentSizeWidth 34 | { 35 | CGSize size = self.contentSize; 36 | size.width = contentSizeWidth; 37 | self.contentSize = size; 38 | } 39 | 40 | - (CGFloat)contentSizeHeight 41 | { 42 | return self.contentSize.height; 43 | } 44 | 45 | - (void)setContentSizeHeight:(CGFloat)contentSizeHeight 46 | { 47 | CGSize size = self.contentSize; 48 | size.height = contentSizeHeight; 49 | self.contentSize = size; 50 | } 51 | 52 | - (CGFloat)contentOffsetX 53 | { 54 | return self.contentOffset.x; 55 | } 56 | 57 | - (void)setContentOffsetX:(CGFloat)contentOffsetX 58 | { 59 | CGPoint offset = self.contentOffset; 60 | offset.x = contentOffsetX; 61 | self.contentOffset = offset; 62 | } 63 | 64 | - (CGFloat)contentOffsetY 65 | { 66 | return self.contentOffset.y; 67 | } 68 | 69 | - (void)setContentOffsetY:(CGFloat)contentOffsetY 70 | { 71 | CGPoint offset = self.contentOffset; 72 | offset.y = contentOffsetY; 73 | self.contentOffset = offset; 74 | } 75 | 76 | - (CGFloat)contentInsetTop 77 | { 78 | return self.contentInset.top; 79 | } 80 | 81 | - (void)setContentInsetTop:(CGFloat)contentInsetTop 82 | { 83 | UIEdgeInsets inset = self.contentInset; 84 | inset.top = contentInsetTop; 85 | self.contentInset = inset; 86 | } 87 | 88 | - (CGFloat)contentInsetLeft 89 | { 90 | return self.contentInset.left; 91 | } 92 | 93 | - (void)setContentInsetLeft:(CGFloat)contentInsetLeft 94 | { 95 | UIEdgeInsets inset = self.contentInset; 96 | inset.left = contentInsetLeft; 97 | self.contentInset = inset; 98 | } 99 | 100 | - (CGFloat)contentInsetBottom 101 | { 102 | return self.contentInset.bottom; 103 | } 104 | 105 | - (void)setContentInsetBottom:(CGFloat)contentInsetBottom 106 | { 107 | UIEdgeInsets inset = self.contentInset; 108 | inset.bottom = contentInsetBottom; 109 | self.contentInset = inset; 110 | } 111 | 112 | - (CGFloat)contentInsetRight 113 | { 114 | return self.contentInset.right; 115 | } 116 | 117 | - (void)setContentInsetRight:(CGFloat)contentInsetRight 118 | { 119 | UIEdgeInsets inset = self.contentInset; 120 | inset.right = contentInsetRight; 121 | self.contentInset = inset; 122 | } 123 | 124 | @end 125 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIView+AGK+AngleConverter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Odd Magne Hågensen 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | @interface UIView (AngleConverter) 27 | 28 | - (CGFloat)convertAngle:(CGFloat)angle toView:(UIView *)view; 29 | - (CGFloat)convertAngleOfViewInRelationToView:(UIView *)view; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIView+AGK+AngleConverter.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Odd Magne Hågensen 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "UIView+AGK+AngleConverter.h" 25 | #import "CGGeometry+AGGeometryKit.h" 26 | 27 | @implementation UIView (AngleConverter) 28 | 29 | - (CGFloat)convertAngle:(CGFloat)angle toView:(UIView *)view 30 | { 31 | CGPoint p1n = CGPointMake(0, 0); 32 | CGPoint p2n = CGPointMake(0, 1000); 33 | 34 | CGPoint p1r = [self convertPoint:p1n toView:view]; 35 | CGPoint p2r = [self convertPoint:p2n toView:view]; 36 | 37 | CGPoint v1 = CGPointMake(p2n.x - p1n.x, p2n.y - p1n.y); 38 | CGPoint v2 = CGPointMake(p2r.x - p1r.x, p2r.y - p1r.y); 39 | 40 | CGPoint v1Normalized = CGPointNormalize_AGK(v1); 41 | CGPoint v2Normalized = CGPointNormalize_AGK(v2); 42 | 43 | CGFloat crossZ = CGPointCrossProductZComponent_AGK(v1Normalized, v2Normalized); 44 | CGFloat cosAngleInRelation = CGPointDotProduct_AGK(v1Normalized, v2Normalized); 45 | CGFloat angleInRelation = acosf(cosAngleInRelation) + angle; 46 | 47 | if (crossZ > 0.0f) 48 | { 49 | angleInRelation = -angleInRelation; 50 | } 51 | 52 | return angleInRelation; 53 | } 54 | 55 | - (CGFloat)convertAngleOfViewInRelationToView:(UIView *)view 56 | { 57 | return [self convertAngle:0.0 toView:view]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Categories/UIView+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | @interface UIView (AGGeometryKit) 27 | 28 | @property (nonatomic, assign) CGSize frameSize; 29 | @property (nonatomic, readonly) CGSize frameSizeHalf; 30 | @property (nonatomic, readonly) CGFloat frameWidthHalf; 31 | @property (nonatomic, readonly) CGFloat frameHeightHalf; 32 | 33 | @property (nonatomic, assign) CGPoint frameOrigin; 34 | @property (nonatomic, assign) CGFloat frameMinX; 35 | @property (nonatomic, assign) CGFloat frameMinY; 36 | @property (nonatomic, assign) CGFloat frameMidX; 37 | @property (nonatomic, assign) CGFloat frameMidY; 38 | @property (nonatomic, assign) CGFloat frameMaxX; 39 | @property (nonatomic, assign) CGFloat frameMaxY; 40 | @property (nonatomic, assign) CGFloat frameWidth; 41 | @property (nonatomic, assign) CGFloat frameHeight; 42 | 43 | @property (nonatomic, readonly) CGRect frameAsIfNoTransformIsApplied; 44 | 45 | @property (nonatomic, assign) CGPoint boundsOrigin; 46 | @property (nonatomic, assign) CGSize boundsSize; 47 | @property (nonatomic, assign) CGFloat boundsWidth; 48 | @property (nonatomic, assign) CGFloat boundsHeight; 49 | 50 | @property (nonatomic, readonly) CGPoint boundsCenter; 51 | @property (nonatomic, readonly) CGSize boundsSizeHalf; 52 | @property (nonatomic, readonly) CGFloat boundsWidthHalf; 53 | @property (nonatomic, readonly) CGFloat boundsHeightHalf; 54 | 55 | @property (nonatomic, assign) CGFloat centerX; 56 | @property (nonatomic, assign) CGFloat centerY; 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Classes/AGGeometryKitClasses.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "AGKCALayerAnimationBlockDelegate.h" 25 | #import "AGKTransformPixelMapper.h" 26 | #import "AGKMatrix.h" -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Classes/AGKCALayerAnimationBlockDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import 26 | 27 | @interface AGKCALayerAnimationBlockDelegate : NSObject 28 | 29 | @property (nonatomic, copy) void (^onStart)(); 30 | @property (nonatomic, copy) void (^onStop)(BOOL completed); 31 | @property (nonatomic, assign) BOOL autoRemoveBlocks; // defaults to YES - will clear blocks after calling onAnimationDidStop 32 | 33 | + (instancetype)newWithAnimationDidStart:(void(^)(void))onStart didStop:(void(^)(BOOL completed))onStop; 34 | + (instancetype)newWithAnimationDidStop:(void(^)(BOOL completed))onStop; 35 | 36 | @end -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Classes/AGKCALayerAnimationBlockDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "AGKCALayerAnimationBlockDelegate.h" 25 | 26 | @interface AGKCALayerAnimationBlockDelegate () 27 | @end 28 | 29 | @implementation AGKCALayerAnimationBlockDelegate 30 | 31 | + (instancetype)newWithAnimationDidStart:(void(^)(void))onStart didStop:(void(^)(BOOL completed))onStop 32 | { 33 | AGKCALayerAnimationBlockDelegate *instance = [[self alloc] init]; 34 | instance.onStart = onStart; 35 | instance.onStop = onStop; 36 | return instance; 37 | } 38 | 39 | + (instancetype)newWithAnimationDidStop:(void(^)(BOOL completed))onStop 40 | { 41 | AGKCALayerAnimationBlockDelegate *instance = [[self alloc] init]; 42 | instance.onStop = onStop; 43 | return instance; 44 | } 45 | 46 | - (id)init 47 | { 48 | self = [super init]; 49 | if(self) 50 | { 51 | _autoRemoveBlocks = YES; 52 | } 53 | return self; 54 | } 55 | 56 | - (void)animationDidStart:(CAAnimation *)anim 57 | { 58 | if(self.onStart) 59 | { 60 | self.onStart(); 61 | } 62 | if(self.autoRemoveBlocks) 63 | { 64 | self.onStart = nil; 65 | } 66 | } 67 | 68 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag 69 | { 70 | if(self.onStop) 71 | { 72 | self.onStop(flag); 73 | } 74 | if(self.autoRemoveBlocks) 75 | { 76 | self.onStop = nil; 77 | } 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/Classes/AGKTransformPixelMapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // Author: Marcos Fuentes http://stackoverflow.com/users/1637195/marcos-fuentes 4 | // 5 | // Copyright (c) 2013 Agens AS (http://agens.no/) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | #import 27 | 28 | @interface AGKTransformPixelMapper : NSObject 29 | 30 | @property (nonatomic, assign, readonly) CATransform3D transform; 31 | @property (nonatomic, assign, readonly) double denominatorX; 32 | @property (nonatomic, assign, readonly) double denominatorY; 33 | @property (nonatomic, assign, readonly) double denominatorW; 34 | 35 | - (id)initWithTransform:(CATransform3D)t anchorPoint:(CGPoint)anchorPoint; 36 | - (CGPoint)projectedPointForModelPoint:(CGPoint)point; 37 | 38 | - (void)mapBitmap:(in unsigned char *)input 39 | to:(out unsigned char *)output 40 | inSize:(CGSize)inSize 41 | outSize:(CGSize)outSize 42 | scale:(double)scale 43 | bytesPerPixel:(size_t)bytesPerPixel 44 | bytesPerRow:(size_t)bytesPerRow; 45 | 46 | - (CGImageRef)createMappedImageRefFrom:(CGImageRef)imageRef scale:(double)scale CF_RETURNS_RETAINED; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/AGGeometryKitCoreGraphics.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "CGGeometry+AGGeometryKit.h" 25 | #import "CGImageRef+AGK+CATransform3D.h" 26 | -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/CGImageRef+AGK+CATransform3D.h: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import 26 | #import 27 | 28 | #import "AGKBaseDefines.h" 29 | 30 | AGK_EXTERN_C_BEGIN 31 | 32 | CGImageRef CGImageDrawWithCATransform3D_AGK(CGImageRef imageRef, 33 | CATransform3D transform, 34 | CGPoint anchorPoint, 35 | CGSize size, 36 | CGFloat scale) CF_RETURNS_RETAINED; 37 | 38 | AGK_EXTERN_C_END -------------------------------------------------------------------------------- /Pods/AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/CGImageRef+AGK+CATransform3D.m: -------------------------------------------------------------------------------- 1 | // 2 | // Author: Håvard Fossli 3 | // 4 | // Copyright (c) 2013 Agens AS (http://agens.no/) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "CGImageRef+AGK+CATransform3D.h" 26 | #import "AGKTransformPixelMapper.h" 27 | 28 | // Refactored and improved upon this answer 29 | // http://stackoverflow.com/a/13850972/202451 30 | 31 | CGImageRef CGImageDrawWithCATransform3D_AGK(CGImageRef imageRef, 32 | CATransform3D transform, 33 | CGPoint anchorPoint, 34 | CGSize size, 35 | CGFloat scale) 36 | { 37 | CATransform3D translateDueToAnchor = CATransform3DMakeTranslation(size.width * (-anchorPoint.x), 38 | size.height * (-anchorPoint.y), 39 | 0); 40 | 41 | CATransform3D translateDueToDisposition = CATransform3DMakeTranslation(size.width * (-0.5 + anchorPoint.x), 42 | size.height * (-0.5 + anchorPoint.y), 43 | 0); 44 | 45 | transform = CATransform3DConcat(translateDueToAnchor, transform); 46 | transform = CATransform3DConcat(transform, translateDueToDisposition); 47 | 48 | AGKTransformPixelMapper *mapper = [[AGKTransformPixelMapper alloc] initWithTransform:transform anchorPoint:anchorPoint]; 49 | CGImageRef newImageRef = [mapper createMappedImageRefFrom:imageRef scale:scale]; 50 | 51 | return newImageRef; 52 | } -------------------------------------------------------------------------------- /Pods/AGGeometryKit/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Author: Håvard Fossli 3 | 4 | Copyright (c) 2013 Agens AS (http://agens.no/) 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /Pods/AXAttributedLabel/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Ed.x 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/AXAttributedLabel/README.md: -------------------------------------------------------------------------------- 1 | # AXAttributedLabel 2 | 富文本Label控件 3 | > 支持数据检测:电话号码、链接、日期、地址 4 | 5 | > 链接支持Peek、Pop预览 6 | 7 | > 可插入自定义视图,文字环绕 8 | 9 | > 可以自定义编辑菜单 10 | 11 | > 可以自定义添加链接 -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit+POP/POPAnimatableProperty+AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit+POP/Source/POPAnimatableProperty+AGGeometryKit.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGGeometryKit.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGGeometryKitCategories.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGGeometryKitCategories.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGGeometryKitClasses.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGGeometryKitClasses.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGGeometryKitCoreGraphics.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/AGGeometryKitCoreGraphics.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKBaseDefines.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKBaseDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKBitOperations.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKBitOperations.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKCALayerAnimationBlockDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGKCALayerAnimationBlockDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKCorner.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKCorner.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKLine.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKLine.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKMath.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKMath.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKMatrix+AGKVector3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+AGKVector3D.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKMatrix+CATransform3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+CATransform3D.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKMatrix+GLKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+GLKit.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKMatrix.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGKMatrix.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKTransformPixelMapper.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGKTransformPixelMapper.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/AGKVector3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKVector3D.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/CALayer+AGK+Methods.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/CALayer+AGK+Methods.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/CALayer+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/CALayer+AGK+Properties.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/CALayer+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/CALayer+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/CGGeometry+AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/CGGeometry+AGGeometryKit.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/CGImageRef+AGK+CATransform3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/CGImageRef+AGK+CATransform3D.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/NSValue+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/NSValue+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/UIBezierPath+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIBezierPath+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/UIImage+AGK+CATransform3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIImage+AGK+CATransform3D.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/UIImage+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIImage+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/UIScrollView+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIScrollView+AGK+Properties.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/UIView+AGK+AngleConverter.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIView+AGK+AngleConverter.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AGGeometryKit/UIView+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIView+AGK+Properties.h -------------------------------------------------------------------------------- /Pods/Headers/Private/AXAttributedLabel/AXAttributedLabel.h: -------------------------------------------------------------------------------- 1 | ../../../AXAttributedLabel/AXAttributedLabel/AXAttributedLabel/AXAttributedLabel.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/FloatConversion.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/WebCore/FloatConversion.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POP.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POP.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAction.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAction.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimatableProperty.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimatableProperty.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationEvent.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationEvent.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationEventInternal.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationEventInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationExtras.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationExtras.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationInternal.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationPrivate.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationPrivate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationRuntime.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationRuntime.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationTracer.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationTracer.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimationTracerInternal.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationTracerInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimator.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimator.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPAnimatorPrivate.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimatorPrivate.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPBasicAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPBasicAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPBasicAnimationInternal.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPBasicAnimationInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPCGUtils.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPCGUtils.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPCustomAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPCustomAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPDecayAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPDecayAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPDecayAnimationInternal.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPDecayAnimationInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPDefines.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPGeometry.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPGeometry.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPLayerExtras.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPLayerExtras.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPMath.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPMath.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPPropertyAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPPropertyAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPPropertyAnimationInternal.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPPropertyAnimationInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPSpringAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPSpringAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPSpringAnimationInternal.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPSpringAnimationInternal.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPSpringSolver.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPSpringSolver.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/POPVector.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPVector.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/TransformationMatrix.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/WebCore/TransformationMatrix.h -------------------------------------------------------------------------------- /Pods/Headers/Private/pop/UnitBezier.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/WebCore/UnitBezier.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit+POP/POPAnimatableProperty+AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit+POP/Source/POPAnimatableProperty+AGGeometryKit.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGGeometryKit.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGGeometryKitCategories.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGGeometryKitCategories.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGGeometryKitClasses.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGGeometryKitClasses.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGGeometryKitCoreGraphics.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/AGGeometryKitCoreGraphics.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKBaseDefines.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKBaseDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKBitOperations.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKBitOperations.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKCALayerAnimationBlockDelegate.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGKCALayerAnimationBlockDelegate.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKCorner.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKCorner.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKLine.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKLine.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKMath.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKMath.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKMatrix+AGKVector3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+AGKVector3D.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKMatrix+CATransform3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+CATransform3D.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKMatrix+GLKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/AGKMatrix+GLKit.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKMatrix.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGKMatrix.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKTransformPixelMapper.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Classes/AGKTransformPixelMapper.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/AGKVector3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/AGKVector3D.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/CALayer+AGK+Methods.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/CALayer+AGK+Methods.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/CALayer+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/CALayer+AGK+Properties.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/CALayer+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/CALayer+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/CGGeometry+AGGeometryKit.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/CGGeometry+AGGeometryKit.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/CGImageRef+AGK+CATransform3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/CoreGraphics_Extensions/CGImageRef+AGK+CATransform3D.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/NSValue+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/NSValue+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/UIBezierPath+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIBezierPath+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/UIImage+AGK+CATransform3D.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIImage+AGK+CATransform3D.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/UIImage+AGKQuad.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIImage+AGKQuad.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/UIScrollView+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIScrollView+AGK+Properties.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/UIView+AGK+AngleConverter.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIView+AGK+AngleConverter.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AGGeometryKit/UIView+AGK+Properties.h: -------------------------------------------------------------------------------- 1 | ../../../AGGeometryKit/AGGeometryKit/Categories/UIView+AGK+Properties.h -------------------------------------------------------------------------------- /Pods/Headers/Public/AXAttributedLabel/AXAttributedLabel.h: -------------------------------------------------------------------------------- 1 | ../../../AXAttributedLabel/AXAttributedLabel/AXAttributedLabel/AXAttributedLabel.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POP.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POP.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPAnimatableProperty.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimatableProperty.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPAnimationEvent.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationEvent.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPAnimationExtras.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationExtras.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPAnimationTracer.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimationTracer.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPAnimator.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPAnimator.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPBasicAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPBasicAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPCustomAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPCustomAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPDecayAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPDecayAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPDefines.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPDefines.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPGeometry.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPGeometry.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPLayerExtras.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPLayerExtras.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPPropertyAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPPropertyAnimation.h -------------------------------------------------------------------------------- /Pods/Headers/Public/pop/POPSpringAnimation.h: -------------------------------------------------------------------------------- 1 | ../../../pop/pop/POPSpringAnimation.h -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AGGeometryKit (1.2.4): 3 | - AGGeometryKit/CALayerProperties (= 1.2.4) 4 | - AGGeometryKit/UIViewProperties (= 1.2.4) 5 | - AGGeometryKit+POP (0.1): 6 | - AGGeometryKit+POP/Default (= 0.1) 7 | - AGGeometryKit+POP/Default (0.1): 8 | - AGGeometryKit (~> 1.0) 9 | - pop (~> 1.0.4) 10 | - AGGeometryKit/CALayerProperties (1.2.4) 11 | - AGGeometryKit/UIViewProperties (1.2.4) 12 | - AXAttributedLabel (0.2.9) 13 | - pop (1.0.9) 14 | 15 | DEPENDENCIES: 16 | - AGGeometryKit+POP 17 | - AXAttributedLabel 18 | 19 | SPEC CHECKSUMS: 20 | AGGeometryKit: 2c2c39c9f99eb7a966f0aa16b2a97027dacc4761 21 | AGGeometryKit+POP: 72c980191db0646c31bed0b1ffd571e05f9ad029 22 | AXAttributedLabel: 038ca8a876b3811a6e3e0471386a3592ccf68537 23 | pop: f667631a5108a2e60d9e8797c9b32ddaf2080bce 24 | 25 | PODFILE CHECKSUM: 34e9dff85e41243faab89a2451625fb4dcc7dceb 26 | 27 | COCOAPODS: 1.1.0.beta.2 28 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AGGeometryKit+POP/AGGeometryKit+POP-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AGGeometryKit_POP : NSObject 3 | @end 4 | @implementation PodsDummy_AGGeometryKit_POP 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AGGeometryKit+POP/AGGeometryKit+POP-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AGGeometryKit+POP/AGGeometryKit+POP.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AGGeometryKit+POP 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AGGeometryKit+POP" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AGGeometryKit" "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" "${PODS_ROOT}/Headers/Public/AXAttributedLabel" "${PODS_ROOT}/Headers/Public/pop" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AGGeometryKit" "$PODS_CONFIGURATION_BUILD_DIR/pop" 5 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "IOKit" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AGGeometryKit/AGGeometryKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AGGeometryKit : NSObject 3 | @end 4 | @implementation PodsDummy_AGGeometryKit 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AGGeometryKit/AGGeometryKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AGGeometryKit/AGGeometryKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AGGeometryKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AGGeometryKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AGGeometryKit" "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" "${PODS_ROOT}/Headers/Public/AXAttributedLabel" "${PODS_ROOT}/Headers/Public/pop" 4 | OTHER_LDFLAGS = -framework "CoreGraphics" -framework "QuartzCore" -framework "UIKit" 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/AXAttributedLabel/AXAttributedLabel-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AXAttributedLabel : NSObject 3 | @end 4 | @implementation PodsDummy_AXAttributedLabel 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AXAttributedLabel/AXAttributedLabel-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AXAttributedLabel/AXAttributedLabel.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AXAttributedLabel 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AXAttributedLabel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AGGeometryKit" "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" "${PODS_ROOT}/Headers/Public/AXAttributedLabel" "${PODS_ROOT}/Headers/Public/pop" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 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-AXPopoverView/Pods-AXPopoverView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_AXPopoverView : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_AXPopoverView 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-AXPopoverView/Pods-AXPopoverView-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-AXPopoverView/Pods-AXPopoverView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AGGeometryKit" "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" "${PODS_ROOT}/Headers/Public/AXAttributedLabel" "${PODS_ROOT}/Headers/Public/pop" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AGGeometryKit" "$PODS_CONFIGURATION_BUILD_DIR/AGGeometryKit+POP" "$PODS_CONFIGURATION_BUILD_DIR/AXAttributedLabel" "$PODS_CONFIGURATION_BUILD_DIR/pop" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AGGeometryKit" -isystem "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" -isystem "${PODS_ROOT}/Headers/Public/AXAttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/pop" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AGGeometryKit" -l"AGGeometryKit+POP" -l"AXAttributedLabel" -l"c++" -l"pop" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-AXPopoverView/Pods-AXPopoverView.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AGGeometryKit" "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" "${PODS_ROOT}/Headers/Public/AXAttributedLabel" "${PODS_ROOT}/Headers/Public/pop" 4 | LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AGGeometryKit" "$PODS_CONFIGURATION_BUILD_DIR/AGGeometryKit+POP" "$PODS_CONFIGURATION_BUILD_DIR/AXAttributedLabel" "$PODS_CONFIGURATION_BUILD_DIR/pop" 5 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AGGeometryKit" -isystem "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" -isystem "${PODS_ROOT}/Headers/Public/AXAttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/pop" 6 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AGGeometryKit" -l"AGGeometryKit+POP" -l"AXAttributedLabel" -l"c++" -l"pop" -framework "CoreGraphics" -framework "Foundation" -framework "IOKit" -framework "QuartzCore" -framework "SystemConfiguration" -framework "UIKit" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/pop/pop-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_pop : NSObject 3 | @end 4 | @implementation PodsDummy_pop 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/pop/pop-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/pop/pop.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_CXX_LANGUAGE_STANDARD = c++11 2 | CLANG_CXX_LIBRARY = libc++ 3 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/pop 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/pop" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AGGeometryKit" "${PODS_ROOT}/Headers/Public/AGGeometryKit+POP" "${PODS_ROOT}/Headers/Public/AXAttributedLabel" "${PODS_ROOT}/Headers/Public/pop" 6 | OTHER_LDFLAGS = -l"c++" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | -------------------------------------------------------------------------------- /Pods/pop/LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For Pop software 4 | 5 | Copyright (c) 2014, Facebook, Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | * Neither the name Facebook nor the names of its contributors may be used to 18 | endorse or promote products derived from this software without specific 19 | prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /Pods/pop/pop/POP.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #ifndef POP_POP_H 11 | #define POP_POP_H 12 | 13 | #import 14 | 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | 29 | #endif /* POP_POP_H */ 30 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAction.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #ifndef POPACTION_H 11 | #define POPACTION_H 12 | 13 | #import 14 | 15 | #import 16 | 17 | #ifdef __cplusplus 18 | 19 | namespace POP { 20 | 21 | /** 22 | @abstract Disables Core Animation actions using RAII. 23 | @discussion The disablement of actions is scoped to the current transaction. 24 | */ 25 | class ActionDisabler 26 | { 27 | BOOL state; 28 | 29 | public: 30 | ActionDisabler() POP_NOTHROW 31 | { 32 | state = [CATransaction disableActions]; 33 | [CATransaction setDisableActions:YES]; 34 | } 35 | 36 | ~ActionDisabler() 37 | { 38 | [CATransaction setDisableActions:state]; 39 | } 40 | }; 41 | 42 | /** 43 | @abstract Enables Core Animation actions using RAII. 44 | @discussion The enablement of actions is scoped to the current transaction. 45 | */ 46 | class ActionEnabler 47 | { 48 | BOOL state; 49 | 50 | public: 51 | ActionEnabler() POP_NOTHROW 52 | { 53 | state = [CATransaction disableActions]; 54 | [CATransaction setDisableActions:NO]; 55 | } 56 | 57 | ~ActionEnabler() 58 | { 59 | [CATransaction setDisableActions:state]; 60 | } 61 | }; 62 | 63 | } 64 | 65 | #endif /* __cplusplus */ 66 | 67 | #endif /* POPACTION_H */ 68 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationEvent.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | /** 13 | @abstract Enumeraton of animation event types. 14 | */ 15 | typedef NS_ENUM(NSUInteger, POPAnimationEventType) { 16 | kPOPAnimationEventPropertyRead = 0, 17 | kPOPAnimationEventPropertyWrite, 18 | kPOPAnimationEventToValueUpdate, 19 | kPOPAnimationEventFromValueUpdate, 20 | kPOPAnimationEventVelocityUpdate, 21 | kPOPAnimationEventBouncinessUpdate, 22 | kPOPAnimationEventSpeedUpdate, 23 | kPOPAnimationEventFrictionUpdate, 24 | kPOPAnimationEventMassUpdate, 25 | kPOPAnimationEventTensionUpdate, 26 | kPOPAnimationEventDidStart, 27 | kPOPAnimationEventDidStop, 28 | kPOPAnimationEventDidReachToValue, 29 | kPOPAnimationEventAutoreversed 30 | }; 31 | 32 | /** 33 | @abstract The base animation event class. 34 | */ 35 | @interface POPAnimationEvent : NSObject 36 | 37 | /** 38 | @abstract The event type. See {@ref POPAnimationEventType} for possible values. 39 | */ 40 | @property (readonly, nonatomic, assign) POPAnimationEventType type; 41 | 42 | /** 43 | @abstract The time of event. 44 | */ 45 | @property (readonly, nonatomic, assign) CFTimeInterval time; 46 | 47 | /** 48 | @abstract Optional string describing the animation at time of event. 49 | */ 50 | @property (readonly, nonatomic, copy) NSString *animationDescription; 51 | 52 | @end 53 | 54 | /** 55 | @abstract An animation event subclass for recording value and velocity. 56 | */ 57 | @interface POPAnimationValueEvent : POPAnimationEvent 58 | 59 | /** 60 | @abstract The value recorded. 61 | */ 62 | @property (readonly, nonatomic, strong) id value; 63 | 64 | /** 65 | @abstract The velocity recorded, if any. 66 | */ 67 | @property (readonly, nonatomic, strong) id velocity; 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationEvent.mm: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "POPAnimationEvent.h" 11 | #import "POPAnimationEventInternal.h" 12 | 13 | static NSString *stringFromType(POPAnimationEventType aType) 14 | { 15 | switch (aType) { 16 | case kPOPAnimationEventPropertyRead: 17 | return @"read"; 18 | case kPOPAnimationEventPropertyWrite: 19 | return @"write"; 20 | case kPOPAnimationEventToValueUpdate: 21 | return @"toValue"; 22 | case kPOPAnimationEventFromValueUpdate: 23 | return @"fromValue"; 24 | case kPOPAnimationEventVelocityUpdate: 25 | return @"velocity"; 26 | case kPOPAnimationEventSpeedUpdate: 27 | return @"speed"; 28 | case kPOPAnimationEventBouncinessUpdate: 29 | return @"bounciness"; 30 | case kPOPAnimationEventFrictionUpdate: 31 | return @"friction"; 32 | case kPOPAnimationEventMassUpdate: 33 | return @"mass"; 34 | case kPOPAnimationEventTensionUpdate: 35 | return @"tension"; 36 | case kPOPAnimationEventDidStart: 37 | return @"didStart"; 38 | case kPOPAnimationEventDidStop: 39 | return @"didStop"; 40 | case kPOPAnimationEventDidReachToValue: 41 | return @"didReachToValue"; 42 | case kPOPAnimationEventAutoreversed: 43 | return @"autoreversed"; 44 | default: 45 | return nil; 46 | } 47 | } 48 | 49 | @implementation POPAnimationEvent 50 | @synthesize type = _type; 51 | @synthesize time = _time; 52 | @synthesize animationDescription = _animationDescription; 53 | 54 | - (instancetype)initWithType:(POPAnimationEventType)aType time:(CFTimeInterval)aTime 55 | { 56 | self = [super init]; 57 | if (nil != self) { 58 | _type = aType; 59 | _time = aTime; 60 | } 61 | return self; 62 | } 63 | 64 | - (NSString *)description 65 | { 66 | NSMutableString *s = [NSMutableString stringWithFormat:@""]; 69 | return s; 70 | } 71 | 72 | // subclass override 73 | - (void)_appendDescription:(NSMutableString *)s 74 | { 75 | if (0 != _animationDescription.length) { 76 | [s appendFormat:@"; animation = %@", _animationDescription]; 77 | } 78 | } 79 | 80 | @end 81 | 82 | @implementation POPAnimationValueEvent 83 | @synthesize value = _value; 84 | @synthesize velocity = _velocity; 85 | 86 | - (instancetype)initWithType:(POPAnimationEventType)aType time:(CFTimeInterval)aTime value:(id)aValue 87 | { 88 | self = [self initWithType:aType time:aTime]; 89 | if (nil != self) { 90 | _value = aValue; 91 | } 92 | return self; 93 | } 94 | 95 | - (void)_appendDescription:(NSMutableString *)s 96 | { 97 | [super _appendDescription:s]; 98 | 99 | if (nil != _value) { 100 | [s appendFormat:@"; value = %@", _value]; 101 | } 102 | 103 | if (nil != _velocity) { 104 | [s appendFormat:@"; velocity = %@", _velocity]; 105 | } 106 | } 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationEventInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "POPAnimationEvent.h" 13 | 14 | @interface POPAnimationEvent () 15 | 16 | /** 17 | @abstract Default initializer. 18 | */ 19 | - (instancetype)initWithType:(POPAnimationEventType)type time:(CFTimeInterval)time; 20 | 21 | /** 22 | @abstract Readwrite redefinition of public property. 23 | */ 24 | @property (readwrite, nonatomic, copy) NSString *animationDescription; 25 | 26 | @end 27 | 28 | @interface POPAnimationValueEvent () 29 | 30 | /** 31 | @abstract Default initializer. 32 | */ 33 | - (instancetype)initWithType:(POPAnimationEventType)type time:(CFTimeInterval)time value:(id)value; 34 | 35 | /** 36 | @abstract Readwrite redefinition of public property. 37 | */ 38 | @property (readwrite, nonatomic, strong) id velocity; 39 | 40 | @end 41 | 42 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationExtras.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | #import 14 | 15 | /** 16 | @abstract The current drag coefficient. 17 | @discussion A value greater than 1.0 indicates Simulator slow-motion animations are enabled. Defaults to 1.0. 18 | */ 19 | extern CGFloat POPAnimationDragCoefficient(); 20 | 21 | @interface CAAnimation (POPAnimationExtras) 22 | 23 | /** 24 | @abstract Apply the current drag coefficient to animation speed. 25 | @discussion Convenience utility to respect Simulator slow-motion animation settings. 26 | */ 27 | - (void)pop_applyDragCoefficient; 28 | 29 | @end 30 | 31 | @interface POPSpringAnimation (POPAnimationExtras) 32 | 33 | /** 34 | @abstract Converts from spring bounciness and speed to tension, friction and mass dynamics values. 35 | */ 36 | + (void)convertBounciness:(CGFloat)bounciness speed:(CGFloat)speed toTension:(CGFloat *)outTension friction:(CGFloat *)outFriction mass:(CGFloat *)outMass; 37 | 38 | /** 39 | @abstract Converts from dynamics tension, friction and mass to spring bounciness and speed values. 40 | */ 41 | + (void)convertTension:(CGFloat)tension friction:(CGFloat)friction toBounciness:(CGFloat *)outBounciness speed:(CGFloat *)outSpeed; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationPrivate.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #define POP_ANIMATION_FRICTION_FOR_QC_FRICTION(qcFriction) (25.0 + (((qcFriction - 8.0) / 2.0) * (25.0 - 19.0))) 13 | #define POP_ANIMATION_TENSION_FOR_QC_TENSION(qcTension) (194.0 + (((qcTension - 30.0) / 50.0) * (375.0 - 194.0))) 14 | 15 | #define QC_FRICTION_FOR_POP_ANIMATION_FRICTION(fbFriction) (8.0 + 2.0 * ((fbFriction - 25.0)/(25.0 - 19.0))) 16 | #define QC_TENSION_FOR_POP_ANIMATION_TENSION(fbTension) (30.0 + 50.0 * ((fbTension - 194.0)/(375.0 - 194.0))) 17 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationRuntime.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | #import "POPVector.h" 15 | 16 | enum POPValueType 17 | { 18 | kPOPValueUnknown = 0, 19 | kPOPValueInteger, 20 | kPOPValueFloat, 21 | kPOPValuePoint, 22 | kPOPValueSize, 23 | kPOPValueRect, 24 | kPOPValueEdgeInsets, 25 | kPOPValueAffineTransform, 26 | kPOPValueTransform, 27 | kPOPValueRange, 28 | kPOPValueColor, 29 | kPOPValueSCNVector3, 30 | kPOPValueSCNVector4, 31 | }; 32 | 33 | using namespace POP; 34 | 35 | /** 36 | Returns value type based on objc type description, given list of supported value types and length. 37 | */ 38 | extern POPValueType POPSelectValueType(const char *objctype, const POPValueType *types, size_t length); 39 | 40 | /** 41 | Returns value type based on objc object, given a list of supported value types and length. 42 | */ 43 | extern POPValueType POPSelectValueType(id obj, const POPValueType *types, size_t length); 44 | 45 | /** 46 | Array of all value types. 47 | */ 48 | extern const POPValueType kPOPAnimatableAllTypes[12]; 49 | 50 | /** 51 | Array of all value types supported for animation. 52 | */ 53 | extern const POPValueType kPOPAnimatableSupportTypes[10]; 54 | 55 | /** 56 | Returns a string description of a value type. 57 | */ 58 | extern NSString *POPValueTypeToString(POPValueType t); 59 | 60 | /** 61 | Returns a mutable dictionary of weak pointer keys to weak pointer values. 62 | */ 63 | extern CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToWeakPointer(NSUInteger capacity) CF_RETURNS_RETAINED; 64 | 65 | /** 66 | Returns a mutable dictionary of weak pointer keys to weak pointer values. 67 | */ 68 | extern CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToStrongObject(NSUInteger capacity) CF_RETURNS_RETAINED; 69 | 70 | /** 71 | Box a vector. 72 | */ 73 | extern id POPBox(VectorConstRef vec, POPValueType type, bool force = false); 74 | 75 | /** 76 | Unbox a vector. 77 | */ 78 | extern VectorRef POPUnbox(id value, POPValueType &type, NSUInteger &count, bool validate); 79 | 80 | /** 81 | Read/write block typedefs for convenience. 82 | */ 83 | typedef void(^pop_animatable_read_block)(id obj, CGFloat *value); 84 | typedef void(^pop_animatable_write_block)(id obj, const CGFloat *value); 85 | 86 | /** 87 | Read object value and return a Vector4r. 88 | */ 89 | NS_INLINE Vector4r read_values(pop_animatable_read_block read, id obj, size_t count) 90 | { 91 | Vector4r vec = Vector4r::Zero(); 92 | if (0 == count) 93 | return vec; 94 | 95 | read(obj, vec.data()); 96 | 97 | return vec; 98 | } 99 | 100 | NS_INLINE NSString *POPStringFromBOOL(BOOL value) 101 | { 102 | return value ? @"YES" : @"NO"; 103 | } 104 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationTracer.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | @class POPAnimation; 15 | 16 | /** 17 | @abstract Tracer of animation events to fasciliate unit testing & debugging. 18 | */ 19 | @interface POPAnimationTracer : NSObject 20 | 21 | /** 22 | @abstract Start recording events. 23 | */ 24 | - (void)start; 25 | 26 | /** 27 | @abstract Stop recording events. 28 | */ 29 | - (void)stop; 30 | 31 | /** 32 | @abstract Resets any recoded events. Continues recording events if already started. 33 | */ 34 | - (void)reset; 35 | 36 | /** 37 | @abstract Property representing all recorded events. 38 | @discussion Events are returned in order of occurence. 39 | */ 40 | @property (nonatomic, assign, readonly) NSArray *allEvents; 41 | 42 | /** 43 | @abstract Property representing all recorded write events for convenience. 44 | @discussion Events are returned in order of occurence. 45 | */ 46 | @property (nonatomic, assign, readonly) NSArray *writeEvents; 47 | 48 | /** 49 | @abstract Queries for events of specified type. 50 | @param type The type of event to return. 51 | @returns An array of events of specified type in order of occurence. 52 | */ 53 | - (NSArray *)eventsWithType:(POPAnimationEventType)type; 54 | 55 | /** 56 | @abstract Property indicating whether tracer should automatically log events and reset collection on animation completion. 57 | */ 58 | @property (nonatomic, assign) BOOL shouldLogAndResetOnCompletion; 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimationTracerInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | @interface POPAnimationTracer (Internal) 15 | 16 | /** 17 | @abstract Designated initalizer. Pass the animation being traced. 18 | */ 19 | - (instancetype)initWithAnimation:(POPAnimation *)anAnim; 20 | 21 | /** 22 | @abstract Records read value. 23 | */ 24 | - (void)readPropertyValue:(id)aValue; 25 | 26 | /** 27 | @abstract Records write value. 28 | */ 29 | - (void)writePropertyValue:(id)aValue; 30 | 31 | /** 32 | Records to value update. 33 | */ 34 | - (void)updateToValue:(id)aValue; 35 | 36 | /** 37 | @abstract Records from value update. 38 | */ 39 | - (void)updateFromValue:(id)aValue; 40 | 41 | /** 42 | @abstract Records from value update. 43 | */ 44 | - (void)updateVelocity:(id)aValue; 45 | 46 | /** 47 | @abstract Records bounciness update. 48 | */ 49 | - (void)updateBounciness:(float)aFloat; 50 | 51 | /** 52 | @abstract Records speed update. 53 | */ 54 | - (void)updateSpeed:(float)aFloat; 55 | 56 | /** 57 | @abstract Records friction update. 58 | */ 59 | - (void)updateFriction:(float)aFloat; 60 | 61 | /** 62 | @abstract Records mass update. 63 | */ 64 | - (void)updateMass:(float)aFloat; 65 | 66 | /** 67 | @abstract Records tension update. 68 | */ 69 | - (void)updateTension:(float)aFloat; 70 | 71 | /** 72 | @abstract Records did add. 73 | */ 74 | - (void)didAdd; 75 | 76 | /** 77 | @abstract Records did start. 78 | */ 79 | - (void)didStart; 80 | 81 | /** 82 | @abstract Records did stop. 83 | */ 84 | - (void)didStop:(BOOL)finished; 85 | 86 | /** 87 | @abstract Records did reach to value. 88 | */ 89 | - (void)didReachToValue:(id)aValue; 90 | 91 | /** 92 | @abstract Records when an autoreverse animation takes place. 93 | */ 94 | - (void)autoreversed; 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimator.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @protocol POPAnimatorDelegate; 13 | 14 | /** 15 | @abstract The animator class renders animations. 16 | */ 17 | @interface POPAnimator : NSObject 18 | 19 | /** 20 | @abstract The shared animator instance. 21 | @discussion Consumers should generally use the shared instance in lieu of creating new instances. 22 | */ 23 | + (instancetype)sharedAnimator; 24 | 25 | /** 26 | @abstract The optional animator delegate. 27 | */ 28 | @property (weak, nonatomic) id delegate; 29 | 30 | @end 31 | 32 | /** 33 | @abstract The animator delegate. 34 | */ 35 | @protocol POPAnimatorDelegate 36 | 37 | /** 38 | @abstract Called on each frame before animation application. 39 | */ 40 | - (void)animatorWillAnimate:(POPAnimator *)animator; 41 | 42 | /** 43 | @abstract Called on each frame after animation application. 44 | */ 45 | - (void)animatorDidAnimate:(POPAnimator *)animator; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPAnimatorPrivate.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class POPAnimation; 13 | 14 | @protocol POPAnimatorObserving 15 | @required 16 | 17 | /** 18 | @abstract Called on each observer after animator has advanced. Core Animation actions are disabled by default. 19 | */ 20 | - (void)animatorDidAnimate:(POPAnimator *)animator; 21 | 22 | @end 23 | 24 | @interface POPAnimator () 25 | 26 | #if !TARGET_OS_IPHONE 27 | /** 28 | Determines whether or not to use a high priority background thread for animation updates. Using a background thread can result in faster, more responsive updates, but may be less compatible. Defaults to YES. 29 | */ 30 | + (BOOL)disableBackgroundThread; 31 | + (void)setDisableBackgroundThread:(BOOL)flag; 32 | #endif 33 | 34 | /** 35 | Used for externally driven animator instances. 36 | */ 37 | @property (assign, nonatomic) BOOL disableDisplayLink; 38 | 39 | /** 40 | Time used when starting animations. Defaults to 0 meaning current media time is used. Exposed for unit testing. 41 | */ 42 | @property (assign, nonatomic) CFTimeInterval beginTime; 43 | 44 | /** 45 | Exposed for unit testing. 46 | */ 47 | - (void)renderTime:(CFTimeInterval)time; 48 | 49 | /** 50 | Funnel methods for category additions. 51 | */ 52 | - (void)addAnimation:(POPAnimation *)anim forObject:(id)obj key:(NSString *)key; 53 | - (void)removeAllAnimationsForObject:(id)obj; 54 | - (void)removeAnimationForObject:(id)obj key:(NSString *)key; 55 | - (NSArray *)animationKeysForObject:(id)obj; 56 | - (POPAnimation *)animationForObject:(id)obj key:(NSString *)key; 57 | 58 | /** 59 | @abstract Add an animator observer. Observer will be notified of each subsequent animator advance until removal. 60 | */ 61 | - (void)addObserver:(id)observer; 62 | 63 | /** 64 | @abstract Remove an animator observer. 65 | */ 66 | - (void)removeObserver:(id)observer; 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPBasicAnimation.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | /** 13 | @abstract A concrete basic animation class. 14 | @discussion Animation is achieved through interpolation. 15 | */ 16 | @interface POPBasicAnimation : POPPropertyAnimation 17 | 18 | /** 19 | @abstract The designated initializer. 20 | @returns An instance of a basic animation. 21 | */ 22 | + (instancetype)animation; 23 | 24 | /** 25 | @abstract Convenience initializer that returns an animation with animatable property of name. 26 | @param name The name of the animatable property. 27 | @returns An instance of a basic animation configured with specified animatable property. 28 | */ 29 | + (instancetype)animationWithPropertyNamed:(NSString *)name; 30 | 31 | /** 32 | @abstract Convenience constructor. 33 | @returns Returns a basic animation with kCAMediaTimingFunctionDefault timing function. 34 | */ 35 | + (instancetype)defaultAnimation; 36 | 37 | /** 38 | @abstract Convenience constructor. 39 | @returns Returns a basic animation with kCAMediaTimingFunctionLinear timing function. 40 | */ 41 | + (instancetype)linearAnimation; 42 | 43 | /** 44 | @abstract Convenience constructor. 45 | @returns Returns a basic animation with kCAMediaTimingFunctionEaseIn timing function. 46 | */ 47 | + (instancetype)easeInAnimation; 48 | 49 | /** 50 | @abstract Convenience constructor. 51 | @returns Returns a basic animation with kCAMediaTimingFunctionEaseOut timing function. 52 | */ 53 | + (instancetype)easeOutAnimation; 54 | 55 | /** 56 | @abstract Convenience constructor. 57 | @returns Returns a basic animation with kCAMediaTimingFunctionEaseInEaseOut timing function. 58 | */ 59 | + (instancetype)easeInEaseOutAnimation; 60 | 61 | /** 62 | @abstract The duration in seconds. Defaults to 0.4. 63 | */ 64 | @property (assign, nonatomic) CFTimeInterval duration; 65 | 66 | /** 67 | @abstract A timing function defining the pacing of the animation. Defaults to nil indicating pacing according to kCAMediaTimingFunctionDefault. 68 | */ 69 | @property (strong, nonatomic) CAMediaTimingFunction *timingFunction; 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPBasicAnimation.mm: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "POPBasicAnimationInternal.h" 11 | 12 | @implementation POPBasicAnimation 13 | 14 | #undef __state 15 | #define __state ((POPBasicAnimationState *)_state) 16 | 17 | #pragma mark - Lifecycle 18 | 19 | + (instancetype)animation 20 | { 21 | return [[self alloc] init]; 22 | } 23 | 24 | + (instancetype)animationWithPropertyNamed:(NSString *)aName 25 | { 26 | POPBasicAnimation *anim = [self animation]; 27 | anim.property = [POPAnimatableProperty propertyWithName:aName]; 28 | return anim; 29 | } 30 | 31 | - (void)_initState 32 | { 33 | _state = new POPBasicAnimationState(self); 34 | } 35 | 36 | + (instancetype)linearAnimation 37 | { 38 | POPBasicAnimation *anim = [self animation]; 39 | anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 40 | return anim; 41 | } 42 | 43 | + (instancetype)easeInAnimation 44 | { 45 | POPBasicAnimation *anim = [self animation]; 46 | anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; 47 | return anim; 48 | } 49 | 50 | + (instancetype)easeOutAnimation 51 | { 52 | POPBasicAnimation *anim = [self animation]; 53 | anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 54 | return anim; 55 | } 56 | 57 | + (instancetype)easeInEaseOutAnimation 58 | { 59 | POPBasicAnimation *anim = [self animation]; 60 | anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 61 | return anim; 62 | } 63 | 64 | + (instancetype)defaultAnimation 65 | { 66 | POPBasicAnimation *anim = [self animation]; 67 | anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; 68 | return anim; 69 | } 70 | 71 | - (id)init 72 | { 73 | return [self _init]; 74 | } 75 | 76 | #pragma mark - Properties 77 | 78 | DEFINE_RW_PROPERTY(POPBasicAnimationState, duration, setDuration:, CFTimeInterval); 79 | DEFINE_RW_PROPERTY_OBJ(POPBasicAnimationState, timingFunction, setTimingFunction:, CAMediaTimingFunction*, __state->updatedTimingFunction();); 80 | 81 | #pragma mark - Utility 82 | 83 | - (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug 84 | { 85 | [super _appendDescription:s debug:debug]; 86 | if (__state->duration) 87 | [s appendFormat:@"; duration = %f", __state->duration]; 88 | } 89 | 90 | @end 91 | 92 | @implementation POPBasicAnimation (NSCopying) 93 | 94 | - (instancetype)copyWithZone:(NSZone *)zone { 95 | 96 | POPBasicAnimation *copy = [super copyWithZone:zone]; 97 | 98 | if (copy) { 99 | copy.duration = self.duration; 100 | copy.timingFunction = self.timingFunction; // not a 'copy', but timing functions are publicly immutable. 101 | } 102 | 103 | return copy; 104 | } 105 | 106 | @end -------------------------------------------------------------------------------- /Pods/pop/pop/POPBasicAnimationInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "POPBasicAnimation.h" 11 | 12 | #import "POPPropertyAnimationInternal.h" 13 | 14 | // default animation duration 15 | static CGFloat const kPOPAnimationDurationDefault = 0.4; 16 | 17 | // progress threshold for computing done 18 | static CGFloat const kPOPProgressThreshold = 1e-6; 19 | 20 | static void interpolate(POPValueType valueType, NSUInteger count, const CGFloat *fromVec, const CGFloat *toVec, CGFloat *outVec, CGFloat p) 21 | { 22 | switch (valueType) { 23 | case kPOPValueInteger: 24 | case kPOPValueFloat: 25 | case kPOPValuePoint: 26 | case kPOPValueSize: 27 | case kPOPValueRect: 28 | case kPOPValueEdgeInsets: 29 | case kPOPValueColor: 30 | POPInterpolateVector(count, outVec, fromVec, toVec, p); 31 | break; 32 | default: 33 | NSCAssert(false, @"unhandled type %d", valueType); 34 | break; 35 | } 36 | } 37 | 38 | struct _POPBasicAnimationState : _POPPropertyAnimationState 39 | { 40 | CAMediaTimingFunction *timingFunction; 41 | double timingControlPoints[4]; 42 | CFTimeInterval duration; 43 | CFTimeInterval timeProgress; 44 | 45 | _POPBasicAnimationState(id __unsafe_unretained anim) : _POPPropertyAnimationState(anim), 46 | timingFunction(nil), 47 | timingControlPoints{0.}, 48 | duration(kPOPAnimationDurationDefault), 49 | timeProgress(0.) 50 | { 51 | type = kPOPAnimationBasic; 52 | } 53 | 54 | bool isDone() { 55 | if (_POPPropertyAnimationState::isDone()) { 56 | return true; 57 | } 58 | return timeProgress + kPOPProgressThreshold >= 1.; 59 | } 60 | 61 | void updatedTimingFunction() 62 | { 63 | float vec[4] = {0.}; 64 | [timingFunction getControlPointAtIndex:1 values:&vec[0]]; 65 | [timingFunction getControlPointAtIndex:2 values:&vec[2]]; 66 | for (NSUInteger idx = 0; idx < POP_ARRAY_COUNT(vec); idx++) { 67 | timingControlPoints[idx] = vec[idx]; 68 | } 69 | } 70 | 71 | bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { 72 | // default timing function 73 | if (!timingFunction) { 74 | ((POPBasicAnimation *)self).timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; 75 | } 76 | 77 | // solve for normalized time, aka progresss [0, 1] 78 | CGFloat p = 1.0f; 79 | if (duration > 0.0f) { 80 | // cap local time to duration 81 | CFTimeInterval t = MIN(time - startTime, duration) / duration; 82 | p = POPTimingFunctionSolve(timingControlPoints, t, SOLVE_EPS(duration)); 83 | timeProgress = t; 84 | } else { 85 | timeProgress = 1.; 86 | } 87 | 88 | // interpolate and advance 89 | interpolate(valueType, valueCount, fromVec->data(), toVec->data(), currentVec->data(), p); 90 | progress = p; 91 | clampCurrentValue(); 92 | 93 | return true; 94 | } 95 | }; 96 | 97 | typedef struct _POPBasicAnimationState POPBasicAnimationState; 98 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPCustomAnimation.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class POPCustomAnimation; 13 | 14 | /** 15 | @abstract POPCustomAnimationBlock is the callback block of a custom animation. 16 | @discussion This block will be executed for each animation frame and should update the property or properties being animated based on current timing. 17 | @param target The object being animated. Reference the passed in target to help avoid retain loops. 18 | @param animation The custom animation instance. Use to determine the current and elapsed time since last callback. Reference the passed in animation to help avoid retain loops. 19 | @return Flag indicating whether the animation should continue animating. Return NO to indicate animation is done. 20 | */ 21 | typedef BOOL (^POPCustomAnimationBlock)(id target, POPCustomAnimation *animation); 22 | 23 | /** 24 | @abstract POPCustomAnimation is a concrete animation subclass for custom animations. 25 | */ 26 | @interface POPCustomAnimation : POPAnimation 27 | 28 | /** 29 | @abstract Creates and returns an initialized custom animation instance. 30 | @discussion This is the designated initializer. 31 | @param block The custom animation callback block. See {@ref POPCustomAnimationBlock}. 32 | @return The initialized custom animation instance. 33 | */ 34 | + (instancetype)animationWithBlock:(POPCustomAnimationBlock)block; 35 | 36 | /** 37 | @abstract The current animation time at time of callback. 38 | */ 39 | @property (readonly, nonatomic) CFTimeInterval currentTime; 40 | 41 | /** 42 | @abstract The elapsed animation time since last callback. 43 | */ 44 | @property (readonly, nonatomic) CFTimeInterval elapsedTime; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPCustomAnimation.mm: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "POPAnimationInternal.h" 11 | 12 | #import "POPCustomAnimation.h" 13 | 14 | @interface POPCustomAnimation () 15 | @property (nonatomic, copy) POPCustomAnimationBlock animate; 16 | @end 17 | 18 | @implementation POPCustomAnimation 19 | @synthesize currentTime = _currentTime; 20 | @synthesize elapsedTime = _elapsedTime; 21 | @synthesize animate = _animate; 22 | 23 | + (instancetype)animationWithBlock:(BOOL(^)(id target, POPCustomAnimation *))block 24 | { 25 | POPCustomAnimation *b = [[self alloc] _init]; 26 | b.animate = block; 27 | return b; 28 | } 29 | 30 | - (id)_init 31 | { 32 | self = [super _init]; 33 | if (nil != self) { 34 | _state->type = kPOPAnimationCustom; 35 | } 36 | return self; 37 | } 38 | 39 | - (CFTimeInterval)beginTime 40 | { 41 | POPAnimationState *s = POPAnimationGetState(self); 42 | return s->startTime > 0 ? s->startTime : s->beginTime; 43 | } 44 | 45 | - (BOOL)_advance:(id)object currentTime:(CFTimeInterval)currentTime elapsedTime:(CFTimeInterval)elapsedTime 46 | { 47 | _currentTime = currentTime; 48 | _elapsedTime = elapsedTime; 49 | return _animate(object, self); 50 | } 51 | 52 | - (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug 53 | { 54 | [s appendFormat:@"; elapsedTime = %f; currentTime = %f;", _elapsedTime, _currentTime]; 55 | } 56 | 57 | @end 58 | 59 | /** 60 | * Note that only the animate block is copied, but not the current/elapsed times 61 | */ 62 | @implementation POPCustomAnimation (NSCopying) 63 | 64 | - (instancetype)copyWithZone:(NSZone *)zone { 65 | 66 | POPCustomAnimation *copy = [super copyWithZone:zone]; 67 | 68 | if (copy) { 69 | copy.animate = self.animate; 70 | } 71 | 72 | return copy; 73 | } 74 | 75 | @end -------------------------------------------------------------------------------- /Pods/pop/pop/POPDecayAnimation.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | /** 13 | @abstract A concrete decay animation class. 14 | @discussion Animation is achieved through gradual decay of animation value. 15 | */ 16 | @interface POPDecayAnimation : POPPropertyAnimation 17 | 18 | /** 19 | @abstract The designated initializer. 20 | @returns An instance of a decay animation. 21 | */ 22 | + (instancetype)animation; 23 | 24 | /** 25 | @abstract Convenience initializer that returns an animation with animatable property of name. 26 | @param name The name of the animatable property. 27 | @returns An instance of a decay animation configured with specified animatable property. 28 | */ 29 | + (instancetype)animationWithPropertyNamed:(NSString *)name; 30 | 31 | /** 32 | @abstract The current velocity value. 33 | @discussion Set before animation start to account for initial velocity. Expressed in change of value units per second. The only POPValueTypes supported for velocity are: kPOPValuePoint, kPOPValueInteger, kPOPValueFloat, kPOPValueRect, and kPOPValueSize. 34 | */ 35 | @property (copy, nonatomic) id velocity; 36 | 37 | /** 38 | @abstract The original velocity value. 39 | @discussion Since the velocity property is modified as the animation progresses, this property stores the original, passed in velocity to support autoreverse and repeatCount. 40 | */ 41 | @property (copy, nonatomic, readonly) id originalVelocity; 42 | 43 | /** 44 | @abstract The deceleration factor. 45 | @discussion Values specifies should be in the range [0, 1]. Lower values results in faster deceleration. Defaults to 0.998. 46 | */ 47 | @property (assign, nonatomic) CGFloat deceleration; 48 | 49 | /** 50 | @abstract The expected duration. 51 | @discussion Derived based on input velocity and deceleration values. 52 | */ 53 | @property (readonly, assign, nonatomic) CFTimeInterval duration; 54 | 55 | /** 56 | The to value is derived based on input velocity and deceleration. 57 | */ 58 | - (void)setToValue:(id)toValue NS_UNAVAILABLE; 59 | 60 | /** 61 | @abstract The reversed velocity. 62 | @discussion The reversed velocity based on the originalVelocity when the animation was set up. 63 | */ 64 | - (id)reversedVelocity; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPDefines.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #ifndef POP_POPDefines_h 11 | #define POP_POPDefines_h 12 | 13 | #import 14 | 15 | #ifdef __cplusplus 16 | # define POP_EXTERN_C_BEGIN extern "C" { 17 | # define POP_EXTERN_C_END } 18 | #else 19 | # define POP_EXTERN_C_BEGIN 20 | # define POP_EXTERN_C_END 21 | #endif 22 | 23 | #define POP_ARRAY_COUNT(x) sizeof(x) / sizeof(x[0]) 24 | 25 | #if defined (__cplusplus) && defined (__GNUC__) 26 | # define POP_NOTHROW __attribute__ ((nothrow)) 27 | #else 28 | # define POP_NOTHROW 29 | #endif 30 | 31 | #if TARGET_OS_MAC 32 | #define SCENEKIT_SDK_AVAILABLE defined(POP_USE_SCENEKIT) 33 | #elif TARGET_OS_IPHONE 34 | #define SCENEKIT_SDK_AVAILABLE defined(POP_USE_SCENEKIT) 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPGeometry.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #if TARGET_OS_IPHONE 13 | #import 14 | #endif 15 | 16 | #if !TARGET_OS_IPHONE 17 | 18 | /** NSValue extensions to support animatable types. */ 19 | @interface NSValue (POP) 20 | 21 | /** 22 | @abstract Creates an NSValue given a CGPoint. 23 | */ 24 | + (NSValue *)valueWithCGPoint:(CGPoint)point; 25 | 26 | /** 27 | @abstract Creates an NSValue given a CGSize. 28 | */ 29 | + (NSValue *)valueWithCGSize:(CGSize)size; 30 | 31 | /** 32 | @abstract Creates an NSValue given a CGRect. 33 | */ 34 | + (NSValue *)valueWithCGRect:(CGRect)rect; 35 | 36 | /** 37 | @abstract Creates an NSValue given a CFRange. 38 | */ 39 | + (NSValue *)valueWithCFRange:(CFRange)range; 40 | 41 | /** 42 | @abstract Creates an NSValue given a CGAffineTransform. 43 | */ 44 | + (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform; 45 | 46 | /** 47 | @abstract Returns the underlying CGPoint value. 48 | */ 49 | - (CGPoint)CGPointValue; 50 | 51 | /** 52 | @abstract Returns the underlying CGSize value. 53 | */ 54 | - (CGSize)CGSizeValue; 55 | 56 | /** 57 | @abstract Returns the underlying CGRect value. 58 | */ 59 | - (CGRect)CGRectValue; 60 | 61 | /** 62 | @abstract Returns the underlying CFRange value. 63 | */ 64 | - (CFRange)CFRangeValue; 65 | 66 | /** 67 | @abstract Returns the underlying CGAffineTransform value. 68 | */ 69 | - (CGAffineTransform)CGAffineTransformValue; 70 | 71 | @end 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPGeometry.mm: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "POPGeometry.h" 11 | 12 | #if !TARGET_OS_IPHONE 13 | @implementation NSValue (POP) 14 | 15 | + (NSValue *)valueWithCGPoint:(CGPoint)point { 16 | return [NSValue valueWithBytes:&point objCType:@encode(CGPoint)]; 17 | } 18 | 19 | + (NSValue *)valueWithCGSize:(CGSize)size { 20 | return [NSValue valueWithBytes:&size objCType:@encode(CGSize)]; 21 | } 22 | 23 | + (NSValue *)valueWithCGRect:(CGRect)rect { 24 | return [NSValue valueWithBytes:&rect objCType:@encode(CGRect)]; 25 | } 26 | 27 | + (NSValue *)valueWithCFRange:(CFRange)range { 28 | return [NSValue valueWithBytes:&range objCType:@encode(CFRange)]; 29 | } 30 | 31 | + (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform 32 | { 33 | return [NSValue valueWithBytes:&transform objCType:@encode(CGAffineTransform)]; 34 | } 35 | 36 | - (CGPoint)CGPointValue { 37 | CGPoint result; 38 | [self getValue:&result]; 39 | return result; 40 | } 41 | 42 | - (CGSize)CGSizeValue { 43 | CGSize result; 44 | [self getValue:&result]; 45 | return result; 46 | } 47 | 48 | - (CGRect)CGRectValue { 49 | CGRect result; 50 | [self getValue:&result]; 51 | return result; 52 | } 53 | 54 | - (CFRange)CFRangeValue { 55 | CFRange result; 56 | [self getValue:&result]; 57 | return result; 58 | } 59 | 60 | - (CGAffineTransform)CGAffineTransformValue { 61 | CGAffineTransform result; 62 | [self getValue:&result]; 63 | return result; 64 | } 65 | @end 66 | 67 | #endif 68 | 69 | #if TARGET_OS_IPHONE 70 | #import "POPDefines.h" 71 | 72 | #if SCENEKIT_SDK_AVAILABLE 73 | #import 74 | 75 | /** 76 | Dirty hacks because iOS is weird and decided to define both SCNVector3's and SCNVector4's objCType as "t". However @encode(SCNVector3) and @encode(SCNVector4) both return the proper definition ("{SCNVector3=fff}" and "{SCNVector4=ffff}" respectively) 77 | 78 | [[NSValue valueWithSCNVector3:SCNVector3Make(0.0, 0.0, 0.0)] objcType] returns "t", whereas it should return "{SCNVector3=fff}". 79 | 80 | *flips table* 81 | */ 82 | @implementation NSValue (SceneKitFixes) 83 | 84 | + (NSValue *)valueWithSCNVector3:(SCNVector3)vec3 { 85 | return [NSValue valueWithBytes:&vec3 objCType:@encode(SCNVector3)]; 86 | } 87 | 88 | + (NSValue *)valueWithSCNVector4:(SCNVector4)vec4 { 89 | return [NSValue valueWithBytes:&vec4 objCType:@encode(SCNVector4)]; 90 | } 91 | 92 | @end 93 | #endif 94 | #endif 95 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPMath.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | #import "POPDefines.h" 15 | #import "POPVector.h" 16 | 17 | NS_INLINE CGFloat sqrtr(CGFloat f) 18 | { 19 | #if CGFLOAT_IS_DOUBLE 20 | return sqrt(f); 21 | #else 22 | return sqrtf(f); 23 | #endif 24 | } 25 | 26 | // round to nearest sub; pass 2.0 to round to every 0.5 (eg: retina pixels) 27 | NS_INLINE CGFloat POPSubRound(CGFloat f, CGFloat sub) 28 | { 29 | return round(f * sub) / sub; 30 | } 31 | 32 | #define MIX(a, b, f) ((a) + (f) * ((b) - (a))) 33 | 34 | // the longer the duration, the higher the necessary precision 35 | #define SOLVE_EPS(dur) (1. / (1000. * (dur))) 36 | 37 | #define _EQLF_(x, y, epsilon) (fabsf ((x) - (y)) < epsilon) 38 | 39 | extern void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f); 40 | 41 | extern double POPTimingFunctionSolve(const double vec[4], double t, double eps); 42 | 43 | // quadratic mapping of t [0, 1] to [start, end] 44 | extern double POPQuadraticOutInterpolation(double t, double start, double end); 45 | 46 | // normalize value to [0, 1] based on its range [startValue, endValue] 47 | extern double POPNormalize(double value, double startValue, double endValue); 48 | 49 | // project a normalized value [0, 1] to a given range [start, end] 50 | extern double POPProjectNormal(double n, double start, double end); 51 | 52 | // solve a quadratic equation of the form a * x^2 + b * x + c = 0 53 | extern void POPQuadraticSolve(CGFloat a, CGFloat b, CGFloat c, CGFloat &x1, CGFloat &x2); 54 | 55 | // for a given tension return the bouncy 3 friction that produces no bounce 56 | extern double POPBouncy3NoBounce(double tension); 57 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPMath.mm: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "POPMath.h" 11 | 12 | #import "POPAnimationPrivate.h" 13 | #import "UnitBezier.h" 14 | 15 | void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f) 16 | { 17 | for (NSUInteger idx = 0; idx < count; idx++) { 18 | dst[idx] = MIX(from[idx], to[idx], f); 19 | } 20 | } 21 | 22 | double POPTimingFunctionSolve(const double vec[4], double t, double eps) 23 | { 24 | WebCore::UnitBezier bezier(vec[0], vec[1], vec[2], vec[3]); 25 | return bezier.solve(t, eps); 26 | } 27 | 28 | double POPNormalize(double value, double startValue, double endValue) 29 | { 30 | return (value - startValue) / (endValue - startValue); 31 | } 32 | 33 | double POPProjectNormal(double n, double start, double end) 34 | { 35 | return start + (n * (end - start)); 36 | } 37 | 38 | static double linear_interpolation(double t, double start, double end) 39 | { 40 | return t * end + (1.f - t) * start; 41 | } 42 | 43 | double POPQuadraticOutInterpolation(double t, double start, double end) 44 | { 45 | return linear_interpolation(2*t - t*t, start, end); 46 | } 47 | 48 | static double b3_friction1(double x) 49 | { 50 | return (0.0007 * pow(x, 3)) - (0.031 * pow(x, 2)) + 0.64 * x + 1.28; 51 | } 52 | 53 | static double b3_friction2(double x) 54 | { 55 | return (0.000044 * pow(x, 3)) - (0.006 * pow(x, 2)) + 0.36 * x + 2.; 56 | } 57 | 58 | static double b3_friction3(double x) 59 | { 60 | return (0.00000045 * pow(x, 3)) - (0.000332 * pow(x, 2)) + 0.1078 * x + 5.84; 61 | } 62 | 63 | double POPBouncy3NoBounce(double tension) 64 | { 65 | double friction = 0; 66 | if (tension <= 18.) { 67 | friction = b3_friction1(tension); 68 | } else if (tension > 18 && tension <= 44) { 69 | friction = b3_friction2(tension); 70 | } else if (tension > 44) { 71 | friction = b3_friction3(tension); 72 | } else { 73 | assert(false); 74 | } 75 | return friction; 76 | } 77 | 78 | void POPQuadraticSolve(CGFloat a, CGFloat b, CGFloat c, CGFloat &x1, CGFloat &x2) 79 | { 80 | CGFloat discriminant = sqrt(b * b - 4 * a * c); 81 | x1 = (-b + discriminant) / (2 * a); 82 | x2 = (-b - discriminant) / (2 * a); 83 | } 84 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPPropertyAnimation.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | /** 14 | @abstract Flags for clamping animation values. 15 | @discussion Animation values can optionally be clamped to avoid overshoot. kPOPAnimationClampStart ensures values are more than fromValue and kPOPAnimationClampEnd ensures values are less than toValue. 16 | */ 17 | typedef NS_OPTIONS(NSUInteger, POPAnimationClampFlags) 18 | { 19 | kPOPAnimationClampNone = 0, 20 | kPOPAnimationClampStart = 1UL << 0, 21 | kPOPAnimationClampEnd = 1UL << 1, 22 | kPOPAnimationClampBoth = kPOPAnimationClampStart | kPOPAnimationClampEnd, 23 | }; 24 | 25 | /** 26 | @abstract The semi-concrete property animation subclass. 27 | */ 28 | @interface POPPropertyAnimation : POPAnimation 29 | 30 | /** 31 | @abstract The property to animate. 32 | */ 33 | @property (strong, nonatomic) POPAnimatableProperty *property; 34 | 35 | /** 36 | @abstract The value to animate from. 37 | @discussion The value type should match the property. If unspecified, the value is initialized to the object's current value on animation start. 38 | */ 39 | @property (copy, nonatomic) id fromValue; 40 | 41 | /** 42 | @abstract The value to animate to. 43 | @discussion The value type should match the property. If unspecified, the value is initialized to the object's current value on animation start. 44 | */ 45 | @property (copy, nonatomic) id toValue; 46 | 47 | /** 48 | @abstract The rounding factor applied to the current animated value. 49 | @discussion Specify 1.0 to animate between integral values. Defaults to 0 meaning no rounding. 50 | */ 51 | @property (assign, nonatomic) CGFloat roundingFactor; 52 | 53 | /** 54 | @abstract The clamp mode applied to the current animated value. 55 | @discussion See {@ref POPAnimationClampFlags} for possible values. Defaults to kPOPAnimationClampNone. 56 | */ 57 | @property (assign, nonatomic) NSUInteger clampMode; 58 | 59 | /** 60 | @abstract The flag indicating whether values should be "added" each frame, rather than set. 61 | @discussion Addition may be type dependent. Defaults to NO. 62 | */ 63 | @property (assign, nonatomic, getter = isAdditive) BOOL additive; 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /Pods/pop/pop/POPPropertyAnimation.mm: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "POPPropertyAnimationInternal.h" 11 | 12 | @implementation POPPropertyAnimation 13 | 14 | #pragma mark - Lifecycle 15 | 16 | #undef __state 17 | #define __state ((POPPropertyAnimationState *)_state) 18 | 19 | - (void)_initState 20 | { 21 | _state = new POPPropertyAnimationState(self); 22 | } 23 | 24 | #pragma mark - Properties 25 | 26 | DEFINE_RW_FLAG(POPPropertyAnimationState, additive, isAdditive, setAdditive:); 27 | DEFINE_RW_PROPERTY(POPPropertyAnimationState, roundingFactor, setRoundingFactor:, CGFloat); 28 | DEFINE_RW_PROPERTY(POPPropertyAnimationState, clampMode, setClampMode:, NSUInteger); 29 | DEFINE_RW_PROPERTY_OBJ(POPPropertyAnimationState, property, setProperty:, POPAnimatableProperty*, ((POPPropertyAnimationState*)_state)->updatedDynamicsThreshold();); 30 | DEFINE_RW_PROPERTY_OBJ_COPY(POPPropertyAnimationState, progressMarkers, setProgressMarkers:, NSArray*, ((POPPropertyAnimationState*)_state)->updatedProgressMarkers();); 31 | 32 | - (id)fromValue 33 | { 34 | return POPBox(__state->fromVec, __state->valueType); 35 | } 36 | 37 | - (void)setFromValue:(id)aValue 38 | { 39 | POPPropertyAnimationState *s = __state; 40 | VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); 41 | if (!vec_equal(vec, s->fromVec)) { 42 | s->fromVec = vec; 43 | 44 | if (s->tracing) { 45 | [s->tracer updateFromValue:aValue]; 46 | } 47 | } 48 | } 49 | 50 | - (id)toValue 51 | { 52 | return POPBox(__state->toVec, __state->valueType); 53 | } 54 | 55 | - (void)setToValue:(id)aValue 56 | { 57 | POPPropertyAnimationState *s = __state; 58 | VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); 59 | 60 | if (!vec_equal(vec, s->toVec)) { 61 | s->toVec = vec; 62 | 63 | // invalidate to dependent state 64 | s->didReachToValue = false; 65 | s->distanceVec = NULL; 66 | 67 | if (s->tracing) { 68 | [s->tracer updateToValue:aValue]; 69 | } 70 | 71 | // automatically unpause active animations 72 | if (s->active && s->paused) { 73 | s->setPaused(false); 74 | } 75 | } 76 | } 77 | 78 | - (id)currentValue 79 | { 80 | return POPBox(__state->currentValue(), __state->valueType); 81 | } 82 | 83 | #pragma mark - Utility 84 | 85 | - (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug 86 | { 87 | [s appendFormat:@"; from = %@; to = %@", describe(__state->fromVec), describe(__state->toVec)]; 88 | 89 | if (_state->active) 90 | [s appendFormat:@"; currentValue = %@", describe(__state->currentValue())]; 91 | 92 | if (__state->velocityVec && 0 != __state->velocityVec->norm()) 93 | [s appendFormat:@"; velocity = %@", describe(__state->velocityVec)]; 94 | 95 | if (!self.removedOnCompletion) 96 | [s appendFormat:@"; removedOnCompletion = %@", POPStringFromBOOL(self.removedOnCompletion)]; 97 | 98 | if (__state->progressMarkers) 99 | [s appendFormat:@"; progressMarkers = [%@]", [__state->progressMarkers componentsJoinedByString:@", "]]; 100 | 101 | if (_state->active) 102 | [s appendFormat:@"; progress = %f", __state->progress]; 103 | } 104 | 105 | @end 106 | 107 | @implementation POPPropertyAnimation (NSCopying) 108 | 109 | - (instancetype)copyWithZone:(NSZone *)zone { 110 | 111 | POPPropertyAnimation *copy = [super copyWithZone:zone]; 112 | 113 | if (copy) { 114 | copy.property = [self.property copyWithZone:zone]; 115 | copy.fromValue = self.fromValue; 116 | copy.toValue = self.toValue; 117 | copy.roundingFactor = self.roundingFactor; 118 | copy.clampMode = self.clampMode; 119 | copy.additive = self.additive; 120 | } 121 | 122 | return copy; 123 | } 124 | 125 | @end -------------------------------------------------------------------------------- /Pods/pop/pop/POPSpringAnimation.h: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2014-present, Facebook, Inc. 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | /** 13 | @abstract A concrete spring animation class. 14 | @discussion Animation is achieved through modeling spring dynamics. 15 | */ 16 | @interface POPSpringAnimation : POPPropertyAnimation 17 | 18 | /** 19 | @abstract The designated initializer. 20 | @returns An instance of a spring animation. 21 | */ 22 | + (instancetype)animation; 23 | 24 | /** 25 | @abstract Convenience initializer that returns an animation with animatable property of name. 26 | @param name The name of the animatable property. 27 | @returns An instance of a spring animation configured with specified animatable property. 28 | */ 29 | + (instancetype)animationWithPropertyNamed:(NSString *)name; 30 | 31 | /** 32 | @abstract The current velocity value. 33 | @discussion Set before animation start to account for initial velocity. Expressed in change of value units per second. 34 | */ 35 | @property (copy, nonatomic) id velocity; 36 | 37 | /** 38 | @abstract The effective bounciness. 39 | @discussion Use in conjunction with 'springSpeed' to change animation effect. Values are converted into corresponding dynamics constants. Higher values increase spring movement range resulting in more oscillations and springiness. Defined as a value in the range [0, 20]. Defaults to 4. 40 | */ 41 | @property (assign, nonatomic) CGFloat springBounciness; 42 | 43 | /** 44 | @abstract The effective speed. 45 | @discussion Use in conjunction with 'springBounciness' to change animation effect. Values are converted into corresponding dynamics constants. Higher values increase the dampening power of the spring resulting in a faster initial velocity and more rapid bounce slowdown. Defined as a value in the range [0, 20]. Defaults to 12. 46 | */ 47 | @property (assign, nonatomic) CGFloat springSpeed; 48 | 49 | /** 50 | @abstract The tension used in the dynamics simulation. 51 | @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. 52 | */ 53 | @property (assign, nonatomic) CGFloat dynamicsTension; 54 | 55 | /** 56 | @abstract The friction used in the dynamics simulation. 57 | @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. 58 | */ 59 | @property (assign, nonatomic) CGFloat dynamicsFriction; 60 | 61 | /** 62 | @abstract The mass used in the dynamics simulation. 63 | @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. 64 | */ 65 | @property (assign, nonatomic) CGFloat dynamicsMass; 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /Pods/pop/pop/WebCore/FloatConversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Apple Inc. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of 14 | * its contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 18 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 21 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef FloatConversion_h 30 | #define FloatConversion_h 31 | 32 | #include 33 | 34 | namespace WebCore { 35 | 36 | template 37 | float narrowPrecisionToFloat(T); 38 | 39 | template<> 40 | inline float narrowPrecisionToFloat(double number) 41 | { 42 | return static_cast(number); 43 | } 44 | 45 | template 46 | CGFloat narrowPrecisionToCGFloat(T); 47 | 48 | template<> 49 | inline CGFloat narrowPrecisionToCGFloat(double number) 50 | { 51 | return static_cast(number); 52 | } 53 | 54 | } // namespace WebCore 55 | 56 | #endif // FloatConversion_h 57 | --------------------------------------------------------------------------------