├── BrowseMeetup.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── simon.xcuserdatad │ └── xcschemes │ ├── BrowseMeetup.xcscheme │ └── xcschememanagement.plist ├── BrowseMeetup.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ └── simon.xcuserdatad │ └── xcdebugger │ └── Breakpoints_v2.xcbkptlist ├── BrowseMeetup ├── AppDelegate.swift ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── Group.swift ├── GroupCellNode.swift ├── Info.plist ├── LocationService.swift ├── MeetupFeedDataManager.swift ├── MeetupFeedInteractorIO.swift ├── MeetupFeedTableDataProvider.swift ├── MeetupFeedViewController.swift ├── MeetupService.swift └── Organizer.swift ├── Podfile ├── Podfile.lock ├── Pods ├── AsyncDisplayKit │ ├── AsyncDisplayKit │ │ ├── ASButtonNode.h │ │ ├── ASButtonNode.mm │ │ ├── ASCellNode+Internal.h │ │ ├── ASCellNode.h │ │ ├── ASCellNode.mm │ │ ├── ASCollectionNode+Beta.h │ │ ├── ASCollectionNode.h │ │ ├── ASCollectionNode.mm │ │ ├── ASCollectionView.h │ │ ├── ASCollectionView.mm │ │ ├── ASCollectionViewLayoutFacilitatorProtocol.h │ │ ├── ASCollectionViewProtocols.h │ │ ├── ASContextTransitioning.h │ │ ├── ASControlNode+Subclasses.h │ │ ├── ASControlNode+tvOS.h │ │ ├── ASControlNode+tvOS.m │ │ ├── ASControlNode.h │ │ ├── ASControlNode.mm │ │ ├── ASDisplayNode+Beta.h │ │ ├── ASDisplayNode+Deprecated.h │ │ ├── ASDisplayNode+Subclasses.h │ │ ├── ASDisplayNode.h │ │ ├── ASDisplayNode.mm │ │ ├── ASDisplayNodeExtras.h │ │ ├── ASDisplayNodeExtras.mm │ │ ├── ASEditableTextNode.h │ │ ├── ASEditableTextNode.mm │ │ ├── ASImageNode+AnimatedImage.mm │ │ ├── ASImageNode+tvOS.h │ │ ├── ASImageNode+tvOS.m │ │ ├── ASImageNode.h │ │ ├── ASImageNode.mm │ │ ├── ASMapNode.h │ │ ├── ASMapNode.mm │ │ ├── ASMultiplexImageNode.h │ │ ├── ASMultiplexImageNode.mm │ │ ├── ASNavigationController.h │ │ ├── ASNavigationController.m │ │ ├── ASNetworkImageNode.h │ │ ├── ASNetworkImageNode.mm │ │ ├── ASPagerFlowLayout.h │ │ ├── ASPagerFlowLayout.m │ │ ├── ASPagerNode.h │ │ ├── ASPagerNode.m │ │ ├── ASRunLoopQueue.h │ │ ├── ASRunLoopQueue.mm │ │ ├── ASScrollNode.h │ │ ├── ASScrollNode.m │ │ ├── ASTabBarController.h │ │ ├── ASTabBarController.m │ │ ├── ASTableNode.h │ │ ├── ASTableNode.mm │ │ ├── ASTableView.h │ │ ├── ASTableView.mm │ │ ├── ASTableViewInternal.h │ │ ├── ASTableViewProtocols.h │ │ ├── ASTextNode+Beta.h │ │ ├── ASTextNode.h │ │ ├── ASTextNode.mm │ │ ├── ASVideoNode.h │ │ ├── ASVideoNode.mm │ │ ├── ASVideoPlayerNode.h │ │ ├── ASVideoPlayerNode.mm │ │ ├── ASViewController.h │ │ ├── ASViewController.mm │ │ ├── ASVisibilityProtocols.h │ │ ├── ASVisibilityProtocols.m │ │ ├── AsyncDisplayKit+Debug.h │ │ ├── AsyncDisplayKit+Debug.m │ │ ├── AsyncDisplayKit.h │ │ ├── Debug │ │ │ ├── ASLayoutElementInspectorCell.h │ │ │ ├── ASLayoutElementInspectorCell.m │ │ │ ├── ASLayoutElementInspectorNode.h │ │ │ ├── ASLayoutElementInspectorNode.m │ │ │ ├── ASLayoutSpec+Debug.h │ │ │ └── ASLayoutSpec+Debug.m │ │ ├── Details │ │ │ ├── ASAbstractLayoutController.h │ │ │ ├── ASAbstractLayoutController.mm │ │ │ ├── ASBasicImageDownloader.h │ │ │ ├── ASBasicImageDownloader.mm │ │ │ ├── ASBatchContext.h │ │ │ ├── ASBatchContext.mm │ │ │ ├── ASChangeSetDataController.h │ │ │ ├── ASChangeSetDataController.mm │ │ │ ├── ASCollectionDataController.h │ │ │ ├── ASCollectionDataController.mm │ │ │ ├── ASCollectionInternal.h │ │ │ ├── ASCollectionInternal.m │ │ │ ├── ASCollectionViewFlowLayoutInspector.h │ │ │ ├── ASCollectionViewFlowLayoutInspector.m │ │ │ ├── ASCollectionViewLayoutController.h │ │ │ ├── ASCollectionViewLayoutController.mm │ │ │ ├── ASCollectionViewLayoutInspector.h │ │ │ ├── ASCollectionViewLayoutInspector.m │ │ │ ├── ASDataController.h │ │ │ ├── ASDataController.mm │ │ │ ├── ASDelegateProxy.h │ │ │ ├── ASDelegateProxy.m │ │ │ ├── ASEnvironment.h │ │ │ ├── ASEnvironment.mm │ │ │ ├── ASEventLog.h │ │ │ ├── ASEventLog.mm │ │ │ ├── ASFlowLayoutController.h │ │ │ ├── ASFlowLayoutController.mm │ │ │ ├── ASHighlightOverlayLayer.h │ │ │ ├── ASHighlightOverlayLayer.mm │ │ │ ├── ASImageContainerProtocolCategories.h │ │ │ ├── ASImageContainerProtocolCategories.m │ │ │ ├── ASImageProtocols.h │ │ │ ├── ASIndexPath.h │ │ │ ├── ASIndexPath.m │ │ │ ├── ASIndexedNodeContext.h │ │ │ ├── ASIndexedNodeContext.mm │ │ │ ├── ASLayoutController.h │ │ │ ├── ASLayoutRangeType.h │ │ │ ├── ASMainSerialQueue.h │ │ │ ├── ASMainSerialQueue.mm │ │ │ ├── ASMutableAttributedStringBuilder.h │ │ │ ├── ASMutableAttributedStringBuilder.m │ │ │ ├── ASObjectDescriptionHelpers.h │ │ │ ├── ASObjectDescriptionHelpers.m │ │ │ ├── ASPINRemoteImageDownloader.h │ │ │ ├── ASPINRemoteImageDownloader.m │ │ │ ├── ASPhotosFrameworkImageRequest.h │ │ │ ├── ASPhotosFrameworkImageRequest.m │ │ │ ├── ASRangeController.h │ │ │ ├── ASRangeController.mm │ │ │ ├── ASRangeControllerUpdateRangeProtocol+Beta.h │ │ │ ├── ASScrollDirection.h │ │ │ ├── ASScrollDirection.m │ │ │ ├── ASSectionContext.h │ │ │ ├── ASThread.h │ │ │ ├── ASTraceEvent.h │ │ │ ├── ASTraceEvent.m │ │ │ ├── ASTraitCollection.h │ │ │ ├── ASTraitCollection.m │ │ │ ├── ASWeakProxy.h │ │ │ ├── ASWeakProxy.m │ │ │ ├── ASWeakSet.h │ │ │ ├── ASWeakSet.m │ │ │ ├── CoreGraphics+ASConvenience.h │ │ │ ├── CoreGraphics+ASConvenience.m │ │ │ ├── NSArray+Diffing.h │ │ │ ├── NSArray+Diffing.m │ │ │ ├── NSIndexSet+ASHelpers.h │ │ │ ├── NSIndexSet+ASHelpers.m │ │ │ ├── NSMutableAttributedString+TextKitAdditions.h │ │ │ ├── NSMutableAttributedString+TextKitAdditions.m │ │ │ ├── Transactions │ │ │ │ ├── _ASAsyncTransaction.h │ │ │ │ ├── _ASAsyncTransaction.mm │ │ │ │ ├── _ASAsyncTransactionContainer+Private.h │ │ │ │ ├── _ASAsyncTransactionContainer.h │ │ │ │ ├── _ASAsyncTransactionContainer.m │ │ │ │ ├── _ASAsyncTransactionGroup.h │ │ │ │ └── _ASAsyncTransactionGroup.m │ │ │ ├── UICollectionViewLayout+ASConvenience.h │ │ │ ├── UICollectionViewLayout+ASConvenience.m │ │ │ ├── UIView+ASConvenience.h │ │ │ ├── _ASDisplayLayer.h │ │ │ ├── _ASDisplayLayer.mm │ │ │ ├── _ASDisplayView.h │ │ │ ├── _ASDisplayView.mm │ │ │ ├── _ASDisplayViewAccessiblity.h │ │ │ └── _ASDisplayViewAccessiblity.mm │ │ ├── Layout │ │ │ ├── ASAbsoluteLayoutElement.h │ │ │ ├── ASAbsoluteLayoutSpec.h │ │ │ ├── ASAbsoluteLayoutSpec.mm │ │ │ ├── ASAsciiArtBoxCreator.h │ │ │ ├── ASAsciiArtBoxCreator.m │ │ │ ├── ASBackgroundLayoutSpec.h │ │ │ ├── ASBackgroundLayoutSpec.mm │ │ │ ├── ASCenterLayoutSpec.h │ │ │ ├── ASCenterLayoutSpec.mm │ │ │ ├── ASDimension.h │ │ │ ├── ASDimension.mm │ │ │ ├── ASInsetLayoutSpec.h │ │ │ ├── ASInsetLayoutSpec.mm │ │ │ ├── ASLayout.h │ │ │ ├── ASLayout.mm │ │ │ ├── ASLayoutElement.h │ │ │ ├── ASLayoutElement.mm │ │ │ ├── ASLayoutElementExtensibility.h │ │ │ ├── ASLayoutElementPrivate.h │ │ │ ├── ASLayoutElementStylePrivate.h │ │ │ ├── ASLayoutSpec+Subclasses.h │ │ │ ├── ASLayoutSpec+Subclasses.mm │ │ │ ├── ASLayoutSpec.h │ │ │ ├── ASLayoutSpec.mm │ │ │ ├── ASOverlayLayoutSpec.h │ │ │ ├── ASOverlayLayoutSpec.mm │ │ │ ├── ASRatioLayoutSpec.h │ │ │ ├── ASRatioLayoutSpec.mm │ │ │ ├── ASRelativeLayoutSpec.h │ │ │ ├── ASRelativeLayoutSpec.mm │ │ │ ├── ASStackLayoutDefines.h │ │ │ ├── ASStackLayoutElement.h │ │ │ ├── ASStackLayoutSpec.h │ │ │ └── ASStackLayoutSpec.mm │ │ ├── Private │ │ │ ├── ASBasicImageDownloaderInternal.h │ │ │ ├── ASBatchFetching.h │ │ │ ├── ASBatchFetching.m │ │ │ ├── ASCollectionView+Undeprecated.h │ │ │ ├── ASControlTargetAction.h │ │ │ ├── ASControlTargetAction.m │ │ │ ├── ASDataController+Subclasses.h │ │ │ ├── ASDefaultPlayButton.h │ │ │ ├── ASDefaultPlayButton.m │ │ │ ├── ASDefaultPlaybackButton.h │ │ │ ├── ASDefaultPlaybackButton.m │ │ │ ├── ASDispatch.h │ │ │ ├── ASDisplayNode+AsyncDisplay.mm │ │ │ ├── ASDisplayNode+DebugTiming.h │ │ │ ├── ASDisplayNode+DebugTiming.mm │ │ │ ├── ASDisplayNode+FrameworkPrivate.h │ │ │ ├── ASDisplayNode+UIViewBridge.mm │ │ │ ├── ASDisplayNodeInternal.h │ │ │ ├── ASDisplayNodeLayout.h │ │ │ ├── ASDisplayNodeLayout.mm │ │ │ ├── ASEnvironmentInternal.h │ │ │ ├── ASEnvironmentInternal.mm │ │ │ ├── ASImageNode+AnimatedImagePrivate.h │ │ │ ├── ASImageNode+CGExtras.h │ │ │ ├── ASImageNode+CGExtras.m │ │ │ ├── ASInternalHelpers.h │ │ │ ├── ASInternalHelpers.m │ │ │ ├── ASLayoutSpecPrivate.h │ │ │ ├── ASLayoutSpecUtilities.h │ │ │ ├── ASLayoutTransition.h │ │ │ ├── ASLayoutTransition.mm │ │ │ ├── ASMultidimensionalArrayUtils.h │ │ │ ├── ASMultidimensionalArrayUtils.mm │ │ │ ├── ASPendingStateController.h │ │ │ ├── ASPendingStateController.mm │ │ │ ├── ASSection.h │ │ │ ├── ASSection.m │ │ │ ├── ASStackBaselinePositionedLayout.h │ │ │ ├── ASStackBaselinePositionedLayout.mm │ │ │ ├── ASStackLayoutSpecUtilities.h │ │ │ ├── ASStackPositionedLayout.h │ │ │ ├── ASStackPositionedLayout.mm │ │ │ ├── ASStackUnpositionedLayout.h │ │ │ ├── ASStackUnpositionedLayout.mm │ │ │ ├── ASTableView+Undeprecated.h │ │ │ ├── ASWeakMap.h │ │ │ ├── ASWeakMap.m │ │ │ ├── _ASCoreAnimationExtras.h │ │ │ ├── _ASCoreAnimationExtras.mm │ │ │ ├── _ASHierarchyChangeSet.h │ │ │ ├── _ASHierarchyChangeSet.mm │ │ │ ├── _ASPendingState.h │ │ │ ├── _ASPendingState.mm │ │ │ └── _ASScopeTimer.h │ │ ├── TextKit │ │ │ ├── ASEqualityHashHelpers.h │ │ │ ├── ASEqualityHashHelpers.mm │ │ │ ├── ASLayoutManager.h │ │ │ ├── ASLayoutManager.m │ │ │ ├── ASTextKitAttributes.h │ │ │ ├── ASTextKitAttributes.mm │ │ │ ├── ASTextKitComponents.h │ │ │ ├── ASTextKitComponents.m │ │ │ ├── ASTextKitContext.h │ │ │ ├── ASTextKitContext.mm │ │ │ ├── ASTextKitCoreTextAdditions.h │ │ │ ├── ASTextKitCoreTextAdditions.m │ │ │ ├── ASTextKitEntityAttribute.h │ │ │ ├── ASTextKitEntityAttribute.m │ │ │ ├── ASTextKitFontSizeAdjuster.h │ │ │ ├── ASTextKitFontSizeAdjuster.mm │ │ │ ├── ASTextKitRenderer+Positioning.h │ │ │ ├── ASTextKitRenderer+Positioning.mm │ │ │ ├── ASTextKitRenderer+TextChecking.h │ │ │ ├── ASTextKitRenderer+TextChecking.mm │ │ │ ├── ASTextKitRenderer.h │ │ │ ├── ASTextKitRenderer.mm │ │ │ ├── ASTextKitShadower.h │ │ │ ├── ASTextKitShadower.mm │ │ │ ├── ASTextKitTailTruncater.h │ │ │ ├── ASTextKitTailTruncater.mm │ │ │ ├── ASTextKitTruncating.h │ │ │ ├── ASTextNodeTypes.h │ │ │ ├── ASTextNodeWordKerner.h │ │ │ └── ASTextNodeWordKerner.m │ │ ├── UIImage+ASConvenience.h │ │ ├── UIImage+ASConvenience.m │ │ ├── _ASTransitionContext.h │ │ └── _ASTransitionContext.m │ ├── Base │ │ ├── ASAssert.h │ │ ├── ASAvailability.h │ │ ├── ASBaseDefines.h │ │ ├── ASEqualityHelpers.h │ │ └── ASLog.h │ ├── LICENSE │ └── README.md ├── Manifest.lock ├── PINCache │ ├── LICENSE.txt │ ├── PINCache │ │ ├── Nullability.h │ │ ├── PINCache.h │ │ ├── PINCache.m │ │ ├── PINCacheObjectSubscripting.h │ │ ├── PINDiskCache.h │ │ ├── PINDiskCache.m │ │ ├── PINMemoryCache.h │ │ ├── PINMemoryCache.m │ │ ├── PINOperationGroup.h │ │ ├── PINOperationGroup.m │ │ ├── PINOperationQueue.h │ │ └── PINOperationQueue.m │ └── README.md ├── PINRemoteImage │ ├── LICENSE │ ├── Pod │ │ └── Classes │ │ │ ├── Categories │ │ │ ├── NSData+ImageDetectors.h │ │ │ ├── NSData+ImageDetectors.m │ │ │ ├── PINImage+DecodedImage.h │ │ │ ├── PINImage+DecodedImage.m │ │ │ ├── PINImage+WebP.h │ │ │ └── PINImage+WebP.m │ │ │ ├── Image Categories │ │ │ ├── PINButton+PINRemoteImage.h │ │ │ ├── PINButton+PINRemoteImage.m │ │ │ ├── PINImageView+PINRemoteImage.h │ │ │ └── PINImageView+PINRemoteImage.m │ │ │ ├── PINAlternateRepresentationProvider.h │ │ │ ├── PINAlternateRepresentationProvider.m │ │ │ ├── PINAnimatedImage.h │ │ │ ├── PINAnimatedImage.m │ │ │ ├── PINAnimatedImageManager.h │ │ │ ├── PINAnimatedImageManager.m │ │ │ ├── PINCache │ │ │ ├── PINCache+PINRemoteImageCaching.h │ │ │ └── PINCache+PINRemoteImageCaching.m │ │ │ ├── PINDataTaskOperation.h │ │ │ ├── PINDataTaskOperation.m │ │ │ ├── PINProgressiveImage.h │ │ │ ├── PINProgressiveImage.m │ │ │ ├── PINRemoteImage.h │ │ │ ├── PINRemoteImageBasicCache.h │ │ │ ├── PINRemoteImageBasicCache.m │ │ │ ├── PINRemoteImageCaching.h │ │ │ ├── PINRemoteImageCallbacks.h │ │ │ ├── PINRemoteImageCallbacks.m │ │ │ ├── PINRemoteImageCategoryManager.h │ │ │ ├── PINRemoteImageCategoryManager.m │ │ │ ├── PINRemoteImageDownloadTask.h │ │ │ ├── PINRemoteImageDownloadTask.m │ │ │ ├── PINRemoteImageMacros.h │ │ │ ├── PINRemoteImageManager.h │ │ │ ├── PINRemoteImageManager.m │ │ │ ├── PINRemoteImageManagerResult.h │ │ │ ├── PINRemoteImageManagerResult.m │ │ │ ├── PINRemoteImageMemoryContainer.h │ │ │ ├── PINRemoteImageMemoryContainer.m │ │ │ ├── PINRemoteImageProcessorTask.h │ │ │ ├── PINRemoteImageProcessorTask.m │ │ │ ├── PINRemoteImageTask.h │ │ │ ├── PINRemoteImageTask.m │ │ │ ├── PINRemoteLock.h │ │ │ ├── PINRemoteLock.m │ │ │ ├── PINURLSessionManager.h │ │ │ └── PINURLSessionManager.m │ └── README.md ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── simon.xcuserdatad │ │ └── xcschemes │ │ ├── AsyncDisplayKit.xcscheme │ │ ├── PINCache.xcscheme │ │ ├── PINRemoteImage.xcscheme │ │ ├── Pods-BrowseMeetup.xcscheme │ │ └── xcschememanagement.plist └── Target Support Files │ ├── AsyncDisplayKit │ ├── AsyncDisplayKit-dummy.m │ ├── AsyncDisplayKit-prefix.pch │ ├── AsyncDisplayKit-umbrella.h │ ├── AsyncDisplayKit.modulemap │ ├── AsyncDisplayKit.xcconfig │ └── Info.plist │ ├── PINCache │ ├── Info.plist │ ├── PINCache-dummy.m │ ├── PINCache-prefix.pch │ ├── PINCache-umbrella.h │ ├── PINCache.modulemap │ └── PINCache.xcconfig │ ├── PINRemoteImage │ ├── Info.plist │ ├── PINRemoteImage-dummy.m │ ├── PINRemoteImage-prefix.pch │ ├── PINRemoteImage-umbrella.h │ ├── PINRemoteImage.modulemap │ └── PINRemoteImage.xcconfig │ └── Pods-BrowseMeetup │ ├── Info.plist │ ├── Pods-BrowseMeetup-acknowledgements.markdown │ ├── Pods-BrowseMeetup-acknowledgements.plist │ ├── Pods-BrowseMeetup-dummy.m │ ├── Pods-BrowseMeetup-frameworks.sh │ ├── Pods-BrowseMeetup-resources.sh │ ├── Pods-BrowseMeetup-umbrella.h │ ├── Pods-BrowseMeetup.debug.xcconfig │ ├── Pods-BrowseMeetup.modulemap │ └── Pods-BrowseMeetup.release.xcconfig └── README.md /BrowseMeetup.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BrowseMeetup.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BrowseMeetup.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F4D8BE8F1E13708D00F8F901 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /BrowseMeetup.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /BrowseMeetup.xcworkspace/xcuserdata/simon.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /BrowseMeetup/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | let window = UIWindow(frame: UIScreen.main.bounds) 18 | window.backgroundColor = UIColor.white 19 | 20 | let feedVC = MeetupFeedViewController() 21 | let locationService = LocationService() 22 | let meetupService = MeetupService() 23 | 24 | let dataManager = MeetupFeedDataManager(meetupService: meetupService, locationService: locationService) 25 | let interactor = MeetupFeedInteractor() 26 | interactor.dataManager = dataManager 27 | interactor.output = feedVC 28 | 29 | feedVC.handler = interactor 30 | 31 | let feedNavCtrl = UINavigationController(rootViewController: feedVC) 32 | window.rootViewController = feedNavCtrl 33 | 34 | window.makeKeyAndVisible() 35 | self.window = window 36 | 37 | return true 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /BrowseMeetup/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /BrowseMeetup/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /BrowseMeetup/Group.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Group.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Group { 12 | let createdAt: Double! 13 | let photoUrl: URL! 14 | let city: String! 15 | let country: String! 16 | let organizer: Organizer! 17 | 18 | var timeInterval: String { 19 | let date = Date(timeIntervalSince1970: createdAt) 20 | let dateFormatter = DateFormatter() 21 | dateFormatter.dateStyle = .medium 22 | dateFormatter.timeStyle = .none 23 | 24 | return dateFormatter.string(from: date) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /BrowseMeetup/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | NSAppTransportSecurity 8 | 9 | NSAllowsArbitraryLoads 10 | 11 | 12 | CFBundleExecutable 13 | $(EXECUTABLE_NAME) 14 | CFBundleIdentifier 15 | $(PRODUCT_BUNDLE_IDENTIFIER) 16 | CFBundleInfoDictionaryVersion 17 | 6.0 18 | CFBundleName 19 | $(PRODUCT_NAME) 20 | CFBundlePackageType 21 | APPL 22 | CFBundleShortVersionString 23 | 1.0 24 | CFBundleVersion 25 | 1 26 | LSRequiresIPhoneOS 27 | 28 | UILaunchStoryboardName 29 | LaunchScreen 30 | UIRequiredDeviceCapabilities 31 | 32 | armv7 33 | 34 | UISupportedInterfaceOrientations 35 | 36 | UIInterfaceOrientationPortrait 37 | UIInterfaceOrientationLandscapeLeft 38 | UIInterfaceOrientationLandscapeRight 39 | 40 | UISupportedInterfaceOrientations~ipad 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationPortraitUpsideDown 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /BrowseMeetup/LocationService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LocationService.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import CoreLocation 11 | 12 | final class LocationService { 13 | 14 | var coordinate: CLLocationCoordinate2D? = CLLocationCoordinate2D(latitude: 51.509980, longitude: -0.133700) 15 | } 16 | -------------------------------------------------------------------------------- /BrowseMeetup/MeetupFeedDataManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MeetupFeedDataManager.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | final class MeetupFeedDataManager { 12 | 13 | fileprivate var _meetupService: MeetupService? 14 | fileprivate var _locationService: LocationService? 15 | 16 | init(meetupService: MeetupService, locationService: LocationService) { 17 | _meetupService = meetupService 18 | _locationService = locationService 19 | } 20 | 21 | func searchForGroupNearby(completion: @escaping ( _ groups: [Group]?, _ error: Error?) -> ()) { 22 | let coordinate = _locationService?.coordinate 23 | 24 | _meetupService?.fetchMeetupGroupInLocation(latitude: coordinate!.latitude, longitude: coordinate!.longitude, completion: { (results, error) in 25 | guard error == nil else { completion(nil, error); return } 26 | 27 | let groups = results?.flatMap(self.groupItemFromJSONDictionary) 28 | completion(groups, nil) 29 | }) 30 | } 31 | 32 | func groupItemFromJSONDictionary(_ entry: JSONDictionary) -> Group? { 33 | guard let created = entry["created"] as? Double, let city = entry["city"] as? String, let country = entry["country"] as? String, let keyPhoto = entry["key_photo"] as? JSONDictionary, let photoUrl = keyPhoto["photo_link"] as? String, let organizerJSON = entry["organizer"] as? JSONDictionary, let organizer = organizerItemFromJSONDictionary(organizerJSON) else { 34 | return nil 35 | } 36 | 37 | return Group(createdAt: created, photoUrl: URL(string: photoUrl), city: city, country: country, organizer: organizer) 38 | } 39 | 40 | func organizerItemFromJSONDictionary(_ entry: JSONDictionary) -> Organizer? { 41 | guard let name = entry["name"] as? String, let photo = entry["photo"] as? JSONDictionary, let thumbUrl = photo["thumb_link"] as? String else { 42 | return nil 43 | } 44 | 45 | return Organizer(name: name, thumbUrl: URL(string: thumbUrl)) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /BrowseMeetup/MeetupFeedInteractorIO.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MeetupFeedInteractorIO.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | protocol MeetupFeedInteractorInput { 12 | func findGroupItemsNearby () 13 | } 14 | 15 | protocol MeetupFeedInteractorOutput { 16 | func foundGroupItems (_ groups: [Group]?, error: Error?) 17 | } 18 | 19 | final class MeetupFeedInteractor: MeetupFeedInteractorInput { 20 | 21 | var dataManager: MeetupFeedDataManager? 22 | 23 | var output: MeetupFeedInteractorOutput? 24 | 25 | func findGroupItemsNearby() { 26 | dataManager?.searchForGroupNearby(completion: output!.foundGroupItems) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /BrowseMeetup/MeetupFeedTableDataProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MeetupFeedTableDataProvider.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import AsyncDisplayKit 11 | 12 | class MeetupFeedTableDataProvider: NSObject, ASTableDataSource { 13 | 14 | var _groups: [Group]? 15 | weak var _tableNode: ASTableNode? 16 | 17 | ///-------------------------------------- 18 | // MARK - Table data source 19 | ///-------------------------------------- 20 | 21 | func tableNode(_ tableNode: ASTableNode, numberOfRowsInSection section: Int) -> Int { 22 | return _groups?.count ?? 0 23 | } 24 | 25 | func tableNode(_ tableNode: ASTableNode, nodeBlockForRowAt indexPath: IndexPath) -> ASCellNodeBlock { 26 | 27 | let group = _groups![indexPath.row] 28 | let cellNodeBlock = { () -> ASCellNode in 29 | return GroupCellNode(group: group) 30 | } 31 | return cellNodeBlock 32 | } 33 | 34 | ///-------------------------------------- 35 | // MARK - Helper Methods 36 | ///-------------------------------------- 37 | 38 | func insertNewGroupsInTableView(_ groups: [Group]) { 39 | _groups = groups 40 | 41 | let section = 0 42 | var indexPaths = [IndexPath]() 43 | groups.enumerated().forEach { (row, group) in 44 | let path = IndexPath(row: row, section: section) 45 | indexPaths.append(path) 46 | } 47 | _tableNode?.insertRows(at: indexPaths, with: .none) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /BrowseMeetup/MeetupFeedViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MeetupFeedViewController.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import AsyncDisplayKit 11 | 12 | final class MeetupFeedViewController: ASViewController, MeetupFeedInteractorOutput { 13 | 14 | var _tableNode: ASTableNode 15 | var handler: MeetupFeedInteractorInput? 16 | var _activityIndicatorView: UIActivityIndicatorView! 17 | var _dataProvider: MeetupFeedTableDataProvider! 18 | 19 | init() { 20 | _tableNode = ASTableNode() 21 | super.init(node: _tableNode) 22 | setupInitialState() 23 | } 24 | 25 | required init?(coder aDecoder: NSCoder) { 26 | fatalError("init(coder:) has not been implemented") 27 | } 28 | 29 | override func viewDidLoad() { 30 | super.viewDidLoad() 31 | _activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle: .gray) 32 | _activityIndicatorView.hidesWhenStopped = true 33 | _activityIndicatorView.sizeToFit() 34 | 35 | var refreshRect = _activityIndicatorView.frame 36 | refreshRect.origin = CGPoint(x: (view.bounds.size.width - _activityIndicatorView.frame.width) / 2.0, y: _activityIndicatorView.frame.midY) 37 | 38 | _activityIndicatorView.frame = refreshRect 39 | view.addSubview(_activityIndicatorView) 40 | 41 | _tableNode.view.allowsSelection = false 42 | _tableNode.view.separatorStyle = UITableViewCellSeparatorStyle.none 43 | 44 | _activityIndicatorView.startAnimating() 45 | handler?.findGroupItemsNearby() 46 | } 47 | 48 | func setupInitialState() { 49 | title = "Browse Meetup" 50 | 51 | _dataProvider = MeetupFeedTableDataProvider() 52 | _dataProvider._tableNode = _tableNode 53 | _tableNode.dataSource = _dataProvider 54 | } 55 | 56 | func foundGroupItems(_ groups: [Group]?, error: Error?) { 57 | guard error == nil else { return } 58 | 59 | _dataProvider.insertNewGroupsInTableView(groups!) 60 | _activityIndicatorView.stopAnimating() 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /BrowseMeetup/MeetupService.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MeetupService.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | typealias JSONDictionary = Dictionary 12 | let MEETUP_API_KEY = "1f5718c16a7fb3a5452f45193232" 13 | 14 | final class MeetupService { 15 | 16 | var baseUrl: String = "https://api.meetup.com/" 17 | lazy var session: URLSession = URLSession.shared 18 | 19 | func fetchMeetupGroupInLocation(latitude: Double, longitude: Double, completion: @escaping (_ results: [JSONDictionary]?, _ error: Error?) -> ()) { 20 | print("\(baseUrl)find/groups?&lat=\(latitude)&lon=\(longitude)&page=10&key=\(MEETUP_API_KEY)") 21 | guard let url = URL(string: "\(baseUrl)find/groups?&lat=\(latitude)&lon=\(longitude)&page=10&key=\(MEETUP_API_KEY)") else { 22 | fatalError() 23 | } 24 | 25 | session.dataTask(with: url) { (data, response, error) in 26 | DispatchQueue.main.async(execute: { 27 | do { 28 | let results = try JSONSerialization.jsonObject(with: data!) as? [JSONDictionary] 29 | completion(results, nil); 30 | 31 | } catch let underlyingError { 32 | completion(nil, underlyingError); 33 | } 34 | }) 35 | }.resume() 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /BrowseMeetup/Organizer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Organizer.swift 3 | // BrowseMeetup 4 | // 5 | // Created by Simon Ng on 28/12/2016. 6 | // Copyright © 2016 AppCoda. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct Organizer { 12 | let name: String! 13 | let thumbUrl: URL! 14 | } 15 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'BrowseMeetup' do 5 | use_frameworks! 6 | 7 | pod 'AsyncDisplayKit', ' 2.0' 8 | end 9 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AsyncDisplayKit (2.0): 3 | - AsyncDisplayKit/PINRemoteImage (= 2.0) 4 | - AsyncDisplayKit/Core (2.0) 5 | - AsyncDisplayKit/PINRemoteImage (2.0): 6 | - AsyncDisplayKit/Core 7 | - PINRemoteImage/iOS (= 3.0.0-beta.7) 8 | - PINRemoteImage/PINCache 9 | - PINCache (3.0.1-beta.2): 10 | - PINCache/Arc-exception-safe (= 3.0.1-beta.2) 11 | - PINCache/Core (= 3.0.1-beta.2) 12 | - PINCache/Arc-exception-safe (3.0.1-beta.2): 13 | - PINCache/Core 14 | - PINCache/Core (3.0.1-beta.2) 15 | - PINRemoteImage/Core (3.0.0-beta.7) 16 | - PINRemoteImage/iOS (3.0.0-beta.7): 17 | - PINRemoteImage/Core 18 | - PINRemoteImage/PINCache (3.0.0-beta.7): 19 | - PINCache (= 3.0.1-beta.2) 20 | - PINRemoteImage/Core 21 | 22 | DEPENDENCIES: 23 | - AsyncDisplayKit (= 2.0) 24 | 25 | SPEC CHECKSUMS: 26 | AsyncDisplayKit: ed88de8d9fb404e098f4fdde9b8db50f23972f56 27 | PINCache: 6d273a6e0754bd26e3f12a38a90dde73cc6a42b2 28 | PINRemoteImage: ff63baf185088530db6cfa41cb665e2b5126b5c3 29 | 30 | PODFILE CHECKSUM: a15931ffeedceb52f0ecfa5a641ffcf43237bf36 31 | 32 | COCOAPODS: 1.1.1 33 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASCollectionNode+Beta.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASCollectionNode+Beta.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASCollectionNode.h" 12 | @protocol ASCollectionViewLayoutFacilitatorProtocol; 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface ASCollectionNode (Beta) 17 | 18 | - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout layoutFacilitator:(nullable id)layoutFacilitator; 19 | 20 | - (void)beginUpdates ASDISPLAYNODE_DEPRECATED_MSG("Use -performBatchUpdates:completion: instead."); 21 | 22 | - (void)endUpdatesAnimated:(BOOL)animated ASDISPLAYNODE_DEPRECATED_MSG("Use -performBatchUpdates:completion: instead."); 23 | 24 | - (void)endUpdatesAnimated:(BOOL)animated completion:(nullable void (^)(BOOL))completion ASDISPLAYNODE_DEPRECATED_MSG("Use -performBatchUpdates:completion: instead."); 25 | 26 | @end 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASCollectionViewLayoutFacilitatorProtocol.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASCollectionViewLayoutFacilitatorProtocol.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #pragma once 12 | 13 | /** 14 | * This facilitator protocol is intended to help Layout to better 15 | * gel with the CollectionView 16 | */ 17 | @protocol ASCollectionViewLayoutFacilitatorProtocol 18 | 19 | /** 20 | * Inform that the collectionView is editing the cells at a list of indexPaths 21 | * 22 | * @param indexPaths an array of NSIndexPath objects of cells being/will be edited. 23 | * @param isBatched indicates whether the editing operation will be batched by the collectionView 24 | * 25 | * NOTE: when isBatched, used in combination with -collectionViewWillPerformBatchUpdates 26 | */ 27 | - (void)collectionViewWillEditCellsAtIndexPaths:(NSArray *)indexPaths batched:(BOOL)isBatched; 28 | 29 | /** 30 | * Inform that the collectionView is editing the sections at a set of indexes 31 | * 32 | * @param indexes an NSIndexSet of section indexes being/will be edited. 33 | * @param batched indicates whether the editing operation will be batched by the collectionView 34 | * 35 | * NOTE: when batched, used in combination with -collectionViewWillPerformBatchUpdates 36 | */ 37 | - (void)collectionViewWillEditSectionsAtIndexSet:(NSIndexSet *)indexes batched:(BOOL)batched; 38 | 39 | /** 40 | * Informs the delegate that the collectionView is about to call performBatchUpdates 41 | */ 42 | - (void)collectionViewWillPerformBatchUpdates; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASControlNode+tvOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASControlNode+tvOS.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Aaron Schubert on 21/04/2016. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #if TARGET_OS_TV 14 | #import 15 | 16 | @interface ASControlNode (tvOS) 17 | 18 | @end 19 | #endif 20 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASImageNode+tvOS.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASImageNode+tvOS.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Aaron Schubert on 21/04/2016. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #if TARGET_OS_TV 14 | #import 15 | 16 | @interface ASImageNode (tvOS) 17 | @end 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASNavigationController.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 4/27/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | #import "ASVisibilityProtocols.h" 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | * ASNavigationController 21 | * 22 | * @discussion ASNavigationController is a drop in replacement for UINavigationController 23 | * which improves memory efficiency by implementing the @c ASManagesChildVisibilityDepth protocol. 24 | * You can use ASNavigationController with regular UIViewControllers, as well as ASViewControllers. 25 | * It is safe to subclass or use even where AsyncDisplayKit is not adopted. 26 | * 27 | * @see ASManagesChildVisibilityDepth 28 | */ 29 | @interface ASNavigationController : UINavigationController 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASPagerFlowLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASPagerFlowLayout.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Levi McCallum on 2/12/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface ASPagerFlowLayout : UICollectionViewFlowLayout 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASRunLoopQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASRunLoopQueue.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Rahul Malik on 3/7/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface ASRunLoopQueue : NSObject 18 | 19 | /** 20 | * Create a new queue with the given run loop and handler. 21 | * 22 | * @param runloop The run loop that will drive this queue. 23 | * @param handlerBlock An optional block to be run for each enqueued object. 24 | * 25 | * @discussion You may pass @c nil for the handler if you simply want the objects to 26 | * be retained at enqueue time, and released during the run loop step. This is useful 27 | * for creating a "main deallocation queue", as @c ASDeallocQueue creates its own 28 | * worker thread with its own run loop. 29 | */ 30 | - (instancetype)initWithRunLoop:(CFRunLoopRef)runloop 31 | andHandler:(nullable void(^)(ObjectType dequeuedItem, BOOL isQueueDrained))handlerBlock; 32 | 33 | - (void)enqueue:(ObjectType)object; 34 | 35 | @property (nonatomic, assign) NSUInteger batchSize; // Default == 1. 36 | @property (nonatomic, assign) BOOL ensureExclusiveMembership; // Default == YES. Set-like behavior. 37 | 38 | @end 39 | 40 | @interface ASDeallocQueue : NSObject 41 | 42 | + (instancetype)sharedDeallocationQueue; 43 | 44 | - (void)releaseObjectInBackground:(id)object; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASScrollNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASScrollNode.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | /** 18 | * Simple node that wraps UIScrollView. 19 | */ 20 | @interface ASScrollNode : ASDisplayNode 21 | 22 | /** 23 | * @abstract The node's UIScrollView. 24 | */ 25 | @property (nonatomic, readonly, strong) UIScrollView *view; 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASScrollNode.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASScrollNode.m 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASScrollNode.h" 12 | #import "_ASDisplayLayer.h" 13 | 14 | @interface ASScrollView : UIScrollView 15 | @end 16 | 17 | @implementation ASScrollView 18 | 19 | + (Class)layerClass 20 | { 21 | return [_ASDisplayLayer class]; 22 | } 23 | 24 | @end 25 | 26 | @implementation ASScrollNode 27 | @dynamic view; 28 | 29 | - (instancetype)init 30 | { 31 | return [super initWithViewBlock:^UIView *{ 32 | return [[ASScrollView alloc] init]; 33 | } didLoadBlock:nil]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTabBarController.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 5/10/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | #import "ASVisibilityProtocols.h" 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | * ASTabBarController 21 | * 22 | * @discussion ASTabBarController is a drop in replacement for UITabBarController 23 | * which implements the memory efficiency improving @c ASManagesChildVisibilityDepth protocol. 24 | * 25 | * @see ASManagesChildVisibilityDepth 26 | */ 27 | @interface ASTabBarController : UITabBarController 28 | 29 | @end 30 | 31 | NS_ASSUME_NONNULL_END 32 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASTextNode+Beta.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextNode+Beta.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Luke on 1/25/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface ASTextNode () 16 | 17 | /** 18 | @abstract An array of descending scale factors that will be applied to this text node to try to make it fit within its constrained size 19 | @discussion This array should be in descending order and NOT contain the scale factor 1.0. For example, it could return @[@(.9), @(.85), @(.8)]; 20 | @default nil (no scaling) 21 | */ 22 | @property (nullable, nonatomic, copy) NSArray *pointSizeScaleFactors; 23 | 24 | /** 25 | @abstract Text margins for text laid out in the text node. 26 | @discussion defaults to UIEdgeInsetsZero. 27 | This property can be useful for handling text which does not fit within the view by default. An example: like UILabel, 28 | ASTextNode will clip the left and right of the string "judar" if it's rendered in an italicised font. 29 | */ 30 | @property (nonatomic, assign) UIEdgeInsets textContainerInset; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/ASVisibilityProtocols.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASVisibilityProtocols.m 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 4/28/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import "ASVisibilityProtocols.h" 14 | 15 | ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth) 16 | { 17 | if (visibilityDepth == 0) { 18 | return ASLayoutRangeModeFull; 19 | } else if (visibilityDepth == 1) { 20 | return ASLayoutRangeModeMinimum; 21 | } else if (visibilityDepth == 2) { 22 | return ASLayoutRangeModeVisibleOnly; 23 | } 24 | return ASLayoutRangeModeLowMemory; 25 | } 26 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutElementInspectorCell.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Hannah Troisi on 3/27/16. 6 | // Copyright © 2016 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, ASLayoutElementPropertyType) { 12 | ASLayoutElementPropertyFlexGrow = 0, 13 | ASLayoutElementPropertyFlexShrink, 14 | ASLayoutElementPropertyAlignSelf, 15 | ASLayoutElementPropertyFlexBasis, 16 | ASLayoutElementPropertySpacingBefore, 17 | ASLayoutElementPropertySpacingAfter, 18 | ASLayoutElementPropertyAscender, 19 | ASLayoutElementPropertyDescender, 20 | ASLayoutElementPropertyCount 21 | }; 22 | 23 | @interface ASLayoutElementInspectorCell : ASCellNode 24 | 25 | - (instancetype)initWithProperty:(ASLayoutElementPropertyType)property layoutElementToEdit:(id)layoutable NS_DESIGNATED_INITIALIZER; 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutElementInspectorNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutElementInspectorNode.h 3 | // Sample 4 | // 5 | // Created by Hannah Troisi on 3/19/16. 6 | // Copyright © 2016 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol ASLayoutElementInspectorNodeDelegate 12 | 13 | - (void)toggleVisualization:(BOOL)toggle; 14 | 15 | @end 16 | 17 | @interface ASLayoutElementInspectorNode : ASDisplayNode 18 | 19 | @property (nonatomic, strong) id layoutElementToEdit; 20 | @property (nonatomic, strong) id delegate; 21 | @property (nonatomic, assign) CGFloat vizNodeInsetSize; 22 | 23 | + (instancetype)sharedInstance; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Debug/ASLayoutSpec+Debug.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutSpec+Debug.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Hannah Troisi on 3/20/16. 6 | // 7 | // 8 | 9 | #pragma once 10 | #import "ASControlNode.h" 11 | 12 | @class ASLayoutSpec; 13 | 14 | @interface ASLayoutSpecVisualizerNode : ASControlNode 15 | 16 | @property (nonatomic, strong) ASLayoutSpec *layoutSpec; 17 | 18 | - (instancetype)initWithLayoutSpec:(ASLayoutSpec *)layoutSpec; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASAbstractLayoutController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASAbstractLayoutController.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface ASAbstractLayoutController : NSObject 17 | 18 | @end 19 | 20 | @interface ASAbstractLayoutController (Unavailable) 21 | 22 | - (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection rangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType __unavailable; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASBasicImageDownloader.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASBasicImageDownloader.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | * @abstract Simple NSURLSession-based image downloader. 17 | */ 18 | @interface ASBasicImageDownloader : NSObject 19 | 20 | /** 21 | * A shared image downloader which can be used by @c ASNetworkImageNodes and @c ASMultiplexImageNodes 22 | * 23 | * This is a very basic image downloader. It does not support caching, progressive downloading and likely 24 | * isn't something you should use in production. If you'd like something production ready, see @c ASPINRemoteImageDownloader 25 | * 26 | * @note It is strongly recommended you include PINRemoteImage and use @c ASPINRemoteImageDownloader instead. 27 | */ 28 | + (instancetype)sharedImageDownloader; 29 | 30 | + (instancetype)new __attribute__((unavailable("+[ASBasicImageDownloader sharedImageDownloader] must be used."))); 31 | - (instancetype)init __attribute__((unavailable("+[ASBasicImageDownloader sharedImageDownloader] must be used."))); 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASBatchContext.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ASBatchContext.mm 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASBatchContext.h" 12 | 13 | #import "ASThread.h" 14 | 15 | typedef NS_ENUM(NSInteger, ASBatchContextState) { 16 | ASBatchContextStateFetching, 17 | ASBatchContextStateCancelled, 18 | ASBatchContextStateCompleted 19 | }; 20 | 21 | @interface ASBatchContext () 22 | { 23 | ASBatchContextState _state; 24 | ASDN::RecursiveMutex __instanceLock__; 25 | } 26 | @end 27 | 28 | @implementation ASBatchContext 29 | 30 | - (instancetype)init 31 | { 32 | if (self = [super init]) { 33 | _state = ASBatchContextStateCompleted; 34 | } 35 | return self; 36 | } 37 | 38 | - (BOOL)isFetching 39 | { 40 | ASDN::MutexLocker l(__instanceLock__); 41 | return _state == ASBatchContextStateFetching; 42 | } 43 | 44 | - (BOOL)batchFetchingWasCancelled 45 | { 46 | ASDN::MutexLocker l(__instanceLock__); 47 | return _state == ASBatchContextStateCancelled; 48 | } 49 | 50 | - (void)beginBatchFetching 51 | { 52 | ASDN::MutexLocker l(__instanceLock__); 53 | _state = ASBatchContextStateFetching; 54 | } 55 | 56 | - (void)completeBatchFetching:(BOOL)didComplete 57 | { 58 | if (didComplete) { 59 | ASDN::MutexLocker l(__instanceLock__); 60 | _state = ASBatchContextStateCompleted; 61 | } 62 | } 63 | 64 | - (void)cancelBatchFetching 65 | { 66 | ASDN::MutexLocker l(__instanceLock__); 67 | _state = ASBatchContextStateCancelled; 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASChangeSetDataController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASChangeSetDataController.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Huy Nguyen on 19/10/15. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | /** 16 | * @abstract Subclass of ASDataController that simulates ordering of operations in batch updates defined in UITableView and UICollectionView. 17 | * 18 | * @discussion The ordering is achieved by using _ASHierarchyChangeSet to enqueue and sort operations. 19 | * More information about the ordering and the index paths used for operations can be found here: 20 | * https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TableView_iPhone/ManageInsertDeleteRow/ManageInsertDeleteRow.html#//apple_ref/doc/uid/TP40007451-CH10-SW17 21 | * 22 | * @see ASDataController 23 | * @see _ASHierarchyChangeSet 24 | */ 25 | @interface ASChangeSetDataController : ASDataController 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionDataController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASCollectionDataController.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | @class ASDisplayNode; 17 | @class ASCollectionDataController; 18 | @protocol ASDataControllerSource; 19 | @protocol ASSectionContext; 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @protocol ASCollectionDataControllerSource 24 | 25 | /** 26 | The constrained size range for layout. 27 | */ 28 | - (ASSizeRange)dataController:(ASCollectionDataController *)dataController constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; 29 | 30 | - (NSArray *)supplementaryNodeKindsInDataController:(ASCollectionDataController *)dataController; 31 | 32 | - (NSUInteger)dataController:(ASCollectionDataController *)dataController supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section; 33 | 34 | - (nullable id)dataController:(ASCollectionDataController *)dataController contextForSection:(NSInteger)section; 35 | 36 | @optional 37 | 38 | - (ASCellNode *)dataController:(ASCollectionDataController *)dataController supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; 39 | 40 | - (ASCellNodeBlock)dataController:(ASCollectionDataController *)dataController supplementaryNodeBlockOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; 41 | 42 | @end 43 | 44 | @interface ASCollectionDataController : ASChangeSetDataController 45 | 46 | - (instancetype)initWithDataSource:(id)dataSource eventLog:(nullable ASEventLog *)eventLog NS_DESIGNATED_INITIALIZER; 47 | 48 | - (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; 49 | 50 | - (nullable id)contextForSection:(NSInteger)section; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionInternal.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASCollectionInternal.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Scott Goodson on 1/1/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @protocol ASCollectionViewLayoutFacilitatorProtocol; 18 | @class ASCollectionNode; 19 | @class ASDataController; 20 | @class ASRangeController; 21 | 22 | @interface ASCollectionView () 23 | - (instancetype)_initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout layoutFacilitator:(nullable id)layoutFacilitator eventLog:(nullable ASEventLog *)eventLog; 24 | 25 | @property (nonatomic, weak, readwrite) ASCollectionNode *collectionNode; 26 | @property (nonatomic, strong, readonly) ASDataController *dataController; 27 | @property (nonatomic, strong, readonly) ASRangeController *rangeController; 28 | 29 | /** 30 | * Attempt to get the view-layer index path for the item with the given index path. 31 | * 32 | * @param indexPath The index path of the item. 33 | * @param wait If the item hasn't reached the view yet, this attempts to wait for updates to commit. 34 | */ 35 | - (nullable NSIndexPath *)convertIndexPathFromCollectionNode:(NSIndexPath *)indexPath waitingIfNeeded:(BOOL)wait; 36 | 37 | /** 38 | * Attempt to get the node index path given the view-layer index path. 39 | * 40 | * @param indexPath The index path of the row. 41 | */ 42 | - (NSIndexPath *)convertIndexPathToCollectionNode:(NSIndexPath *)indexPath; 43 | 44 | /** 45 | * Attempt to get the node index paths given the view-layer index paths. 46 | * 47 | * @param indexPaths An array of index paths in the view space 48 | */ 49 | - (nullable NSArray *)convertIndexPathsToCollectionNode:(nullable NSArray *)indexPaths; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionInternal.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASCollectionInternal.m 3 | // AsyncDisplayKit 4 | // 5 | // Created by Scott Goodson on 1/1/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASCollectionViewFlowLayoutInspector.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #pragma once 12 | 13 | #include "ASCollectionViewLayoutInspector.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | /** 18 | * A layout inspector implementation specific for the sizing behavior of UICollectionViewFlowLayouts 19 | */ 20 | @interface ASCollectionViewFlowLayoutInspector : NSObject 21 | 22 | @property (nonatomic, weak, readonly) UICollectionViewFlowLayout *layout; 23 | 24 | - (instancetype)init NS_UNAVAILABLE; 25 | - (instancetype)initWithCollectionView:(ASCollectionView *)collectionView flowLayout:(UICollectionViewFlowLayout *)flowLayout NS_DESIGNATED_INITIALIZER; 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASCollectionViewLayoutController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASCollectionViewLayoutController.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @class ASCollectionView; 17 | 18 | @interface ASCollectionViewLayoutController : ASAbstractLayoutController 19 | 20 | - (instancetype)initWithCollectionView:(ASCollectionView *)collectionView; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASDelegateProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASDelegateProxy.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | @class ASDelegateProxy; 14 | @protocol ASDelegateProxyInterceptor 15 | @required 16 | // Called if the target object is discovered to be nil if it had been non-nil at init time. 17 | // This happens if the object is deallocated, because the proxy must maintain a weak reference to avoid cycles. 18 | // Though the target object may become nil, the interceptor must not; it is assumed the interceptor owns the proxy. 19 | - (void)proxyTargetHasDeallocated:(ASDelegateProxy *)proxy; 20 | @end 21 | 22 | /** 23 | * Stand-in for delegates like UITableView or UICollectionView's delegate / dataSource. 24 | * Any selectors flagged by "interceptsSelector" are routed to the interceptor object and are not delivered to the target. 25 | * Everything else leaves AsyncDisplayKit safely and arrives at the original target object. 26 | */ 27 | 28 | @interface ASDelegateProxy : NSProxy 29 | 30 | - (instancetype)initWithTarget:(id )target interceptor:(id )interceptor; 31 | 32 | // This method must be overridden by a subclass. 33 | - (BOOL)interceptsSelector:(SEL)selector; 34 | 35 | @end 36 | 37 | /** 38 | * ASTableView intercepts and/or overrides a few of UITableView's critical data source and delegate methods. 39 | * 40 | * Any selector included in this function *MUST* be implemented by ASTableView. 41 | */ 42 | 43 | @interface ASTableViewProxy : ASDelegateProxy 44 | @end 45 | 46 | /** 47 | * ASCollectionView intercepts and/or overrides a few of UICollectionView's critical data source and delegate methods. 48 | * 49 | * Any selector included in this function *MUST* be implemented by ASCollectionView. 50 | */ 51 | 52 | @interface ASCollectionViewProxy : ASDelegateProxy 53 | @end 54 | 55 | @interface ASPagerNodeProxy : ASDelegateProxy 56 | @end 57 | 58 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASEventLog.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASEventLog.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Huy Nguyen on 4/11/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #ifndef ASEVENTLOG_CAPACITY 14 | #define ASEVENTLOG_CAPACITY 5 15 | #endif 16 | 17 | #ifndef ASEVENTLOG_ENABLE 18 | #define ASEVENTLOG_ENABLE DEBUG 19 | #endif 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | @interface ASEventLog : NSObject 24 | 25 | /** 26 | * Create a new event log. 27 | * 28 | * @param anObject The object whose events we are logging. This object is not retained. 29 | */ 30 | - (instancetype)initWithObject:(id)anObject; 31 | 32 | - (void)logEventWithBacktrace:(nullable NSArray *)backtrace format:(NSString *)format, ... NS_FORMAT_FUNCTION(2, 3); 33 | 34 | - (instancetype)init NS_UNAVAILABLE; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASFlowLayoutController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASFlowLayoutController.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @class ASCellNode; 17 | 18 | typedef NS_ENUM(NSUInteger, ASFlowLayoutDirection) { 19 | ASFlowLayoutDirectionVertical, 20 | ASFlowLayoutDirectionHorizontal, 21 | }; 22 | 23 | @protocol ASFlowLayoutControllerDataSource 24 | 25 | - (NSArray *> *)completedNodes; // This provides access to ASDataController's _completedNodes multidimensional array. 26 | 27 | @end 28 | 29 | /** 30 | * An optimized flow layout controller that supports only vertical or horizontal scrolling, not simultaneously two-dimensional scrolling. 31 | * It is used for all ASTableViews, and may be used with ASCollectionView. 32 | */ 33 | @interface ASFlowLayoutController : ASAbstractLayoutController 34 | 35 | @property (nonatomic, readonly, assign) ASFlowLayoutDirection layoutDirection; 36 | @property (nonatomic, readwrite, weak) id dataSource; 37 | 38 | - (instancetype)initWithScrollOption:(ASFlowLayoutDirection)layoutDirection; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASHighlightOverlayLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASHighlightOverlayLayer.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface ASHighlightOverlayLayer : CALayer 16 | 17 | /** 18 | @summary Initializes with CGRects for the highlighting, in the targetLayer's coordinate space. 19 | 20 | @desc This is the designated initializer. 21 | 22 | @param rects Array containing CGRects wrapped in NSValue. 23 | @param targetLayer The layer that the rects are relative to. The rects will be translated to the receiver's coordinate space when rendering. 24 | */ 25 | - (instancetype)initWithRects:(NSArray *)rects targetLayer:(nullable CALayer *)targetLayer; 26 | 27 | /** 28 | @summary Initializes with CGRects for the highlighting, in the receiver's coordinate space. 29 | 30 | @param rects Array containing CGRects wrapped in NSValue. 31 | */ 32 | - (instancetype)initWithRects:(NSArray *)rects; 33 | 34 | @property (nullable, nonatomic, strong) __attribute__((NSObject)) CGColorRef highlightColor; 35 | @property (nonatomic, weak) CALayer *targetLayer; 36 | 37 | @end 38 | 39 | @interface CALayer (ASHighlightOverlayLayerSupport) 40 | 41 | /** 42 | @summary Set to YES to indicate to a sublayer that this is where highlight overlay layers (for pressed states) should 43 | be added so that the highlight won't be clipped by a neighboring layer. 44 | */ 45 | @property (nonatomic, assign, setter=as_setAllowsHighlightDrawing:) BOOL as_allowsHighlightDrawing; 46 | 47 | @end 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASImageContainerProtocolCategories.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASImageContainerProtocolCategories.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 3/18/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | #import "ASImageProtocols.h" 16 | 17 | @interface UIImage (ASImageContainerProtocol) 18 | 19 | @end 20 | 21 | @interface NSData (ASImageContainerProtocol) 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASImageContainerProtocolCategories.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASImageContainerProtocolCategories.m 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 3/18/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import "ASImageContainerProtocolCategories.h" 14 | 15 | @implementation UIImage (ASImageContainerProtocol) 16 | 17 | - (UIImage *)asdk_image 18 | { 19 | return self; 20 | } 21 | 22 | - (NSData *)asdk_animatedImageData 23 | { 24 | return nil; 25 | } 26 | 27 | @end 28 | 29 | @implementation NSData (ASImageContainerProtocol) 30 | 31 | - (UIImage *)asdk_image 32 | { 33 | return nil; 34 | } 35 | 36 | - (NSData *)asdk_animatedImageData 37 | { 38 | return self; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASIndexPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIndexPath.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | typedef struct { 15 | NSInteger section; 16 | NSInteger row; 17 | } ASIndexPath; 18 | 19 | typedef struct { 20 | ASIndexPath start; 21 | ASIndexPath end; 22 | } ASIndexPathRange; 23 | 24 | NS_ASSUME_NONNULL_BEGIN 25 | 26 | ASDISPLAYNODE_EXTERN_C_BEGIN 27 | 28 | 29 | extern ASIndexPath ASIndexPathMake(NSInteger section, NSInteger row); 30 | 31 | extern BOOL ASIndexPathEqualToIndexPath(ASIndexPath first, ASIndexPath second); 32 | 33 | extern ASIndexPath ASIndexPathMinimum(ASIndexPath first, ASIndexPath second); 34 | 35 | extern ASIndexPath ASIndexPathMaximum(ASIndexPath first, ASIndexPath second); 36 | 37 | extern ASIndexPathRange ASIndexPathRangeMake(ASIndexPath first, ASIndexPath second); 38 | 39 | extern BOOL ASIndexPathRangeEqualToIndexPathRange(ASIndexPathRange first, ASIndexPathRange second); 40 | 41 | ASDISPLAYNODE_EXTERN_C_END 42 | 43 | @interface NSIndexPath (ASIndexPathAdditions) 44 | 45 | + (NSIndexPath *)indexPathWithASIndexPath:(ASIndexPath)indexPath; 46 | - (ASIndexPath)ASIndexPathValue; 47 | 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASIndexPath.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASIndexPath.m 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASIndexPath.h" 12 | 13 | #import 14 | 15 | ASIndexPath ASIndexPathMake(NSInteger section, NSInteger row) 16 | { 17 | ASIndexPath indexPath; 18 | indexPath.section = section; 19 | indexPath.row = row; 20 | return indexPath; 21 | } 22 | 23 | BOOL ASIndexPathEqualToIndexPath(ASIndexPath first, ASIndexPath second) 24 | { 25 | return (first.section == second.section && first.row == second.row); 26 | } 27 | 28 | ASIndexPath ASIndexPathMinimum(ASIndexPath first, ASIndexPath second) 29 | { 30 | if (first.section < second.section) { 31 | return first; 32 | } else if (first.section > second.section) { 33 | return second; 34 | } else { 35 | return (first.row < second.row ? first : second); 36 | } 37 | } 38 | 39 | ASIndexPath ASIndexPathMaximum(ASIndexPath first, ASIndexPath second) 40 | { 41 | if (first.section > second.section) { 42 | return first; 43 | } else if (first.section < second.section) { 44 | return second; 45 | } else { 46 | return (first.row > second.row ? first : second); 47 | } 48 | } 49 | 50 | ASIndexPathRange ASIndexPathRangeMake(ASIndexPath first, ASIndexPath second) 51 | { 52 | ASIndexPathRange range; 53 | range.start = ASIndexPathMinimum(first, second); 54 | range.end = ASIndexPathMaximum(first, second); 55 | return range; 56 | } 57 | 58 | BOOL ASIndexPathRangeEqualToIndexPathRange(ASIndexPathRange first, ASIndexPathRange second) 59 | { 60 | return ASIndexPathEqualToIndexPath(first.start, second.start) && ASIndexPathEqualToIndexPath(first.end, second.end); 61 | } 62 | 63 | @implementation NSIndexPath (ASIndexPathAdditions) 64 | 65 | + (NSIndexPath *)indexPathWithASIndexPath:(ASIndexPath)indexPath 66 | { 67 | return [NSIndexPath indexPathForRow:indexPath.row inSection:indexPath.section]; 68 | } 69 | 70 | - (ASIndexPath)ASIndexPathValue 71 | { 72 | return ASIndexPathMake(self.section, self.row); 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASIndexedNodeContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASIndexedNodeContext.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Huy Nguyen on 2/28/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | #import 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface ASIndexedNodeContext : NSObject 19 | 20 | /** 21 | * The index path at which this node was originally inserted. Don't rely on this 22 | * property too heavily – we should remove it in the future. 23 | */ 24 | @property (nonatomic, readonly, strong) NSIndexPath *indexPath; 25 | @property (nonatomic, readonly, copy, nullable) NSString *supplementaryElementKind; 26 | @property (nonatomic, readonly, assign) ASSizeRange constrainedSize; 27 | @property (weak, nonatomic) id environment; 28 | @property (nonatomic, readonly, assign) ASEnvironmentTraitCollection environmentTraitCollection; 29 | 30 | - (instancetype)initWithNodeBlock:(ASCellNodeBlock)nodeBlock 31 | indexPath:(NSIndexPath *)indexPath 32 | supplementaryElementKind:(nullable NSString *)supplementaryElementKind 33 | constrainedSize:(ASSizeRange)constrainedSize 34 | environment:(id)environment; 35 | 36 | /** 37 | * @return The node, running the node block if necessary. The node block will be discarded 38 | * after the first time it is run. 39 | */ 40 | @property (strong, readonly) ASCellNode *node; 41 | 42 | /** 43 | * @return The node, if the node block has been run already. 44 | */ 45 | @property (strong, readonly, nullable) ASCellNode *nodeIfAllocated; 46 | 47 | + (NSArray *)indexPathsFromContexts:(NSArray *)contexts; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASLayoutController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutController.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import 14 | #import 15 | #import 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | @class ASCellNode; 20 | 21 | typedef struct { 22 | CGFloat leadingBufferScreenfuls; 23 | CGFloat trailingBufferScreenfuls; 24 | } ASRangeTuningParameters; 25 | 26 | FOUNDATION_EXPORT ASRangeTuningParameters const ASRangeTuningParametersZero; 27 | 28 | FOUNDATION_EXPORT BOOL ASRangeTuningParametersEqualToRangeTuningParameters(ASRangeTuningParameters lhs, ASRangeTuningParameters rhs); 29 | 30 | @protocol ASLayoutController 31 | 32 | - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType; 33 | 34 | - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType; 35 | 36 | - (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection rangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType; 37 | 38 | @optional 39 | 40 | - (void)setVisibleNodeIndexPaths:(NSArray *)indexPaths; 41 | 42 | - (void)setViewportSize:(CGSize)viewportSize; 43 | - (CGSize)viewportSize; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASMainSerialQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASMainSerialQueue.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 12/11/15. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | @interface ASMainSerialQueue : NSObject 16 | 17 | - (void)performBlockOnMainThread:(dispatch_block_t)block; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASMainSerialQueue.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ASMainSerialQueue.mm 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 12/11/15. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import "ASMainSerialQueue.h" 14 | 15 | #import "ASThread.h" 16 | #import "ASInternalHelpers.h" 17 | 18 | @interface ASMainSerialQueue () 19 | { 20 | ASDN::Mutex _serialQueueLock; 21 | NSMutableArray *_blocks; 22 | } 23 | 24 | @end 25 | 26 | @implementation ASMainSerialQueue 27 | 28 | - (instancetype)init 29 | { 30 | if (!(self = [super init])) { 31 | return nil; 32 | } 33 | 34 | _blocks = [[NSMutableArray alloc] init]; 35 | return self; 36 | } 37 | 38 | - (void)performBlockOnMainThread:(dispatch_block_t)block 39 | { 40 | ASDN::MutexLocker l(_serialQueueLock); 41 | [_blocks addObject:block]; 42 | { 43 | ASDN::MutexUnlocker u(_serialQueueLock); 44 | [self runBlocks]; 45 | } 46 | } 47 | 48 | - (void)runBlocks 49 | { 50 | dispatch_block_t mainThread = ^{ 51 | do { 52 | ASDN::MutexLocker l(_serialQueueLock); 53 | dispatch_block_t block; 54 | if (_blocks.count > 0) { 55 | block = _blocks[0]; 56 | [_blocks removeObjectAtIndex:0]; 57 | } else { 58 | break; 59 | } 60 | { 61 | ASDN::MutexUnlocker u(_serialQueueLock); 62 | block(); 63 | } 64 | } while (true); 65 | }; 66 | 67 | ASPerformBlockOnMainThread(mainThread); 68 | } 69 | 70 | - (NSString *)description 71 | { 72 | return [[super description] stringByAppendingFormat:@" Blocks: %@", _blocks]; 73 | } 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASObjectDescriptionHelpers.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASObjectDescriptionHelpers.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Adlai Holler on 9/7/16. 6 | // Copyright © 2016 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | * Your base class should conform to this and override `-debugDescription` 17 | * to call `[self propertiesForDebugDescription]` and use `ASObjectDescriptionMake` 18 | * to return a string. Subclasses of this base class just need to override 19 | * `propertiesForDebugDescription`, call super, and modify the result as needed. 20 | */ 21 | @protocol ASDebugDescriptionProvider 22 | @required 23 | - (NSMutableArray *)propertiesForDebugDescription; 24 | @end 25 | 26 | /** 27 | * Your base class should conform to this and override `-description` 28 | * to call `[self propertiesForDescription]` and use `ASObjectDescriptionMake` 29 | * to return a string. Subclasses of this base class just need to override 30 | * `propertiesForDescription`, call super, and modify the result as needed. 31 | */ 32 | @protocol ASDescriptionProvider 33 | @required 34 | - (NSMutableArray *)propertiesForDescription; 35 | @end 36 | 37 | ASDISPLAYNODE_EXTERN_C_BEGIN 38 | 39 | NSString *ASGetDescriptionValueString(id object); 40 | 41 | /// Useful for structs etc. Returns e.g. { position = (0 0); frame = (0 0; 50 50) } 42 | NSString *ASObjectDescriptionMakeWithoutObject(NSArray * _Nullable propertyGroups); 43 | 44 | /// Returns e.g. 45 | NSString *ASObjectDescriptionMake(__autoreleasing id object, NSArray * _Nullable propertyGroups); 46 | 47 | /** 48 | * Returns e.g. 49 | * 50 | * Note: `object` param is autoreleasing so that this function is dealloc-safe. 51 | * No, unsafe_unretained isn't acceptable here – the optimizer may deallocate object early. 52 | */ 53 | NSString *ASObjectDescriptionMakeTiny(__autoreleasing id object); 54 | 55 | NSString * _Nullable ASStringWithQuotesIfMultiword(NSString * _Nullable string); 56 | 57 | ASDISPLAYNODE_EXTERN_C_END 58 | 59 | NS_ASSUME_NONNULL_END 60 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASPINRemoteImageDownloader.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 2/5/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #if PIN_REMOTE_IMAGE 14 | 15 | #import 16 | #import "ASImageProtocols.h" 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @interface ASPINRemoteImageDownloader : NSObject 22 | 23 | /** 24 | * A shared image downloader which can be used by @c ASNetworkImageNodes and @c ASMultiplexImageNodes 25 | * 26 | * This is the default downloader used by network backed image nodes if PINRemoteImage and PINCache are 27 | * available. It uses PINRemoteImage's features to provide caching and progressive image downloads. 28 | */ 29 | + (ASPINRemoteImageDownloader *)sharedDownloader; 30 | 31 | 32 | /** 33 | * Sets the default NSURLSessionConfiguration that will be used by @c ASNetworkImageNodes and @c ASMultiplexImageNodes 34 | * while loading images off the network. This must be specified early in the application lifecycle before 35 | * `sharedDownloader` is accessed. 36 | * 37 | * @param configuration The session configuration that will be used by `sharedDownloader` 38 | * 39 | */ 40 | + (void)setSharedImageManagerWithConfiguration:(nullable NSURLSessionConfiguration *)configuration; 41 | 42 | /** 43 | * The shared instance of a @c PINRemoteImageManager used by all @c ASPINRemoteImageDownloaders 44 | * 45 | * @discussion you can use this method to access the shared manager. This is useful to share a cache 46 | * and resources if you need to download images outside of an @c ASNetworkImageNode or 47 | * @c ASMultiplexImageNode. It's also useful to access the memoryCache and diskCache to set limits 48 | * or handle authentication challenges. 49 | * 50 | * @return An instance of a @c PINRemoteImageManager 51 | */ 52 | - (PINRemoteImageManager *)sharedPINRemoteImageManager; 53 | 54 | @end 55 | 56 | NS_ASSUME_NONNULL_END 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASRangeControllerUpdateRangeProtocol+Beta.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | @protocol ASRangeControllerUpdateRangeProtocol 14 | 15 | /** 16 | * Updates the current range mode of the range controller for at least the next range update 17 | * and, if the new mode is different from the previous mode, enqueues a range update. 18 | */ 19 | - (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASScrollDirection.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASScrollDirection.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import "ASBaseDefines.h" 14 | 15 | #include 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | typedef NS_OPTIONS(NSInteger, ASScrollDirection) { 20 | ASScrollDirectionNone = 0, 21 | ASScrollDirectionRight = 1 << 0, 22 | ASScrollDirectionLeft = 1 << 1, 23 | ASScrollDirectionUp = 1 << 2, 24 | ASScrollDirectionDown = 1 << 3 25 | }; 26 | 27 | extern const ASScrollDirection ASScrollDirectionHorizontalDirections; 28 | extern const ASScrollDirection ASScrollDirectionVerticalDirections; 29 | 30 | ASDISPLAYNODE_EXTERN_C_BEGIN 31 | 32 | BOOL ASScrollDirectionContainsVerticalDirection(ASScrollDirection scrollDirection); 33 | BOOL ASScrollDirectionContainsHorizontalDirection(ASScrollDirection scrollDirection); 34 | 35 | BOOL ASScrollDirectionContainsRight(ASScrollDirection scrollDirection); 36 | BOOL ASScrollDirectionContainsLeft(ASScrollDirection scrollDirection); 37 | BOOL ASScrollDirectionContainsUp(ASScrollDirection scrollDirection); 38 | BOOL ASScrollDirectionContainsDown(ASScrollDirection scrollDirection); 39 | ASScrollDirection ASScrollDirectionApplyTransform(ASScrollDirection scrollDirection, CGAffineTransform transform); 40 | 41 | ASDISPLAYNODE_EXTERN_C_END 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASSectionContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASSectionContext.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Huy Nguyen on 28/08/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | @class ASCollectionView; 14 | 15 | @protocol ASSectionContext 16 | 17 | /** 18 | * Custom name of this section, for debugging only. 19 | */ 20 | @property (nonatomic, copy, nullable) NSString *sectionName; 21 | @property (nonatomic, weak, nullable) ASCollectionView *collectionView; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASTraceEvent.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTraceEvent.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Adlai Holler on 9/13/16. 6 | // Copyright © 2016 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ASTraceEvent : NSObject 14 | 15 | /** 16 | * This method is dealloc safe. 17 | */ 18 | - (instancetype)initWithBacktrace:(nullable NSArray *)backtrace 19 | format:(NSString *)format 20 | arguments:(va_list)arguments NS_FORMAT_FUNCTION(2,0); 21 | 22 | // Will be nil unless AS_SAVE_EVENT_BACKTRACES=1 (default=0) 23 | @property (nonatomic, nullable, readonly) NSArray *backtrace; 24 | @property (nonatomic, strong, readonly) NSString *message; 25 | @property (nonatomic, readonly) NSTimeInterval timestamp; 26 | 27 | @end 28 | 29 | NS_ASSUME_NONNULL_END 30 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASTraitCollection.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTraitCollection.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | @interface ASTraitCollection : NSObject 15 | 16 | @property (nonatomic, assign, readonly) CGFloat displayScale; 17 | @property (nonatomic, assign, readonly) UIUserInterfaceSizeClass horizontalSizeClass; 18 | @property (nonatomic, assign, readonly) UIUserInterfaceIdiom userInterfaceIdiom; 19 | @property (nonatomic, assign, readonly) UIUserInterfaceSizeClass verticalSizeClass; 20 | @property (nonatomic, assign, readonly) UIForceTouchCapability forceTouchCapability; 21 | @property (nonatomic, assign, readonly) CGSize containerSize; 22 | 23 | 24 | + (ASTraitCollection *)traitCollectionWithASEnvironmentTraitCollection:(ASEnvironmentTraitCollection)traits; 25 | 26 | + (ASTraitCollection *)traitCollectionWithUITraitCollection:(UITraitCollection *)traitCollection 27 | containerSize:(CGSize)windowSize; 28 | 29 | 30 | + (ASTraitCollection *)traitCollectionWithDisplayScale:(CGFloat)displayScale 31 | userInterfaceIdiom:(UIUserInterfaceIdiom)userInterfaceIdiom 32 | horizontalSizeClass:(UIUserInterfaceSizeClass)horizontalSizeClass 33 | verticalSizeClass:(UIUserInterfaceSizeClass)verticalSizeClass 34 | forceTouchCapability:(UIForceTouchCapability)forceTouchCapability 35 | containerSize:(CGSize)windowSize; 36 | 37 | 38 | - (ASEnvironmentTraitCollection)environmentTraitCollection; 39 | - (BOOL)isEqualToTraitCollection:(ASTraitCollection *)traitCollection; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASWeakProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASWeakProxy.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 4/12/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | @interface ASWeakProxy : NSProxy 16 | 17 | /** 18 | * @return target The target which will be forwarded all messages sent to the weak proxy. 19 | */ 20 | @property (nonatomic, weak, readonly) id target; 21 | 22 | /** 23 | * An object which forwards messages to a target which it weakly references 24 | * 25 | * @discussion This class is useful for breaking retain cycles. You can pass this in place 26 | * of the target to something which creates a strong reference. All messages sent to the 27 | * proxy will be passed onto the target. 28 | * 29 | * @return an instance of ASWeakProxy 30 | */ 31 | + (instancetype)weakProxyWithTarget:(id)target; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASWeakSet.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASWeakSet.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Adlai Holler on 1/7/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | #import 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface ASWeakSet<__covariant ObjectType> : NSObject 19 | 20 | /// Returns YES if the receiver is empty, NO otherwise. 21 | @property (nonatomic, readonly, getter=isEmpty) BOOL empty; 22 | 23 | /// Returns YES if `object` is in the receiver, NO otherwise. 24 | - (BOOL)containsObject:(ObjectType)object AS_WARN_UNUSED_RESULT; 25 | 26 | /// Insets `object` into the set. 27 | - (void)addObject:(ObjectType)object; 28 | 29 | /// Removes object from the set. 30 | - (void)removeObject:(ObjectType)object; 31 | 32 | /// Removes all objects from the set. 33 | - (void)removeAllObjects; 34 | 35 | /// Returns a standard *retained* NSArray of all objects. Not free to generate, but useful for iterating over contents. 36 | - (NSArray *)allObjects AS_WARN_UNUSED_RESULT; 37 | 38 | /** 39 | * How many objects are contained in this set. 40 | 41 | * NOTE: This computed property is O(N). Consider using the `empty` property. 42 | */ 43 | @property (nonatomic, readonly) NSUInteger count; 44 | 45 | @end 46 | 47 | NS_ASSUME_NONNULL_END 48 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/ASWeakSet.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASWeakSet.m 3 | // AsyncDisplayKit 4 | // 5 | // Created by Adlai Holler on 1/7/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import "ASWeakSet.h" 14 | 15 | @interface ASWeakSet<__covariant ObjectType> () 16 | @property (nonatomic, strong, readonly) NSHashTable *hashTable; 17 | @end 18 | 19 | @implementation ASWeakSet 20 | 21 | - (instancetype)init 22 | { 23 | self = [super init]; 24 | if (self) { 25 | _hashTable = [NSHashTable weakObjectsHashTable]; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)addObject:(id)object 31 | { 32 | [_hashTable addObject:object]; 33 | } 34 | 35 | - (void)removeObject:(id)object 36 | { 37 | [_hashTable removeObject:object]; 38 | } 39 | 40 | - (void)removeAllObjects 41 | { 42 | [_hashTable removeAllObjects]; 43 | } 44 | 45 | - (NSArray *)allObjects 46 | { 47 | return _hashTable.allObjects; 48 | } 49 | 50 | - (BOOL)containsObject:(id)object 51 | { 52 | return [_hashTable containsObject:object]; 53 | } 54 | 55 | - (BOOL)isEmpty 56 | { 57 | return [_hashTable anyObject] == nil; 58 | } 59 | 60 | /** 61 | Note: The `count` property of NSHashTable is unreliable 62 | in the case of weak-object hash tables because entries 63 | that have been deallocated are not removed immediately. 64 | 65 | In order to get the true count we have to fall back to using 66 | fast enumeration. 67 | */ 68 | - (NSUInteger)count 69 | { 70 | NSUInteger count = 0; 71 | for (__unused id object in _hashTable) { 72 | count += 1; 73 | } 74 | return count; 75 | } 76 | 77 | - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id _Nonnull *)buffer count:(NSUInteger)len 78 | { 79 | return [_hashTable countByEnumeratingWithState:state objects:buffer count:len]; 80 | } 81 | 82 | - (NSString *)description 83 | { 84 | return [[super description] stringByAppendingFormat:@" count: %tu, contents: %@", self.count, _hashTable]; 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/NSArray+Diffing.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Diffing.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Levi McCallum on 1/29/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | @interface NSArray (Diffing) 16 | 17 | /** 18 | * @abstract Compares two arrays, providing the insertion and deletion indexes needed to transform into the target array. 19 | * @discussion This compares the equality of each object with `isEqual:`. 20 | * This diffing algorithm uses a bottom-up memoized longest common subsequence solution to identify differences. 21 | * It runs in O(mn) complexity. 22 | */ 23 | - (void)asdk_diffWithArray:(NSArray *)array insertions:(NSIndexSet **)insertions deletions:(NSIndexSet **)deletions; 24 | 25 | /** 26 | * @abstract Compares two arrays, providing the insertion and deletion indexes needed to transform into the target array. 27 | * @discussion The `compareBlock` is used to identify the equality of the objects within the arrays. 28 | * This diffing algorithm uses a bottom-up memoized longest common subsequence solution to identify differences. 29 | * It runs in O(mn) complexity. 30 | */ 31 | - (void)asdk_diffWithArray:(NSArray *)array insertions:(NSIndexSet **)insertions deletions:(NSIndexSet **)deletions compareBlock:(BOOL (^)(id lhs, id rhs))comparison; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexSet+ASHelpers.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Adlai Holler on 6/23/16. 6 | // Copyright © 2016 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSIndexSet (ASHelpers) 12 | 13 | - (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger idx))block; 14 | 15 | - (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes; 16 | 17 | /// Returns all the item indexes from the given index paths that are in the given section. 18 | + (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section; 19 | 20 | /// If you've got an old index, and you insert items using this index set, this returns the change to get to the new index. 21 | - (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index; 22 | 23 | - (NSString *)as_smallDescription; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/NSMutableAttributedString+TextKitAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableAttributedString+TextKitAdditions.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface NSMutableAttributedString (TextKitAdditions) 16 | 17 | - (void)attributeTextInRange:(NSRange)range withTextKitMinimumLineHeight:(CGFloat)minimumLineHeight; 18 | 19 | - (void)attributeTextInRange:(NSRange)range withTextKitMinimumLineHeight:(CGFloat)minimumLineHeight maximumLineHeight:(CGFloat)maximumLineHeight; 20 | 21 | - (void)attributeTextInRange:(NSRange)range withTextKitLineHeight:(CGFloat)lineHeight; 22 | 23 | - (void)attributeTextInRange:(NSRange)range withTextKitParagraphStyle:(NSParagraphStyle *)paragraphStyle; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/NSMutableAttributedString+TextKitAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSMutableAttributedString+TextKitAdditions.m 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "NSMutableAttributedString+TextKitAdditions.h" 12 | 13 | @implementation NSMutableAttributedString (TextKitAdditions) 14 | 15 | #pragma mark - Convenience Methods 16 | 17 | - (void)attributeTextInRange:(NSRange)range withTextKitMinimumLineHeight:(CGFloat)minimumLineHeight 18 | { 19 | if (range.length) { 20 | 21 | NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; 22 | [style setMinimumLineHeight:minimumLineHeight]; 23 | [self attributeTextInRange:range withTextKitParagraphStyle:style]; 24 | } 25 | } 26 | 27 | - (void)attributeTextInRange:(NSRange)range withTextKitMinimumLineHeight:(CGFloat)minimumLineHeight maximumLineHeight:(CGFloat)maximumLineHeight 28 | { 29 | if (range.length) { 30 | 31 | NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init]; 32 | [style setMinimumLineHeight:minimumLineHeight]; 33 | [style setMaximumLineHeight:maximumLineHeight]; 34 | [self attributeTextInRange:range withTextKitParagraphStyle:style]; 35 | } 36 | } 37 | 38 | - (void)attributeTextInRange:(NSRange)range withTextKitLineHeight:(CGFloat)lineHeight 39 | { 40 | [self attributeTextInRange:range withTextKitMinimumLineHeight:lineHeight maximumLineHeight:lineHeight]; 41 | } 42 | 43 | - (void)attributeTextInRange:(NSRange)range withTextKitParagraphStyle:(NSParagraphStyle *)paragraphStyle 44 | { 45 | if (range.length) { 46 | [self addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:range]; 47 | } 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/Transactions/_ASAsyncTransactionContainer+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ASAsyncTransactionContainer+Private.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface CALayer (ASAsyncTransactionContainerTransactions) 16 | @property (nonatomic, strong, nullable, setter=asyncdisplaykit_setAsyncLayerTransactions:) NSHashTable<_ASAsyncTransaction *> *asyncdisplaykit_asyncLayerTransactions; 17 | 18 | - (void)asyncdisplaykit_asyncTransactionContainerWillBeginTransaction:(_ASAsyncTransaction *)transaction; 19 | - (void)asyncdisplaykit_asyncTransactionContainerDidCompleteTransaction:(_ASAsyncTransaction *)transaction; 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/Transactions/_ASAsyncTransactionGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ASAsyncTransactionGroup.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @class _ASAsyncTransaction; 14 | @protocol ASAsyncTransactionContainer; 15 | 16 | /// A group of transaction containers, for which the current transactions are committed together at the end of the next runloop tick. 17 | @interface _ASAsyncTransactionGroup : NSObject 18 | /// The main transaction group is scheduled to commit on every tick of the main runloop. 19 | + (_ASAsyncTransactionGroup *)mainTransactionGroup; 20 | + (void)commit; 21 | 22 | /// Add a transaction container to be committed. 23 | /// @see ASAsyncTransactionContainer 24 | - (void)addTransactionContainer:(id)container; 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/UICollectionViewLayout+ASConvenience.h: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewLayout+ASConvenience.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface UICollectionViewLayout (ASConvenience) 16 | 17 | - (BOOL)asdk_isFlowLayout; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/UICollectionViewLayout+ASConvenience.m: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewLayout+ASConvenience.m 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "UICollectionViewLayout+ASConvenience.h" 12 | 13 | @implementation UICollectionViewLayout (ASConvenience) 14 | 15 | - (BOOL)asdk_isFlowLayout 16 | { 17 | return [self isKindOfClass:[UICollectionViewFlowLayout class]]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/_ASDisplayView.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ASDisplayView.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | 14 | // This class is only for use by ASDisplayNode and should never be subclassed or used directly. 15 | // Note that the "node" property is added to UIView directly via a category in ASDisplayNode. 16 | 17 | @interface _ASDisplayView : UIView 18 | 19 | // These methods expose a way for ASDisplayNode touch events to let the view call super touch events 20 | // Some UIKit mechanisms, like UITableView and UICollectionView selection handling, require this to work 21 | - (void)__forwardTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; 22 | - (void)__forwardTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; 23 | - (void)__forwardTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; 24 | - (void)__forwardTouchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Details/_ASDisplayViewAccessiblity.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ASDisplayViewAccessiblity.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | @interface _ASDisplayView (UIAccessibilityContainer) 14 | @property (copy, nonatomic) NSArray *accessibleElements; 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASAbsoluteLayoutElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASAbsoluteLayoutElement.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | * Layout options that can be defined for an ASLayoutElement being added to a ASAbsoluteLayoutSpec. 18 | */ 19 | @protocol ASAbsoluteLayoutElement 20 | 21 | /** 22 | * @abstract The position of this object within its parent spec. 23 | */ 24 | @property (nonatomic, assign) CGPoint layoutPosition; 25 | 26 | 27 | #pragma mark Deprecated 28 | 29 | @property (nonatomic, assign) ASRelativeSizeRange sizeRange ASDISPLAYNODE_DEPRECATED; 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASAbsoluteLayoutSpec.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASAbsoluteLayoutSpec.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | /** How much space the spec will take up. */ 14 | typedef NS_ENUM(NSInteger, ASAbsoluteLayoutSpecSizing) { 15 | /** The spec will take up the maximum size possible. */ 16 | ASAbsoluteLayoutSpecSizingDefault, 17 | /** Computes a size for the spec that is the union of all childrens' frames. */ 18 | ASAbsoluteLayoutSpecSizingSizeToFit, 19 | }; 20 | 21 | NS_ASSUME_NONNULL_BEGIN 22 | 23 | /** 24 | A layout spec that positions children at fixed positions. 25 | */ 26 | @interface ASAbsoluteLayoutSpec : ASLayoutSpec 27 | 28 | /** 29 | How much space will the spec taken up 30 | */ 31 | @property (nonatomic, assign) ASAbsoluteLayoutSpecSizing sizing; 32 | 33 | /** 34 | @param sizing How much space the spec will take up 35 | @param children Children to be positioned at fixed positions 36 | */ 37 | + (instancetype)absoluteLayoutSpecWithSizing:(ASAbsoluteLayoutSpecSizing)sizing children:(NSArray> *)children AS_WARN_UNUSED_RESULT; 38 | 39 | /** 40 | @param children Children to be positioned at fixed positions 41 | */ 42 | + (instancetype)absoluteLayoutSpecWithChildren:(NSArray> *)children AS_WARN_UNUSED_RESULT; 43 | 44 | @end 45 | 46 | 47 | #pragma mark - Deprecated 48 | 49 | @interface ASStaticLayoutSpec : ASAbsoluteLayoutSpec 50 | 51 | + (instancetype)staticLayoutSpecWithChildren:(NSArray> *)children AS_WARN_UNUSED_RESULT ASDISPLAYNODE_DEPRECATED; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASAsciiArtBoxCreator.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASAsciiArtBoxCreator.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @protocol ASLayoutElementAsciiArtProtocol 16 | /** 17 | * Returns an ascii-art representation of this object and its children. 18 | * For example, an ASInsetSpec may return something like this: 19 | * 20 | * --ASInsetLayoutSpec-- 21 | * | ASTextNode | 22 | * --------------------- 23 | */ 24 | - (NSString *)asciiArtString; 25 | 26 | /** 27 | * returns the name of this object that will display in the ascii art. Usually this can 28 | * simply be NSStringFromClass([self class]). 29 | */ 30 | - (NSString *)asciiArtName; 31 | 32 | @end 33 | 34 | /** 35 | * A that takes a parent and its children and renders as ascii art box. 36 | */ 37 | @interface ASAsciiArtBoxCreator : NSObject 38 | 39 | /** 40 | * Renders an ascii art box with the children aligned horizontally 41 | * Example: 42 | * ------------ASStackLayoutSpec----------- 43 | * | ASTextNode ASTextNode ASTextNode | 44 | * ---------------------------------------- 45 | */ 46 | + (NSString *)horizontalBoxStringForChildren:(NSArray *)children parent:(NSString *)parent; 47 | 48 | /** 49 | * Renders an ascii art box with the children aligned vertically. 50 | * Example: 51 | * --ASStackLayoutSpec-- 52 | * | ASTextNode | 53 | * | ASTextNode | 54 | * | ASTextNode | 55 | * --------------------- 56 | */ 57 | + (NSString *)verticalBoxStringForChildren:(NSArray *)children parent:(NSString *)parent; 58 | 59 | @end 60 | 61 | NS_ASSUME_NONNULL_END 62 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASBackgroundLayoutSpec.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASBackgroundLayoutSpec.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | Lays out a single layoutElement child, then lays out a background layoutElement instance behind it stretched to its size. 17 | */ 18 | @interface ASBackgroundLayoutSpec : ASLayoutSpec 19 | 20 | /** 21 | * Background layoutElement for this layout spec 22 | */ 23 | @property (nullable, nonatomic, strong) id background; 24 | 25 | /** 26 | * Creates and returns an ASBackgroundLayoutSpec object 27 | * 28 | * @param child A child that is laid out to determine the size of this spec. 29 | * @param background A layoutElement object that is laid out behind the child. If this is nil, the background is omitted. 30 | */ 31 | + (instancetype)backgroundLayoutSpecWithChild:(id)child background:(nullable id)background AS_WARN_UNUSED_RESULT; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASInsetLayoutSpec.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASInsetLayoutSpec.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | A layout spec that wraps another layoutElement child, applying insets around it. 17 | 18 | If the child has a size specified as a fraction, the fraction is resolved against this spec's parent 19 | size **after** applying insets. 20 | 21 | @example ASOuterLayoutSpec contains an ASInsetLayoutSpec with an ASInnerLayoutSpec. Suppose that: 22 | - ASOuterLayoutSpec is 200pt wide. 23 | - ASInnerLayoutSpec specifies its width as 100%. 24 | - The ASInsetLayoutSpec has insets of 10pt on every side. 25 | ASInnerLayoutSpec will have size 180pt, not 200pt, because it receives a parent size that has been adjusted for insets. 26 | 27 | If you're familiar with CSS: ASInsetLayoutSpec's child behaves similarly to "box-sizing: border-box". 28 | 29 | An infinite inset is resolved as an inset equal to all remaining space after applying the other insets and child size. 30 | @example An ASInsetLayoutSpec with an infinite left inset and 10px for all other edges will position it's child 10px from the right edge. 31 | */ 32 | @interface ASInsetLayoutSpec : ASLayoutSpec 33 | 34 | @property (nonatomic, assign) UIEdgeInsets insets; 35 | 36 | /** 37 | @param insets The amount of space to inset on each side. 38 | @param child The wrapped child to inset. 39 | */ 40 | + (instancetype)insetLayoutSpecWithInsets:(UIEdgeInsets)insets child:(id)child AS_WARN_UNUSED_RESULT; 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASLayoutElementExtensibility.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutElementExtensibility.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Michael Schneider on 3/29/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | @protocol ASLayoutElementExtensibility 16 | 17 | // The maximum number of extended values per type are defined in ASEnvironment.h above the ASEnvironmentStateExtensions 18 | // struct definition. If you try to set a value at an index after the maximum it will throw an assertion. 19 | 20 | - (void)setLayoutOptionExtensionBool:(BOOL)value atIndex:(int)idx; 21 | - (BOOL)layoutOptionExtensionBoolAtIndex:(int)idx; 22 | 23 | - (void)setLayoutOptionExtensionInteger:(NSInteger)value atIndex:(int)idx; 24 | - (NSInteger)layoutOptionExtensionIntegerAtIndex:(int)idx; 25 | 26 | - (void)setLayoutOptionExtensionEdgeInsets:(UIEdgeInsets)value atIndex:(int)idx; 27 | - (UIEdgeInsets)layoutOptionExtensionEdgeInsetsAtIndex:(int)idx; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASLayoutElementStylePrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutElementStylePrivate.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #pragma once 12 | 13 | #import "ASObjectDescriptionHelpers.h" 14 | 15 | @interface ASLayoutElementStyle () 16 | 17 | /** 18 | * @abstract The object that acts as the delegate of the style. 19 | * 20 | * @discussion The delegate must adopt the ASLayoutElementStyleDelegate protocol. The delegate is not retained. 21 | */ 22 | @property (nullable, nonatomic, weak) id delegate; 23 | 24 | /** 25 | * @abstract A size constraint that should apply to this ASLayoutElement. 26 | */ 27 | @property (nonatomic, assign, readonly) ASLayoutElementSize size; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASOverlayLayoutSpec.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASOverlayLayoutSpec.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | This layout spec lays out a single layoutElement child and then overlays a layoutElement object on top of it streched to its size 17 | */ 18 | @interface ASOverlayLayoutSpec : ASLayoutSpec 19 | 20 | /** 21 | * Overlay layoutElement of this layout spec 22 | */ 23 | @property (nullable, nonatomic, strong) id overlay; 24 | 25 | /** 26 | * Creates and returns an ASOverlayLayoutSpec object with a given child and an layoutElement that act as overlay. 27 | * 28 | * @param child A child that is laid out to determine the size of this spec. 29 | * @param overlay A layoutElement object that is laid out over the child. If this is nil, the overlay is omitted. 30 | */ 31 | + (instancetype)overlayLayoutSpecWithChild:(id)child overlay:(nullable id)overlay AS_WARN_UNUSED_RESULT; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Layout/ASRatioLayoutSpec.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASRatioLayoutSpec.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | Ratio layout spec 18 | For when the content should respect a certain inherent ratio but can be scaled (think photos or videos) 19 | The ratio passed is the ratio of height / width you expect 20 | 21 | For a ratio 0.5, the spec will have a flat rectangle shape 22 | _ _ _ _ 23 | | | 24 | |_ _ _ _| 25 | 26 | For a ratio 2.0, the spec will be twice as tall as it is wide 27 | _ _ 28 | | | 29 | | | 30 | | | 31 | |_ _| 32 | 33 | **/ 34 | @interface ASRatioLayoutSpec : ASLayoutSpec 35 | 36 | @property (nonatomic, assign) CGFloat ratio; 37 | 38 | + (instancetype)ratioLayoutSpecWithRatio:(CGFloat)ratio child:(id)child AS_WARN_UNUSED_RESULT; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASBasicImageDownloaderInternal.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASBasicImageDownloaderInternal.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | @interface ASBasicImageDownloaderContext : NSObject 12 | 13 | + (ASBasicImageDownloaderContext *)contextForURL:(NSURL *)URL; 14 | 15 | @property (nonatomic, strong, readonly) NSURL *URL; 16 | @property (nonatomic, weak) NSURLSessionTask *sessionTask; 17 | 18 | - (BOOL)isCancelled; 19 | - (void)cancel; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASControlTargetAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASControlTargetAction.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | /** 14 | @abstract ASControlTargetAction stores target action pairs registered for specific ASControlNodeEvent values. 15 | */ 16 | @interface ASControlTargetAction : NSObject 17 | 18 | /** 19 | The action to be called on the registered target. 20 | */ 21 | @property (nonatomic, readwrite, assign) SEL action; 22 | 23 | /** 24 | Event handler target. The specified action will be called on this object. 25 | */ 26 | @property (nonatomic, readwrite, weak) id target; 27 | 28 | /** 29 | Indicated whether this target was created without a target, so the action should travel up in the responder chain. 30 | */ 31 | @property (nonatomic, readonly) BOOL createdWithNoTarget; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASControlTargetAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASControlTargetAction.m 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASControlTargetAction.h" 12 | 13 | @implementation ASControlTargetAction 14 | { 15 | __weak id _target; 16 | BOOL _createdWithNoTarget; 17 | } 18 | 19 | - (void)setTarget:(id)target { 20 | _target = target; 21 | 22 | if (!target) { 23 | _createdWithNoTarget = YES; 24 | } 25 | } 26 | 27 | - (id)target { 28 | return _target; 29 | } 30 | 31 | - (BOOL)isEqual:(id)object { 32 | if (![object isKindOfClass:[ASControlTargetAction class]]) { 33 | return NO; 34 | } 35 | 36 | ASControlTargetAction *otherObject = (ASControlTargetAction *)object; 37 | 38 | BOOL areTargetsEqual; 39 | 40 | if (self.target != nil && otherObject.target != nil && self.target == otherObject.target) { 41 | areTargetsEqual = YES; 42 | } 43 | else if (self.target == nil && otherObject.target == nil && self.createdWithNoTarget && otherObject.createdWithNoTarget) { 44 | areTargetsEqual = YES; 45 | } 46 | else { 47 | areTargetsEqual = NO; 48 | } 49 | 50 | if (!areTargetsEqual) { 51 | return NO; 52 | } 53 | 54 | if (self.action && otherObject.action && self.action == otherObject.action) { 55 | return YES; 56 | } 57 | else { 58 | return NO; 59 | } 60 | } 61 | 62 | - (NSUInteger)hash { 63 | return [self.target hash]; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASDefaultPlayButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASDefaultPlayButton.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Luke Parham on 1/27/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | @interface ASDefaultPlayButton : ASButtonNode 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASDefaultPlaybackButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASDefaultPlaybackButton.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Erekle on 5/14/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | typedef enum { 15 | ASDefaultPlaybackButtonTypePlay, 16 | ASDefaultPlaybackButtonTypePause 17 | } ASDefaultPlaybackButtonType; 18 | @interface ASDefaultPlaybackButton : ASControlNode 19 | @property (nonatomic, assign) ASDefaultPlaybackButtonType buttonType; 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASDispatch.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASDispatch.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Adlai Holler on 8/25/16. 6 | // Copyright © 2016 Facebook. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * Like dispatch_apply, but you can set the thread count. 0 means 2*active CPUs. 13 | * 14 | * Note: The actual number of threads may be lower than threadCount, if libdispatch 15 | * decides the system can't handle it. In reality this rarely happens. 16 | */ 17 | static void ASDispatchApply(size_t iterationCount, dispatch_queue_t queue, NSUInteger threadCount, void(^work)(size_t i)) { 18 | if (threadCount == 0) { 19 | threadCount = [NSProcessInfo processInfo].activeProcessorCount * 2; 20 | } 21 | dispatch_group_t group = dispatch_group_create(); 22 | __block size_t trueI = 0; 23 | for (NSUInteger t = 0; t < threadCount; t++) { 24 | dispatch_group_async(group, queue, ^{ 25 | size_t i; 26 | while ((i = __sync_fetch_and_add(&trueI, 1)) < iterationCount) { 27 | work(i); 28 | } 29 | }); 30 | } 31 | dispatch_group_wait(group, DISPATCH_TIME_FOREVER); 32 | }; 33 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASDisplayNode+DebugTiming.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASDisplayNode+DebugTiming.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | @interface ASDisplayNode (DebugTiming) 14 | 15 | @property (nonatomic, readonly) NSTimeInterval debugTimeToCreateView; 16 | @property (nonatomic, readonly) NSTimeInterval debugTimeToApplyPendingState; 17 | @property (nonatomic, readonly) NSTimeInterval debugTimeToAddSubnodeViews; 18 | @property (nonatomic, readonly) NSTimeInterval debugTimeForDidLoad; 19 | 20 | - (NSTimeInterval)debugAllCreationTime; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASDisplayNode+DebugTiming.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ASDisplayNode+DebugTiming.mm 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASDisplayNode+DebugTiming.h" 12 | #import "ASDisplayNodeInternal.h" 13 | 14 | @implementation ASDisplayNode (DebugTiming) 15 | 16 | #if TIME_DISPLAYNODE_OPS 17 | - (NSTimeInterval)debugTimeToCreateView 18 | { 19 | return _debugTimeToCreateView; 20 | } 21 | 22 | - (NSTimeInterval)debugTimeToApplyPendingState 23 | { 24 | return _debugTimeToApplyPendingState; 25 | } 26 | 27 | - (NSTimeInterval)debugTimeToAddSubnodeViews 28 | { 29 | return _debugTimeToAddSubnodeViews; 30 | } 31 | 32 | - (NSTimeInterval)debugTimeForDidLoad 33 | { 34 | return _debugTimeForDidLoad; 35 | } 36 | 37 | - (NSTimeInterval)debugAllCreationTime 38 | { 39 | return self.debugTimeToCreateView + self.debugTimeToApplyPendingState + self.debugTimeToAddSubnodeViews + self.debugTimeForDidLoad; 40 | } 41 | 42 | // This would over-count views that are created in the parent's didload or addsubnodesubviews, so we need to take a more basic approach 43 | //- (NSTimeInterval)debugRecursiveAllCreationTime 44 | //{ 45 | // __block NSTimeInterval total = 0; 46 | // ASDisplayNodeFindAllSubnodes(self, ^(ASDisplayNode *n){ 47 | // total += self.debugTimeToCreateView; 48 | // total += self.debugTimeToApplyPendingState; 49 | // total += self.debugTimeToAddSubnodeViews; 50 | // total += self.debugTimeForDidLoad; 51 | // return NO; 52 | // }); 53 | // return total; 54 | //} 55 | 56 | #else 57 | 58 | // These ivars are compiled out so we don't have the info available 59 | - (NSTimeInterval)debugTimeToCreateView 60 | { 61 | return -1; 62 | } 63 | 64 | - (NSTimeInterval)debugTimeToApplyPendingState 65 | { 66 | return -1; 67 | } 68 | 69 | - (NSTimeInterval)debugTimeToAddSubnodeViews 70 | { 71 | return -1; 72 | } 73 | 74 | - (NSTimeInterval)debugTimeForDidLoad 75 | { 76 | return -1; 77 | } 78 | 79 | - (NSTimeInterval)debugAllCreationTime 80 | { 81 | return -1; 82 | } 83 | 84 | #endif 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASDisplayNodeLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASDisplayNodeLayout.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Michael Schneider on 08/26/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #pragma once 14 | 15 | #import "ASDimension.h" 16 | 17 | @class ASLayout; 18 | 19 | /* 20 | * Represents a connection between an ASLayout and a ASDisplayNode 21 | * ASDisplayNode uses this to store additional information that are necessary besides the layout 22 | */ 23 | struct ASDisplayNodeLayout { 24 | ASLayout *layout; 25 | ASSizeRange constrainedSize; 26 | CGSize parentSize; 27 | BOOL requestedLayoutFromAbove; 28 | BOOL _dirty; 29 | 30 | /* 31 | * Create a new display node layout with 32 | * @param layout The layout to associate, usually returned from a call to -layoutThatFits:parentSize: 33 | * @param constrainedSize Constrained size used to create the layout 34 | * @param parentSize Parent size used to create the layout 35 | */ 36 | ASDisplayNodeLayout(ASLayout *layout, ASSizeRange constrainedSize, CGSize parentSize) 37 | : layout(layout), constrainedSize(constrainedSize), parentSize(parentSize), requestedLayoutFromAbove(NO), _dirty(NO) {}; 38 | 39 | /* 40 | * Creates a layout without any layout associated. By default this display node layout is dirty. 41 | */ 42 | ASDisplayNodeLayout() 43 | : layout(nil), constrainedSize({{0, 0}, {0, 0}}), parentSize({0, 0}), requestedLayoutFromAbove(NO), _dirty(YES) {}; 44 | 45 | /** 46 | * Returns if the display node layout is dirty as it was invalidated or it was created without a layout. 47 | */ 48 | BOOL isDirty(); 49 | 50 | /** 51 | * Returns if ASDisplayNode is still valid for a given constrained and parent size 52 | */ 53 | BOOL isValidForConstrainedSizeParentSize(ASSizeRange constrainedSize, CGSize parentSize); 54 | 55 | /** 56 | * Invalidate the display node layout 57 | */ 58 | void invalidate(); 59 | }; 60 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASDisplayNodeLayout.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ASDisplayNodeLayout.mm 3 | // AsyncDisplayKit 4 | // 5 | // Created by Michael Schneider on 08/26/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #include "ASDisplayNodeLayout.h" 14 | 15 | BOOL ASDisplayNodeLayout::isDirty() 16 | { 17 | return _dirty || layout == nil; 18 | } 19 | 20 | BOOL ASDisplayNodeLayout::isValidForConstrainedSizeParentSize(ASSizeRange theConstrainedSize, CGSize theParentSize) 21 | { 22 | // Only generate a new layout if: 23 | // - The current layout is dirty 24 | // - The passed constrained size is different than the original layout's parent or constrained size 25 | return (layout != nil 26 | && _dirty == NO 27 | && CGSizeEqualToSize(parentSize, theParentSize) 28 | && ASSizeRangeEqualToSizeRange(constrainedSize, theConstrainedSize)); 29 | } 30 | 31 | void ASDisplayNodeLayout::invalidate() 32 | { 33 | _dirty = YES; 34 | } 35 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASImageNode+AnimatedImagePrivate.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Garrett Moon on 3/30/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import "ASThread.h" 14 | 15 | extern NSString *const ASAnimatedImageDefaultRunLoopMode; 16 | 17 | @interface ASImageNode () 18 | { 19 | ASDN::RecursiveMutex _animatedImageLock; 20 | ASDN::Mutex _displayLinkLock; 21 | id _animatedImage; 22 | BOOL _animatedImagePaused; 23 | NSString *_animatedImageRunLoopMode; 24 | CADisplayLink *_displayLink; 25 | 26 | //accessed on main thread only 27 | CFTimeInterval _playHead; 28 | NSUInteger _playedLoops; 29 | } 30 | 31 | @property (nonatomic, assign) CFTimeInterval lastDisplayLinkFire; 32 | 33 | @end 34 | 35 | 36 | @interface ASImageNode (AnimatedImageInvalidation) 37 | 38 | - (void)invalidateAnimatedImage; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASLayoutSpecPrivate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutSpecPrivate.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Michael Schneider on 9/15/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | 14 | #import "ASInternalHelpers.h" 15 | #import "ASEnvironmentInternal.h" 16 | #import "ASThread.h" 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | @interface ASLayoutSpec() { 21 | ASDN::RecursiveMutex __instanceLock__; 22 | ASEnvironmentState _environmentState; 23 | ASLayoutElementStyle *_style; 24 | NSMutableArray *_childrenArray; 25 | } 26 | 27 | /** 28 | * Recursively search the subtree for elements that occur more than once. 29 | */ 30 | - (nullable NSSet> *)findDuplicatedElementsInSubtree; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASLayoutTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutTransition.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Huy Nguyen on 3/8/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import "ASDimension.h" 14 | #import "_ASTransitionContext.h" 15 | #import "ASDisplayNodeLayout.h" 16 | 17 | #import 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | @class ASDisplayNode; 22 | 23 | @interface ASLayoutTransition : NSObject <_ASTransitionContextLayoutDelegate> 24 | 25 | /** 26 | * Node to apply layout transition on 27 | */ 28 | @property (nonatomic, readonly, weak) ASDisplayNode *node; 29 | 30 | /** 31 | * Previous layout to transition from 32 | */ 33 | @property (nonatomic, readonly, assign) std::shared_ptr previousLayout; 34 | 35 | /** 36 | * Pending layout to transition to 37 | */ 38 | @property (nonatomic, readonly, assign) std::shared_ptr pendingLayout; 39 | 40 | /** 41 | * Returns if the layout transition needs to happen synchronously 42 | */ 43 | @property (nonatomic, readonly, assign) BOOL isSynchronous; 44 | 45 | /** 46 | * Returns a newly initialized layout transition 47 | */ 48 | - (instancetype)initWithNode:(ASDisplayNode *)node 49 | pendingLayout:(std::shared_ptr)pendingLayout 50 | previousLayout:(std::shared_ptr)previousLayout NS_DESIGNATED_INITIALIZER; 51 | 52 | /** 53 | * Insert and remove subnodes that were added or removed between the previousLayout and the pendingLayout 54 | */ 55 | - (void)commitTransition; 56 | 57 | /** 58 | * Insert all new subnodes that were added between the previous layout and the pending layout 59 | */ 60 | - (void)applySubnodeInsertions; 61 | 62 | /** 63 | * Remove all subnodes that are removed between the previous layout and the pending layout 64 | */ 65 | - (void)applySubnodeRemovals; 66 | 67 | @end 68 | 69 | @interface ASLayoutTransition (Unavailable) 70 | 71 | - (instancetype)init __unavailable; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASPendingStateController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASPendingStateController.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Adlai Holler on 1/7/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | @class ASDisplayNode; 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | A singleton that is responsible for applying changes to 21 | UIView/CALayer properties of display nodes when they 22 | have been set on background threads. 23 | 24 | This controller will enqueue run-loop events to flush changes 25 | but if you need them flushed now you can call `flush` from the main thread. 26 | */ 27 | @interface ASPendingStateController : NSObject 28 | 29 | + (ASPendingStateController *)sharedInstance; 30 | 31 | @property (nonatomic, readonly) BOOL hasChanges; 32 | 33 | /** 34 | Flush all pending states for nodes now. Any UIView/CALayer properties 35 | that have been set in the background will be applied to their 36 | corresponding views/layers before this method returns. 37 | 38 | You must call this method on the main thread. 39 | */ 40 | - (void)flush; 41 | 42 | /** 43 | Register this node as having pending state that needs to be copied 44 | over to the view/layer. This is called automatically by display nodes 45 | when their view/layer properties are set post-load on background threads. 46 | */ 47 | - (void)registerNode:(ASDisplayNode *)node; 48 | 49 | @end 50 | 51 | NS_ASSUME_NONNULL_END 52 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASSection.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASSection.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Huy Nguyen on 28/08/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | @protocol ASSectionContext; 16 | 17 | @interface ASSection : NSObject 18 | 19 | @property (nonatomic, assign, readonly) NSInteger sectionID; 20 | @property (nonatomic, strong, nullable, readonly) id context; 21 | 22 | - (nullable instancetype)init __unavailable; 23 | - (nullable instancetype)initWithSectionID:(NSInteger)sectionID context:(nullable id)context NS_DESIGNATED_INITIALIZER; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASSection.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASSection.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Huy Nguyen on 28/08/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import "ASSection.h" 14 | #import "ASSectionContext.h" 15 | 16 | @implementation ASSection 17 | 18 | - (instancetype)initWithSectionID:(NSInteger)sectionID context:(id)context 19 | { 20 | self = [super init]; 21 | if (self) { 22 | _sectionID = sectionID; 23 | _context = context; 24 | } 25 | return self; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASStackBaselinePositionedLayout.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASLayout.h" 12 | #import "ASDimension.h" 13 | #import "ASStackPositionedLayout.h" 14 | 15 | struct ASStackBaselinePositionedLayout { 16 | const std::vector items; 17 | const CGFloat crossSize; 18 | const CGFloat ascender; 19 | const CGFloat descender; 20 | 21 | /** Given a positioned layout, computes each child position using baseline alignment. */ 22 | static ASStackBaselinePositionedLayout compute(const ASStackPositionedLayout &positionedLayout, 23 | const ASStackLayoutSpecStyle &style, 24 | const ASSizeRange &constrainedSize); 25 | 26 | static BOOL needsBaselineAlignment(const ASStackLayoutSpecStyle &style); 27 | }; 28 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASStackPositionedLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASStackPositionedLayout.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASLayout.h" 12 | #import "ASDimension.h" 13 | #import "ASStackUnpositionedLayout.h" 14 | 15 | /** Represents a set of laid out and positioned stack layout children. */ 16 | struct ASStackPositionedLayout { 17 | const std::vector items; 18 | const CGFloat crossSize; 19 | 20 | /** Given an unpositioned layout, computes the positions each child should be placed at. */ 21 | static ASStackPositionedLayout compute(const ASStackUnpositionedLayout &unpositionedLayout, 22 | const ASStackLayoutSpecStyle &style, 23 | const ASSizeRange &constrainedSize); 24 | }; 25 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/ASStackUnpositionedLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASStackUnpositionedLayout.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import "ASLayout.h" 14 | #import "ASStackLayoutSpecUtilities.h" 15 | #import "ASStackLayoutSpec.h" 16 | 17 | struct ASStackLayoutSpecChild { 18 | /** The original source child. */ 19 | id element; 20 | /** Style object of element. */ 21 | ASLayoutElementStyle *style; 22 | /** Size object of the element */ 23 | ASLayoutElementSize size; 24 | }; 25 | 26 | struct ASStackLayoutSpecItem { 27 | /** The original source child. */ 28 | ASStackLayoutSpecChild child; 29 | /** The proposed layout or nil if no is calculated yet. */ 30 | ASLayout *layout; 31 | }; 32 | 33 | 34 | /** Represents a set of stack layout children that have their final layout computed, but are not yet positioned. */ 35 | struct ASStackUnpositionedLayout { 36 | /** A set of proposed child layouts, not yet positioned. */ 37 | const std::vector items; 38 | /** The total size of the children in the stack dimension, including all spacing. */ 39 | const CGFloat stackDimensionSum; 40 | /** The amount by which stackDimensionSum violates constraints. If positive, less than min; negative, greater than max. */ 41 | const CGFloat violation; 42 | 43 | /** Given a set of children, computes the unpositioned layouts for those children. */ 44 | static ASStackUnpositionedLayout compute(const std::vector &children, 45 | const ASStackLayoutSpecStyle &style, 46 | const ASSizeRange &sizeRange); 47 | }; 48 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/_ASPendingState.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ASPendingState.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import "UIView+ASConvenience.h" 14 | 15 | /** 16 | 17 | Private header for ASDisplayNode.mm 18 | 19 | _ASPendingState is a proxy for a UIView that has yet to be created. 20 | In response to its setters, it sets an internal property and a flag that indicates that that property has been set. 21 | 22 | When you want to configure a view from this pending state information, just call -applyToView: 23 | */ 24 | 25 | @interface _ASPendingState : NSObject 26 | 27 | // Supports all of the properties included in the ASDisplayNodeViewProperties protocol 28 | 29 | - (void)applyToView:(UIView *)view withSpecialPropertiesHandling:(BOOL)setFrameDirectly; 30 | - (void)applyToLayer:(CALayer *)layer; 31 | 32 | + (_ASPendingState *)pendingViewStateFromLayer:(CALayer *)layer; 33 | + (_ASPendingState *)pendingViewStateFromView:(UIView *)view; 34 | 35 | @property (nonatomic, readonly) BOOL hasSetNeedsLayout; 36 | @property (nonatomic, readonly) BOOL hasSetNeedsDisplay; 37 | 38 | @property (nonatomic, readonly) BOOL hasChanges; 39 | 40 | - (void)clearChanges; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/Private/_ASScopeTimer.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ASScopeTimer.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #pragma once 12 | 13 | /** 14 | Must compile as c++ for this to work. 15 | 16 | Usage: 17 | // Can be an ivar or local variable 18 | NSTimeInterval placeToStoreTiming; 19 | 20 | { 21 | // some scope 22 | ASDisplayNode::ScopeTimer t(placeToStoreTiming); 23 | DoPotentiallySlowWork(); 24 | MorePotentiallySlowWork(); 25 | } 26 | 27 | */ 28 | 29 | namespace ASDN { 30 | struct ScopeTimer { 31 | NSTimeInterval begin; 32 | NSTimeInterval &outT; 33 | ScopeTimer(NSTimeInterval &outRef) : outT(outRef) { 34 | begin = CACurrentMediaTime(); 35 | } 36 | ~ScopeTimer() { 37 | outT = CACurrentMediaTime() - begin; 38 | } 39 | }; 40 | 41 | // variant where repeated calls are summed 42 | struct SumScopeTimer { 43 | NSTimeInterval begin; 44 | NSTimeInterval &outT; 45 | BOOL enable; 46 | SumScopeTimer(NSTimeInterval &outRef, BOOL enable = YES) : outT(outRef), enable(enable) { 47 | if (enable) { 48 | begin = CACurrentMediaTime(); 49 | } 50 | } 51 | ~SumScopeTimer() { 52 | if (enable) { 53 | outT += CACurrentMediaTime() - begin; 54 | } 55 | } 56 | }; 57 | } 58 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASEqualityHashHelpers.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ASEqualityHashHelpers.mm 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASEqualityHashHelpers.h" 12 | 13 | NSUInteger ASIntegerArrayHash(const NSUInteger *subhashes, NSUInteger count) 14 | { 15 | uint64_t result = subhashes[0]; 16 | for (int ii = 1; ii < count; ++ii) { 17 | result = ASHashCombine(result, subhashes[ii]); 18 | } 19 | return ASHash64ToNative(result); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASLayoutManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutManager.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | @interface ASLayoutManager : NSLayoutManager 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASLayoutManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASLayoutManager.m 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASLayoutManager.h" 12 | 13 | @implementation ASLayoutManager 14 | 15 | - (void)showCGGlyphs:(const CGGlyph *)glyphs 16 | positions:(const CGPoint *)positions 17 | count:(NSUInteger)glyphCount 18 | font:(UIFont *)font 19 | matrix:(CGAffineTransform)textMatrix 20 | attributes:(NSDictionary *)attributes 21 | inContext:(CGContextRef)graphicsContext 22 | { 23 | 24 | // NSLayoutManager has a hard coded internal color for hyperlinks which ignores 25 | // NSForegroundColorAttributeName. To get around this, we force the fill color 26 | // in the current context to match NSForegroundColorAttributeName. 27 | UIColor *foregroundColor = attributes[NSForegroundColorAttributeName]; 28 | 29 | if (foregroundColor) 30 | { 31 | CGContextSetFillColorWithColor(graphicsContext, foregroundColor.CGColor); 32 | } 33 | 34 | [super showCGGlyphs:glyphs 35 | positions:positions 36 | count:glyphCount 37 | font:font 38 | matrix:textMatrix 39 | attributes:attributes 40 | inContext:graphicsContext]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitAttributes.mm: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitAttributes.mm 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASTextKitAttributes.h" 12 | 13 | #import "ASEqualityHashHelpers.h" 14 | 15 | #include 16 | 17 | NSString *const ASTextKitTruncationAttributeName = @"ck_truncation"; 18 | NSString *const ASTextKitEntityAttributeName = @"ck_entity"; 19 | 20 | size_t ASTextKitAttributes::hash() const 21 | { 22 | NSUInteger subhashes[] = { 23 | [attributedString hash], 24 | [truncationAttributedString hash], 25 | [avoidTailTruncationSet hash], 26 | std::hash()(lineBreakMode), 27 | std::hash()(maximumNumberOfLines), 28 | [exclusionPaths hash], 29 | std::hash()(shadowOffset.width), 30 | std::hash()(shadowOffset.height), 31 | [shadowColor hash], 32 | std::hash()(shadowOpacity), 33 | std::hash()(shadowRadius), 34 | }; 35 | return ASIntegerArrayHash(subhashes, sizeof(subhashes) / sizeof(subhashes[0])); 36 | } 37 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitContext.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | /** 14 | A threadsafe container for the TextKit components that ASTextKit uses to lay out and truncate its text. 15 | 16 | This container is the sole owner and manager of the TextKit classes. This is an important model because of major 17 | thread safety issues inside vanilla TextKit. It provides a central locking location for accessing TextKit methods. 18 | */ 19 | @interface ASTextKitContext : NSObject 20 | 21 | /** 22 | Initializes a context and its associated TextKit components. 23 | 24 | Initialization of TextKit components is a globally locking operation so be careful of bottlenecks with this class. 25 | */ 26 | - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString 27 | lineBreakMode:(NSLineBreakMode)lineBreakMode 28 | maximumNumberOfLines:(NSUInteger)maximumNumberOfLines 29 | exclusionPaths:(NSArray *)exclusionPaths 30 | constrainedSize:(CGSize)constrainedSize; 31 | 32 | @property (nonatomic, assign, readwrite) CGSize constrainedSize; 33 | 34 | /** 35 | All operations on TextKit values MUST occur within this locked context. Simultaneous access (even non-mutative) to 36 | TextKit components may cause crashes. 37 | 38 | The block provided MUST not call out to client code from within its scope or it is possible for this to cause deadlocks 39 | in your application. Use with EXTREME care. 40 | 41 | Callers MUST NOT keep a ref to these internal objects and use them later. This WILL cause crashes in your application. 42 | */ 43 | - (void)performBlockWithLockedTextKitComponents:(void (^)(NSLayoutManager *layoutManager, 44 | NSTextStorage *textStorage, 45 | NSTextContainer *textContainer))block; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitEntityAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitEntityAttribute.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | /** 14 | The object that should be embedded with ASTextKitEntityAttributeName. Please note that the entity you provide MUST 15 | implement a proper hash and isEqual function or your application performance will grind to a halt due to 16 | NSMutableAttributedString's usage of a global hash table of all attributes. This means the entity should NOT be a 17 | Foundation Collection (NSArray, NSDictionary, NSSet, etc.) since their hash function is a simple count of the values 18 | in the collection, which causes pathological performance problems deep inside NSAttributedString's implementation. 19 | 20 | rdar://19352367 21 | */ 22 | @interface ASTextKitEntityAttribute : NSObject 23 | 24 | @property (nonatomic, strong, readonly) id entity; 25 | 26 | - (instancetype)initWithEntity:(id)entity; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitEntityAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitEntityAttribute.m 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASTextKitEntityAttribute.h" 12 | 13 | @implementation ASTextKitEntityAttribute 14 | 15 | - (instancetype)initWithEntity:(id)entity 16 | { 17 | if (self = [super init]) { 18 | _entity = entity; 19 | } 20 | return self; 21 | } 22 | 23 | - (NSUInteger)hash 24 | { 25 | return [_entity hash]; 26 | } 27 | 28 | - (BOOL)isEqual:(id)object 29 | { 30 | if (self == object) { 31 | return YES; 32 | } 33 | if (![object isKindOfClass:[self class]]) { 34 | return NO; 35 | } 36 | ASTextKitEntityAttribute *other = (ASTextKitEntityAttribute *)object; 37 | return _entity == other.entity || [_entity isEqual:other.entity]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitFontSizeAdjuster.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitFontSizeAdjuster.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import "ASTextKitAttributes.h" 13 | #import "ASTextKitContext.h" 14 | 15 | @interface ASTextKitFontSizeAdjuster : NSObject 16 | 17 | @property (nonatomic, assign) CGSize constrainedSize; 18 | 19 | /** 20 | * Creates a class that will return a scale factor the will make a string fit inside the constrained size. 21 | * 22 | * "Fitting" means that both the longest word in the string will fit without breaking in the constrained 23 | * size's width AND that the entire string will try to fit within attribute's maximumLineCount. The amount 24 | * that the string will scale is based upon the attribute's pointSizeScaleFactors. If the string cannot fit 25 | * in the given width/number of lines, the smallest scale factor will be returned. 26 | * 27 | * @param context The text kit context 28 | * @param constrainedSize The constrained size to render into 29 | * @param textComponentAttributes The renderer's text attributes 30 | */ 31 | - (instancetype)initWithContext:(ASTextKitContext *)context 32 | constrainedSize:(CGSize)constrainedSize 33 | textKitAttributes:(const ASTextKitAttributes &)textComponentAttributes; 34 | 35 | /** 36 | * Returns the best fit scale factor for the text 37 | */ 38 | - (CGFloat)scaleFactor; 39 | 40 | /** 41 | * Takes all of the attributed string attributes dealing with size (font size, line spacing, kerning, etc) and 42 | * scales them by the scaleFactor. I wouldn't be surprised if I missed some in here. 43 | */ 44 | + (void)adjustFontSizeForAttributeString:(NSMutableAttributedString *)attrString withScaleFactor:(CGFloat)scaleFactor; 45 | 46 | @end 47 | 48 | 49 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitRenderer+TextChecking.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitRenderer+TextChecking.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASTextKitRenderer.h" 12 | 13 | /** 14 | Application extensions to NSTextCheckingType. We're allowed to do this (see NSTextCheckingAllCustomTypes). 15 | */ 16 | static uint64_t const ASTextKitTextCheckingTypeEntity = 1ULL << 33; 17 | static uint64_t const ASTextKitTextCheckingTypeTruncation = 1ULL << 34; 18 | 19 | @class ASTextKitEntityAttribute; 20 | 21 | @interface ASTextKitTextCheckingResult : NSTextCheckingResult 22 | @property (nonatomic, strong, readonly) ASTextKitEntityAttribute *entityAttribute; 23 | @end 24 | 25 | @interface ASTextKitRenderer (TextChecking) 26 | 27 | - (NSTextCheckingResult *)textCheckingResultAtPoint:(CGPoint)point; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitTailTruncater.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import "ASTextKitTruncating.h" 14 | 15 | @interface ASTextKitTailTruncater : NSObject 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextKitTruncating.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextKitTruncating.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | 13 | #import 14 | 15 | #import "ASTextKitRenderer.h" 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | @protocol ASTextKitTruncating 20 | 21 | /** 22 | The character range from the original attributedString that is displayed by the renderer given the parameters in the 23 | initializer. 24 | */ 25 | @property (nonatomic, assign, readonly) std::vector visibleRanges; 26 | 27 | /** 28 | Returns the first visible range or an NSRange with location of NSNotFound and size of 0 if no first visible 29 | range exists 30 | */ 31 | @property (nonatomic, assign, readonly) NSRange firstVisibleRange; 32 | 33 | /** 34 | A truncater object is initialized with the full state of the text. It is a Single Responsibility Object that is 35 | mutative. It configures the state of the TextKit components (layout manager, text container, text storage) to achieve 36 | the intended truncation, then it stores the resulting state for later fetching. 37 | 38 | The truncater may mutate the state of the text storage such that only the drawn string is actually present in the 39 | text storage itself. 40 | 41 | The truncater should not store a strong reference to the context to prevent retain cycles. 42 | */ 43 | - (instancetype)initWithContext:(ASTextKitContext *)context 44 | truncationAttributedString:(NSAttributedString * _Nullable)truncationAttributedString 45 | avoidTailTruncationSet:(NSCharacterSet * _Nullable)avoidTailTruncationSet; 46 | 47 | /** 48 | Actually do the truncation. 49 | */ 50 | - (void)truncate; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextNodeTypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextNodeTypes.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #pragma once 12 | 13 | // Use this attribute name to add "word kerning" 14 | static NSString *const ASTextNodeWordKerningAttributeName = @"ASAttributedStringWordKerning"; 15 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/TextKit/ASTextNodeWordKerner.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASTextNodeWordKerner.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | @abstract This class acts as the NSLayoutManagerDelegate for ASTextNode. 18 | @discussion Its current job is word kerning, i.e. adjusting the width of spaces to match the set 19 | wordKernedSpaceWidth. If word kerning is not needed, set the layoutManager's delegate to nil. 20 | */ 21 | @interface ASTextNodeWordKerner : NSObject 22 | 23 | /** 24 | The following @optional NSLayoutManagerDelegate methods are implemented: 25 | 26 | - (NSUInteger)layoutManager:(NSLayoutManager *)layoutManager shouldGenerateGlyphs:(const CGGlyph *)glyphs properties:(const NSGlyphProperty *)props characterIndexes:(const NSUInteger *)charIndexes font:(UIFont *)aFont forGlyphRange:(NSRange)glyphRange NS_AVAILABLE_IOS(7_0); 27 | 28 | - (NSControlCharacterAction)layoutManager:(NSLayoutManager *)layoutManager shouldUseAction:(NSControlCharacterAction)action forControlCharacterAtIndex:(NSUInteger)charIndex NS_AVAILABLE_IOS(7_0); 29 | 30 | - (CGRect)layoutManager:(NSLayoutManager *)layoutManager boundingBoxForControlGlyphAtIndex:(NSUInteger)glyphIndex forTextContainer:(NSTextContainer *)textContainer proposedLineFragment:(CGRect)proposedRect glyphPosition:(CGPoint)glyphPosition characterIndex:(NSUInteger)charIndex NS_AVAILABLE_IOS(7_0); 31 | */ 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/AsyncDisplayKit/_ASTransitionContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // _ASTransitionContext.h 3 | // AsyncDisplayKit 4 | // 5 | // Created by Levi McCallum on 2/4/16. 6 | // 7 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 8 | // This source code is licensed under the BSD-style license found in the 9 | // LICENSE file in the root directory of this source tree. An additional grant 10 | // of patent rights can be found in the PATENTS file in the same directory. 11 | // 12 | 13 | #import 14 | 15 | #import "ASContextTransitioning.h" 16 | 17 | @class ASLayout; 18 | @class _ASTransitionContext; 19 | 20 | @protocol _ASTransitionContextLayoutDelegate 21 | 22 | - (NSArray *)currentSubnodesWithTransitionContext:(_ASTransitionContext *)context; 23 | 24 | - (NSArray *)insertedSubnodesWithTransitionContext:(_ASTransitionContext *)context; 25 | - (NSArray *)removedSubnodesWithTransitionContext:(_ASTransitionContext *)context; 26 | 27 | - (ASLayout *)transitionContext:(_ASTransitionContext *)context layoutForKey:(NSString *)key; 28 | - (ASSizeRange)transitionContext:(_ASTransitionContext *)context constrainedSizeForKey:(NSString *)key; 29 | 30 | @end 31 | 32 | @protocol _ASTransitionContextCompletionDelegate 33 | 34 | - (void)transitionContext:(_ASTransitionContext *)context didComplete:(BOOL)didComplete; 35 | 36 | @end 37 | 38 | @interface _ASTransitionContext : NSObject 39 | 40 | @property (assign, readonly, nonatomic, getter=isAnimated) BOOL animated; 41 | 42 | - (instancetype)initWithAnimation:(BOOL)animated 43 | layoutDelegate:(id<_ASTransitionContextLayoutDelegate>)layoutDelegate 44 | completionDelegate:(id<_ASTransitionContextCompletionDelegate>)completionDelegate; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/Base/ASAvailability.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASAvailability.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import 12 | #import 13 | 14 | #import 15 | 16 | #ifndef kCFCoreFoundationVersionNumber_IOS_7_0 17 | #define kCFCoreFoundationVersionNumber_IOS_7_0 838.00 18 | #endif 19 | 20 | #ifndef kCFCoreFoundationVersionNumber_iOS_7_1 21 | #define kCFCoreFoundationVersionNumber_iOS_7_1 847.24 22 | #endif 23 | 24 | #ifndef kCFCoreFoundationVersionNumber_iOS_8_0 25 | #define kCFCoreFoundationVersionNumber_iOS_8_0 1140.1 26 | #endif 27 | 28 | #ifndef kCFCoreFoundationVersionNumber_iOS_8_4 29 | #define kCFCoreFoundationVersionNumber_iOS_8_4 1145.15 30 | #endif 31 | 32 | #ifndef kCFCoreFoundationVersionNumber_iOS_9_0 33 | #define kCFCoreFoundationVersionNumber_iOS_9_0 1240.10 34 | #endif 35 | 36 | #ifndef kCFCoreFoundationVersionNumber_iOS_10_0 37 | #define kCFCoreFoundationVersionNumber_iOS_10_0 1348.00 38 | #endif 39 | 40 | #ifndef __IPHONE_7_0 41 | #define __IPHONE_7_0 70000 42 | #endif 43 | 44 | #ifndef __IPHONE_8_0 45 | #define __IPHONE_8_0 80000 46 | #endif 47 | 48 | #ifndef __IPHONE_9_0 49 | #define __IPHONE_9_0 90000 50 | #endif 51 | 52 | #ifndef __IPHONE_10_0 53 | #define __IPHONE_10_0 100000 54 | #endif 55 | 56 | #ifndef AS_IOS8_SDK_OR_LATER 57 | #define AS_IOS8_SDK_OR_LATER __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0 58 | #endif 59 | 60 | #define AS_AT_LEAST_IOS7 (kCFCoreFoundationVersionNumber > kCFCoreFoundationVersionNumber_iOS_6_1) 61 | #define AS_AT_LEAST_IOS7_1 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_1) 62 | #define AS_AT_LEAST_IOS8 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) 63 | #define AS_AT_LEAST_IOS9 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_9_0) 64 | #define AS_AT_LEAST_IOS10 (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_10_0) 65 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/Base/ASEqualityHelpers.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASEqualityHelpers.h 3 | // AsyncDisplayKit 4 | // 5 | // Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | // This source code is licensed under the BSD-style license found in the 7 | // LICENSE file in the root directory of this source tree. An additional grant 8 | // of patent rights can be found in the PATENTS file in the same directory. 9 | // 10 | 11 | #import "ASBaseDefines.h" 12 | 13 | /** 14 | @abstract Correctly equates two objects, including cases where both objects are nil. The latter is a case where `isEqual:` fails. 15 | @param obj The first object in the comparison. Can be nil. 16 | @param otherObj The second object in the comparison. Can be nil. 17 | @result YES if the objects are equal, including cases where both object are nil. 18 | */ 19 | ASDISPLAYNODE_INLINE BOOL ASObjectIsEqual(id obj, id otherObj) 20 | { 21 | return obj == otherObj || [obj isEqual:otherObj]; 22 | } 23 | -------------------------------------------------------------------------------- /Pods/AsyncDisplayKit/LICENSE: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For AsyncDisplayKit software 4 | 5 | Copyright (c) 2014-present, Facebook, Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | * Neither the name Facebook nor the names of its contributors may be used to 18 | endorse or promote products derived from this software without specific 19 | prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AsyncDisplayKit (2.0): 3 | - AsyncDisplayKit/PINRemoteImage (= 2.0) 4 | - AsyncDisplayKit/Core (2.0) 5 | - AsyncDisplayKit/PINRemoteImage (2.0): 6 | - AsyncDisplayKit/Core 7 | - PINRemoteImage/iOS (= 3.0.0-beta.7) 8 | - PINRemoteImage/PINCache 9 | - PINCache (3.0.1-beta.2): 10 | - PINCache/Arc-exception-safe (= 3.0.1-beta.2) 11 | - PINCache/Core (= 3.0.1-beta.2) 12 | - PINCache/Arc-exception-safe (3.0.1-beta.2): 13 | - PINCache/Core 14 | - PINCache/Core (3.0.1-beta.2) 15 | - PINRemoteImage/Core (3.0.0-beta.7) 16 | - PINRemoteImage/iOS (3.0.0-beta.7): 17 | - PINRemoteImage/Core 18 | - PINRemoteImage/PINCache (3.0.0-beta.7): 19 | - PINCache (= 3.0.1-beta.2) 20 | - PINRemoteImage/Core 21 | 22 | DEPENDENCIES: 23 | - AsyncDisplayKit (= 2.0) 24 | 25 | SPEC CHECKSUMS: 26 | AsyncDisplayKit: ed88de8d9fb404e098f4fdde9b8db50f23972f56 27 | PINCache: 6d273a6e0754bd26e3f12a38a90dde73cc6a42b2 28 | PINRemoteImage: ff63baf185088530db6cfa41cb665e2b5126b5c3 29 | 30 | PODFILE CHECKSUM: a15931ffeedceb52f0ecfa5a641ffcf43237bf36 31 | 32 | COCOAPODS: 1.1.1 33 | -------------------------------------------------------------------------------- /Pods/PINCache/PINCache/Nullability.h: -------------------------------------------------------------------------------- 1 | // PINCache is a modified version of TMCache 2 | // Modifications by Garrett Moon 3 | // Copyright (c) 2015 Pinterest. All rights reserved. 4 | 5 | #ifndef PINCache_nullability_h 6 | #define PINCache_nullability_h 7 | 8 | #if !__has_feature(nullability) 9 | #define NS_ASSUME_NONNULL_BEGIN 10 | #define NS_ASSUME_NONNULL_END 11 | #define nullable 12 | #define nonnull 13 | #define null_unspecified 14 | #define null_resettable 15 | #define __nullable 16 | #define __nonnull 17 | #define __null_unspecified 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Pods/PINCache/PINCache/PINCacheObjectSubscripting.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINCacheObjectSubscripting.h 3 | // PINCache 4 | // 5 | // Created by Rocir Marcos Leite Santiago on 4/2/16. 6 | // Copyright © 2016 Pinterest. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol PINCacheObjectSubscripting 12 | 13 | @required 14 | 15 | /** 16 | This method enables using literals on the receiving object, such as `id object = cache[@"key"];`. 17 | 18 | @param key The key associated with the object. 19 | @result The object for the specified key. 20 | */ 21 | - (id)objectForKeyedSubscript:(NSString *)key; 22 | 23 | /** 24 | This method enables using literals on the receiving object, such as `cache[@"key"] = object;`. 25 | 26 | @param object An object to be assigned for the key. 27 | @param key A key to associate with the object. This string will be copied. 28 | */ 29 | - (void)setObject:(id)obj forKeyedSubscript:(NSString *)key; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Pods/PINCache/PINCache/PINOperationGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINOperationGroup.h 3 | // PINCache 4 | // 5 | // Created by Garrett Moon on 10/8/16. 6 | // Copyright © 2016 Pinterest. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "PINOperationQueue.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @protocol PINGroupOperationReference; 16 | 17 | @interface PINOperationGroup : NSObject 18 | 19 | - (instancetype)init NS_UNAVAILABLE; 20 | + (instancetype)asyncOperationGroupWithQueue:(PINOperationQueue *)operationQueue; 21 | 22 | - (nullable id )addOperation:(dispatch_block_t)operation; 23 | - (nullable id )addOperation:(dispatch_block_t)operation withPriority:(PINOperationQueuePriority)priority; 24 | - (void)start; 25 | - (void)cancel; 26 | - (void)setCompletion:(dispatch_block_t)completion; 27 | - (void)waitUntilComplete; 28 | 29 | @end 30 | 31 | @protocol PINGroupOperationReference 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /Pods/PINCache/PINCache/PINOperationQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINOperationQueue.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 8/23/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | typedef NS_ENUM(NSUInteger, PINOperationQueuePriority) { 14 | PINOperationQueuePriorityLow, 15 | PINOperationQueuePriorityDefault, 16 | PINOperationQueuePriorityHigh, 17 | }; 18 | 19 | @protocol PINOperationReference; 20 | 21 | @interface PINOperationQueue : NSObject 22 | 23 | - (instancetype)init NS_UNAVAILABLE; 24 | - (instancetype)initWithMaxConcurrentOperations:(NSUInteger)maxConcurrentOperations; 25 | - (instancetype)initWithMaxConcurrentOperations:(NSUInteger)maxConcurrentOperations concurrentQueue:(dispatch_queue_t)concurrentQueue NS_DESIGNATED_INITIALIZER; 26 | + (instancetype)sharedOperationQueue; 27 | 28 | - (id )addOperation:(dispatch_block_t)operation; 29 | - (id )addOperation:(dispatch_block_t)operation withPriority:(PINOperationQueuePriority)priority; 30 | 31 | /** 32 | * Marks the operation as cancelled 33 | */ 34 | - (BOOL)cancelOperation:(id )operationReference; 35 | 36 | /** 37 | * Cancels all queued operations 38 | */ 39 | - (void)cancelAllOperations; 40 | 41 | /* 42 | * Blocks the current thread until all of the receiver’s queued and executing operations finish executing. 43 | * 44 | * @discussion When called, this method blocks the current thread and waits for the receiver’s current and queued 45 | * operations to finish executing. While the current thread is blocked, the receiver continues to launch already 46 | * queued operations and monitor those that are executing. 47 | * 48 | * @warning This should never be called from within an operation submitted to the PINOperationQueue as this will result 49 | * in a deadlock. 50 | */ 51 | - (void)waitUntilAllOperationsAreFinished; 52 | 53 | - (void)setOperationPriority:(PINOperationQueuePriority)priority withReference:(id )reference; 54 | 55 | @end 56 | 57 | @protocol PINOperationReference 58 | 59 | @end 60 | 61 | NS_ASSUME_NONNULL_END 62 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/Categories/NSData+ImageDetectors.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+ImageDetectors.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 11/19/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (PINImageDetectors) 12 | 13 | - (BOOL)pin_isGIF; 14 | #ifdef PIN_WEBP 15 | - (BOOL)pin_isWebP; 16 | #endif 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/Categories/NSData+ImageDetectors.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+ImageDetectors.m 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 11/19/14. 6 | // 7 | // 8 | 9 | #import "NSData+ImageDetectors.h" 10 | 11 | @implementation NSData (PINImageDetectors) 12 | 13 | - (BOOL)pin_isGIF 14 | { 15 | const NSInteger length = 3; 16 | Byte firstBytes[length]; 17 | if ([self length] >= length) { 18 | [self getBytes:&firstBytes length:length]; 19 | //G, I, F 20 | if (firstBytes[0] == 0x47 && firstBytes[1] == 0x49 && firstBytes[2] == 0x46) { 21 | return YES; 22 | } 23 | } 24 | return NO; 25 | } 26 | 27 | #ifdef PIN_WEBP 28 | - (BOOL)pin_isWebP 29 | { 30 | const NSInteger length = 12; 31 | Byte firstBytes[length]; 32 | if ([self length] >= length) { 33 | [self getBytes:&firstBytes length:length]; 34 | //R, I, F, F, -, -, -, -, W, E, B, P 35 | if (firstBytes[0] == 0x52 && firstBytes[1] == 0x49 && firstBytes[2] == 0x46 && firstBytes[3] == 0x46 && firstBytes[8] == 0x57 && firstBytes[9] == 0x45 && firstBytes[10] == 0x42 && firstBytes[11] == 0x50) { 36 | return YES; 37 | } 38 | } 39 | return NO; 40 | } 41 | #endif 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/Categories/PINImage+DecodedImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+DecodedImage.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 11/19/14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #if PIN_TARGET_IOS 12 | #import 13 | #elif PIN_TARGET_MAC 14 | #import 15 | #endif 16 | 17 | #import "PINRemoteImageMacros.h" 18 | 19 | #if !PIN_TARGET_IOS 20 | @interface NSImage (PINiOSMapping) 21 | 22 | @property(nonatomic, readonly, nullable) CGImageRef CGImage; 23 | 24 | + (nullable NSImage *)imageWithData:(nonnull NSData *)imageData; 25 | + (nullable NSImage *)imageWithContentsOfFile:(nonnull NSString *)path; 26 | + (nonnull NSImage *)imageWithCGImage:(nonnull CGImageRef)imageRef; 27 | 28 | @end 29 | #endif 30 | 31 | NSData * __nullable PINImageJPEGRepresentation(PINImage * __nonnull image, CGFloat compressionQuality); 32 | NSData * __nullable PINImagePNGRepresentation(PINImage * __nonnull image); 33 | 34 | @interface PINImage (PINDecodedImage) 35 | 36 | + (nullable PINImage *)pin_decodedImageWithData:(nonnull NSData *)data; 37 | + (nullable PINImage *)pin_decodedImageWithData:(nonnull NSData *)data skipDecodeIfPossible:(BOOL)skipDecodeIfPossible; 38 | + (nullable PINImage *)pin_decodedImageWithCGImageRef:(nonnull CGImageRef)imageRef; 39 | #if PIN_TARGET_IOS 40 | + (nullable PINImage *)pin_decodedImageWithCGImageRef:(nonnull CGImageRef)imageRef orientation:(UIImageOrientation) orientation; 41 | #endif 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/Categories/PINImage+WebP.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+WebP.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 11/18/14. 6 | // 7 | // 8 | 9 | #ifdef PIN_WEBP 10 | 11 | #if PIN_TARGET_IOS 12 | #import 13 | #elif PIN_TARGET_MAC 14 | #import 15 | #endif 16 | 17 | #import "PINRemoteImageMacros.h" 18 | 19 | @interface PINImage (PINWebP) 20 | 21 | + (PINImage *)pin_imageWithWebPData:(NSData *)webPData; 22 | 23 | @end 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/Image Categories/PINButton+PINRemoteImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+PINRemoteImage.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 8/18/14. 6 | // 7 | // 8 | 9 | #if PIN_TARGET_IOS 10 | #import 11 | #elif PIN_TARGET_MAC 12 | #import 13 | #endif 14 | 15 | #import "PINRemoteImageManager.h" 16 | #import "PINRemoteImageCategoryManager.h" 17 | 18 | @interface PINButton (PINRemoteImage) 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/Image Categories/PINImageView+PINRemoteImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+PINRemoteImage.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 8/17/14. 6 | // 7 | // 8 | 9 | #if PIN_TARGET_IOS 10 | #import 11 | #elif PIN_TARGET_MAC 12 | #import 13 | #endif 14 | 15 | #import "PINRemoteImageManager.h" 16 | #import "PINRemoteImageCategoryManager.h" 17 | 18 | @interface PINImageView (PINRemoteImage) 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINAlternateRepresentationProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINAlternateRepresentationProvider.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/17/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import "PINRemoteImageManager.h" 12 | 13 | @protocol PINRemoteImageManagerAlternateRepresentationProvider 14 | @required 15 | 16 | /** 17 | @discussion This method will be called with data off the wire or stored in the cache. Return an object to have it returned as the alternativeRepresentation object in the PINRemoteImageManagerResult. @warning this method can be called on the main thread, be careful of doing expensive work. 18 | */ 19 | - (id)alternateRepresentationWithData:(NSData *)data options:(PINRemoteImageManagerDownloadOptions)options; 20 | 21 | @end 22 | 23 | @interface PINAlternateRepresentationProvider : NSObject 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINAlternateRepresentationProvider.m: -------------------------------------------------------------------------------- 1 | // 2 | // PINAlternateRepresentationProvider.m 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/17/16. 6 | // 7 | // 8 | 9 | #import "PINAlternateRepresentationProvider.h" 10 | 11 | #import "NSData+ImageDetectors.h" 12 | #if USE_FLANIMATED_IMAGE 13 | #import 14 | #endif 15 | 16 | @implementation PINAlternateRepresentationProvider 17 | 18 | - (id)alternateRepresentationWithData:(NSData *)data options:(PINRemoteImageManagerDownloadOptions)options 19 | { 20 | #if USE_FLANIMATED_IMAGE 21 | if ([data pin_isGIF]) { 22 | return [FLAnimatedImage animatedImageWithGIFData:data]; 23 | } 24 | #endif 25 | return nil; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINCache/PINCache+PINRemoteImageCaching.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINCache+PINRemoteImageCaching.h 3 | // Pods 4 | // 5 | // Created by Aleksei Shevchenko on 7/28/16. 6 | // 7 | // 8 | 9 | #import 10 | #import "PINRemoteImageCaching.h" 11 | 12 | @interface PINCache (PINRemoteImageCaching) 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINDataTaskOperation.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINDataTaskOperation.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/12/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import "PINURLSessionManager.h" 12 | 13 | @interface PINDataTaskOperation : NSOperation 14 | 15 | @property (nonatomic, readonly, nullable) NSURLSessionDataTask *dataTask; 16 | 17 | + (nonnull instancetype)dataTaskOperationWithSessionManager:(nonnull PINURLSessionManager *)sessionManager 18 | request:(nonnull NSURLRequest *)request 19 | completionHandler:(nonnull void (^)(NSURLResponse * _Nonnull response, NSError * _Nullable error))completionHandler; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINProgressiveImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINProgressiveImage.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 2/9/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #if PIN_TARGET_IOS 12 | #import 13 | #elif PIN_TARGET_MAC 14 | #import 15 | #endif 16 | 17 | #import "PINRemoteImageMacros.h" 18 | 19 | /** An object which store the data of a downloading image and vends progressive scans **/ 20 | @interface PINProgressiveImage : NSObject 21 | 22 | @property (atomic, copy, nonnull) NSArray *progressThresholds; 23 | @property (atomic, assign) CFTimeInterval estimatedRemainingTimeThreshold; 24 | @property (atomic, assign) CFTimeInterval startTime; 25 | 26 | - (void)updateProgressiveImageWithData:(nonnull NSData *)data expectedNumberOfBytes:(int64_t)expectedNumberOfBytes; 27 | 28 | /** 29 | Returns the latest image based on thresholds, returns nil if no new image is generated 30 | 31 | @param blurred A boolean to indicate if the image should be blurred 32 | @param maxProgressiveRenderSize the maximum dimensions at which to apply a blur. If an image exceeds either the height 33 | or width of this dimension, the image will *not* be blurred regardless of the blurred parameter. 34 | @param renderedImageQuality Value between 0 and 1. Computed by dividing the received number of bytes by the expected number of bytes 35 | @return PINImage a progressive scan of the image or nil if a new one has not been generated 36 | */ 37 | - (nullable PINImage *)currentImageBlurred:(BOOL)blurred maxProgressiveRenderSize:(CGSize)maxProgressiveRenderSize renderedImageQuality:(nonnull out CGFloat *)renderedImageQuality; 38 | 39 | /** 40 | Returns the current data for the image. 41 | 42 | @return NSData the current data for the image 43 | */ 44 | - (nullable NSData *)data; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImage.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 8/17/14. 6 | // 7 | // 8 | 9 | #ifndef Pods_PINRemoteImage_h 10 | #define Pods_PINRemoteImage_h 11 | 12 | #import "PINRemoteImageMacros.h" 13 | 14 | #import "PINRemoteImageManager.h" 15 | #import "PINRemoteImageCategoryManager.h" 16 | #import "PINRemoteImageManagerResult.h" 17 | #import "PINRemoteImageCaching.h" 18 | #import "PINProgressiveImage.h" 19 | #import "PINURLSessionManager.h" 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageBasicCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageBasicCache.h 3 | // Pods 4 | // 5 | // Created by Aleksei Shevchenko on 7/28/16. 6 | // 7 | // 8 | 9 | #import 10 | #import "PINRemoteImageCaching.h" 11 | 12 | /** 13 | * Simplistic wrapper based on NSCache. 14 | * not persisting any data on disk 15 | */ 16 | @interface PINRemoteImageBasicCache : NSObject 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageCaching.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageCaching.h 3 | // Pods 4 | // 5 | // Created by Aleksei Shevchenko on 7/25/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @protocol PINRemoteImageCaching; 15 | typedef void (^PINRemoteImageCachingObjectBlock)(id cache, NSString *key, id __nullable object); 16 | 17 | /** 18 | * Image Cache is responsible for actual image caching. 19 | */ 20 | @protocol PINRemoteImageCaching 21 | 22 | //****************************************************************************************************** 23 | // Memory cache methods 24 | //****************************************************************************************************** 25 | - (nullable id)objectFromMemoryForKey:(NSString *)key; 26 | - (void)setObjectInMemory:(id)object forKey:(NSString *)key withCost:(NSUInteger)cost; 27 | 28 | //****************************************************************************************************** 29 | // Disk cache methods 30 | //****************************************************************************************************** 31 | - (nullable id)objectFromDiskForKey:(NSString *)key; 32 | - (void)objectFromDiskForKey:(NSString *)key completion:(nullable PINRemoteImageCachingObjectBlock)completion; 33 | - (void)setObjectOnDisk:(id)object forKey:(NSString *)key; 34 | 35 | 36 | - (BOOL)objectExistsForKey:(NSString *)key; 37 | 38 | - (void)removeObjectForKey:(NSString *)key; 39 | - (void)removeObjectForKey:(NSString *)key completion:(nullable PINRemoteImageCachingObjectBlock)completion; 40 | - (void)removeAllObjects; 41 | 42 | @optional 43 | 44 | - (void)removeObjectForKeyFromMemory:(NSString *)key; 45 | 46 | @end 47 | 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageCallbacks.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageCallbacks.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/9/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import "PINRemoteImageManager.h" 12 | 13 | @interface PINRemoteImageCallbacks : NSObject 14 | 15 | @property (nonatomic, strong, nullable) PINRemoteImageManagerImageCompletion completionBlock; 16 | @property (nonatomic, strong, nullable) PINRemoteImageManagerImageCompletion progressImageBlock; 17 | @property (nonatomic, strong, nullable) PINRemoteImageManagerProgressDownload progressDownloadBlock; 18 | @property (nonatomic, assign) CFTimeInterval requestTime; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageCallbacks.m: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageCallbacks.m 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/9/15. 6 | // 7 | // 8 | 9 | #import "PINRemoteImageCallbacks.h" 10 | 11 | @implementation PINRemoteImageCallbacks 12 | 13 | - (void)setCompletionBlock:(PINRemoteImageManagerImageCompletion)completionBlock 14 | { 15 | _completionBlock = [completionBlock copy]; 16 | self.requestTime = CACurrentMediaTime(); 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageDownloadTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageDownloadTask.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/9/15. 6 | // 7 | // 8 | 9 | #import "PINRemoteImageTask.h" 10 | #import "PINProgressiveImage.h" 11 | #import "PINDataTaskOperation.h" 12 | 13 | @interface PINRemoteImageDownloadTask : PINRemoteImageTask 14 | 15 | @property (nonatomic, strong, nullable) PINDataTaskOperation *urlSessionTaskOperation; 16 | @property (nonatomic, assign) CFTimeInterval sessionTaskStartTime; 17 | @property (nonatomic, assign) CFTimeInterval sessionTaskEndTime; 18 | @property (nonatomic, assign) BOOL hasProgressBlocks; 19 | @property (nonatomic, strong, nullable) PINProgressiveImage *progressImage; 20 | 21 | @property (nonatomic, assign) NSUInteger numberOfRetries; 22 | 23 | - (void)callProgressDownloadWithQueue:(nonnull dispatch_queue_t)queue completedBytes:(int64_t)completedBytes totalBytes:(int64_t)totalBytes; 24 | - (void)callProgressImageWithQueue:(nonnull dispatch_queue_t)queue withImage:(nonnull PINImage *)image renderedImageQuality:(CGFloat)renderedImageQuality; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageMacros.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageMacros.h 3 | // PINRemoteImage 4 | // 5 | 6 | #import 7 | 8 | #ifndef PINRemoteImageMacros_h 9 | #define PINRemoteImageMacros_h 10 | 11 | #define PIN_TARGET_IOS (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR || TARGET_OS_TV) 12 | #define PIN_TARGET_MAC (TARGET_OS_MAC) 13 | 14 | #define PINRemoteImageLogging 0 15 | #if PINRemoteImageLogging 16 | #define PINLog(args...) NSLog(args) 17 | #else 18 | #define PINLog(args...) 19 | #endif 20 | 21 | #if __has_include() 22 | #define USE_FLANIMATED_IMAGE 1 23 | #else 24 | #define USE_FLANIMATED_IMAGE 0 25 | #define FLAnimatedImage NSObject 26 | #endif 27 | 28 | #if __has_include() 29 | #define USE_PINCACHE 1 30 | #else 31 | #define USE_PINCACHE 0 32 | #endif 33 | 34 | #if PIN_TARGET_IOS 35 | #define PINImage UIImage 36 | #define PINImageView UIImageView 37 | #define PINButton UIButton 38 | #elif PIN_TARGET_MAC 39 | #define PINImage NSImage 40 | #define PINImageView NSImageView 41 | #define PINButton NSButton 42 | #endif 43 | 44 | #define BlockAssert(condition, desc, ...) \ 45 | do { \ 46 | __PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS \ 47 | if (!(condition)) { \ 48 | [[NSAssertionHandler currentHandler] handleFailureInMethod:_cmd \ 49 | object:strongSelf file:[NSString stringWithUTF8String:__FILE__] \ 50 | lineNumber:__LINE__ description:(desc), ##__VA_ARGS__]; \ 51 | } \ 52 | __PRAGMA_POP_NO_EXTRA_ARG_WARNINGS \ 53 | } while(0); 54 | 55 | #endif /* PINRemoteImageMacros_h */ 56 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageMemoryContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageMemoryContainer.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/17/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import "PINRemoteImageMacros.h" 12 | #import "PINRemoteLock.h" 13 | 14 | @class PINImage; 15 | 16 | @interface PINRemoteImageMemoryContainer : NSObject 17 | 18 | @property (nonatomic, strong) PINImage *image; 19 | @property (nonatomic, strong) NSData *data; 20 | @property (nonatomic, strong) PINRemoteLock *lock; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageMemoryContainer.m: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageMemoryContainer.m 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/17/16. 6 | // 7 | // 8 | 9 | #import "PINRemoteImageMemoryContainer.h" 10 | 11 | @implementation PINRemoteImageMemoryContainer 12 | 13 | - (instancetype)init 14 | { 15 | if (self = [super init]) { 16 | _lock = [[PINRemoteLock alloc] initWithName:@"PINRemoteImageMemoryContainer" lockType:PINRemoteLockTypeNonRecursive]; 17 | } 18 | return self; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageProcessorTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageProcessorTask.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/9/15. 6 | // 7 | // 8 | 9 | #import "PINRemoteImageTask.h" 10 | 11 | @interface PINRemoteImageProcessorTask : PINRemoteImageTask 12 | 13 | @property (nonatomic, strong, nullable) NSUUID *downloadTaskUUID; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageProcessorTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageProcessorTask.m 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/9/15. 6 | // 7 | // 8 | 9 | #import "PINRemoteImageProcessorTask.h" 10 | 11 | @implementation PINRemoteImageProcessorTask 12 | 13 | - (BOOL)cancelWithUUID:(NSUUID *)UUID manager:(PINRemoteImageManager *)manager 14 | { 15 | BOOL noMoreCompletions = [super cancelWithUUID:UUID manager:manager]; 16 | if (noMoreCompletions && self.downloadTaskUUID) { 17 | [manager cancelTaskWithUUID:self.downloadTaskUUID]; 18 | _downloadTaskUUID = nil; 19 | } 20 | return noMoreCompletions; 21 | } 22 | 23 | - (void)setDownloadTaskUUID:(NSUUID *)downloadTaskUUID 24 | { 25 | NSAssert(_downloadTaskUUID == nil, @"downloadTaskUUID should be nil"); 26 | _downloadTaskUUID = downloadTaskUUID; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteImageTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteImageTask.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/9/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #import "PINRemoteImageManager.h" 12 | #import "PINRemoteImageMacros.h" 13 | 14 | @interface PINRemoteImageTask : NSObject 15 | 16 | @property (nonatomic, strong, nonnull) NSMutableDictionary *callbackBlocks; 17 | #if PINRemoteImageLogging 18 | @property (nonatomic, copy, nullable) NSString *key; 19 | #endif 20 | 21 | - (void)addCallbacksWithCompletionBlock:(nonnull PINRemoteImageManagerImageCompletion)completionBlock 22 | progressImageBlock:(nullable PINRemoteImageManagerImageCompletion)progressImageBlock 23 | progressDownloadBlock:(nullable PINRemoteImageManagerProgressDownload)progressDownloadBlock 24 | withUUID:(nonnull NSUUID *)UUID; 25 | 26 | - (void)removeCallbackWithUUID:(nonnull NSUUID *)UUID; 27 | 28 | - (void)callCompletionsWithQueue:(nonnull dispatch_queue_t)queue 29 | remove:(BOOL)remove 30 | withImage:(nullable PINImage *)image 31 | alternativeRepresentation:(nullable id)alternativeRepresentation 32 | cached:(BOOL)cached 33 | error:(nullable NSError *)error; 34 | 35 | //returns YES if no more attached completionBlocks 36 | - (BOOL)cancelWithUUID:(nonnull NSUUID *)UUID manager:(nullable PINRemoteImageManager *)manager; 37 | 38 | - (void)setPriority:(PINRemoteImageManagerPriority)priority; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINRemoteLock.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINRemoteLock.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 3/17/16. 6 | // 7 | // 8 | 9 | #import 10 | 11 | /** The type of lock, either recursive or non-recursive */ 12 | typedef NS_ENUM(NSUInteger, PINRemoteLockType) { 13 | /** A non-recursive version of the lock. The default. */ 14 | PINRemoteLockTypeNonRecursive = 0, 15 | /** A recursive version of the lock. More expensive. */ 16 | PINRemoteLockTypeRecursive, 17 | }; 18 | 19 | @interface PINRemoteLock : NSObject 20 | 21 | - (instancetype)initWithName:(NSString *)lockName lockType:(PINRemoteLockType)lockType NS_DESIGNATED_INITIALIZER; 22 | - (instancetype)initWithName:(NSString *)lockName; 23 | - (void)lockWithBlock:(dispatch_block_t)block; 24 | 25 | - (void)lock; 26 | - (void)unlock; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/PINRemoteImage/Pod/Classes/PINURLSessionManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // PINURLSessionManager.h 3 | // Pods 4 | // 5 | // Created by Garrett Moon on 6/26/15. 6 | // 7 | // 8 | 9 | #import 10 | 11 | extern NSString * __nonnull const PINURLErrorDomain; 12 | 13 | @protocol PINURLSessionManagerDelegate 14 | 15 | @required 16 | - (void)didReceiveData:(nonnull NSData *)data forTask:(nonnull NSURLSessionTask *)task; 17 | - (void)didCompleteTask:(nonnull NSURLSessionTask *)task withError:(nullable NSError *)error; 18 | 19 | @optional 20 | - (void)didReceiveAuthenticationChallenge:(nonnull NSURLAuthenticationChallenge *)challenge forTask:(nullable NSURLSessionTask *)task completionHandler:(nonnull void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler; 21 | 22 | 23 | @end 24 | 25 | @interface PINURLSessionManager : NSObject 26 | 27 | - (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration; 28 | 29 | - (nonnull NSURLSessionDataTask *)dataTaskWithRequest:(nonnull NSURLRequest *)request completionHandler:(nullable void (^)(NSURLResponse * _Nonnull response, NSError * _Nullable error))completionHandler; 30 | 31 | - (void)invalidateSessionAndCancelTasks; 32 | 33 | @property (atomic, weak, nullable) id delegate; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/AsyncDisplayKit.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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/PINCache.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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/PINRemoteImage.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 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/simon.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AsyncDisplayKit.xcscheme 8 | 9 | isShown 10 | 11 | 12 | PINCache.xcscheme 13 | 14 | isShown 15 | 16 | 17 | PINRemoteImage.xcscheme 18 | 19 | isShown 20 | 21 | 22 | Pods-BrowseMeetup.xcscheme 23 | 24 | isShown 25 | 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 0985F7FEE79DD1F76299234D3C1BD603 31 | 32 | primary 33 | 34 | 35 | 5D775DF2C531DC053792F654D7FF847F 36 | 37 | primary 38 | 39 | 40 | 8DB2E236C2B00918797F246F07B5A9B0 41 | 42 | primary 43 | 44 | 45 | C4B6296593E188B756906E1231B69B15 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AsyncDisplayKit : NSObject 3 | @end 4 | @implementation PodsDummy_AsyncDisplayKit 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module AsyncDisplayKit { 2 | umbrella header "AsyncDisplayKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AsyncDisplayKit/AsyncDisplayKit.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_CXX_LANGUAGE_STANDARD = c++11 2 | CLANG_CXX_LIBRARY = libc++ 3 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AsyncDisplayKit 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PINCache" "$PODS_CONFIGURATION_BUILD_DIR/PINRemoteImage" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) PIN_REMOTE_IMAGE=1 6 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 7 | OTHER_LDFLAGS = -l"c++" -framework "AssetsLibrary" -weak_framework "MapKit" -weak_framework "Photos" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/AsyncDisplayKit/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.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINCache/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 | 3.0.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINCache/PINCache-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_PINCache : NSObject 3 | @end 4 | @implementation PodsDummy_PINCache 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINCache/PINCache-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #ifndef TARGET_OS_WATCH 6 | #define TARGET_OS_WATCH 0 7 | #endif 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINCache/PINCache-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "Nullability.h" 6 | #import "PINCache.h" 7 | #import "PINCacheObjectSubscripting.h" 8 | #import "PINDiskCache.h" 9 | #import "PINMemoryCache.h" 10 | #import "PINOperationGroup.h" 11 | #import "PINOperationQueue.h" 12 | 13 | FOUNDATION_EXPORT double PINCacheVersionNumber; 14 | FOUNDATION_EXPORT const unsigned char PINCacheVersionString[]; 15 | 16 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINCache/PINCache.modulemap: -------------------------------------------------------------------------------- 1 | framework module PINCache { 2 | umbrella header "PINCache-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINCache/PINCache.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PINCache 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "Foundation" -weak_framework "UIKit" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINRemoteImage/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 | 3.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINRemoteImage/PINRemoteImage-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_PINRemoteImage : NSObject 3 | @end 4 | @implementation PodsDummy_PINRemoteImage 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINRemoteImage/PINRemoteImage-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINRemoteImage/PINRemoteImage-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | #import "NSData+ImageDetectors.h" 6 | #import "PINImage+DecodedImage.h" 7 | #import "PINImage+WebP.h" 8 | #import "PINButton+PINRemoteImage.h" 9 | #import "PINImageView+PINRemoteImage.h" 10 | #import "PINAlternateRepresentationProvider.h" 11 | #import "PINAnimatedImage.h" 12 | #import "PINAnimatedImageManager.h" 13 | #import "PINDataTaskOperation.h" 14 | #import "PINProgressiveImage.h" 15 | #import "PINRemoteImage.h" 16 | #import "PINRemoteImageBasicCache.h" 17 | #import "PINRemoteImageCaching.h" 18 | #import "PINRemoteImageCallbacks.h" 19 | #import "PINRemoteImageCategoryManager.h" 20 | #import "PINRemoteImageDownloadTask.h" 21 | #import "PINRemoteImageMacros.h" 22 | #import "PINRemoteImageManager.h" 23 | #import "PINRemoteImageManagerResult.h" 24 | #import "PINRemoteImageMemoryContainer.h" 25 | #import "PINRemoteImageProcessorTask.h" 26 | #import "PINRemoteImageTask.h" 27 | #import "PINRemoteLock.h" 28 | #import "PINURLSessionManager.h" 29 | #import "PINCache+PINRemoteImageCaching.h" 30 | 31 | FOUNDATION_EXPORT double PINRemoteImageVersionNumber; 32 | FOUNDATION_EXPORT const unsigned char PINRemoteImageVersionString[]; 33 | 34 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINRemoteImage/PINRemoteImage.modulemap: -------------------------------------------------------------------------------- 1 | framework module PINRemoteImage { 2 | umbrella header "PINRemoteImage-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/PINRemoteImage/PINRemoteImage.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PINRemoteImage 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PINCache" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 5 | OTHER_LDFLAGS = -framework "Accelerate" -framework "ImageIO" -framework "UIKit" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BrowseMeetup/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 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BrowseMeetup/Pods-BrowseMeetup-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_BrowseMeetup : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_BrowseMeetup 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BrowseMeetup/Pods-BrowseMeetup-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | 6 | FOUNDATION_EXPORT double Pods_BrowseMeetupVersionNumber; 7 | FOUNDATION_EXPORT const unsigned char Pods_BrowseMeetupVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BrowseMeetup/Pods-BrowseMeetup.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AsyncDisplayKit" "$PODS_CONFIGURATION_BUILD_DIR/PINCache" "$PODS_CONFIGURATION_BUILD_DIR/PINRemoteImage" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) PIN_REMOTE_IMAGE=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncDisplayKit/AsyncDisplayKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PINCache/PINCache.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PINRemoteImage/PINRemoteImage.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AsyncDisplayKit" -framework "PINCache" -framework "PINRemoteImage" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BrowseMeetup/Pods-BrowseMeetup.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_BrowseMeetup { 2 | umbrella header "Pods-BrowseMeetup-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-BrowseMeetup/Pods-BrowseMeetup.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AsyncDisplayKit" "$PODS_CONFIGURATION_BUILD_DIR/PINCache" "$PODS_CONFIGURATION_BUILD_DIR/PINRemoteImage" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) PIN_REMOTE_IMAGE=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncDisplayKit/AsyncDisplayKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PINCache/PINCache.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/PINRemoteImage/PINRemoteImage.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "AsyncDisplayKit" -framework "PINCache" -framework "PINRemoteImage" 7 | PODS_BUILD_DIR = $BUILD_DIR 8 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A simple iOS demo for AsyncDisplayKit 2 | 3 | AsyncDisplayKit is an iOS framework developed in order to optimize your app by making user interfaces thread safe, which means that you will be able to shift all your expensive views into background threads, preparing them before presenting. It's a great way to make your app elegant, smooth and has a responsive user interface. 4 | 5 | This simple demo shows you how to use the display kit to build a Meetup client app. For the full tutorial, you can check it out here: 6 | 7 | http://www.appcoda.com/introduction-asyncdisplaykit-2-0 8 | --------------------------------------------------------------------------------