├── .travis.yml ├── EGOCircleMenu.podspec ├── EGOCircleMenu ├── Assets │ ├── hamburger-close.json │ └── hamburger-open.json └── Classes │ ├── AnimationDelegate.swift │ ├── BasicCircleMenuButton.swift │ ├── CircleButtonIndicator.swift │ ├── CircleMenu.swift │ ├── CircleMenuButton.swift │ ├── CircleMenuDelegate.swift │ ├── CircleMenuItemModel.swift │ ├── CircleMenuMainButton.swift │ ├── CircleMenuPanGestureAnalyzer.swift │ ├── JsonReader.swift │ ├── UIColorExtension.swift │ └── UIViewExtension.swift ├── Example ├── EGOCircleMenu.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── EGOCircleMenu-Example.xcscheme ├── EGOCircleMenu.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── pavel.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── EGOCircleMenu │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── iTunesArtwork@2x.png │ │ ├── Contents.json │ │ ├── icHDR.imageset │ │ │ ├── Contents.json │ │ │ └── icHDR.pdf │ │ ├── icImage.imageset │ │ │ ├── Contents.json │ │ │ └── icImage.pdf │ │ ├── icMacro.imageset │ │ │ ├── Contents.json │ │ │ └── icMacro.pdf │ │ ├── icOneToOne.imageset │ │ │ ├── Contents.json │ │ │ └── icOneToOne.pdf │ │ ├── icPanorama.imageset │ │ │ ├── Contents.json │ │ │ └── icPanorama.pdf │ │ ├── icPhoto.imageset │ │ │ ├── Contents.json │ │ │ └── icPhoto.pdf │ │ ├── icPortrait.imageset │ │ │ ├── Contents.json │ │ │ └── icPortrait.pdf │ │ ├── icSeries.imageset │ │ │ ├── Contents.json │ │ │ └── icSeries.pdf │ │ ├── icSixteenToNine.imageset │ │ │ ├── Contents.json │ │ │ └── icSixteenToNine.pdf │ │ ├── icTimelapse.imageset │ │ │ ├── Contents.json │ │ │ └── icTimelapse.pdf │ │ ├── icTimer.imageset │ │ │ ├── Contents.json │ │ │ └── icTimer.pdf │ │ └── icVideo.imageset │ │ │ ├── Contents.json │ │ │ └── icVideo.pdf │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Info.plist │ ├── MenuItemViewController.swift │ └── ViewController.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── EGOCircleMenu.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcuserdata │ │ │ └── pavel.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── EGOCircleMenu-EGOCircleMenu.xcscheme │ │ │ ├── EGOCircleMenu.xcscheme │ │ │ ├── Pods-EGOCircleMenu_Example.xcscheme │ │ │ ├── Pods-EGOCircleMenu_Tests.xcscheme │ │ │ ├── PromiseKit.xcscheme │ │ │ ├── lottie-ios.xcscheme │ │ │ └── xcschememanagement.plist │ ├── PromiseKit │ │ ├── Extensions │ │ │ ├── Foundation │ │ │ │ └── Sources │ │ │ │ │ ├── NSNotificationCenter+AnyPromise.h │ │ │ │ │ ├── NSNotificationCenter+AnyPromise.m │ │ │ │ │ ├── NSNotificationCenter+Promise.swift │ │ │ │ │ ├── NSObject+Promise.swift │ │ │ │ │ ├── NSTask+AnyPromise.h │ │ │ │ │ ├── NSTask+AnyPromise.m │ │ │ │ │ ├── NSURLSession+AnyPromise.h │ │ │ │ │ ├── NSURLSession+AnyPromise.m │ │ │ │ │ ├── NSURLSession+Promise.swift │ │ │ │ │ ├── PMKFoundation.h │ │ │ │ │ ├── Process+Promise.swift │ │ │ │ │ └── afterlife.swift │ │ │ └── UIKit │ │ │ │ └── Sources │ │ │ │ ├── PMKUIKit.h │ │ │ │ ├── UIView+AnyPromise.h │ │ │ │ ├── UIView+AnyPromise.m │ │ │ │ ├── UIView+Promise.swift │ │ │ │ ├── UIViewController+AnyPromise.h │ │ │ │ ├── UIViewController+AnyPromise.m │ │ │ │ └── UIViewPropertyAnimator+Promise.swift │ │ ├── LICENSE │ │ ├── README.md │ │ └── Sources │ │ │ ├── AnyPromise+Private.h │ │ │ ├── AnyPromise.h │ │ │ ├── AnyPromise.m │ │ │ ├── AnyPromise.swift │ │ │ ├── Box.swift │ │ │ ├── Catchable.swift │ │ │ ├── Configuration.swift │ │ │ ├── CustomStringConvertible.swift │ │ │ ├── Deprecations.swift │ │ │ ├── Error.swift │ │ │ ├── Guarantee.swift │ │ │ ├── NSMethodSignatureForBlock.m │ │ │ ├── PMKCallVariadicBlock.m │ │ │ ├── Promise.swift │ │ │ ├── PromiseKit.h │ │ │ ├── Resolver.swift │ │ │ ├── Thenable.swift │ │ │ ├── after.m │ │ │ ├── after.swift │ │ │ ├── dispatch_promise.m │ │ │ ├── firstly.swift │ │ │ ├── fwd.h │ │ │ ├── hang.m │ │ │ ├── hang.swift │ │ │ ├── join.m │ │ │ ├── race.m │ │ │ ├── race.swift │ │ │ ├── when.m │ │ │ └── when.swift │ ├── Target Support Files │ │ ├── EGOCircleMenu │ │ │ ├── EGOCircleMenu-dummy.m │ │ │ ├── EGOCircleMenu-prefix.pch │ │ │ ├── EGOCircleMenu-umbrella.h │ │ │ ├── EGOCircleMenu.modulemap │ │ │ ├── EGOCircleMenu.xcconfig │ │ │ ├── Info.plist │ │ │ ├── ResourceBundle-CircleMenu-Info.plist │ │ │ └── ResourceBundle-EGOCircleMenu-Info.plist │ │ ├── Pods-EGOCircleMenu_Example │ │ │ ├── Info.plist │ │ │ ├── Pods-EGOCircleMenu_Example-acknowledgements.markdown │ │ │ ├── Pods-EGOCircleMenu_Example-acknowledgements.plist │ │ │ ├── Pods-EGOCircleMenu_Example-dummy.m │ │ │ ├── Pods-EGOCircleMenu_Example-frameworks.sh │ │ │ ├── Pods-EGOCircleMenu_Example-resources.sh │ │ │ ├── Pods-EGOCircleMenu_Example-umbrella.h │ │ │ ├── Pods-EGOCircleMenu_Example.debug.xcconfig │ │ │ ├── Pods-EGOCircleMenu_Example.modulemap │ │ │ └── Pods-EGOCircleMenu_Example.release.xcconfig │ │ ├── Pods-EGOCircleMenu_Tests │ │ │ ├── Info.plist │ │ │ ├── Pods-EGOCircleMenu_Tests-acknowledgements.markdown │ │ │ ├── Pods-EGOCircleMenu_Tests-acknowledgements.plist │ │ │ ├── Pods-EGOCircleMenu_Tests-dummy.m │ │ │ ├── Pods-EGOCircleMenu_Tests-frameworks.sh │ │ │ ├── Pods-EGOCircleMenu_Tests-resources.sh │ │ │ ├── Pods-EGOCircleMenu_Tests-umbrella.h │ │ │ ├── Pods-EGOCircleMenu_Tests.debug.xcconfig │ │ │ ├── Pods-EGOCircleMenu_Tests.modulemap │ │ │ └── Pods-EGOCircleMenu_Tests.release.xcconfig │ │ ├── PromiseKit │ │ │ ├── Info.plist │ │ │ ├── PromiseKit-dummy.m │ │ │ ├── PromiseKit-prefix.pch │ │ │ ├── PromiseKit-umbrella.h │ │ │ ├── PromiseKit.modulemap │ │ │ └── PromiseKit.xcconfig │ │ └── lottie-ios │ │ │ ├── Info.plist │ │ │ ├── lottie-ios-dummy.m │ │ │ ├── lottie-ios-prefix.pch │ │ │ ├── lottie-ios-umbrella.h │ │ │ ├── lottie-ios.modulemap │ │ │ └── lottie-ios.xcconfig │ └── lottie-ios │ │ ├── LICENSE │ │ ├── README.md │ │ └── lottie-ios │ │ └── Classes │ │ ├── AnimatableLayers │ │ ├── LOTCompositionContainer.h │ │ ├── LOTCompositionContainer.m │ │ ├── LOTLayerContainer.h │ │ ├── LOTLayerContainer.m │ │ ├── LOTMaskContainer.h │ │ └── LOTMaskContainer.m │ │ ├── AnimatableProperties │ │ ├── LOTBezierData.h │ │ ├── LOTBezierData.m │ │ ├── LOTKeyframe.h │ │ └── LOTKeyframe.m │ │ ├── Extensions │ │ ├── CGGeometry+LOTAdditions.h │ │ ├── CGGeometry+LOTAdditions.m │ │ ├── LOTBezierPath.h │ │ ├── LOTBezierPath.m │ │ ├── LOTHelpers.h │ │ ├── LOTRadialGradientLayer.h │ │ ├── LOTRadialGradientLayer.m │ │ ├── UIColor+Expanded.h │ │ └── UIColor+Expanded.m │ │ ├── MacCompatibility │ │ ├── CALayer+Compat.h │ │ ├── CALayer+Compat.m │ │ ├── LOTPlatformCompat.h │ │ ├── NSValue+Compat.h │ │ ├── NSValue+Compat.m │ │ ├── UIBezierPath.h │ │ ├── UIBezierPath.m │ │ ├── UIColor.h │ │ └── UIColor.m │ │ ├── Models │ │ ├── LOTAsset.h │ │ ├── LOTAsset.m │ │ ├── LOTAssetGroup.h │ │ ├── LOTAssetGroup.m │ │ ├── LOTLayer.h │ │ ├── LOTLayer.m │ │ ├── LOTLayerGroup.h │ │ ├── LOTLayerGroup.m │ │ ├── LOTMask.h │ │ ├── LOTMask.m │ │ ├── LOTModels.h │ │ ├── LOTShapeCircle.h │ │ ├── LOTShapeCircle.m │ │ ├── LOTShapeFill.h │ │ ├── LOTShapeFill.m │ │ ├── LOTShapeGradientFill.h │ │ ├── LOTShapeGradientFill.m │ │ ├── LOTShapeGroup.h │ │ ├── LOTShapeGroup.m │ │ ├── LOTShapePath.h │ │ ├── LOTShapePath.m │ │ ├── LOTShapeRectangle.h │ │ ├── LOTShapeRectangle.m │ │ ├── LOTShapeRepeater.h │ │ ├── LOTShapeRepeater.m │ │ ├── LOTShapeStar.h │ │ ├── LOTShapeStar.m │ │ ├── LOTShapeStroke.h │ │ ├── LOTShapeStroke.m │ │ ├── LOTShapeTransform.h │ │ ├── LOTShapeTransform.m │ │ ├── LOTShapeTrimPath.h │ │ └── LOTShapeTrimPath.m │ │ ├── Private │ │ ├── LOTAnimatedControl.m │ │ ├── LOTAnimatedSwitch.m │ │ ├── LOTAnimationCache.m │ │ ├── LOTAnimationTransitionController.m │ │ ├── LOTAnimationView.m │ │ ├── LOTAnimationView_Internal.h │ │ ├── LOTBlockCallback.m │ │ ├── LOTCacheProvider.m │ │ ├── LOTComposition.m │ │ ├── LOTInterpolatorCallback.m │ │ ├── LOTKeypath.m │ │ └── LOTValueCallback.m │ │ ├── PublicHeaders │ │ ├── LOTAnimatedControl.h │ │ ├── LOTAnimatedSwitch.h │ │ ├── LOTAnimationCache.h │ │ ├── LOTAnimationTransitionController.h │ │ ├── LOTAnimationView.h │ │ ├── LOTAnimationView_Compat.h │ │ ├── LOTBlockCallback.h │ │ ├── LOTCacheProvider.h │ │ ├── LOTComposition.h │ │ ├── LOTInterpolatorCallback.h │ │ ├── LOTKeypath.h │ │ ├── LOTValueCallback.h │ │ ├── LOTValueDelegate.h │ │ └── Lottie.h │ │ └── RenderSystem │ │ ├── AnimatorNodes │ │ ├── LOTCircleAnimator.h │ │ ├── LOTCircleAnimator.m │ │ ├── LOTPathAnimator.h │ │ ├── LOTPathAnimator.m │ │ ├── LOTPolygonAnimator.h │ │ ├── LOTPolygonAnimator.m │ │ ├── LOTPolystarAnimator.h │ │ ├── LOTPolystarAnimator.m │ │ ├── LOTRoundedRectAnimator.h │ │ └── LOTRoundedRectAnimator.m │ │ ├── InterpolatorNodes │ │ ├── LOTArrayInterpolator.h │ │ ├── LOTArrayInterpolator.m │ │ ├── LOTColorInterpolator.h │ │ ├── LOTColorInterpolator.m │ │ ├── LOTNumberInterpolator.h │ │ ├── LOTNumberInterpolator.m │ │ ├── LOTPathInterpolator.h │ │ ├── LOTPathInterpolator.m │ │ ├── LOTPointInterpolator.h │ │ ├── LOTPointInterpolator.m │ │ ├── LOTSizeInterpolator.h │ │ ├── LOTSizeInterpolator.m │ │ ├── LOTTransformInterpolator.h │ │ ├── LOTTransformInterpolator.m │ │ ├── LOTValueInterpolator.h │ │ └── LOTValueInterpolator.m │ │ ├── LOTAnimatorNode.h │ │ ├── LOTAnimatorNode.m │ │ ├── LOTRenderNode.h │ │ ├── LOTRenderNode.m │ │ ├── ManipulatorNodes │ │ ├── LOTTrimPathNode.h │ │ └── LOTTrimPathNode.m │ │ └── RenderNodes │ │ ├── LOTFillRenderer.h │ │ ├── LOTFillRenderer.m │ │ ├── LOTGradientFillRender.h │ │ ├── LOTGradientFillRender.m │ │ ├── LOTRenderGroup.h │ │ ├── LOTRenderGroup.m │ │ ├── LOTRepeaterRenderer.h │ │ ├── LOTRepeaterRenderer.m │ │ ├── LOTStrokeRenderer.h │ │ └── LOTStrokeRenderer.m └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md ├── Resources └── animation.gif └── _Pods.xcodeproj /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/EGOCircleMenu.xcworkspace -scheme EGOCircleMenu-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /EGOCircleMenu.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'EGOCircleMenu' 3 | s.version = '1.0.1' 4 | s.summary = 'Simple circle menu for iOS developers' 5 | 6 | s.description = <<-DESC 7 | TODO: Add long description of the pod here. 8 | DESC 9 | 10 | s.homepage = 'https://github.com/ego-cms/circlemenu.git' 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = { 'Pavel Chehov' => 'pchehov@ego-cms.com' } 13 | s.source = { :git => 'https://github.com/ego-cms/circlemenu.git', :tag => s.version.to_s } 14 | s.social_media_url = 'https://twitter.com/ego_innovations' 15 | 16 | s.ios.deployment_target = '11.0' 17 | 18 | s.source_files = 'EGOCircleMenu/Classes/*.swift' 19 | s.ios.deployment_target = '11.0' 20 | s.swift_version = '4.2' 21 | 22 | s.resource_bundles = { 23 | 'EGOCircleMenu' => ['EGOCircleMenu/Assets/*.json'] 24 | } 25 | 26 | s.dependency 'lottie-ios' 27 | s.dependency 'PromiseKit', '~> 6.0' 28 | end 29 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/AnimationDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimationExtension.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 12/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | class AnimationDelegate: NSObject, CAAnimationDelegate { 11 | var callback: (() -> ())? 12 | 13 | convenience init(_ callback: @escaping ()->()) { 14 | self.init() 15 | self.callback = callback 16 | } 17 | 18 | func animationDidStop(_ anim: CAAnimation, finished flag: Bool) { 19 | if let callback = callback { 20 | callback() 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/BasicCircleMenuButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BasicCircleMenuButton.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 08/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | public class BasicCircleMenuButton : UIButton { 11 | override public init(frame: CGRect) { 12 | super.init(frame: frame) 13 | layer.shadowColor = UIColor.black.cgColor 14 | layer.shadowOffset = CGSize(width: 0, height: 6) 15 | layer.shadowRadius = 6 16 | layer.shadowOpacity = 0.24 17 | } 18 | 19 | required init?(coder aDecoder: NSCoder) { 20 | fatalError("init(coder:) has not been implemented") 21 | } 22 | 23 | override public func didMoveToSuperview() { 24 | super.didMoveToSuperview() 25 | layer.cornerRadius = frame.height / 2 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/CircleButtonIndicator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleButtonIndicator.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 08/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | class CircleButtonIndicator: UIView { 11 | static let size:Double = 6 12 | private var oldPosition: CGPoint = CGPoint.zero 13 | 14 | var position: CGPoint = CGPoint.zero { 15 | didSet { 16 | oldPosition = position 17 | frame = CGRect(x: position.x, y: position.y, width: CGFloat(CircleButtonIndicator.size), height: CGFloat(CircleButtonIndicator.size)) 18 | } 19 | } 20 | 21 | convenience init() { 22 | self.init(frame: CGRect.zero) 23 | } 24 | 25 | override init(frame: CGRect) { 26 | super.init(frame: frame) 27 | layer.shadowColor = UIColor.black.cgColor 28 | isHidden = true 29 | } 30 | 31 | required init?(coder aDecoder: NSCoder) { 32 | fatalError("init(coder:) has not been implemented") 33 | } 34 | 35 | override func didMoveToSuperview() { 36 | super.didMoveToSuperview() 37 | layer.cornerRadius = bounds.height / 2 38 | } 39 | 40 | func resetPosition() { 41 | position = oldPosition 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/CircleMenuDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleMenuDelegate.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 08/11/2018. 6 | // 7 | 8 | import Foundation 9 | 10 | public protocol CircleMenuDelegate { 11 | func menuItemSelected(id: Int) 12 | } 13 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/CircleMenuItemModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleMenuItemModel.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 08/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | public class CircleMenuItemModel { 11 | public var id: Int? 12 | public var imageSource: UIImage? 13 | public var children: [CircleMenuItemModel]? 14 | public var hasChildren: Bool { 15 | guard let children = children else { 16 | return false 17 | } 18 | return children.count > 0 19 | } 20 | 21 | public init() { 22 | children = [CircleMenuItemModel]() 23 | } 24 | 25 | public init(id: Int?, imageSource: UIImage?, children: [CircleMenuItemModel]? = nil) { 26 | self.id = id 27 | self.imageSource = imageSource?.withRenderingMode(.alwaysTemplate) 28 | self.children = children ?? [CircleMenuItemModel]() 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/CircleMenuPanGestureAnalyzer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleMenuPanGestureAnalyzer.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 08/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | class CircleMenuPanGestureAnalyzer { 11 | private let minLenght = 30.0 12 | private var pointStart: CGPoint = CGPoint.zero 13 | private var pointEnd: CGPoint = CGPoint.zero 14 | private var view: UIView 15 | 16 | init(view: UIView) { 17 | self.view = view 18 | } 19 | 20 | func getDirection(for recognizer: UIPanGestureRecognizer) -> UISwipeGestureRecognizer.Direction? { 21 | var heightDiff = 0.0 22 | var widthDiff = 0.0 23 | var heightDiffAbs = 0.0 24 | var widthDiffAbs = 0.0 25 | 26 | var verticalDirection: UISwipeGestureRecognizer.Direction? 27 | var horizontalDirection: UISwipeGestureRecognizer.Direction? 28 | var generalDirection: UISwipeGestureRecognizer.Direction? 29 | 30 | switch recognizer.state { 31 | case .began: 32 | pointStart = recognizer.location(in: view) 33 | case .ended: 34 | pointEnd = recognizer.location(in: view) 35 | widthDiff = Double(pointStart.x - pointEnd.x) 36 | widthDiffAbs = abs(widthDiff) 37 | if widthDiffAbs < minLenght { 38 | widthDiff = 0 39 | widthDiffAbs = 0 40 | } 41 | heightDiff = Double(pointStart.y - pointEnd.y) 42 | heightDiffAbs = abs(heightDiff) 43 | if heightDiffAbs < minLenght { 44 | heightDiff = 0 45 | heightDiffAbs = 0 46 | } 47 | if widthDiff != 0 { 48 | horizontalDirection = widthDiff < 0 ? .right : .left 49 | } 50 | if heightDiff != 0 { 51 | verticalDirection = heightDiff < 0 ? .down : .up 52 | } 53 | if widthDiffAbs != heightDiffAbs { 54 | generalDirection = widthDiffAbs > heightDiffAbs ? horizontalDirection : verticalDirection 55 | } 56 | default: 57 | break 58 | } 59 | return generalDirection 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/JsonReader.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Pavel Chehov on 20/11/2018. 3 | // Copyright (c) 2018 Pavel Chehov. All rights reserved. 4 | // 5 | 6 | import Foundation 7 | 8 | final class JsonReader { 9 | public static func readJson(fileName: String) -> Any? { 10 | do { 11 | let podBundle = Bundle(for: JsonReader.self) 12 | if let bundleURL = podBundle.url(forResource: "EGOCircleMenu", withExtension: "bundle") { 13 | if let bundle = Bundle(url: bundleURL) { 14 | if let file = bundle.url(forResource: fileName, withExtension: "json") { 15 | let data = try Data(contentsOf: file) 16 | let json = try JSONSerialization.jsonObject(with: data, options: []) 17 | if let jsonObject = json as? [String: Any] { 18 | return jsonObject 19 | } else { 20 | assertionFailure("JSON is invalid") 21 | return nil 22 | } 23 | } else { 24 | assertionFailure("No file found!") 25 | return nil 26 | } 27 | } else { 28 | assertionFailure("Could not load the bundle") 29 | return nil 30 | } 31 | } else { 32 | assertionFailure("Could not create a path to the bundle") 33 | return nil 34 | } 35 | } catch { 36 | return nil 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/UIColorExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColorExtension.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 13/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIColor { 11 | convenience init(red: Int, green: Int, blue: Int) { 12 | assert(red >= 0 && red <= 255, "Invalid red component") 13 | assert(green >= 0 && green <= 255, "Invalid green component") 14 | assert(blue >= 0 && blue <= 255, "Invalid blue component") 15 | self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1.0) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /EGOCircleMenu/Classes/UIViewExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewExtension.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 13/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | extension CGRect { 11 | mutating func resize(x: Double? = nil, y: Double? = nil, width: Double? = nil, height: Double? = nil) { 12 | let origin = self.origin 13 | self = CGRect(x: x ?? Double(origin.x), y: y ?? Double(origin.y), width: width ?? Double(self.width), height: height ?? Double(self.height)) 14 | } 15 | 16 | mutating func resize(x: CGFloat? = nil, y: CGFloat? = nil, width: CGFloat? = nil, height: CGFloat? = nil) { 17 | self = CGRect(x: x ?? origin.x, y: y ?? origin.y, width: width ?? self.width, height: height ?? self.height) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Example/EGOCircleMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/EGOCircleMenu.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/EGOCircleMenu.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/EGOCircleMenu.xcworkspace/xcuserdata/pavel.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu.xcworkspace/xcuserdata/pavel.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/EGOCircleMenu/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 11/19/2018. 6 | // Copyright (c) 2018 Pavel Chehov. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/AppIcon.appiconset/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icHDR.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icHDR.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icHDR.imageset/icHDR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icHDR.imageset/icHDR.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icImage.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icImage.imageset/icImage.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icImage.imageset/icImage.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icMacro.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icMacro.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icMacro.imageset/icMacro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icMacro.imageset/icMacro.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icOneToOne.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icOneToOne.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icOneToOne.imageset/icOneToOne.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icOneToOne.imageset/icOneToOne.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icPanorama.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icPanorama.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icPanorama.imageset/icPanorama.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icPanorama.imageset/icPanorama.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icPhoto.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icPhoto.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icPhoto.imageset/icPhoto.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icPhoto.imageset/icPhoto.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icPortrait.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icPortrait.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icPortrait.imageset/icPortrait.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icPortrait.imageset/icPortrait.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icSeries.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icSeries.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icSeries.imageset/icSeries.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icSeries.imageset/icSeries.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icSixteenToNine.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icSixteenToNine.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icSixteenToNine.imageset/icSixteenToNine.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icSixteenToNine.imageset/icSixteenToNine.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icTimelapse.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icTimelapse.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icTimelapse.imageset/icTimelapse.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icTimelapse.imageset/icTimelapse.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icTimer.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icTimer.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icTimer.imageset/icTimer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icTimer.imageset/icTimer.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icVideo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icVideo.pdf" 6 | }, 7 | { 8 | "idiom" : "iphone" 9 | }, 10 | { 11 | "idiom" : "iphone", 12 | "subtype" : "retina4" 13 | }, 14 | { 15 | "idiom" : "ipad" 16 | }, 17 | { 18 | "idiom" : "watch" 19 | }, 20 | { 21 | "idiom" : "watch", 22 | "screen-width" : "<=145" 23 | }, 24 | { 25 | "idiom" : "watch", 26 | "screen-width" : ">161" 27 | }, 28 | { 29 | "idiom" : "watch", 30 | "screen-width" : ">145" 31 | }, 32 | { 33 | "idiom" : "watch", 34 | "screen-width" : ">183" 35 | }, 36 | { 37 | "idiom" : "mac" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | }, 44 | "properties" : { 45 | "template-rendering-intent" : "template", 46 | "preserves-vector-representation" : true 47 | } 48 | } -------------------------------------------------------------------------------- /Example/EGOCircleMenu/Assets.xcassets/icVideo.imageset/icVideo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Example/EGOCircleMenu/Assets.xcassets/icVideo.imageset/icVideo.pdf -------------------------------------------------------------------------------- /Example/EGOCircleMenu/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 | -------------------------------------------------------------------------------- /Example/EGOCircleMenu/MenuItemViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MenuItemViewController.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 19/11/2018. 6 | // 7 | 8 | import UIKit 9 | 10 | class MenuItemViewController: UIViewController { 11 | 12 | @IBOutlet weak var imageView: UIImageView! 13 | var imageSource: String! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | imageView.image = UIImage.init(named: imageSource) 18 | imageView.tintColor = UIColor.black 19 | navigationController?.isNavigationBarHidden = false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example/EGOCircleMenu/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // CircleMenu 4 | // 5 | // Created by Pavel Chehov on 08/11/2018. 6 | // 7 | 8 | import UIKit 9 | import EGOCircleMenu 10 | 11 | class ViewController: UIViewController, CircleMenuDelegate { 12 | 13 | var icons = [String]() 14 | let submenuIds = [2,3] 15 | let showItemSegueId = "showItem" 16 | var selectedItemId: Int? 17 | 18 | @IBOutlet weak var idLabel: UILabel! 19 | 20 | override func viewDidLoad() { 21 | super.viewDidLoad() 22 | 23 | icons.append(contentsOf: ["icImage", "icPanorama", "icVideo", 24 | "icPhoto","icTimelapse","icMacro", "icPortrait", "icSeries", "icTimer", 25 | "icSixteenToNine", "icOneToOne", "icHDR"]) 26 | 27 | let circleMenu = CircleMenu() 28 | circleMenu.attach(to: self) 29 | circleMenu.delegate = self 30 | circleMenu.circleMenuItems = createCircleMenuItems(count: 9) 31 | } 32 | 33 | override func viewWillAppear(_ animated: Bool) { 34 | super.viewWillAppear(animated) 35 | navigationController?.isNavigationBarHidden = true 36 | } 37 | 38 | func menuItemSelected(id: Int) { 39 | idLabel.text = "id: \(id)" 40 | selectedItemId = id 41 | guard id != 100, !submenuIds.contains(id) else { 42 | return 43 | } 44 | performSegue(withIdentifier: showItemSegueId, sender: self) 45 | } 46 | 47 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 48 | guard segue.identifier == showItemSegueId, let selectedItemId = selectedItemId else { 49 | return 50 | } 51 | let viewController = segue.destination as! MenuItemViewController 52 | viewController.imageSource = icons[selectedItemId] 53 | } 54 | 55 | private func createCircleMenuItems(count: Int) -> [CircleMenuItemModel] { 56 | var menuModels = [CircleMenuItemModel]() 57 | for i in 0.. '../' 5 | 6 | target 'EGOCircleMenu_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - EGOCircleMenu (0.1.0): 3 | - lottie-ios 4 | - PromiseKit (~> 6.0) 5 | - lottie-ios (2.5.2) 6 | - PromiseKit (6.5.3): 7 | - PromiseKit/CorePromise (= 6.5.3) 8 | - PromiseKit/Foundation (= 6.5.3) 9 | - PromiseKit/UIKit (= 6.5.3) 10 | - PromiseKit/CorePromise (6.5.3) 11 | - PromiseKit/Foundation (6.5.3): 12 | - PromiseKit/CorePromise 13 | - PromiseKit/UIKit (6.5.3): 14 | - PromiseKit/CorePromise 15 | 16 | DEPENDENCIES: 17 | - EGOCircleMenu (from `../`) 18 | 19 | SPEC REPOS: 20 | https://github.com/cocoapods/specs.git: 21 | - lottie-ios 22 | - PromiseKit 23 | 24 | EXTERNAL SOURCES: 25 | EGOCircleMenu: 26 | :path: "../" 27 | 28 | SPEC CHECKSUMS: 29 | EGOCircleMenu: ee63227ff0d8b25aab5b9ad3e4019f9de381f829 30 | lottie-ios: 3fef45d3fabe63e3c7c2eb603dd64ddfffc73062 31 | PromiseKit: c609029bdd801f792551a504c695c7d3098b42cd 32 | 33 | PODFILE CHECKSUM: 3a9f37aa2d60e2fca527ccf36d3239a4c6309f4d 34 | 35 | COCOAPODS: 1.5.3 36 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/EGOCircleMenu.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EGOCircleMenu", 3 | "version": "0.1.0", 4 | "summary": "Simple circle menu for iOS developers", 5 | "description": "TODO: Add long description of the pod here.", 6 | "homepage": "https://github.com/ego-cms/circlemenu.git", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Pavel Chehov": "pavel.chehov.personal@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/ego-cms/circlemenu.git", 16 | "tag": "0.1.0" 17 | }, 18 | "social_media_url": "https://twitter.com/ego_innovations", 19 | "platforms": { 20 | "ios": "11.0" 21 | }, 22 | "source_files": "EGOCircleMenu/Classes/*.swift", 23 | "swift_version": "4.2", 24 | "resource_bundles": { 25 | "EGOCircleMenu": [ 26 | "EGOCircleMenu/Assets/*.json" 27 | ] 28 | }, 29 | "dependencies": { 30 | "lottie-ios": [ 31 | 32 | ], 33 | "PromiseKit": [ 34 | "~> 6.0" 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - EGOCircleMenu (0.1.0): 3 | - lottie-ios 4 | - PromiseKit (~> 6.0) 5 | - lottie-ios (2.5.2) 6 | - PromiseKit (6.5.3): 7 | - PromiseKit/CorePromise (= 6.5.3) 8 | - PromiseKit/Foundation (= 6.5.3) 9 | - PromiseKit/UIKit (= 6.5.3) 10 | - PromiseKit/CorePromise (6.5.3) 11 | - PromiseKit/Foundation (6.5.3): 12 | - PromiseKit/CorePromise 13 | - PromiseKit/UIKit (6.5.3): 14 | - PromiseKit/CorePromise 15 | 16 | DEPENDENCIES: 17 | - EGOCircleMenu (from `../`) 18 | 19 | SPEC REPOS: 20 | https://github.com/cocoapods/specs.git: 21 | - lottie-ios 22 | - PromiseKit 23 | 24 | EXTERNAL SOURCES: 25 | EGOCircleMenu: 26 | :path: "../" 27 | 28 | SPEC CHECKSUMS: 29 | EGOCircleMenu: ee63227ff0d8b25aab5b9ad3e4019f9de381f829 30 | lottie-ios: 3fef45d3fabe63e3c7c2eb603dd64ddfffc73062 31 | PromiseKit: c609029bdd801f792551a504c695c7d3098b42cd 32 | 33 | PODFILE CHECKSUM: 3a9f37aa2d60e2fca527ccf36d3239a4c6309f4d 34 | 35 | COCOAPODS: 1.5.3 36 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/pavel.xcuserdatad/xcschemes/EGOCircleMenu.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/pavel.xcuserdatad/xcschemes/PromiseKit.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/pavel.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | EGOCircleMenu-EGOCircleMenu.xcscheme 8 | 9 | isShown 10 | 11 | 12 | EGOCircleMenu.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Pods-EGOCircleMenu_Example.xcscheme 18 | 19 | isShown 20 | 21 | 22 | Pods-EGOCircleMenu_Tests.xcscheme 23 | 24 | isShown 25 | 26 | 27 | PromiseKit.xcscheme 28 | 29 | isShown 30 | 31 | 32 | lottie-ios.xcscheme 33 | 34 | isShown 35 | 36 | 37 | 38 | SuppressBuildableAutocreation 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | 5 | /** 6 | To import the `NSNotificationCenter` category: 7 | 8 | use_frameworks! 9 | pod "PromiseKit/Foundation" 10 | 11 | Or `NSNotificationCenter` is one of the categories imported by the umbrella pod: 12 | 13 | use_frameworks! 14 | pod "PromiseKit" 15 | 16 | And then in your sources: 17 | 18 | #import 19 | */ 20 | @interface NSNotificationCenter (PromiseKit) 21 | /** 22 | Observe the named notification once. 23 | 24 | [NSNotificationCenter once:UIKeyboardWillShowNotification].then(^(id note, id userInfo){ 25 | UIViewAnimationCurve curve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue]; 26 | CGFloat duration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue]; 27 | 28 | return [UIView promiseWithDuration:duration delay:0.0 options:(curve << 16) animations:^{ 29 | 30 | }]; 31 | }); 32 | 33 | @warning *Important* Promises only resolve once. If you need your block to execute more than once then use `-addObserverForName:object:queue:usingBlock:`. 34 | 35 | @param notificationName The name of the notification for which to register the observer. 36 | 37 | @return A promise that fulfills with two parameters: 38 | 39 | 1. The NSNotification object. 40 | 2. The NSNotification’s userInfo property. 41 | */ 42 | + (AnyPromise *)once:(NSString *)notificationName NS_REFINED_FOR_SWIFT; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+AnyPromise.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "PMKFoundation.h" 4 | 5 | @implementation NSNotificationCenter (PromiseKit) 6 | 7 | + (AnyPromise *)once:(NSString *)name { 8 | return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { 9 | __block id identifier; 10 | identifier = [[NSNotificationCenter defaultCenter] addObserverForName:name object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) { 11 | [[NSNotificationCenter defaultCenter] removeObserver:identifier name:name object:nil]; 12 | identifier = nil; 13 | resolve(PMKManifold(note, note.userInfo)); 14 | }]; 15 | }]; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/NSNotificationCenter+Promise.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | #if !PMKCocoaPods 3 | import PromiseKit 4 | #endif 5 | 6 | /** 7 | To import the `NSNotificationCenter` category: 8 | 9 | use_frameworks! 10 | pod "PromiseKit/Foundation" 11 | 12 | Or `NSNotificationCenter` is one of the categories imported by the umbrella pod: 13 | 14 | use_frameworks! 15 | pod "PromiseKit" 16 | 17 | And then in your sources: 18 | 19 | import PromiseKit 20 | */ 21 | extension NotificationCenter { 22 | /// Observe the named notification once 23 | public func observe(once name: Notification.Name, object: Any? = nil) -> Guarantee { 24 | let (promise, fulfill) = Guarantee.pending() 25 | #if os(Linux) && ((swift(>=4.0) && !swift(>=4.0.1)) || (swift(>=3.0) && !swift(>=3.2.1))) 26 | let id = addObserver(forName: name, object: object, queue: nil, usingBlock: fulfill) 27 | #else 28 | let id = addObserver(forName: name, object: object, queue: nil, using: fulfill) 29 | #endif 30 | promise.done { _ in self.removeObserver(id) } 31 | return promise 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/NSObject+Promise.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | #if !PMKCocoaPods 3 | import PromiseKit 4 | #endif 5 | 6 | /** 7 | To import the `NSObject` category: 8 | 9 | use_frameworks! 10 | pod "PromiseKit/Foundation" 11 | 12 | Or `NSObject` is one of the categories imported by the umbrella pod: 13 | 14 | use_frameworks! 15 | pod "PromiseKit" 16 | 17 | And then in your sources: 18 | 19 | import PromiseKit 20 | */ 21 | extension NSObject { 22 | /** 23 | - Returns: A promise that resolves when the provided keyPath changes. 24 | - Warning: *Important* The promise must not outlive the object under observation. 25 | - SeeAlso: Apple’s KVO documentation. 26 | */ 27 | public func observe(_: PMKNamespacer, keyPath: String) -> Guarantee { 28 | return Guarantee { KVOProxy(observee: self, keyPath: keyPath, resolve: $0) } 29 | } 30 | } 31 | 32 | private class KVOProxy: NSObject { 33 | var retainCycle: KVOProxy? 34 | let fulfill: (Any?) -> Void 35 | 36 | @discardableResult 37 | init(observee: NSObject, keyPath: String, resolve: @escaping (Any?) -> Void) { 38 | fulfill = resolve 39 | super.init() 40 | observee.addObserver(self, forKeyPath: keyPath, options: NSKeyValueObservingOptions.new, context: pointer) 41 | retainCycle = self 42 | } 43 | 44 | fileprivate override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) { 45 | if let change = change, context == pointer { 46 | defer { retainCycle = nil } 47 | fulfill(change[NSKeyValueChangeKey.newKey]) 48 | if let object = object as? NSObject, let keyPath = keyPath { 49 | object.removeObserver(self, forKeyPath: keyPath) 50 | } 51 | } 52 | } 53 | 54 | private lazy var pointer: UnsafeMutableRawPointer = { 55 | return Unmanaged.passUnretained(self).toOpaque() 56 | }() 57 | } 58 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.h: -------------------------------------------------------------------------------- 1 | #if TARGET_OS_MAC && !TARGET_OS_EMBEDDED && !TARGET_OS_SIMULATOR 2 | 3 | #import 4 | #import 5 | 6 | #define PMKTaskErrorLaunchPathKey @"PMKTaskErrorLaunchPathKey" 7 | #define PMKTaskErrorArgumentsKey @"PMKTaskErrorArgumentsKey" 8 | #define PMKTaskErrorStandardOutputKey @"PMKTaskErrorStandardOutputKey" 9 | #define PMKTaskErrorStandardErrorKey @"PMKTaskErrorStandardErrorKey" 10 | #define PMKTaskErrorExitStatusKey @"PMKTaskErrorExitStatusKey" 11 | 12 | /** 13 | To import the `NSTask` category: 14 | 15 | use_frameworks! 16 | pod "PromiseKit/Foundation" 17 | 18 | Or `NSTask` is one of the categories imported by the umbrella pod: 19 | 20 | use_frameworks! 21 | pod "PromiseKit" 22 | 23 | And then in your sources: 24 | 25 | #import 26 | */ 27 | @interface NSTask (PromiseKit) 28 | 29 | /** 30 | Launches the receiver and resolves when it exits. 31 | 32 | If the task fails the promise is rejected with code `PMKTaskError`, and 33 | `userInfo` keys: `PMKTaskErrorStandardOutputKey`, 34 | `PMKTaskErrorStandardErrorKey` and `PMKTaskErrorExitStatusKey`. 35 | 36 | NSTask *task = [NSTask new]; 37 | task.launchPath = @"/usr/bin/basename"; 38 | task.arguments = @[@"/usr/bin/sleep"]; 39 | [task promise].then(^(NSString *stdout){ 40 | //… 41 | }); 42 | 43 | @return A promise that fulfills with three parameters: 44 | 45 | 1) The stdout interpreted as a UTF8 string. 46 | 2) The stderr interpreted as a UTF8 string. 47 | 3) The stdout as `NSData`. 48 | */ 49 | - (AnyPromise *)promise NS_REFINED_FOR_SWIFT; 50 | 51 | @end 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/NSTask+AnyPromise.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | #import 6 | 7 | #if TARGET_OS_MAC && !TARGET_OS_EMBEDDED && !TARGET_OS_SIMULATOR 8 | 9 | #import "NSTask+AnyPromise.h" 10 | 11 | @implementation NSTask (PromiseKit) 12 | 13 | - (AnyPromise *)promise { 14 | return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { 15 | self.standardOutput = [NSPipe pipe]; 16 | self.standardError = [NSPipe pipe]; 17 | self.terminationHandler = ^(NSTask *task){ 18 | id stdoutData = [[task.standardOutput fileHandleForReading] readDataToEndOfFile]; 19 | id stdoutString = [[NSString alloc] initWithData:stdoutData encoding:NSUTF8StringEncoding]; 20 | id stderrData = [[task.standardError fileHandleForReading] readDataToEndOfFile]; 21 | id stderrString = [[NSString alloc] initWithData:stderrData encoding:NSUTF8StringEncoding]; 22 | 23 | if (task.terminationReason == NSTaskTerminationReasonExit && self.terminationStatus == 0) { 24 | resolve(PMKManifold(stdoutString, stderrString, stdoutData)); 25 | } else { 26 | id cmd = [NSMutableArray arrayWithObject:task.launchPath]; 27 | [cmd addObjectsFromArray:task.arguments]; 28 | cmd = [cmd componentsJoinedByString:@" "]; 29 | 30 | id info = @{ 31 | NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Failed executing: %@.", cmd], 32 | PMKTaskErrorStandardOutputKey: stdoutString, 33 | PMKTaskErrorStandardErrorKey: stderrString, 34 | PMKTaskErrorExitStatusKey: @(task.terminationStatus), 35 | }; 36 | 37 | resolve([NSError errorWithDomain:PMKErrorDomain code:PMKTaskError userInfo:info]); 38 | } 39 | }; 40 | 41 | #if __clang_major__ >= 9 42 | if (@available(macOS 10.13, *)) { 43 | NSError *error = nil; 44 | 45 | if (![self launchAndReturnError:&error]) { 46 | resolve(error); 47 | } 48 | } else { 49 | [self launch]; 50 | } 51 | #else 52 | [self launch]; // might @throw 53 | #endif 54 | }]; 55 | } 56 | 57 | @end 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/PMKFoundation.h: -------------------------------------------------------------------------------- 1 | #import "NSNotificationCenter+AnyPromise.h" 2 | #import "NSURLSession+AnyPromise.h" 3 | #import "NSTask+AnyPromise.h" 4 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/Foundation/Sources/afterlife.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | #if !PMKCocoaPods 3 | import PromiseKit 4 | #endif 5 | 6 | /** 7 | - Returns: A promise that resolves when the provided object deallocates 8 | - Important: The promise is not guarenteed to resolve immediately when the provided object is deallocated. So you cannot write code that depends on exact timing. 9 | */ 10 | public func after(life object: NSObject) -> Guarantee { 11 | var reaper = objc_getAssociatedObject(object, &handle) as? GrimReaper 12 | if reaper == nil { 13 | reaper = GrimReaper() 14 | objc_setAssociatedObject(object, &handle, reaper, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) 15 | } 16 | return reaper!.promise 17 | } 18 | 19 | private var handle: UInt8 = 0 20 | 21 | private class GrimReaper: NSObject { 22 | deinit { 23 | fulfill(()) 24 | } 25 | let (promise, fulfill) = Guarantee.pending() 26 | } 27 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/UIKit/Sources/PMKUIKit.h: -------------------------------------------------------------------------------- 1 | #import "UIView+AnyPromise.h" 2 | #import "UIViewController+AnyPromise.h" 3 | 4 | typedef NS_OPTIONS(NSInteger, PMKAnimationOptions) { 5 | PMKAnimationOptionsNone = 1 << 0, 6 | PMKAnimationOptionsAppear = 1 << 1, 7 | PMKAnimationOptionsDisappear = 1 << 2, 8 | }; 9 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/UIKit/Sources/UIView+AnyPromise.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+PromiseKit_UIAnimation.m 3 | // YahooDenaStudy 4 | // 5 | // Created by Masafumi Yoshida on 2014/07/11. 6 | // Copyright (c) 2014年 DeNA. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIView+AnyPromise.h" 11 | 12 | 13 | #define CopyPasta \ 14 | NSAssert([NSThread isMainThread], @"UIKit animation must be performed on the main thread"); \ 15 | \ 16 | if (![NSThread isMainThread]) { \ 17 | id error = [NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"Animation was attempted on a background thread"}]; \ 18 | return [AnyPromise promiseWithValue:error]; \ 19 | } \ 20 | \ 21 | PMKResolver resolve = nil; \ 22 | AnyPromise *promise = [[AnyPromise alloc] initWithResolver:&resolve]; 23 | 24 | 25 | @implementation UIView (PromiseKit) 26 | 27 | + (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration animations:(void (^)(void))animations { 28 | return [self promiseWithDuration:duration delay:0 options:0 animations:animations]; 29 | } 30 | 31 | + (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void(^)(void))animations 32 | { 33 | CopyPasta; 34 | 35 | [UIView animateWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) { 36 | resolve(@(finished)); 37 | }]; 38 | 39 | return promise; 40 | } 41 | 42 | + (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay usingSpringWithDamping:(CGFloat)dampingRatio initialSpringVelocity:(CGFloat)velocity options:(UIViewAnimationOptions)options animations:(void(^)(void))animations 43 | { 44 | CopyPasta; 45 | 46 | [UIView animateWithDuration:duration delay:delay usingSpringWithDamping:dampingRatio initialSpringVelocity:velocity options:options animations:animations completion:^(BOOL finished) { 47 | resolve(@(finished)); 48 | }]; 49 | 50 | return promise; 51 | } 52 | 53 | + (AnyPromise *)promiseWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewKeyframeAnimationOptions)options keyframeAnimations:(void(^)(void))animations 54 | { 55 | CopyPasta; 56 | 57 | [UIView animateKeyframesWithDuration:duration delay:delay options:options animations:animations completion:^(BOOL finished) { 58 | resolve(@(finished)); 59 | }]; 60 | 61 | return promise; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewController+AnyPromise.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | /** 5 | To import the `UIViewController` category: 6 | 7 | use_frameworks! 8 | pod "PromiseKit/UIKit" 9 | 10 | Or `UIKit` is one of the categories imported by the umbrella pod: 11 | 12 | use_frameworks! 13 | pod "PromiseKit" 14 | 15 | And then in your sources: 16 | 17 | @import PromiseKit; 18 | */ 19 | @interface UIViewController (PromiseKit) 20 | 21 | /** 22 | Presents a view controller modally. 23 | 24 | If the view controller is one of the following: 25 | 26 | - MFMailComposeViewController 27 | - MFMessageComposeViewController 28 | - UIImagePickerController 29 | - SLComposeViewController 30 | 31 | Then PromiseKit presents the view controller returning a promise that is 32 | resolved as per the documentation for those classes. Eg. if you present a 33 | `UIImagePickerController` the view controller will be presented for you 34 | and the returned promise will resolve with the media the user selected. 35 | 36 | [self promiseViewController:[MFMailComposeViewController new] animated:YES completion:nil].then(^{ 37 | //… 38 | }); 39 | 40 | Otherwise PromiseKit expects your view controller to implement a 41 | `promise` property. This promise will be returned from this method and 42 | presentation and dismissal of the presented view controller will be 43 | managed for you. 44 | 45 | \@interface MyViewController: UIViewController 46 | @property (readonly) AnyPromise *promise; 47 | @end 48 | 49 | @implementation MyViewController { 50 | PMKResolver resolve; 51 | } 52 | 53 | - (void)viewDidLoad { 54 | _promise = [[AnyPromise alloc] initWithResolver:&resolve]; 55 | } 56 | 57 | - (void)later { 58 | resolve(@"some fulfilled value"); 59 | } 60 | 61 | @end 62 | 63 | [self promiseViewController:[MyViewController new] aniamted:YES completion:nil].then(^(id value){ 64 | // value == @"some fulfilled value" 65 | }); 66 | 67 | @return A promise that can be resolved by the presented view controller. 68 | */ 69 | - (AnyPromise *)promiseViewController:(UIViewController *)vc animated:(BOOL)animated completion:(void (^)(void))block NS_REFINED_FOR_SWIFT; 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Extensions/UIKit/Sources/UIViewPropertyAnimator+Promise.swift: -------------------------------------------------------------------------------- 1 | #if !PMKCocoaPods 2 | import PromiseKit 3 | #endif 4 | import UIKit 5 | 6 | @available(iOS 10, tvOS 10, *) 7 | public extension UIViewPropertyAnimator { 8 | func startAnimation(_: PMKNamespacer) -> Guarantee { 9 | return Guarantee { 10 | addCompletion($0) 11 | startAnimation() 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016-present, Max Howell; mxcl@me.com 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/AnyPromise+Private.h: -------------------------------------------------------------------------------- 1 | @import Foundation.NSError; 2 | @import Foundation.NSPointerArray; 3 | 4 | #if TARGET_OS_IPHONE 5 | #define NSPointerArrayMake(N) ({ \ 6 | NSPointerArray *aa = [NSPointerArray strongObjectsPointerArray]; \ 7 | aa.count = N; \ 8 | aa; \ 9 | }) 10 | #else 11 | static inline NSPointerArray * __nonnull NSPointerArrayMake(NSUInteger count) { 12 | #pragma clang diagnostic push 13 | #pragma clang diagnostic ignored "-Wdeprecated-declarations" 14 | NSPointerArray *aa = [[NSPointerArray class] respondsToSelector:@selector(strongObjectsPointerArray)] 15 | ? [NSPointerArray strongObjectsPointerArray] 16 | : [NSPointerArray pointerArrayWithStrongObjects]; 17 | #pragma clang diagnostic pop 18 | aa.count = count; 19 | return aa; 20 | } 21 | #endif 22 | 23 | #define IsError(o) [o isKindOfClass:[NSError class]] 24 | #define IsPromise(o) [o isKindOfClass:[AnyPromise class]] 25 | 26 | #import "AnyPromise.h" 27 | 28 | @class PMKArray; 29 | 30 | @interface AnyPromise () 31 | - (void)__pipe:(void(^ __nonnull)(__nullable id))block NS_REFINED_FOR_SWIFT; 32 | @end 33 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/Configuration.swift: -------------------------------------------------------------------------------- 1 | import Dispatch 2 | 3 | /// PromiseKit’s configurable parameters 4 | public struct PMKConfiguration { 5 | /// The default queues that promises handlers dispatch to 6 | public var Q: (map: DispatchQueue?, return: DispatchQueue?) = (map: DispatchQueue.main, return: DispatchQueue.main) 7 | 8 | /// The default catch-policy for all `catch` and `resolve` 9 | public var catchPolicy = CatchPolicy.allErrorsExceptCancellation 10 | } 11 | 12 | /// Modify this as soon as possible in your application’s lifetime 13 | public var conf = PMKConfiguration() 14 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/CustomStringConvertible.swift: -------------------------------------------------------------------------------- 1 | 2 | extension Promise: CustomStringConvertible { 3 | /// - Returns: A description of the state of this promise. 4 | public var description: String { 5 | switch result { 6 | case nil: 7 | return "Promise(…\(T.self))" 8 | case .rejected(let error)?: 9 | return "Promise(\(error))" 10 | case .fulfilled(let value)?: 11 | return "Promise(\(value))" 12 | } 13 | } 14 | } 15 | 16 | extension Promise: CustomDebugStringConvertible { 17 | /// - Returns: A debug-friendly description of the state of this promise. 18 | public var debugDescription: String { 19 | switch box.inspect() { 20 | case .pending(let handlers): 21 | return "Promise<\(T.self)>.pending(handlers: \(handlers.bodies.count))" 22 | case .resolved(.rejected(let error)): 23 | return "Promise<\(T.self)>.rejected(\(type(of: error)).\(error))" 24 | case .resolved(.fulfilled(let value)): 25 | return "Promise<\(T.self)>.fulfilled(\(value))" 26 | } 27 | } 28 | } 29 | 30 | #if !SWIFT_PACKAGE 31 | extension AnyPromise { 32 | /// - Returns: A description of the state of this promise. 33 | override open var description: String { 34 | switch box.inspect() { 35 | case .pending: 36 | return "AnyPromise(…)" 37 | case .resolved(let obj?): 38 | return "AnyPromise(\(obj))" 39 | case .resolved(nil): 40 | return "AnyPromise(nil)" 41 | } 42 | } 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/PromiseKit.h: -------------------------------------------------------------------------------- 1 | #import "fwd.h" 2 | #import "AnyPromise.h" 3 | 4 | #import // `FOUNDATION_EXPORT` 5 | 6 | FOUNDATION_EXPORT double PromiseKitVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; 8 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/Resolver.swift: -------------------------------------------------------------------------------- 1 | /// An object for resolving promises 2 | public final class Resolver { 3 | let box: Box> 4 | 5 | init(_ box: Box>) { 6 | self.box = box 7 | } 8 | 9 | deinit { 10 | if case .pending = box.inspect() { 11 | print("PromiseKit: warning: pending promise deallocated") 12 | } 13 | } 14 | } 15 | 16 | public extension Resolver { 17 | /// Fulfills the promise with the provided value 18 | func fulfill(_ value: T) { 19 | box.seal(.fulfilled(value)) 20 | } 21 | 22 | /// Rejects the promise with the provided error 23 | func reject(_ error: Error) { 24 | box.seal(.rejected(error)) 25 | } 26 | 27 | /// Resolves the promise with the provided result 28 | public func resolve(_ result: Result) { 29 | box.seal(result) 30 | } 31 | 32 | /// Resolves the promise with the provided value or error 33 | public func resolve(_ obj: T?, _ error: Error?) { 34 | if let error = error { 35 | reject(error) 36 | } else if let obj = obj { 37 | fulfill(obj) 38 | } else { 39 | reject(PMKError.invalidCallingConvention) 40 | } 41 | } 42 | 43 | /// Fulfills the promise with the provided value unless the provided error is non-nil 44 | public func resolve(_ obj: T, _ error: Error?) { 45 | if let error = error { 46 | reject(error) 47 | } else { 48 | fulfill(obj) 49 | } 50 | } 51 | 52 | /// Resolves the promise, provided for non-conventional value-error ordered completion handlers. 53 | public func resolve(_ error: Error?, _ obj: T?) { 54 | resolve(obj, error) 55 | } 56 | } 57 | 58 | #if swift(>=3.1) 59 | extension Resolver where T == Void { 60 | /// Fulfills the promise unless error is non-nil 61 | public func resolve(_ error: Error?) { 62 | if let error = error { 63 | reject(error) 64 | } else { 65 | fulfill(()) 66 | } 67 | } 68 | } 69 | #endif 70 | 71 | public enum Result { 72 | case fulfilled(T) 73 | case rejected(Error) 74 | } 75 | 76 | public extension PromiseKit.Result { 77 | var isFulfilled: Bool { 78 | switch self { 79 | case .fulfilled: 80 | return true 81 | case .rejected: 82 | return false 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/after.m: -------------------------------------------------------------------------------- 1 | #import "AnyPromise.h" 2 | @import Dispatch; 3 | @import Foundation.NSDate; 4 | @import Foundation.NSValue; 5 | 6 | /// @return A promise that fulfills after the specified duration. 7 | AnyPromise *PMKAfter(NSTimeInterval duration) { 8 | return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { 9 | dispatch_time_t time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(duration * NSEC_PER_SEC)); 10 | dispatch_after(time, dispatch_get_global_queue(0, 0), ^{ 11 | resolve(@(duration)); 12 | }); 13 | }]; 14 | } 15 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/after.swift: -------------------------------------------------------------------------------- 1 | import struct Foundation.TimeInterval 2 | import Dispatch 3 | 4 | /** 5 | after(.seconds(2)).then { 6 | //… 7 | } 8 | 9 | - Returns: A guarantee that resolves after the specified duration. 10 | */ 11 | public func after(seconds: TimeInterval) -> Guarantee { 12 | let (rg, seal) = Guarantee.pending() 13 | let when = DispatchTime.now() + seconds 14 | #if swift(>=4.0) 15 | q.asyncAfter(deadline: when) { seal(()) } 16 | #else 17 | q.asyncAfter(deadline: when, execute: seal) 18 | #endif 19 | return rg 20 | } 21 | 22 | /** 23 | after(seconds: 1.5).then { 24 | //… 25 | } 26 | 27 | - Returns: A guarantee that resolves after the specified duration. 28 | */ 29 | public func after(_ interval: DispatchTimeInterval) -> Guarantee { 30 | let (rg, seal) = Guarantee.pending() 31 | let when = DispatchTime.now() + interval 32 | #if swift(>=4.0) 33 | q.asyncAfter(deadline: when) { seal(()) } 34 | #else 35 | q.asyncAfter(deadline: when, execute: seal) 36 | #endif 37 | return rg 38 | } 39 | 40 | private var q: DispatchQueue { 41 | if #available(macOS 10.10, iOS 8.0, tvOS 9.0, watchOS 2.0, *) { 42 | return DispatchQueue.global(qos: .default) 43 | } else { 44 | return DispatchQueue.global(priority: .default) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/dispatch_promise.m: -------------------------------------------------------------------------------- 1 | #import "AnyPromise.h" 2 | @import Dispatch; 3 | 4 | AnyPromise *dispatch_promise_on(dispatch_queue_t queue, id block) { 5 | return [AnyPromise promiseWithValue:nil].thenOn(queue, block); 6 | } 7 | 8 | AnyPromise *dispatch_promise(id block) { 9 | return dispatch_promise_on(dispatch_get_global_queue(0, 0), block); 10 | } 11 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/firstly.swift: -------------------------------------------------------------------------------- 1 | import Dispatch 2 | 3 | /** 4 | Judicious use of `firstly` *may* make chains more readable. 5 | 6 | Compare: 7 | 8 | URLSession.shared.dataTask(url: url1).then { 9 | URLSession.shared.dataTask(url: url2) 10 | }.then { 11 | URLSession.shared.dataTask(url: url3) 12 | } 13 | 14 | With: 15 | 16 | firstly { 17 | URLSession.shared.dataTask(url: url1) 18 | }.then { 19 | URLSession.shared.dataTask(url: url2) 20 | }.then { 21 | URLSession.shared.dataTask(url: url3) 22 | } 23 | 24 | - Note: the block you pass excecutes immediately on the current thread/queue. 25 | */ 26 | public func firstly(execute body: () throws -> U) -> Promise { 27 | do { 28 | let rp = Promise(.pending) 29 | try body().pipe(to: rp.box.seal) 30 | return rp 31 | } catch { 32 | return Promise(error: error) 33 | } 34 | } 35 | 36 | /// - See: firstly() 37 | public func firstly(execute body: () -> Guarantee) -> Guarantee { 38 | return body() 39 | } 40 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/hang.m: -------------------------------------------------------------------------------- 1 | #import "AnyPromise.h" 2 | #import "AnyPromise+Private.h" 3 | @import CoreFoundation.CFRunLoop; 4 | 5 | /** 6 | Suspends the active thread waiting on the provided promise. 7 | 8 | @return The value of the provided promise once resolved. 9 | */ 10 | id PMKHang(AnyPromise *promise) { 11 | if (promise.pending) { 12 | static CFRunLoopSourceContext context; 13 | 14 | CFRunLoopRef runLoop = CFRunLoopGetCurrent(); 15 | CFRunLoopSourceRef runLoopSource = CFRunLoopSourceCreate(NULL, 0, &context); 16 | CFRunLoopAddSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); 17 | 18 | promise.ensure(^{ 19 | CFRunLoopStop(runLoop); 20 | }); 21 | while (promise.pending) { 22 | CFRunLoopRun(); 23 | } 24 | CFRunLoopRemoveSource(runLoop, runLoopSource, kCFRunLoopDefaultMode); 25 | CFRelease(runLoopSource); 26 | } 27 | 28 | return promise.value; 29 | } 30 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/hang.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import CoreFoundation 3 | 4 | /** 5 | Runs the active run-loop until the provided promise resolves. 6 | 7 | This is for debug and is not a generally safe function to use in your applications. We mostly provide it for use in testing environments. 8 | 9 | Still if you like, study how it works (by reading the sources!) and use at your own risk. 10 | 11 | - Returns: The value of the resolved promise 12 | - Throws: An error, should the promise be rejected 13 | - See: `wait()` 14 | */ 15 | public func hang(_ promise: Promise) throws -> T { 16 | #if os(Linux) || os(Android) 17 | // isMainThread is not yet implemented on Linux. 18 | let runLoopModeRaw = RunLoopMode.defaultRunLoopMode.rawValue._bridgeToObjectiveC() 19 | let runLoopMode: CFString = unsafeBitCast(runLoopModeRaw, to: CFString.self) 20 | #else 21 | guard Thread.isMainThread else { 22 | // hang doesn't make sense on threads that aren't the main thread. 23 | // use `.wait()` on those threads. 24 | fatalError("Only call hang() on the main thread.") 25 | } 26 | let runLoopMode: CFRunLoopMode = CFRunLoopMode.defaultMode 27 | #endif 28 | 29 | if promise.isPending { 30 | var context = CFRunLoopSourceContext() 31 | let runLoop = CFRunLoopGetCurrent() 32 | let runLoopSource = CFRunLoopSourceCreate(nil, 0, &context) 33 | CFRunLoopAddSource(runLoop, runLoopSource, runLoopMode) 34 | 35 | _ = promise.ensure { 36 | CFRunLoopStop(runLoop) 37 | } 38 | 39 | while promise.isPending { 40 | CFRunLoopRun() 41 | } 42 | CFRunLoopRemoveSource(runLoop, runLoopSource, runLoopMode) 43 | } 44 | 45 | switch promise.result! { 46 | case .rejected(let error): 47 | throw error 48 | case .fulfilled(let value): 49 | return value 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/join.m: -------------------------------------------------------------------------------- 1 | @import Foundation.NSDictionary; 2 | #import "AnyPromise+Private.h" 3 | #import 4 | @import Foundation.NSError; 5 | @import Foundation.NSNull; 6 | #import "PromiseKit.h" 7 | #import 8 | 9 | /** 10 | Waits on all provided promises. 11 | 12 | `PMKWhen` rejects as soon as one of the provided promises rejects. `PMKJoin` waits on all provided promises, then rejects if any of those promises rejects, otherwise it fulfills with values from the provided promises. 13 | 14 | - Returns: A new promise that resolves once all the provided promises resolve. 15 | */ 16 | AnyPromise *PMKJoin(NSArray *promises) { 17 | if (promises == nil) 18 | return [AnyPromise promiseWithValue:[NSError errorWithDomain:PMKErrorDomain code:PMKInvalidUsageError userInfo:@{NSLocalizedDescriptionKey: @"PMKJoin(nil)"}]]; 19 | 20 | if (promises.count == 0) 21 | return [AnyPromise promiseWithValue:promises]; 22 | 23 | return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { 24 | NSPointerArray *results = NSPointerArrayMake(promises.count); 25 | __block atomic_int countdown = promises.count; 26 | __block BOOL rejected = NO; 27 | 28 | [promises enumerateObjectsUsingBlock:^(AnyPromise *promise, NSUInteger ii, BOOL *stop) { 29 | [promise __pipe:^(id value) { 30 | 31 | if (IsError(value)) { 32 | rejected = YES; 33 | } 34 | 35 | //FIXME surely this isn't thread safe on multiple cores? 36 | [results replacePointerAtIndex:ii withPointer:(__bridge void *)(value ?: [NSNull null])]; 37 | 38 | atomic_fetch_sub_explicit(&countdown, 1, memory_order_relaxed); 39 | 40 | if (countdown == 0) { 41 | if (!rejected) { 42 | resolve(results.allObjects); 43 | } else { 44 | id userInfo = @{PMKJoinPromisesKey: promises}; 45 | id err = [NSError errorWithDomain:PMKErrorDomain code:PMKJoinError userInfo:userInfo]; 46 | resolve(err); 47 | } 48 | } 49 | }]; 50 | 51 | (void) stop; 52 | }]; 53 | }]; 54 | } 55 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/race.m: -------------------------------------------------------------------------------- 1 | #import "AnyPromise+Private.h" 2 | 3 | AnyPromise *PMKRace(NSArray *promises) { 4 | return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { 5 | for (AnyPromise *promise in promises) { 6 | [promise __pipe:resolve]; 7 | } 8 | }]; 9 | } 10 | -------------------------------------------------------------------------------- /Example/Pods/PromiseKit/Sources/race.swift: -------------------------------------------------------------------------------- 1 | @inline(__always) 2 | private func _race(_ thenables: [U]) -> Promise { 3 | let rp = Promise(.pending) 4 | for thenable in thenables { 5 | thenable.pipe(to: rp.box.seal) 6 | } 7 | return rp 8 | } 9 | 10 | /** 11 | Waits for one promise to resolve 12 | 13 | race(promise1, promise2, promise3).then { winner in 14 | //… 15 | } 16 | 17 | - Returns: The promise that resolves first 18 | - Warning: If the first resolution is a rejection, the returned promise is rejected 19 | */ 20 | public func race(_ thenables: U...) -> Promise { 21 | return _race(thenables) 22 | } 23 | 24 | /** 25 | Waits for one promise to resolve 26 | 27 | race(promise1, promise2, promise3).then { winner in 28 | //… 29 | } 30 | 31 | - Returns: The promise that resolves first 32 | - Warning: If the first resolution is a rejection, the returned promise is rejected 33 | - Remark: If the provided array is empty the returned promise is rejected with PMKError.badInput 34 | */ 35 | public func race(_ thenables: [U]) -> Promise { 36 | guard !thenables.isEmpty else { 37 | return Promise(error: PMKError.badInput) 38 | } 39 | return _race(thenables) 40 | } 41 | 42 | /** 43 | Waits for one guarantee to resolve 44 | 45 | race(promise1, promise2, promise3).then { winner in 46 | //… 47 | } 48 | 49 | - Returns: The guarantee that resolves first 50 | */ 51 | public func race(_ guarantees: Guarantee...) -> Guarantee { 52 | let rg = Guarantee(.pending) 53 | for guarantee in guarantees { 54 | guarantee.pipe(to: rg.box.seal) 55 | } 56 | return rg 57 | } 58 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/EGOCircleMenu-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_EGOCircleMenu : NSObject 3 | @end 4 | @implementation PodsDummy_EGOCircleMenu 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/EGOCircleMenu-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/EGOCircleMenu-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double EGOCircleMenuVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char EGOCircleMenuVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/EGOCircleMenu.modulemap: -------------------------------------------------------------------------------- 1 | framework module EGOCircleMenu { 2 | umbrella header "EGOCircleMenu-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/EGOCircleMenu.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/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 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/ResourceBundle-CircleMenu-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 0.1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/EGOCircleMenu/ResourceBundle-EGOCircleMenu-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | ${PRODUCT_BUNDLE_IDENTIFIER} 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | ${PRODUCT_NAME} 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 0.1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Example/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Example/Pods-EGOCircleMenu_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_EGOCircleMenu_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_EGOCircleMenu_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Example/Pods-EGOCircleMenu_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_EGOCircleMenu_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_EGOCircleMenu_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Example/Pods-EGOCircleMenu_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu/EGOCircleMenu.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "EGOCircleMenu" -framework "Lottie" -framework "PromiseKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Example/Pods-EGOCircleMenu_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_EGOCircleMenu_Example { 2 | umbrella header "Pods-EGOCircleMenu_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Example/Pods-EGOCircleMenu_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu/EGOCircleMenu.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "EGOCircleMenu" -framework "Lottie" -framework "PromiseKit" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/Pods-EGOCircleMenu_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/Pods-EGOCircleMenu_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/Pods-EGOCircleMenu_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_EGOCircleMenu_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_EGOCircleMenu_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/Pods-EGOCircleMenu_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_EGOCircleMenu_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_EGOCircleMenu_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/Pods-EGOCircleMenu_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu/EGOCircleMenu.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/Pods-EGOCircleMenu_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_EGOCircleMenu_Tests { 2 | umbrella header "Pods-EGOCircleMenu_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-EGOCircleMenu_Tests/Pods-EGOCircleMenu_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu" "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/EGOCircleMenu/EGOCircleMenu.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit/PromiseKit.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 8 | PODS_ROOT = ${SRCROOT}/Pods 9 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromiseKit/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 | FMWK 17 | CFBundleShortVersionString 18 | 6.5.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_PromiseKit : NSObject 3 | @end 4 | @implementation PodsDummy_PromiseKit 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromiseKit/PromiseKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "fwd.h" 14 | #import "AnyPromise.h" 15 | #import "PromiseKit.h" 16 | #import "NSURLSession+AnyPromise.h" 17 | #import "NSTask+AnyPromise.h" 18 | #import "NSNotificationCenter+AnyPromise.h" 19 | #import "PMKFoundation.h" 20 | #import "PMKUIKit.h" 21 | #import "UIView+AnyPromise.h" 22 | #import "UIViewController+AnyPromise.h" 23 | 24 | FOUNDATION_EXPORT double PromiseKitVersionNumber; 25 | FOUNDATION_EXPORT const unsigned char PromiseKitVersionString[]; 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromiseKit/PromiseKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module PromiseKit { 2 | umbrella header "PromiseKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PromiseKit 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" 4 | OTHER_SWIFT_FLAGS = $(inherited) -DPMKCocoaPods $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/PromiseKit 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/lottie-ios/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 | FMWK 17 | CFBundleShortVersionString 18 | 2.5.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/lottie-ios/lottie-ios-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_lottie_ios : NSObject 3 | @end 4 | @implementation PodsDummy_lottie_ios 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/lottie-ios/lottie-ios-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/lottie-ios/lottie-ios-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "LOTAnimatedControl.h" 14 | #import "LOTAnimatedSwitch.h" 15 | #import "LOTAnimationCache.h" 16 | #import "LOTAnimationTransitionController.h" 17 | #import "LOTAnimationView.h" 18 | #import "LOTAnimationView_Compat.h" 19 | #import "LOTBlockCallback.h" 20 | #import "LOTCacheProvider.h" 21 | #import "LOTComposition.h" 22 | #import "LOTInterpolatorCallback.h" 23 | #import "LOTKeypath.h" 24 | #import "Lottie.h" 25 | #import "LOTValueCallback.h" 26 | #import "LOTValueDelegate.h" 27 | 28 | FOUNDATION_EXPORT double LottieVersionNumber; 29 | FOUNDATION_EXPORT const unsigned char LottieVersionString[]; 30 | 31 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/lottie-ios/lottie-ios.modulemap: -------------------------------------------------------------------------------- 1 | framework module Lottie { 2 | umbrella header "lottie-ios-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/lottie-ios/lottie-ios.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = -framework "UIKit" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/lottie-ios 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/AnimatableLayers/LOTCompositionContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCompositionContainer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/18/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTLayerContainer.h" 10 | #import "LOTAssetGroup.h" 11 | 12 | @interface LOTCompositionContainer : LOTLayerContainer 13 | 14 | - (instancetype _Nonnull)initWithModel:(LOTLayer * _Nullable)layer 15 | inLayerGroup:(LOTLayerGroup * _Nullable)layerGroup 16 | withLayerGroup:(LOTLayerGroup * _Nullable)childLayerGroup 17 | withAssestGroup:(LOTAssetGroup * _Nullable)assetGroup; 18 | 19 | - (nullable NSArray *)keysForKeyPath:(nonnull LOTKeypath *)keypath; 20 | 21 | - (CGPoint)convertPoint:(CGPoint)point 22 | toKeypathLayer:(nonnull LOTKeypath *)keypath 23 | withParentLayer:(CALayer *_Nonnull)parent; 24 | 25 | - (CGRect)convertRect:(CGRect)rect 26 | toKeypathLayer:(nonnull LOTKeypath *)keypath 27 | withParentLayer:(CALayer *_Nonnull)parent; 28 | 29 | - (CGPoint)convertPoint:(CGPoint)point 30 | fromKeypathLayer:(nonnull LOTKeypath *)keypath 31 | withParentLayer:(CALayer *_Nonnull)parent; 32 | 33 | - (CGRect)convertRect:(CGRect)rect 34 | fromKeypathLayer:(nonnull LOTKeypath *)keypath 35 | withParentLayer:(CALayer *_Nonnull)parent; 36 | 37 | - (void)addSublayer:(nonnull CALayer *)subLayer 38 | toKeypathLayer:(nonnull LOTKeypath *)keypath; 39 | 40 | - (void)maskSublayer:(nonnull CALayer *)subLayer 41 | toKeypathLayer:(nonnull LOTKeypath *)keypath; 42 | 43 | @property (nonatomic, readonly, nonnull) NSArray *childLayers; 44 | @property (nonatomic, readonly, nonnull) NSDictionary *childMap; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/AnimatableLayers/LOTLayerContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTLayerContainer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/18/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPlatformCompat.h" 10 | #import "LOTLayer.h" 11 | #import "LOTLayerGroup.h" 12 | #import "LOTKeypath.h" 13 | #import "LOTValueDelegate.h" 14 | 15 | @class LOTValueCallback; 16 | 17 | @interface LOTLayerContainer : CALayer 18 | 19 | - (instancetype _Nonnull)initWithModel:(LOTLayer * _Nullable)layer 20 | inLayerGroup:(LOTLayerGroup * _Nullable)layerGroup; 21 | 22 | @property (nonatomic, readonly, strong, nullable) NSString *layerName; 23 | @property (nonatomic, nullable) NSNumber *currentFrame; 24 | @property (nonatomic, readonly, nonnull) NSNumber *timeStretchFactor; 25 | @property (nonatomic, assign) CGRect viewportBounds; 26 | @property (nonatomic, readonly, nonnull) CALayer *wrapperLayer; 27 | @property (nonatomic, readonly, nonnull) NSDictionary *valueInterpolators; 28 | 29 | - (void)displayWithFrame:(NSNumber * _Nonnull)frame; 30 | - (void)displayWithFrame:(NSNumber * _Nonnull)frame forceUpdate:(BOOL)forceUpdate; 31 | 32 | - (void)searchNodesForKeypath:(LOTKeypath * _Nonnull)keypath; 33 | 34 | - (void)setValueDelegate:(id _Nonnull)delegate 35 | forKeypath:(LOTKeypath * _Nonnull)keypath; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/AnimatableLayers/LOTMaskContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTMaskContainer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/19/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTMask.h" 11 | 12 | @interface LOTMaskContainer : CALayer 13 | 14 | - (instancetype _Nonnull)initWithMasks:(NSArray * _Nonnull)masks; 15 | 16 | @property (nonatomic, strong, nullable) NSNumber *currentFrame; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/AnimatableProperties/LOTBezierData.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTBezierData.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/10/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTBezierData : NSObject 15 | 16 | - (instancetype)initWithData:(NSDictionary *)bezierData; 17 | 18 | @property (nonatomic, readonly) NSInteger count; 19 | @property (nonatomic, readonly) BOOL closed; 20 | 21 | - (CGPoint)vertexAtIndex:(NSInteger)index; 22 | - (CGPoint)inTangentAtIndex:(NSInteger)index; 23 | - (CGPoint)outTangentAtIndex:(NSInteger)index; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/AnimatableProperties/LOTKeyframe.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTKeyframe.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 7/10/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | #import "LOTPlatformCompat.h" 12 | #import "LOTBezierData.h" 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface LOTKeyframe : NSObject 17 | 18 | - (instancetype)initWithKeyframe:(NSDictionary *)keyframe; 19 | - (instancetype)initWithValue:(id)value; 20 | - (void)remapValueWithBlock:(CGFloat (^)(CGFloat inValue))remapBlock; 21 | - (LOTKeyframe *)copyWithData:(id)data; 22 | 23 | @property (nonatomic, readonly) NSNumber *keyframeTime; 24 | @property (nonatomic, readonly) BOOL isHold; 25 | @property (nonatomic, readonly) CGPoint inTangent; 26 | @property (nonatomic, readonly) CGPoint outTangent; 27 | @property (nonatomic, readonly) CGPoint spatialInTangent; 28 | @property (nonatomic, readonly) CGPoint spatialOutTangent; 29 | 30 | @property (nonatomic, readonly) CGFloat floatValue; 31 | @property (nonatomic, readonly) CGPoint pointValue; 32 | @property (nonatomic, readonly) CGSize sizeValue; 33 | @property (nonatomic, readonly) UIColor *colorValue; 34 | @property (nonatomic, readonly, nullable) LOTBezierData *pathData; 35 | @property (nonatomic, readonly) NSArray *arrayValue; 36 | 37 | @end 38 | 39 | @interface LOTKeyframeGroup : NSObject 40 | 41 | - (instancetype)initWithData:(id)data; 42 | 43 | - (void)remapKeyframesWithBlock:(CGFloat (^)(CGFloat inValue))remapBlock; 44 | 45 | @property (nonatomic, readonly) NSArray *keyframes; 46 | 47 | @end 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Extensions/LOTBezierPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTBezierPath.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/20/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPlatformCompat.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface LOTBezierPath : NSObject 14 | 15 | + (instancetype)pathWithCGPath:(CGPathRef)path; 16 | 17 | + (instancetype)newPath; 18 | 19 | - (void)LOT_moveToPoint:(CGPoint)point; 20 | 21 | - (void)LOT_addLineToPoint:(CGPoint)point; 22 | 23 | - (void)LOT_addCurveToPoint:(CGPoint)point 24 | controlPoint1:(CGPoint)cp1 25 | controlPoint2:(CGPoint)cp2; 26 | 27 | - (void)LOT_closePath; 28 | 29 | - (void)LOT_removeAllPoints; 30 | 31 | - (void)LOT_appendPath:(LOTBezierPath *)bezierPath; 32 | 33 | - (void)trimPathFromT:(CGFloat)fromT toT:(CGFloat)toT offset:(CGFloat)offset; 34 | 35 | - (void)LOT_applyTransform:(CGAffineTransform)transform; 36 | 37 | @property (nonatomic, assign) BOOL cacheLengths; 38 | 39 | @property (nonatomic, readonly) CGFloat length; 40 | 41 | @property (nonatomic, readonly) CGPathRef CGPath; 42 | @property (nonatomic, readonly) CGPoint currentPoint; 43 | @property (nonatomic) CGFloat lineWidth; 44 | @property (nonatomic) CGLineCap lineCapStyle; 45 | @property (nonatomic) CGLineJoin lineJoinStyle; 46 | @property (nonatomic) CGFloat miterLimit; 47 | @property (nonatomic) CGFloat flatness; 48 | @property (nonatomic) BOOL usesEvenOddFillRule; 49 | @property (readonly, getter=isEmpty) BOOL empty; 50 | @property (nonatomic, readonly) CGRect bounds; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Extensions/LOTHelpers.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTHelpers.h 3 | // Lottie 4 | // 5 | // Created by Brandon Withrow on 7/28/16. 6 | // Copyright © 2016 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #ifndef LOTHelpers_h 10 | #define LOTHelpers_h 11 | 12 | #import "UIColor+Expanded.h" 13 | #import "CGGeometry+LOTAdditions.h" 14 | #import "LOTBezierPath.h" 15 | 16 | #define ENABLE_DEBUG_LOGGING NO 17 | #define ENABLE_DEBUG_SHAPES NO 18 | 19 | #endif /* LOTHelpers_h */ 20 | 21 | // TODO Feature Phase 22 | /* 23 | - Trim Path individually 24 | - Image Cache Support 25 | - Skew transform 26 | */ 27 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Extensions/LOTRadialGradientLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationView 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | #import 9 | #import 10 | 11 | @interface LOTRadialGradientLayer : CALayer 12 | 13 | @property CGPoint startPoint; 14 | @property CGPoint endPoint; 15 | 16 | @property (nonatomic, copy) NSArray *colors; 17 | @property (nonatomic, copy) NSArray *locations; 18 | @property (nonatomic, assign) BOOL isRadial; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Extensions/UIColor+Expanded.h: -------------------------------------------------------------------------------- 1 | #import "LOTPlatformCompat.h" 2 | 3 | // From http://github.com/ars/uicolor-utilities 4 | #define CLAMP(val,min,max) MIN(MAX(val,min),max) 5 | 6 | @interface UIColor (UIColor_Expanded) 7 | @property (nonatomic, readonly) CGColorSpaceModel colorSpaceModel; 8 | @property (nonatomic, readonly) BOOL canProvideRGBComponents; 9 | @property (nonatomic, readonly) CGFloat red; // Only valid if canProvideRGBComponents is YES 10 | @property (nonatomic, readonly) CGFloat green; // Only valid if canProvideRGBComponents is YES 11 | @property (nonatomic, readonly) CGFloat blue; // Only valid if canProvideRGBComponents is YES 12 | @property (nonatomic, readonly) CGFloat white; // Only valid if colorSpaceModel == kCGColorSpaceModelMonochrome 13 | @property (nonatomic, readonly) CGFloat alpha; 14 | @property (nonatomic, readonly) UInt32 rgbHex; 15 | 16 | - (NSString *)LOT_colorSpaceString; 17 | 18 | - (NSArray *)LOT_arrayFromRGBAComponents; 19 | 20 | - (BOOL)LOT_red:(CGFloat *)r green:(CGFloat *)g blue:(CGFloat *)b alpha:(CGFloat *)a; 21 | 22 | - (UIColor *)LOT_colorByLuminanceMapping; 23 | 24 | - (UIColor *)LOT_colorByMultiplyingByRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; 25 | - (UIColor *) LOT_colorByAddingRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; 26 | - (UIColor *) LOT_colorByLighteningToRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; 27 | - (UIColor *) LOT_colorByDarkeningToRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; 28 | 29 | - (UIColor *)LOT_colorByMultiplyingBy:(CGFloat)f; 30 | - (UIColor *) LOT_colorByAdding:(CGFloat)f; 31 | - (UIColor *) LOT_colorByLighteningTo:(CGFloat)f; 32 | - (UIColor *) LOT_colorByDarkeningTo:(CGFloat)f; 33 | 34 | - (UIColor *)LOT_colorByMultiplyingByColor:(UIColor *)color; 35 | - (UIColor *) LOT_colorByAddingColor:(UIColor *)color; 36 | - (UIColor *) LOT_colorByLighteningToColor:(UIColor *)color; 37 | - (UIColor *) LOT_colorByDarkeningToColor:(UIColor *)color; 38 | 39 | - (NSString *)LOT_stringFromColor; 40 | - (NSString *)LOT_hexStringValue; 41 | 42 | + (UIColor *)LOT_randomColor; 43 | + (UIColor *)LOT_colorWithString:(NSString *)stringToConvert; 44 | + (UIColor *)LOT_colorWithRGBHex:(UInt32)hex; 45 | + (UIColor *)LOT_colorWithHexString:(NSString *)stringToConvert; 46 | 47 | + (UIColor *)LOT_colorWithName:(NSString *)cssColorName; 48 | 49 | + (UIColor *)LOT_colorByLerpingFromColor:(UIColor *)fromColor toColor:(UIColor *)toColor amount:(CGFloat)amount; 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/CALayer+Compat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import 10 | #import 11 | 12 | @interface CALayer (Compat) 13 | 14 | @property (nonatomic, assign) BOOL allowsEdgeAntialiasing; 15 | 16 | @end 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/CALayer+Compat.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import "CALayer+Compat.h" 10 | 11 | @implementation CALayer (Compat) 12 | 13 | - (BOOL)allowsEdgeAntialiasing { return NO; } 14 | - (void)setAllowsEdgeAntialiasing:(BOOL)allowsEdgeAntialiasing { } 15 | 16 | @end 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/LOTPlatformCompat.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPlatformCompat.h 3 | // Lottie 4 | // 5 | // Created by Oleksii Pavlovskyi on 2/2/17. 6 | // Copyright (c) 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #ifndef LOTPlatformCompat_h 10 | #define LOTPlatformCompat_h 11 | 12 | #include 13 | 14 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 15 | 16 | #import 17 | 18 | #else 19 | 20 | #import 21 | #import "UIColor.h" 22 | #import "CALayer+Compat.h" 23 | #import "NSValue+Compat.h" 24 | #import "UIBezierPath.h" 25 | 26 | NS_INLINE NSString *NSStringFromCGRect(CGRect rect) { 27 | return NSStringFromRect(rect); 28 | } 29 | 30 | NS_INLINE NSString *NSStringFromCGPoint(CGPoint point) { 31 | return NSStringFromPoint(point); 32 | } 33 | 34 | typedef NSEdgeInsets UIEdgeInsets; 35 | 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/NSValue+Compat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import 10 | 11 | @interface NSValue (Compat) 12 | 13 | + (NSValue *)valueWithCGRect:(CGRect)rect; 14 | + (NSValue *)valueWithCGPoint:(CGPoint)point; 15 | 16 | @property (nonatomic, readonly) CGRect CGRectValue; 17 | @property(nonatomic, readonly) CGPoint CGPointValue; 18 | @property (nonatomic, readonly) CGSize CGSizeValue; 19 | 20 | @end 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/NSValue+Compat.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import "NSValue+Compat.h" 10 | 11 | @implementation NSValue (Compat) 12 | 13 | + (NSValue *)valueWithCGRect:(CGRect)rect { 14 | return [self valueWithRect:rect]; 15 | } 16 | 17 | + (NSValue *)valueWithCGPoint:(CGPoint)point { 18 | return [self valueWithPoint:point]; 19 | } 20 | 21 | - (CGRect)CGRectValue { 22 | return self.rectValue; 23 | } 24 | 25 | - (CGPoint)CGPointValue { 26 | return self.pointValue; 27 | } 28 | 29 | - (CGSize)CGSizeValue { 30 | return self.sizeValue; 31 | } 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/UIColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor.h 3 | // Lottie 4 | // 5 | // Created by Oleksii Pavlovskyi on 2/2/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #include 10 | 11 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 12 | #import 13 | #import 14 | 15 | @interface UIColor : NSObject 16 | 17 | + (UIColor *)colorWithWhite:(CGFloat)white alpha:(CGFloat)alpha; 18 | + (UIColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha; 19 | + (UIColor *)colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; 20 | + (UIColor *)colorWithCGColor:(CGColorRef)cgColor; 21 | 22 | + (UIColor *)blackColor; 23 | + (UIColor *)darkGrayColor; 24 | + (UIColor *)lightGrayColor; 25 | + (UIColor *)whiteColor; 26 | + (UIColor *)grayColor; 27 | + (UIColor *)redColor; 28 | + (UIColor *)greenColor; 29 | + (UIColor *)blueColor; 30 | + (UIColor *)cyanColor; 31 | + (UIColor *)yellowColor; 32 | + (UIColor *)magentaColor; 33 | + (UIColor *)orangeColor; 34 | + (UIColor *)purpleColor; 35 | + (UIColor *)brownColor; 36 | + (UIColor *)clearColor; 37 | 38 | - (UIColor *)colorWithAlphaComponent:(CGFloat)alpha; 39 | 40 | @property (nonatomic, readonly) CGColorRef CGColor; 41 | 42 | @end 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAsset.h 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @class LOTLayerGroup; 15 | @class LOTLayer; 16 | @class LOTAssetGroup; 17 | 18 | @interface LOTAsset : NSObject 19 | 20 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary 21 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 22 | withAssetBundle:(NSBundle *_Nonnull)bundle 23 | withFramerate:(NSNumber *)framerate; 24 | 25 | @property (nonatomic, readonly, nullable) NSString *referenceID; 26 | @property (nonatomic, readonly, nullable) NSNumber *assetWidth; 27 | @property (nonatomic, readonly, nullable) NSNumber *assetHeight; 28 | 29 | @property (nonatomic, readonly, nullable) NSString *imageName; 30 | @property (nonatomic, readonly, nullable) NSString *imageDirectory; 31 | 32 | @property (nonatomic, readonly, nullable) LOTLayerGroup *layerGroup; 33 | 34 | @property (nonatomic, readwrite) NSString *rootDirectory; 35 | @property (nonatomic, readonly) NSBundle *assetBundle; 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTAsset.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAsset.m 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import "LOTAsset.h" 10 | #import "LOTLayer.h" 11 | #import "LOTLayerGroup.h" 12 | #import "LOTAssetGroup.h" 13 | 14 | @implementation LOTAsset 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary 17 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 18 | withAssetBundle:(NSBundle *_Nonnull)bundle 19 | withFramerate:(NSNumber *)framerate { 20 | self = [super init]; 21 | if (self) { 22 | _assetBundle = bundle; 23 | [self _mapFromJSON:jsonDictionary 24 | withAssetGroup:assetGroup 25 | withFramerate:framerate]; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary 31 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 32 | withFramerate:(NSNumber *)framerate { 33 | _referenceID = [jsonDictionary[@"id"] copy]; 34 | 35 | if (jsonDictionary[@"w"]) { 36 | _assetWidth = [jsonDictionary[@"w"] copy]; 37 | } 38 | 39 | if (jsonDictionary[@"h"]) { 40 | _assetHeight = [jsonDictionary[@"h"] copy]; 41 | } 42 | 43 | if (jsonDictionary[@"u"]) { 44 | _imageDirectory = [jsonDictionary[@"u"] copy]; 45 | } 46 | 47 | if (jsonDictionary[@"p"]) { 48 | _imageName = [jsonDictionary[@"p"] copy]; 49 | } 50 | 51 | NSArray *layersJSON = jsonDictionary[@"layers"]; 52 | if (layersJSON) { 53 | _layerGroup = [[LOTLayerGroup alloc] initWithLayerJSON:layersJSON 54 | withAssetGroup:assetGroup 55 | withFramerate:framerate]; 56 | } 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTAssetGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAssetGroup.h 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/17/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class LOTAsset; 13 | @class LOTLayerGroup; 14 | @interface LOTAssetGroup : NSObject 15 | @property (nonatomic, readwrite) NSString * _Nullable rootDirectory; 16 | @property (nonatomic, readonly, nullable) NSBundle *assetBundle; 17 | 18 | - (instancetype _Nonnull)initWithJSON:(NSArray * _Nonnull)jsonArray 19 | withAssetBundle:(NSBundle *_Nullable)bundle 20 | withFramerate:(NSNumber * _Nonnull)framerate; 21 | 22 | - (void)buildAssetNamed:(NSString * _Nonnull)refID withFramerate:(NSNumber * _Nonnull)framerate; 23 | 24 | - (void)finalizeInitializationWithFramerate:(NSNumber * _Nonnull)framerate; 25 | 26 | - (LOTAsset * _Nullable)assetModelForID:(NSString * _Nonnull)assetID; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTAssetGroup.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAssetGroup.m 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/17/17. 6 | // 7 | // 8 | 9 | #import "LOTAssetGroup.h" 10 | #import "LOTAsset.h" 11 | 12 | @implementation LOTAssetGroup { 13 | NSMutableDictionary *_assetMap; 14 | NSDictionary *_assetJSONMap; 15 | } 16 | 17 | - (instancetype _Nonnull)initWithJSON:(NSArray * _Nonnull)jsonArray 18 | withAssetBundle:(NSBundle * _Nullable)bundle 19 | withFramerate:(NSNumber * _Nonnull)framerate { 20 | self = [super init]; 21 | if (self) { 22 | _assetBundle = bundle; 23 | _assetMap = [NSMutableDictionary dictionary]; 24 | NSMutableDictionary *assetJSONMap = [NSMutableDictionary dictionary]; 25 | for (NSDictionary *assetDictionary in jsonArray) { 26 | NSString *referenceID = assetDictionary[@"id"]; 27 | if (referenceID) { 28 | assetJSONMap[referenceID] = assetDictionary; 29 | } 30 | } 31 | _assetJSONMap = assetJSONMap; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)buildAssetNamed:(NSString *)refID 37 | withFramerate:(NSNumber * _Nonnull)framerate { 38 | 39 | if ([self assetModelForID:refID]) { 40 | return; 41 | } 42 | 43 | NSDictionary *assetDictionary = _assetJSONMap[refID]; 44 | if (assetDictionary) { 45 | LOTAsset *asset = [[LOTAsset alloc] initWithJSON:assetDictionary 46 | withAssetGroup:self 47 | withAssetBundle:_assetBundle 48 | withFramerate:framerate]; 49 | _assetMap[refID] = asset; 50 | } 51 | } 52 | 53 | - (void)finalizeInitializationWithFramerate:(NSNumber * _Nonnull)framerate { 54 | for (NSString *refID in _assetJSONMap.allKeys) { 55 | [self buildAssetNamed:refID withFramerate:framerate]; 56 | } 57 | _assetJSONMap = nil; 58 | } 59 | 60 | - (LOTAsset *)assetModelForID:(NSString *)assetID { 61 | return _assetMap[assetID]; 62 | } 63 | 64 | - (void)setRootDirectory:(NSString *)rootDirectory { 65 | _rootDirectory = rootDirectory; 66 | [_assetMap enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, LOTAsset * _Nonnull obj, BOOL * _Nonnull stop) { 67 | obj.rootDirectory = rootDirectory; 68 | }]; 69 | } 70 | @end 71 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTLayerGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTLayerGroup.h 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @class LOTLayer; 15 | @class LOTAssetGroup; 16 | 17 | @interface LOTLayerGroup : NSObject 18 | 19 | - (instancetype)initWithLayerJSON:(NSArray *)layersJSON 20 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 21 | withFramerate:(NSNumber *)framerate; 22 | 23 | @property (nonatomic, readonly) NSArray *layers; 24 | 25 | - (LOTLayer *)layerModelForID:(NSNumber *)layerID; 26 | - (LOTLayer *)layerForReferenceID:(NSString *)referenceID; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTLayerGroup.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTLayerGroup.m 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import "LOTLayerGroup.h" 10 | #import "LOTLayer.h" 11 | #import "LOTAssetGroup.h" 12 | 13 | @implementation LOTLayerGroup { 14 | NSDictionary *_modelMap; 15 | NSDictionary *_referenceIDMap; 16 | } 17 | 18 | - (instancetype)initWithLayerJSON:(NSArray *)layersJSON 19 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 20 | withFramerate:(NSNumber *)framerate { 21 | self = [super init]; 22 | if (self) { 23 | [self _mapFromJSON:layersJSON withAssetGroup:assetGroup withFramerate:framerate]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)_mapFromJSON:(NSArray *)layersJSON 29 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 30 | withFramerate:(NSNumber *)framerate { 31 | 32 | NSMutableArray *layers = [NSMutableArray array]; 33 | NSMutableDictionary *modelMap = [NSMutableDictionary dictionary]; 34 | NSMutableDictionary *referenceMap = [NSMutableDictionary dictionary]; 35 | 36 | for (NSDictionary *layerJSON in layersJSON) { 37 | LOTLayer *layer = [[LOTLayer alloc] initWithJSON:layerJSON 38 | withAssetGroup:assetGroup 39 | withFramerate:framerate]; 40 | [layers addObject:layer]; 41 | modelMap[layer.layerID] = layer; 42 | if (layer.referenceID) { 43 | referenceMap[layer.referenceID] = layer; 44 | } 45 | } 46 | 47 | _referenceIDMap = referenceMap; 48 | _modelMap = modelMap; 49 | _layers = layers; 50 | } 51 | 52 | - (LOTLayer *)layerModelForID:(NSNumber *)layerID { 53 | return _modelMap[layerID]; 54 | } 55 | 56 | - (LOTLayer *)layerForReferenceID:(NSString *)referenceID { 57 | return _referenceIDMap[referenceID]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTMask.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTMask.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | typedef enum : NSUInteger { 13 | LOTMaskModeAdd, 14 | LOTMaskModeSubtract, 15 | LOTMaskModeIntersect, 16 | LOTMaskModeUnknown 17 | } LOTMaskMode; 18 | 19 | @interface LOTMask : NSObject 20 | 21 | - (instancetype _Nonnull)initWithJSON:(NSDictionary * _Nonnull)jsonDictionary; 22 | 23 | @property (nonatomic, readonly) BOOL closed; 24 | @property (nonatomic, readonly) BOOL inverted; 25 | @property (nonatomic, readonly) LOTMaskMode maskMode; 26 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *maskPath; 27 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *opacity; 28 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *expansion; 29 | @end 30 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTMask.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTMask.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTMask.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTMask 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | NSNumber *closed = jsonDictionary[@"cl"]; 24 | _closed = closed.boolValue; 25 | 26 | NSNumber *inverted = jsonDictionary[@"inv"]; 27 | _inverted = inverted.boolValue; 28 | 29 | NSString *mode = jsonDictionary[@"mode"]; 30 | if ([mode isEqualToString:@"a"]) { 31 | _maskMode = LOTMaskModeAdd; 32 | } else if ([mode isEqualToString:@"s"]) { 33 | _maskMode = LOTMaskModeSubtract; 34 | } else if ([mode isEqualToString:@"i"]) { 35 | _maskMode = LOTMaskModeIntersect; 36 | } else { 37 | _maskMode = LOTMaskModeUnknown; 38 | } 39 | 40 | NSDictionary *maskshape = jsonDictionary[@"pt"]; 41 | if (maskshape) { 42 | _maskPath = [[LOTKeyframeGroup alloc] initWithData:maskshape]; 43 | } 44 | 45 | NSDictionary *opacity = jsonDictionary[@"o"]; 46 | if (opacity) { 47 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 48 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 49 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 50 | }]; 51 | } 52 | 53 | NSDictionary *expansion = jsonDictionary[@"x"]; 54 | if (expansion) { 55 | _expansion = [[LOTKeyframeGroup alloc] initWithData:expansion]; 56 | } 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTModels.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTModels.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #ifndef LOTModels_h 10 | #define LOTModels_h 11 | 12 | #import "LOTKeyframe.h" 13 | #import "LOTComposition.h" 14 | #import "LOTLayer.h" 15 | #import "LOTMask.h" 16 | #import "LOTShapeCircle.h" 17 | #import "LOTShapeFill.h" 18 | #import "LOTShapeGroup.h" 19 | #import "LOTShapePath.h" 20 | #import "LOTShapeRectangle.h" 21 | #import "LOTShapeStroke.h" 22 | #import "LOTShapeTransform.h" 23 | #import "LOTShapeTrimPath.h" 24 | #import "LOTLayerGroup.h" 25 | #import "LOTAsset.h" 26 | #import "LOTShapeGradientFill.h" 27 | 28 | #endif /* LOTModels_h */ 29 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeCircle.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeCircle.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTShapeCircle : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 20 | @property (nonatomic, readonly) LOTKeyframeGroup *size; 21 | @property (nonatomic, readonly) BOOL reversed; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeCircle.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeCircle.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeCircle.h" 10 | 11 | @implementation LOTShapeCircle 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *position = jsonDictionary[@"p"]; 28 | if (position) { 29 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 30 | } 31 | 32 | NSDictionary *size= jsonDictionary[@"s"]; 33 | if (size) { 34 | _size = [[LOTKeyframeGroup alloc] initWithData:size]; 35 | } 36 | NSNumber *reversed = jsonDictionary[@"d"]; 37 | _reversed = (reversed.integerValue == 3); 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeFill.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeFill.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTShapeFill : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly) BOOL fillEnabled; 20 | @property (nonatomic, readonly) LOTKeyframeGroup *color; 21 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 22 | @property (nonatomic, readonly) BOOL evenOddFillRule; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeFill.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeFill.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeFill.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTShapeFill 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | 24 | if (jsonDictionary[@"nm"] ) { 25 | _keyname = [jsonDictionary[@"nm"] copy]; 26 | } 27 | 28 | NSDictionary *color = jsonDictionary[@"c"]; 29 | if (color) { 30 | _color = [[LOTKeyframeGroup alloc] initWithData:color]; 31 | } 32 | 33 | NSDictionary *opacity = jsonDictionary[@"o"]; 34 | if (opacity) { 35 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 36 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 37 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 38 | }]; 39 | } 40 | 41 | NSNumber *evenOdd = jsonDictionary[@"r"]; 42 | if (evenOdd.integerValue == 2) { 43 | _evenOddFillRule = YES; 44 | } else { 45 | _evenOddFillRule = NO; 46 | } 47 | 48 | NSNumber *fillEnabled = jsonDictionary[@"fillEnabled"]; 49 | _fillEnabled = fillEnabled.boolValue; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeGradientFill.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeGradientFill.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/26/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | typedef enum : NSUInteger { 15 | LOTGradientTypeLinear, 16 | LOTGradientTypeRadial 17 | } LOTGradientType; 18 | 19 | @interface LOTShapeGradientFill : NSObject 20 | 21 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 22 | 23 | @property (nonatomic, readonly) NSString *keyname; 24 | @property (nonatomic, readonly) NSNumber *numberOfColors; 25 | @property (nonatomic, readonly) LOTKeyframeGroup *startPoint; 26 | @property (nonatomic, readonly) LOTKeyframeGroup *endPoint; 27 | @property (nonatomic, readonly) LOTKeyframeGroup *gradient; 28 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 29 | @property (nonatomic, readonly) BOOL evenOddFillRule; 30 | @property (nonatomic, readonly) LOTGradientType type; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeGradientFill.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeGradientFill.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/26/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeGradientFill.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTShapeGradientFill 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSNumber *type = jsonDictionary[@"t"]; 28 | 29 | if (type.integerValue != 1) { 30 | _type = LOTGradientTypeRadial; 31 | } else { 32 | _type = LOTGradientTypeLinear; 33 | } 34 | 35 | NSDictionary *start = jsonDictionary[@"s"]; 36 | if (start) { 37 | _startPoint = [[LOTKeyframeGroup alloc] initWithData:start]; 38 | } 39 | 40 | NSDictionary *end = jsonDictionary[@"e"]; 41 | if (end) { 42 | _endPoint = [[LOTKeyframeGroup alloc] initWithData:end]; 43 | } 44 | 45 | NSDictionary *gradient = jsonDictionary[@"g"]; 46 | if (gradient) { 47 | NSDictionary *unwrappedGradient = gradient[@"k"]; 48 | _numberOfColors = gradient[@"p"]; 49 | _gradient = [[LOTKeyframeGroup alloc] initWithData:unwrappedGradient]; 50 | } 51 | 52 | NSDictionary *opacity = jsonDictionary[@"o"]; 53 | if (opacity) { 54 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 55 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 56 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 57 | }]; 58 | } 59 | 60 | NSNumber *evenOdd = jsonDictionary[@"r"]; 61 | if (evenOdd.integerValue == 2) { 62 | _evenOddFillRule = YES; 63 | } else { 64 | _evenOddFillRule = NO; 65 | } 66 | } 67 | @end 68 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShape.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LOTShapeGroup : NSObject 13 | 14 | - (instancetype _Nonnull)initWithJSON:(NSDictionary *_Nonnull)jsonDictionary; 15 | 16 | @property (nonatomic, readonly, nonnull) NSString *keyname; 17 | @property (nonatomic, readonly, nonnull) NSArray *items; 18 | 19 | + (id _Nullable)shapeItemWithJSON:(NSDictionary * _Nonnull)itemJSON; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapePath.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapePath.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | @interface LOTShapePath : NSObject 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 15 | 16 | @property (nonatomic, readonly) NSString *keyname; 17 | @property (nonatomic, readonly) BOOL closed; 18 | @property (nonatomic, readonly) NSNumber *index; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *shapePath; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapePath.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapePath.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapePath.h" 10 | 11 | @implementation LOTShapePath 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | _index = jsonDictionary[@"ind"]; 28 | _closed = [jsonDictionary[@"closed"] boolValue]; 29 | NSDictionary *shape = jsonDictionary[@"ks"]; 30 | if (shape) { 31 | _shapePath = [[LOTKeyframeGroup alloc] initWithData:shape]; 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeRectangle.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeRectangle.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | @interface LOTShapeRectangle : NSObject 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 15 | 16 | @property (nonatomic, readonly) NSString *keyname; 17 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 18 | @property (nonatomic, readonly) LOTKeyframeGroup *size; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *cornerRadius; 20 | @property (nonatomic, readonly) BOOL reversed; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeRectangle.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeRectangle.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeRectangle.h" 10 | 11 | @implementation LOTShapeRectangle 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *position = jsonDictionary[@"p"]; 28 | if (position) { 29 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 30 | } 31 | 32 | NSDictionary *cornerRadius = jsonDictionary[@"r"]; 33 | if (cornerRadius) { 34 | _cornerRadius = [[LOTKeyframeGroup alloc] initWithData:cornerRadius]; 35 | } 36 | 37 | NSDictionary *size = jsonDictionary[@"s"]; 38 | if (size) { 39 | _size = [[LOTKeyframeGroup alloc] initWithData:size]; 40 | } 41 | NSNumber *reversed = jsonDictionary[@"d"]; 42 | _reversed = (reversed.integerValue == 3); 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeRepeater.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeRepeater.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/28/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTShapeRepeater : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *copies; 20 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *offset; 21 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *anchorPoint; 22 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *scale; 23 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *position; 24 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *rotation; 25 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *startOpacity; 26 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *endOpacity; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeRepeater.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeRepeater.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/28/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeRepeater.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTShapeRepeater 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | 24 | if (jsonDictionary[@"nm"] ) { 25 | _keyname = [jsonDictionary[@"nm"] copy]; 26 | } 27 | 28 | NSDictionary *copies = jsonDictionary[@"c"]; 29 | if (copies) { 30 | _copies = [[LOTKeyframeGroup alloc] initWithData:copies]; 31 | } 32 | 33 | NSDictionary *offset = jsonDictionary[@"o"]; 34 | if (offset) { 35 | _offset = [[LOTKeyframeGroup alloc] initWithData:offset]; 36 | } 37 | 38 | NSDictionary *transform = jsonDictionary[@"tr"]; 39 | 40 | NSDictionary *rotation = transform[@"r"]; 41 | if (rotation) { 42 | _rotation = [[LOTKeyframeGroup alloc] initWithData:rotation]; 43 | [_rotation remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 44 | return LOT_DegreesToRadians(inValue); 45 | }]; 46 | } 47 | 48 | NSDictionary *startOpacity = transform[@"so"]; 49 | if (startOpacity) { 50 | _startOpacity = [[LOTKeyframeGroup alloc] initWithData:startOpacity]; 51 | [_startOpacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 52 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 53 | }]; 54 | } 55 | 56 | NSDictionary *endOpacity = transform[@"eo"]; 57 | if (endOpacity) { 58 | _endOpacity = [[LOTKeyframeGroup alloc] initWithData:endOpacity]; 59 | [_endOpacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 60 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 61 | }]; 62 | } 63 | 64 | NSDictionary *anchorPoint = transform[@"a"]; 65 | if (anchorPoint) { 66 | _anchorPoint = [[LOTKeyframeGroup alloc] initWithData:anchorPoint]; 67 | } 68 | 69 | NSDictionary *position = transform[@"p"]; 70 | if (position) { 71 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 72 | } 73 | 74 | NSDictionary *scale = transform[@"s"]; 75 | if (scale) { 76 | _scale = [[LOTKeyframeGroup alloc] initWithData:scale]; 77 | [_scale remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 78 | return LOT_RemapValue(inValue, -100, 100, -1, 1); 79 | }]; 80 | } 81 | } 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStar.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStar.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | typedef enum : NSUInteger { 13 | LOTPolystarShapeNone, 14 | LOTPolystarShapeStar, 15 | LOTPolystarShapePolygon 16 | } LOTPolystarShape; 17 | 18 | @interface LOTShapeStar : NSObject 19 | 20 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 21 | 22 | @property (nonatomic, readonly) NSString *keyname; 23 | @property (nonatomic, readonly) LOTKeyframeGroup *outerRadius; 24 | @property (nonatomic, readonly) LOTKeyframeGroup *outerRoundness; 25 | 26 | @property (nonatomic, readonly) LOTKeyframeGroup *innerRadius; 27 | @property (nonatomic, readonly) LOTKeyframeGroup *innerRoundness; 28 | 29 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 30 | @property (nonatomic, readonly) LOTKeyframeGroup *numberOfPoints; 31 | @property (nonatomic, readonly) LOTKeyframeGroup *rotation; 32 | 33 | @property (nonatomic, readonly) LOTPolystarShape type; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStar.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStar.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeStar.h" 10 | 11 | @implementation LOTShapeStar 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *outerRadius = jsonDictionary[@"or"]; 28 | if (outerRadius) { 29 | _outerRadius = [[LOTKeyframeGroup alloc] initWithData:outerRadius]; 30 | } 31 | 32 | NSDictionary *outerRoundness = jsonDictionary[@"os"]; 33 | if (outerRoundness) { 34 | _outerRoundness = [[LOTKeyframeGroup alloc] initWithData:outerRoundness]; 35 | } 36 | 37 | NSDictionary *innerRadius = jsonDictionary[@"ir"]; 38 | if (innerRadius) { 39 | _innerRadius = [[LOTKeyframeGroup alloc] initWithData:innerRadius]; 40 | } 41 | 42 | NSDictionary *innerRoundness = jsonDictionary[@"is"]; 43 | if (innerRoundness) { 44 | _innerRoundness = [[LOTKeyframeGroup alloc] initWithData:innerRoundness]; 45 | } 46 | 47 | NSDictionary *position = jsonDictionary[@"p"]; 48 | if (position) { 49 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 50 | } 51 | 52 | NSDictionary *numberOfPoints = jsonDictionary[@"pt"]; 53 | if (numberOfPoints) { 54 | _numberOfPoints = [[LOTKeyframeGroup alloc] initWithData:numberOfPoints]; 55 | } 56 | 57 | NSDictionary *rotation = jsonDictionary[@"r"]; 58 | if (rotation) { 59 | _rotation = [[LOTKeyframeGroup alloc] initWithData:rotation]; 60 | } 61 | 62 | NSNumber *type = jsonDictionary[@"sy"]; 63 | _type = type.integerValue; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStroke.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStroke.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | typedef enum : NSUInteger { 13 | LOTLineCapTypeButt, 14 | LOTLineCapTypeRound, 15 | LOTLineCapTypeUnknown 16 | } LOTLineCapType; 17 | 18 | typedef enum : NSUInteger { 19 | LOTLineJoinTypeMiter, 20 | LOTLineJoinTypeRound, 21 | LOTLineJoinTypeBevel 22 | } LOTLineJoinType; 23 | 24 | @interface LOTShapeStroke : NSObject 25 | 26 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 27 | 28 | @property (nonatomic, readonly) NSString *keyname; 29 | @property (nonatomic, readonly) BOOL fillEnabled; 30 | @property (nonatomic, readonly) LOTKeyframeGroup *color; 31 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 32 | @property (nonatomic, readonly) LOTKeyframeGroup *width; 33 | @property (nonatomic, readonly) LOTKeyframeGroup *dashOffset; 34 | @property (nonatomic, readonly) LOTLineCapType capType; 35 | @property (nonatomic, readonly) LOTLineJoinType joinType; 36 | 37 | @property (nonatomic, readonly) NSArray *lineDashPattern; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStroke.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStroke.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeStroke.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTShapeStroke 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | 24 | if (jsonDictionary[@"nm"] ) { 25 | _keyname = [jsonDictionary[@"nm"] copy]; 26 | } 27 | 28 | NSDictionary *color = jsonDictionary[@"c"]; 29 | if (color) { 30 | _color = [[LOTKeyframeGroup alloc] initWithData:color]; 31 | } 32 | 33 | NSDictionary *width = jsonDictionary[@"w"]; 34 | if (width) { 35 | _width = [[LOTKeyframeGroup alloc] initWithData:width]; 36 | } 37 | 38 | NSDictionary *opacity = jsonDictionary[@"o"]; 39 | if (opacity) { 40 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 41 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 42 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 43 | }]; 44 | } 45 | 46 | _capType = [jsonDictionary[@"lc"] integerValue] - 1; 47 | _joinType = [jsonDictionary[@"lj"] integerValue] - 1; 48 | 49 | NSNumber *fillEnabled = jsonDictionary[@"fillEnabled"]; 50 | _fillEnabled = fillEnabled.boolValue; 51 | 52 | NSDictionary *dashOffset = nil; 53 | NSArray *dashes = jsonDictionary[@"d"]; 54 | if (dashes) { 55 | NSMutableArray *dashPattern = [NSMutableArray array]; 56 | for (NSDictionary *dash in dashes) { 57 | if ([dash[@"n"] isEqualToString:@"o"]) { 58 | dashOffset = dash[@"v"]; 59 | continue; 60 | } 61 | // TODO DASH PATTERNS 62 | NSDictionary *value = dash[@"v"]; 63 | LOTKeyframeGroup *keyframeGroup = [[LOTKeyframeGroup alloc] initWithData:value]; 64 | [dashPattern addObject:keyframeGroup]; 65 | } 66 | _lineDashPattern = dashPattern; 67 | } 68 | if (dashOffset) { 69 | _dashOffset = [[LOTKeyframeGroup alloc] initWithData:dashOffset]; 70 | } 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeTransform.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeTransform.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import "LOTKeyframe.h" 13 | 14 | @interface LOTShapeTransform : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 20 | @property (nonatomic, readonly) LOTKeyframeGroup *anchor; 21 | @property (nonatomic, readonly) LOTKeyframeGroup *scale; 22 | @property (nonatomic, readonly) LOTKeyframeGroup *rotation; 23 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeTransform.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeTransform.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeTransform.h" 10 | #import "LOTHelpers.h" 11 | 12 | @implementation LOTShapeTransform 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | 24 | if (jsonDictionary[@"nm"] ) { 25 | _keyname = [jsonDictionary[@"nm"] copy]; 26 | } 27 | 28 | NSDictionary *position = jsonDictionary[@"p"]; 29 | if (position) { 30 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 31 | } 32 | 33 | NSDictionary *anchor = jsonDictionary[@"a"]; 34 | if (anchor) { 35 | _anchor = [[LOTKeyframeGroup alloc] initWithData:anchor]; 36 | } 37 | 38 | NSDictionary *scale = jsonDictionary[@"s"]; 39 | if (scale) { 40 | _scale = [[LOTKeyframeGroup alloc] initWithData:scale]; 41 | [_scale remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 42 | return LOT_RemapValue(inValue, -100, 100, -1, 1); 43 | }]; 44 | } 45 | 46 | NSDictionary *rotation = jsonDictionary[@"r"]; 47 | if (rotation) { 48 | _rotation = [[LOTKeyframeGroup alloc] initWithData:rotation]; 49 | [_rotation remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 50 | return LOT_DegreesToRadians(inValue); 51 | }]; 52 | } 53 | 54 | NSDictionary *opacity = jsonDictionary[@"o"]; 55 | if (opacity) { 56 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 57 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 58 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 59 | }]; 60 | } 61 | 62 | NSString *name = jsonDictionary[@"nm"]; 63 | 64 | NSDictionary *skew = jsonDictionary[@"sk"]; 65 | BOOL hasSkew = (skew && [skew[@"k"] isEqual:@0] == NO); 66 | NSDictionary *skewAxis = jsonDictionary[@"sa"]; 67 | BOOL hasSkewAxis = (skewAxis && [skewAxis[@"k"] isEqual:@0] == NO); 68 | 69 | if (hasSkew || hasSkewAxis) { 70 | NSLog(@"%s: Warning: skew is not supported: %@", __PRETTY_FUNCTION__, name); 71 | } 72 | } 73 | 74 | - (NSString *)description { 75 | return [NSString stringWithFormat:@"LOTShapeTransform \"Position: %@ Anchor: %@ Scale: %@ Rotation: %@ Opacity: %@\"", _position.description, _anchor.description, _scale.description, _rotation.description, _opacity.description]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeTrimPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeTrimPath.h 3 | // LottieAnimator 4 | // 5 | // Created by brandon_withrow on 7/26/16. 6 | // Copyright © 2016 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | @interface LOTShapeTrimPath : NSObject 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 15 | 16 | @property (nonatomic, readonly) NSString *keyname; 17 | @property (nonatomic, readonly) LOTKeyframeGroup *start; 18 | @property (nonatomic, readonly) LOTKeyframeGroup *end; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *offset; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeTrimPath.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeTrimPath.m 3 | // LottieAnimator 4 | // 5 | // Created by brandon_withrow on 7/26/16. 6 | // Copyright © 2016 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeTrimPath.h" 10 | 11 | @implementation LOTShapeTrimPath 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *start = jsonDictionary[@"s"]; 28 | if (start) { 29 | _start = [[LOTKeyframeGroup alloc] initWithData:start]; 30 | } 31 | 32 | NSDictionary *end = jsonDictionary[@"e"]; 33 | if (end) { 34 | _end = [[LOTKeyframeGroup alloc] initWithData:end]; 35 | } 36 | 37 | NSDictionary *offset = jsonDictionary[@"o"]; 38 | if (offset) { 39 | _offset = [[LOTKeyframeGroup alloc] initWithData:offset]; 40 | } 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Private/LOTAnimationCache.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationCache.m 3 | // Lottie 4 | // 5 | // Created by Brandon Withrow on 1/9/17. 6 | // Copyright © 2017 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimationCache.h" 10 | 11 | const NSInteger kLOTCacheSize = 50; 12 | 13 | @implementation LOTAnimationCache { 14 | NSMutableDictionary *animationsCache_; 15 | NSMutableArray *lruOrderArray_; 16 | } 17 | 18 | + (instancetype)sharedCache { 19 | static LOTAnimationCache *sharedCache = nil; 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | sharedCache = [[self alloc] init]; 23 | }); 24 | return sharedCache; 25 | } 26 | 27 | - (instancetype)init { 28 | self = [super init]; 29 | if (self) { 30 | animationsCache_ = [[NSMutableDictionary alloc] init]; 31 | lruOrderArray_ = [[NSMutableArray alloc] init]; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)addAnimation:(LOTComposition *)animation forKey:(NSString *)key { 37 | if (lruOrderArray_.count >= kLOTCacheSize) { 38 | NSString *oldKey = lruOrderArray_[0]; 39 | [animationsCache_ removeObjectForKey:oldKey]; 40 | [lruOrderArray_ removeObject:oldKey]; 41 | } 42 | [lruOrderArray_ removeObject:key]; 43 | [lruOrderArray_ addObject:key]; 44 | [animationsCache_ setObject:animation forKey:key]; 45 | } 46 | 47 | - (LOTComposition *)animationForKey:(NSString *)key { 48 | if (!key) { 49 | return nil; 50 | } 51 | LOTComposition *animation = [animationsCache_ objectForKey:key]; 52 | [lruOrderArray_ removeObject:key]; 53 | [lruOrderArray_ addObject:key]; 54 | return animation; 55 | } 56 | 57 | - (void)clearCache { 58 | [animationsCache_ removeAllObjects]; 59 | [lruOrderArray_ removeAllObjects]; 60 | } 61 | 62 | - (void)removeAnimationForKey:(NSString *)key { 63 | [lruOrderArray_ removeObject:key]; 64 | [animationsCache_ removeObjectForKey:key]; 65 | } 66 | 67 | - (void)disableCaching { 68 | [self clearCache]; 69 | animationsCache_ = nil; 70 | lruOrderArray_ = nil; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Private/LOTAnimationView_Internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationView_Internal.h 3 | // Lottie 4 | // 5 | // Created by Brandon Withrow on 12/7/16. 6 | // Copyright © 2016 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimationView.h" 10 | 11 | typedef enum : NSUInteger { 12 | LOTConstraintTypeAlignToBounds, 13 | LOTConstraintTypeAlignToLayer, 14 | LOTConstraintTypeNone 15 | } LOTConstraintType; 16 | 17 | @interface LOTAnimationView () 18 | 19 | - (CALayer * _Nullable)layerForKey:(NSString * _Nonnull)keyname; 20 | - (NSArray * _Nonnull)compositionLayers; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Private/LOTCacheProvider.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCacheProvider.m 3 | // Lottie 4 | // 5 | // Created by punmy on 2017/7/8. 6 | // 7 | // 8 | 9 | #import "LOTCacheProvider.h" 10 | 11 | @implementation LOTCacheProvider 12 | 13 | static id _imageCache; 14 | 15 | + (id)imageCache { 16 | return _imageCache; 17 | } 18 | 19 | + (void)setImageCache:(id)cache { 20 | _imageCache = cache; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/Private/LOTInterpolatorCallback.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTInterpolatorCallback.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 1/5/18. 6 | // Copyright © 2018 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTInterpolatorCallback.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTFloatInterpolatorCallback 13 | 14 | + (instancetype _Nonnull)withFromFloat:(CGFloat)fromFloat toFloat:(CGFloat)toFloat { 15 | LOTFloatInterpolatorCallback *interpolator = [[self alloc] init]; 16 | interpolator.fromFloat = fromFloat; 17 | interpolator.toFloat = toFloat; 18 | return interpolator; 19 | } 20 | - (CGFloat)floatValueForFrame:(CGFloat)currentFrame startKeyframe:(CGFloat)startKeyframe endKeyframe:(CGFloat)endKeyframe interpolatedProgress:(CGFloat)interpolatedProgress startValue:(CGFloat)startValue endValue:(CGFloat)endValue currentValue:(CGFloat)interpolatedValue { 21 | return LOT_RemapValue(self.currentProgress, 0, 1, self.fromFloat, self.toFloat); 22 | } 23 | 24 | @end 25 | 26 | @implementation LOTPointInterpolatorCallback 27 | 28 | + (instancetype _Nonnull)withFromPoint:(CGPoint)fromPoint toPoint:(CGPoint)toPoint { 29 | LOTPointInterpolatorCallback *interpolator = [[self alloc] init]; 30 | interpolator.fromPoint = fromPoint; 31 | interpolator.toPoint = toPoint; 32 | return interpolator; 33 | } 34 | - (CGPoint)pointForFrame:(CGFloat)currentFrame startKeyframe:(CGFloat)startKeyframe endKeyframe:(CGFloat)endKeyframe interpolatedProgress:(CGFloat)interpolatedProgress startPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint currentPoint:(CGPoint)interpolatedPoint { 35 | return LOT_PointInLine(self.fromPoint, self.toPoint, self.currentProgress); 36 | } 37 | 38 | @end 39 | 40 | @implementation LOTSizeInterpolatorCallback 41 | 42 | + (instancetype)withFromSize:(CGSize)fromSize toSize:(CGSize)toSize { 43 | LOTSizeInterpolatorCallback *interpolator = [[self alloc] init]; 44 | interpolator.fromSize = fromSize; 45 | interpolator.toSize = toSize; 46 | return interpolator; 47 | } 48 | 49 | - (CGSize)sizeForFrame:(CGFloat)currentFrame startKeyframe:(CGFloat)startKeyframe endKeyframe:(CGFloat)endKeyframe interpolatedProgress:(CGFloat)interpolatedProgress startSize:(CGSize)startSize endSize:(CGSize)endSize currentSize:(CGSize)interpolatedSize { 50 | CGPoint from = CGPointMake(self.fromSize.width, self.fromSize.height); 51 | CGPoint to = CGPointMake(self.toSize.width, self.toSize.height); 52 | CGPoint returnPoint = LOT_PointInLine(from, to, self.currentProgress); 53 | return CGSizeMake(returnPoint.x, returnPoint.y); 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimatedControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimatedControl.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 8/25/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class LOTAnimationView; 12 | @class LOTComposition; 13 | 14 | @interface LOTAnimatedControl : UIControl 15 | 16 | // This class is a base class that is intended to be subclassed 17 | 18 | /** 19 | * Map a specific animation layer to a control state. 20 | * When the state is set all layers will be hidden except the specified layer. 21 | **/ 22 | 23 | - (void)setLayerName:(NSString * _Nonnull)layerName forState:(UIControlState)state; 24 | 25 | @property (nonatomic, strong, readonly, nonnull) LOTAnimationView *animationView; 26 | @property (nonatomic, strong, nullable) LOTComposition *animationComp; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimatedSwitch.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimatedSwitch.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 8/25/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatedControl.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface LOTAnimatedSwitch : LOTAnimatedControl 14 | 15 | /// Convenience method to initialize a control from the Main Bundle by name 16 | + (instancetype _Nonnull)switchNamed:(NSString * _Nonnull)toggleName; 17 | 18 | /// Convenience method to initialize a control from the specified bundle by name 19 | + (instancetype _Nonnull)switchNamed:(NSString * _Nonnull)toggleName inBundle:(NSBundle * _Nonnull)bundle; 20 | 21 | 22 | /// The ON/OFF state of the control. Setting will toggle without animation 23 | @property (nonatomic, getter=isOn) BOOL on; 24 | 25 | /// Enable interactive sliding gesture for toggle 26 | @property (nonatomic) BOOL interactiveGesture; 27 | 28 | /// Set the state of the control with animation 29 | - (void)setOn:(BOOL)on animated:(BOOL)animated; // does not send action 30 | 31 | /// Styling 32 | 33 | /** 34 | * Sets the animation play range for the ON state animation. 35 | * fromProgress is the start of the animation 36 | * toProgress is the end of the animation and also the ON static state 37 | * Defaults 0-1 38 | **/ 39 | - (void)setProgressRangeForOnState:(CGFloat)fromProgress 40 | toProgress:(CGFloat)toProgress NS_SWIFT_NAME(setProgressRangeForOnState(fromProgress:toProgress:)); 41 | 42 | /** 43 | * Sets the animation play range for the OFF state animation. 44 | * fromProgress is the start of the animation 45 | * toProgress is the end of the animation and also the OFF static state 46 | * Defaults 1-0 47 | **/ 48 | - (void)setProgressRangeForOffState:(CGFloat)fromProgress 49 | toProgress:(CGFloat)toProgress NS_SWIFT_NAME(setProgressRangeForOffState(fromProgress:toProgress:)); 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimationCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationCache.h 3 | // Lottie 4 | // 5 | // Created by Brandon Withrow on 1/9/17. 6 | // Copyright © 2017 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @class LOTComposition; 14 | 15 | @interface LOTAnimationCache : NSObject 16 | 17 | /// Global Cache 18 | + (instancetype)sharedCache; 19 | 20 | /// Adds animation to the cache 21 | - (void)addAnimation:(LOTComposition *)animation forKey:(NSString *)key; 22 | 23 | /// Returns animation from cache. 24 | - (LOTComposition * _Nullable)animationForKey:(NSString *)key; 25 | 26 | /// Removes a specific animation from the cache 27 | - (void)removeAnimationForKey:(NSString *)key; 28 | 29 | /// Clears Everything from the Cache 30 | - (void)clearCache; 31 | 32 | /// Disables Caching Animation Model Objects 33 | - (void)disableCaching; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimationView_Compat.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationView_Compat.h 3 | // Lottie 4 | // 5 | // Created by Oleksii Pavlovskyi on 2/2/17. 6 | // Copyright (c) 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 10 | 11 | #import 12 | @compatibility_alias LOTView UIView; 13 | 14 | #else 15 | 16 | #import 17 | @compatibility_alias LOTView NSView; 18 | 19 | typedef NS_ENUM(NSInteger, LOTViewContentMode) { 20 | LOTViewContentModeScaleToFill, 21 | LOTViewContentModeScaleAspectFit, 22 | LOTViewContentModeScaleAspectFill, 23 | LOTViewContentModeRedraw, 24 | LOTViewContentModeCenter, 25 | LOTViewContentModeTop, 26 | LOTViewContentModeBottom, 27 | LOTViewContentModeLeft, 28 | LOTViewContentModeRight, 29 | LOTViewContentModeTopLeft, 30 | LOTViewContentModeTopRight, 31 | LOTViewContentModeBottomLeft, 32 | LOTViewContentModeBottomRight, 33 | }; 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTCacheProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCacheProvider.h 3 | // Lottie 4 | // 5 | // Created by punmy on 2017/7/8. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 12 | 13 | #import 14 | @compatibility_alias LOTImage UIImage; 15 | 16 | @protocol LOTImageCache; 17 | 18 | #pragma mark - LOTCacheProvider 19 | 20 | @interface LOTCacheProvider : NSObject 21 | 22 | + (id)imageCache; 23 | + (void)setImageCache:(id)cache; 24 | 25 | @end 26 | 27 | #pragma mark - LOTImageCache 28 | 29 | /** 30 | This protocol represent the interface of a image cache which lottie can use. 31 | */ 32 | @protocol LOTImageCache 33 | 34 | @required 35 | - (LOTImage *)imageForKey:(NSString *)key; 36 | - (void)setImage:(LOTImage *)image forKey:(NSString *)key; 37 | 38 | @end 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTComposition.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTScene.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class LOTLayerGroup; 13 | @class LOTLayer; 14 | @class LOTAssetGroup; 15 | 16 | @interface LOTComposition : NSObject 17 | 18 | /// Load animation by name from the default bundle, Images are also loaded from the bundle 19 | + (nullable instancetype)animationNamed:(nonnull NSString *)animationName NS_SWIFT_NAME(init(name:)); 20 | 21 | /// Loads animation by name from specified bundle, Images are also loaded from the bundle 22 | + (nullable instancetype)animationNamed:(nonnull NSString *)animationName 23 | inBundle:(nonnull NSBundle *)bundle NS_SWIFT_NAME(init(name:bundle:)); 24 | 25 | /// Loads an animation from a specific file path. WARNING Do not use a web URL for file path. 26 | + (nullable instancetype)animationWithFilePath:(nonnull NSString *)filePath NS_SWIFT_NAME(init(filePath:)); 27 | 28 | /// Creates an animation from the deserialized JSON Dictionary 29 | + (nonnull instancetype)animationFromJSON:(nonnull NSDictionary *)animationJSON NS_SWIFT_NAME(init(json:)); 30 | 31 | /// Creates an animation from the deserialized JSON Dictionary, images are loaded from the specified bundle 32 | + (nonnull instancetype)animationFromJSON:(nullable NSDictionary *)animationJSON 33 | inBundle:(nullable NSBundle *)bundle NS_SWIFT_NAME(init(json:bundle:)); 34 | 35 | - (instancetype _Nonnull)initWithJSON:(NSDictionary * _Nullable)jsonDictionary 36 | withAssetBundle:(NSBundle * _Nullable)bundle; 37 | 38 | @property (nonatomic, readonly) CGRect compBounds; 39 | @property (nonatomic, strong, readonly, nullable) NSNumber *startFrame; 40 | @property (nonatomic, strong, readonly, nullable) NSNumber *endFrame; 41 | @property (nonatomic, strong, readonly, nullable) NSNumber *framerate; 42 | @property (nonatomic, readonly) NSTimeInterval timeDuration; 43 | @property (nonatomic, strong, readonly, nullable) LOTLayerGroup *layerGroup; 44 | @property (nonatomic, strong, readonly, nullable) LOTAssetGroup *assetGroup; 45 | @property (nonatomic, strong, readwrite, nullable) NSString *rootDirectory; 46 | @property (nonatomic, strong, readonly, nullable) NSBundle *assetBundle; 47 | @property (nonatomic, copy, nullable) NSString *cacheKey; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/Lottie.h: -------------------------------------------------------------------------------- 1 | // 2 | // Lottie.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 1/27/17. 6 | // 7 | // Dream Big. 8 | 9 | #if __has_feature(modules) 10 | @import Foundation; 11 | #else 12 | #import 13 | #endif 14 | 15 | #ifndef Lottie_h 16 | #define Lottie_h 17 | 18 | //! Project version number for Lottie. 19 | FOUNDATION_EXPORT double LottieVersionNumber; 20 | 21 | //! Project version string for Lottie. 22 | FOUNDATION_EXPORT const unsigned char LottieVersionString[]; 23 | 24 | #include 25 | 26 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 27 | #import "LOTAnimationTransitionController.h" 28 | #import "LOTAnimatedSwitch.h" 29 | #import "LOTAnimatedControl.h" 30 | #endif 31 | 32 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 33 | #import "LOTCacheProvider.h" 34 | #endif 35 | 36 | #import "LOTAnimationView.h" 37 | #import "LOTAnimationCache.h" 38 | #import "LOTComposition.h" 39 | #import "LOTBlockCallback.h" 40 | #import "LOTInterpolatorCallback.h" 41 | #import "LOTValueCallback.h" 42 | #import "LOTValueDelegate.h" 43 | 44 | #endif /* Lottie_h */ 45 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTCircleAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCircleAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/19/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeCircle.h" 11 | 12 | @interface LOTCircleAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeCircle:(LOTShapeCircle *_Nonnull)shapeCircle; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPathAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPathAnimator.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapePath.h" 11 | 12 | @interface LOTPathAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapePath:(LOTShapePath *_Nonnull)shapePath; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPathAnimator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPathAnimator.m 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTPathAnimator.h" 10 | #import "LOTPathInterpolator.h" 11 | 12 | @implementation LOTPathAnimator { 13 | LOTShapePath *_pathConent; 14 | LOTPathInterpolator *_interpolator; 15 | } 16 | 17 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 18 | shapePath:(LOTShapePath *_Nonnull)shapePath { 19 | self = [super initWithInputNode:inputNode keyName:shapePath.keyname]; 20 | if (self) { 21 | _pathConent = shapePath; 22 | _interpolator = [[LOTPathInterpolator alloc] initWithKeyframes:_pathConent.shapePath.keyframes]; 23 | } 24 | return self; 25 | } 26 | 27 | - (NSDictionary *)valueInterpolators { 28 | return @{@"Path" : _interpolator}; 29 | } 30 | 31 | - (BOOL)needsUpdateForFrame:(NSNumber *)frame { 32 | return [_interpolator hasUpdateForFrame:frame]; 33 | } 34 | 35 | - (void)performLocalUpdate { 36 | self.localPath = [_interpolator pathForFrame:self.currentFrame cacheLengths:self.pathShouldCacheLengths]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolygonAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPolygonAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeStar.h" 11 | 12 | @interface LOTPolygonAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapePolygon:(LOTShapeStar *_Nonnull)shapeStar; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolystarAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPolystarAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeStar.h" 11 | 12 | @interface LOTPolystarAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeStar:(LOTShapeStar *_Nonnull)shapeStar; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTRoundedRectAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRoundedRectAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/19/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeRectangle.h" 11 | 12 | @interface LOTRoundedRectAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeRectangle:(LOTShapeRectangle *_Nonnull)shapeRectangle; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTArrayInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTArrayInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface LOTArrayInterpolator : LOTValueInterpolator 14 | 15 | - (NSArray *)numberArrayForFrame:(NSNumber *)frame; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTArrayInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTArrayInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTArrayInterpolator.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTArrayInterpolator 13 | 14 | - (NSArray *)numberArrayForFrame:(NSNumber *)frame { 15 | CGFloat progress = [self progressForFrame:frame]; 16 | if (progress == 0) { 17 | return self.leadingKeyframe.arrayValue; 18 | } 19 | if (progress == 1) { 20 | return self.trailingKeyframe.arrayValue; 21 | } 22 | NSMutableArray *returnArray = [NSMutableArray array]; 23 | for (int i = 0; i < self.leadingKeyframe.arrayValue.count; i ++) { 24 | CGFloat from = [(NSNumber *)self.leadingKeyframe.arrayValue[i] floatValue]; 25 | CGFloat to = [(NSNumber *)self.trailingKeyframe.arrayValue[i] floatValue]; 26 | CGFloat value = LOT_RemapValue(progress, 0, 1, from, to); 27 | [returnArray addObject:@(value)]; 28 | } 29 | return returnArray; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTColorInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTColorInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTPlatformCompat.h" 11 | #import "LOTValueDelegate.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface LOTColorInterpolator : LOTValueInterpolator 16 | 17 | - (CGColorRef)colorForFrame:(NSNumber *)frame; 18 | 19 | @property (nonatomic, weak, nullable) id delegate; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTColorInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTColorInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTColorInterpolator.h" 10 | #import "LOTPlatformCompat.h" 11 | #import "UIColor+Expanded.h" 12 | 13 | @implementation LOTColorInterpolator 14 | 15 | - (CGColorRef)colorForFrame:(NSNumber *)frame { 16 | CGFloat progress = [self progressForFrame:frame]; 17 | UIColor *returnColor; 18 | 19 | if (progress == 0) { 20 | returnColor = self.leadingKeyframe.colorValue; 21 | } else if (progress == 1) { 22 | returnColor = self.trailingKeyframe.colorValue; 23 | } else { 24 | returnColor = [UIColor LOT_colorByLerpingFromColor:self.leadingKeyframe.colorValue toColor:self.trailingKeyframe.colorValue amount:progress]; 25 | } 26 | if (self.hasDelegateOverride) { 27 | return [self.delegate colorForFrame:frame.floatValue 28 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 29 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 30 | interpolatedProgress:progress 31 | startColor:self.leadingKeyframe.colorValue.CGColor 32 | endColor:self.trailingKeyframe.colorValue.CGColor 33 | currentColor:returnColor.CGColor]; 34 | } 35 | 36 | return returnColor.CGColor; 37 | } 38 | 39 | - (void)setValueDelegate:(id)delegate { 40 | NSAssert(([delegate conformsToProtocol:@protocol(LOTColorValueDelegate)]), @"Color Interpolator set with incorrect callback type. Expected LOTColorValueDelegate"); 41 | self.delegate = (id)delegate; 42 | } 43 | 44 | - (BOOL)hasDelegateOverride { 45 | return self.delegate != nil; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTNumberInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTNumberInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/11/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTValueInterpolator.h" 11 | #import "LOTValueDelegate.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | @interface LOTNumberInterpolator : LOTValueInterpolator 15 | 16 | - (CGFloat)floatValueForFrame:(NSNumber *)frame; 17 | 18 | @property (nonatomic, weak, nullable) id delegate; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTNumberInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTNumberInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/11/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTNumberInterpolator.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTNumberInterpolator 13 | 14 | - (CGFloat)floatValueForFrame:(NSNumber *)frame { 15 | CGFloat progress = [self progressForFrame:frame]; 16 | CGFloat returnValue; 17 | if (progress == 0) { 18 | returnValue = self.leadingKeyframe.floatValue; 19 | } else if (progress == 1) { 20 | returnValue = self.trailingKeyframe.floatValue; 21 | } else { 22 | returnValue = LOT_RemapValue(progress, 0, 1, self.leadingKeyframe.floatValue, self.trailingKeyframe.floatValue); 23 | } 24 | if (self.hasDelegateOverride) { 25 | return [self.delegate floatValueForFrame:frame.floatValue 26 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 27 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 28 | interpolatedProgress:progress 29 | startValue:self.leadingKeyframe.floatValue 30 | endValue:self.trailingKeyframe.floatValue 31 | currentValue:returnValue]; 32 | } 33 | 34 | return returnValue; 35 | } 36 | 37 | - (BOOL)hasDelegateOverride { 38 | return self.delegate != nil; 39 | } 40 | 41 | - (void)setValueDelegate:(id _Nonnull)delegate { 42 | NSAssert(([delegate conformsToProtocol:@protocol(LOTNumberValueDelegate)]), @"Number Interpolator set with incorrect callback type. Expected LOTNumberValueDelegate"); 43 | self.delegate = (id)delegate; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPathInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPathInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTPlatformCompat.h" 11 | #import "LOTBezierPath.h" 12 | #import "LOTValueDelegate.h" 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface LOTPathInterpolator : LOTValueInterpolator 17 | 18 | - (LOTBezierPath *)pathForFrame:(NSNumber *)frame cacheLengths:(BOOL)cacheLengths; 19 | 20 | @property (nonatomic, weak, nullable) id delegate; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPointInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPointInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/12/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTValueDelegate.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTPointInterpolator : LOTValueInterpolator 15 | 16 | - (CGPoint)pointValueForFrame:(NSNumber *)frame; 17 | 18 | @property (nonatomic, weak, nullable) id delegate; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPointInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPointInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/12/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPointInterpolator.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTPointInterpolator 13 | 14 | - (CGPoint)pointValueForFrame:(NSNumber *)frame { 15 | CGFloat progress = [self progressForFrame:frame]; 16 | CGPoint returnPoint; 17 | if (progress == 0) { 18 | returnPoint = self.leadingKeyframe.pointValue; 19 | } else if (progress == 1) { 20 | returnPoint = self.trailingKeyframe.pointValue; 21 | } else if (!CGPointEqualToPoint(self.leadingKeyframe.spatialOutTangent, CGPointZero) || 22 | !CGPointEqualToPoint(self.trailingKeyframe.spatialInTangent, CGPointZero)) { 23 | // Spatial Bezier path 24 | CGPoint outTan = LOT_PointAddedToPoint(self.leadingKeyframe.pointValue, self.leadingKeyframe.spatialOutTangent); 25 | CGPoint inTan = LOT_PointAddedToPoint(self.trailingKeyframe.pointValue, self.trailingKeyframe.spatialInTangent); 26 | returnPoint = LOT_PointInCubicCurve(self.leadingKeyframe.pointValue, outTan, inTan, self.trailingKeyframe.pointValue, progress); 27 | } else { 28 | returnPoint = LOT_PointInLine(self.leadingKeyframe.pointValue, self.trailingKeyframe.pointValue, progress); 29 | } 30 | if (self.hasDelegateOverride) { 31 | return [self.delegate pointForFrame:frame.floatValue 32 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 33 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 34 | interpolatedProgress:progress 35 | startPoint:self.leadingKeyframe.pointValue 36 | endPoint:self.trailingKeyframe.pointValue 37 | currentPoint:returnPoint]; 38 | } 39 | return returnPoint; 40 | } 41 | 42 | - (BOOL)hasDelegateOverride { 43 | return self.delegate != nil; 44 | } 45 | 46 | - (void)setValueDelegate:(id)delegate { 47 | NSAssert(([delegate conformsToProtocol:@protocol(LOTPointValueDelegate)]), @"Point Interpolator set with incorrect callback type. Expected LOTPointValueDelegate"); 48 | self.delegate = (id)delegate; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTSizeInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTSizeInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTValueDelegate.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTSizeInterpolator : LOTValueInterpolator 15 | 16 | - (CGSize)sizeValueForFrame:(NSNumber *)frame; 17 | 18 | @property (nonatomic, weak, nullable) id delegate; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTSizeInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTSizeInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPlatformCompat.h" 10 | #import "LOTSizeInterpolator.h" 11 | #import "CGGeometry+LOTAdditions.h" 12 | 13 | @implementation LOTSizeInterpolator 14 | 15 | - (CGSize)sizeValueForFrame:(NSNumber *)frame { 16 | CGFloat progress = [self progressForFrame:frame]; 17 | CGSize returnSize; 18 | if (progress == 0) { 19 | returnSize = self.leadingKeyframe.sizeValue; 20 | }else if (progress == 1) { 21 | returnSize = self.trailingKeyframe.sizeValue; 22 | } else { 23 | returnSize = CGSizeMake(LOT_RemapValue(progress, 0, 1, self.leadingKeyframe.sizeValue.width, self.trailingKeyframe.sizeValue.width), 24 | LOT_RemapValue(progress, 0, 1, self.leadingKeyframe.sizeValue.height, self.trailingKeyframe.sizeValue.height)); 25 | } 26 | if (self.hasDelegateOverride) { 27 | return [self.delegate sizeForFrame:frame.floatValue 28 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 29 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 30 | interpolatedProgress:progress startSize:self.leadingKeyframe.sizeValue 31 | endSize:self.trailingKeyframe.sizeValue 32 | currentSize:returnSize]; 33 | } 34 | return returnSize; 35 | } 36 | 37 | - (BOOL)hasDelegateOverride { 38 | return self.delegate != nil; 39 | } 40 | 41 | - (void)setValueDelegate:(id)delegate { 42 | NSAssert(([delegate conformsToProtocol:@protocol(LOTSizeValueDelegate)]), @"Size Interpolator set with incorrect callback type. Expected LOTSizeValueDelegate"); 43 | self.delegate = (id)delegate; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTTransformInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTTransformInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/18/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTNumberInterpolator.h" 11 | #import "LOTPointInterpolator.h" 12 | #import "LOTSizeInterpolator.h" 13 | #import "LOTKeyframe.h" 14 | #import "LOTLayer.h" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface LOTTransformInterpolator : NSObject 19 | 20 | + (instancetype)transformForLayer:(LOTLayer *)layer; 21 | 22 | - (instancetype)initWithPosition:(NSArray *)position 23 | rotation:(NSArray *)rotation 24 | anchor:(NSArray *)anchor 25 | scale:(NSArray *)scale; 26 | 27 | - (instancetype)initWithPositionX:(NSArray *)positionX 28 | positionY:(NSArray *)positionY 29 | rotation:(NSArray *)rotation 30 | anchor:(NSArray *)anchor 31 | scale:(NSArray *)scale; 32 | 33 | @property (nonatomic, strong) LOTTransformInterpolator * inputNode; 34 | 35 | @property (nonatomic, readonly) LOTPointInterpolator *positionInterpolator; 36 | @property (nonatomic, readonly) LOTPointInterpolator *anchorInterpolator; 37 | @property (nonatomic, readonly) LOTSizeInterpolator *scaleInterpolator; 38 | @property (nonatomic, readonly) LOTNumberInterpolator *rotationInterpolator; 39 | @property (nonatomic, readonly) LOTNumberInterpolator *positionXInterpolator; 40 | @property (nonatomic, readonly) LOTNumberInterpolator *positionYInterpolator; 41 | @property (nonatomic, strong, nullable) NSString *parentKeyName; 42 | 43 | - (CATransform3D)transformForFrame:(NSNumber *)frame; 44 | - (BOOL)hasUpdateForFrame:(NSNumber *)frame; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTValueInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTValueInterpolator.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 7/10/17. 6 | // 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | #import "LOTValueDelegate.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface LOTValueInterpolator : NSObject 16 | 17 | - (instancetype)initWithKeyframes:(NSArray *)keyframes; 18 | 19 | @property (nonatomic, weak, nullable) LOTKeyframe *leadingKeyframe; 20 | @property (nonatomic, weak, nullable) LOTKeyframe *trailingKeyframe; 21 | @property (nonatomic, readonly) BOOL hasDelegateOverride; 22 | 23 | - (void)setValueDelegate:(id _Nonnull)delegate; 24 | 25 | - (BOOL)hasUpdateForFrame:(NSNumber *)frame; 26 | - (CGFloat)progressForFrame:(NSNumber *)frame; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/LOTRenderNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRenderNode.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | 11 | @interface LOTRenderNode : LOTAnimatorNode 12 | 13 | @property (nonatomic, readonly, strong) CAShapeLayer * _Nonnull outputLayer; 14 | 15 | - (NSDictionary * _Nonnull)actionsForRenderLayer; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/LOTRenderNode.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRenderNode.m 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | 11 | @implementation LOTRenderNode 12 | 13 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 14 | keyName:(NSString * _Nullable)keyname { 15 | self = [super initWithInputNode:inputNode keyName:keyname]; 16 | if (self) { 17 | _outputLayer = [CAShapeLayer new]; 18 | _outputLayer.actions = [self actionsForRenderLayer]; 19 | } 20 | return self; 21 | } 22 | 23 | /// Layer Properties that need to disable implicit animations 24 | - (NSDictionary * _Nonnull)actionsForRenderLayer { 25 | return @{@"path": [NSNull null]}; 26 | } 27 | 28 | /// Local interpolators have changed. Update layer specific properties. 29 | - (void)performLocalUpdate { 30 | 31 | } 32 | 33 | /// The path for rendering has changed. Do any rendering required. 34 | - (void)rebuildOutputs { 35 | 36 | } 37 | 38 | - (LOTBezierPath *)localPath { 39 | return self.inputNode.localPath; 40 | } 41 | 42 | /// Forwards its input node's output path forwards downstream 43 | - (LOTBezierPath *)outputPath { 44 | return self.inputNode.outputPath; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/ManipulatorNodes/LOTTrimPathNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTTrimPathNode.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/21/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeTrimPath.h" 11 | 12 | @interface LOTTrimPathNode : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | trimPath:(LOTShapeTrimPath *_Nonnull)trimPath; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTFillRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTFillRenderer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeFill.h" 11 | 12 | @interface LOTFillRenderer : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeFill:(LOTShapeFill *_Nonnull)fill; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTFillRenderer.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTFillRenderer.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTFillRenderer.h" 10 | #import "LOTColorInterpolator.h" 11 | #import "LOTNumberInterpolator.h" 12 | #import "LOTHelpers.h" 13 | 14 | @implementation LOTFillRenderer { 15 | LOTColorInterpolator *colorInterpolator_; 16 | LOTNumberInterpolator *opacityInterpolator_; 17 | BOOL _evenOddFillRule; 18 | CALayer *centerPoint_DEBUG; 19 | } 20 | 21 | - (instancetype)initWithInputNode:(LOTAnimatorNode *)inputNode 22 | shapeFill:(LOTShapeFill *)fill { 23 | self = [super initWithInputNode:inputNode keyName:fill.keyname]; 24 | if (self) { 25 | colorInterpolator_ = [[LOTColorInterpolator alloc] initWithKeyframes:fill.color.keyframes]; 26 | opacityInterpolator_ = [[LOTNumberInterpolator alloc] initWithKeyframes:fill.opacity.keyframes]; 27 | centerPoint_DEBUG = [CALayer layer]; 28 | centerPoint_DEBUG.bounds = CGRectMake(0, 0, 20, 20); 29 | if (ENABLE_DEBUG_SHAPES) { 30 | [self.outputLayer addSublayer:centerPoint_DEBUG]; 31 | } 32 | _evenOddFillRule = fill.evenOddFillRule; 33 | 34 | self.outputLayer.fillRule = _evenOddFillRule ? @"even-odd" : @"non-zero"; 35 | } 36 | return self; 37 | } 38 | 39 | - (NSDictionary *)valueInterpolators { 40 | return @{@"Color" : colorInterpolator_, 41 | @"Opacity" : opacityInterpolator_}; 42 | } 43 | 44 | - (BOOL)needsUpdateForFrame:(NSNumber *)frame { 45 | return [colorInterpolator_ hasUpdateForFrame:frame] || [opacityInterpolator_ hasUpdateForFrame:frame]; 46 | } 47 | 48 | - (void)performLocalUpdate { 49 | centerPoint_DEBUG.backgroundColor = [colorInterpolator_ colorForFrame:self.currentFrame]; 50 | centerPoint_DEBUG.borderColor = [UIColor lightGrayColor].CGColor; 51 | centerPoint_DEBUG.borderWidth = 2.f; 52 | self.outputLayer.fillColor = [colorInterpolator_ colorForFrame:self.currentFrame]; 53 | self.outputLayer.opacity = [opacityInterpolator_ floatValueForFrame:self.currentFrame]; 54 | } 55 | 56 | - (void)rebuildOutputs { 57 | self.outputLayer.path = self.inputNode.outputPath.CGPath; 58 | } 59 | 60 | - (NSDictionary *)actionsForRenderLayer { 61 | return @{@"backgroundColor": [NSNull null], 62 | @"fillColor": [NSNull null], 63 | @"opacity" : [NSNull null]}; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTGradientFillRender.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTGradientFillRender.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeGradientFill.h" 11 | 12 | @interface LOTGradientFillRender : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeGradientFill:(LOTShapeGradientFill *_Nonnull)fill; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRenderGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRenderGroup.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | 11 | @interface LOTRenderGroup : LOTRenderNode 12 | 13 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode * _Nullable)inputNode 14 | contents:(NSArray * _Nonnull)contents 15 | keyname:(NSString * _Nullable)keyname; 16 | 17 | @property (nonatomic, strong, readonly) CALayer * _Nonnull containerLayer; 18 | 19 | @end 20 | 21 | 22 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRepeaterRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRepeaterRenderer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/28/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeRepeater.h" 11 | 12 | @interface LOTRepeaterRenderer : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeRepeater:(LOTShapeRepeater *_Nonnull)repeater; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Example/Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTStrokeRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTStrokeRenderer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/17/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeStroke.h" 11 | 12 | @interface LOTStrokeRenderer : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeStroke:(LOTShapeStroke *_Nonnull)stroke; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Example/Tests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import EGOCircleMenu 3 | 4 | class Tests: XCTestCase { 5 | 6 | override func setUp() { 7 | super.setUp() 8 | // Put setup code here. This method is called before the invocation of each test method in the class. 9 | } 10 | 11 | override func tearDown() { 12 | // Put teardown code here. This method is called after the invocation of each test method in the class. 13 | super.tearDown() 14 | } 15 | 16 | func testExample() { 17 | // This is an example of a functional test case. 18 | XCTAssert(true, "Pass") 19 | } 20 | 21 | func testPerformanceExample() { 22 | // This is an example of a performance test case. 23 | self.measure() { 24 | // Put the code you want to measure the time of here. 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright © 2018 EGO creative innovations 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 | -------------------------------------------------------------------------------- /Resources/animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ego-cms/circlemenu/202411160718faafa0c96c658f74ecdf1239b19c/Resources/animation.gif -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------