From 0b4b59c3aff66fc0950a3187b63b433703f9db94 Mon Sep 17 00:00:00 2001 From: SeanWong933 Date: Sun, 24 Apr 2016 15:30:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8B=E5=8F=8B=E5=9C=88=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=88=90=E5=8A=9F=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=BD=86=E6=98=AF=E6=9C=89=E7=AC=AC=E4=B8=80=E8=A1=8C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 3 +- Podfile.lock | 14 + .../DACircularProgressView.h | 28 + .../DACircularProgressView.m | 321 +++ .../DALabeledCircularProgressView.h | 23 + .../DALabeledCircularProgressView.m | 47 + Pods/DACircularProgress/LICENSE.md | 23 + Pods/DACircularProgress/README.md | 77 + .../DACircularProgressView.h | 1 + .../DALabeledCircularProgressView.h | 1 + .../Private/IDMPhotoBrowser/IDMCaptionView.h | 1 + .../Private/IDMPhotoBrowser/IDMPBConstants.h | 1 + .../Private/IDMPhotoBrowser/IDMPhoto.h | 1 + .../Private/IDMPhotoBrowser/IDMPhotoBrowser.h | 1 + .../IDMPhotoBrowser/IDMPhotoProtocol.h | 1 + .../IDMTapDetectingImageView.h | 1 + .../IDMPhotoBrowser/IDMTapDetectingView.h | 1 + .../IDMPhotoBrowser/IDMZoomingScrollView.h | 1 + .../SDWebImage/NSData+ImageContentType.h | 1 + .../Headers/Private/SDWebImage/SDImageCache.h | 1 + .../Private/SDWebImage/SDWebImageCompat.h | 1 + .../Private/SDWebImage/SDWebImageDecoder.h | 1 + .../Private/SDWebImage/SDWebImageDownloader.h | 1 + .../SDWebImageDownloaderOperation.h | 1 + .../Private/SDWebImage/SDWebImageManager.h | 1 + .../Private/SDWebImage/SDWebImageOperation.h | 1 + .../Private/SDWebImage/SDWebImagePrefetcher.h | 1 + .../Private/SDWebImage/UIButton+WebCache.h | 1 + Pods/Headers/Private/SDWebImage/UIImage+GIF.h | 1 + .../Private/SDWebImage/UIImage+MultiFormat.h | 1 + .../UIImageView+HighlightedWebCache.h | 1 + .../Private/SDWebImage/UIImageView+WebCache.h | 1 + .../SDWebImage/UIView+WebCacheOperation.h | 1 + Pods/Headers/Private/pop/FloatConversion.h | 1 + Pods/Headers/Private/pop/POP.h | 1 + Pods/Headers/Private/pop/POPAction.h | 1 + .../Private/pop/POPAnimatableProperty.h | 1 + Pods/Headers/Private/pop/POPAnimation.h | 1 + Pods/Headers/Private/pop/POPAnimationEvent.h | 1 + .../Private/pop/POPAnimationEventInternal.h | 1 + Pods/Headers/Private/pop/POPAnimationExtras.h | 1 + .../Private/pop/POPAnimationInternal.h | 1 + .../Headers/Private/pop/POPAnimationPrivate.h | 1 + .../Headers/Private/pop/POPAnimationRuntime.h | 1 + Pods/Headers/Private/pop/POPAnimationTracer.h | 1 + .../Private/pop/POPAnimationTracerInternal.h | 1 + Pods/Headers/Private/pop/POPAnimator.h | 1 + Pods/Headers/Private/pop/POPAnimatorPrivate.h | 1 + Pods/Headers/Private/pop/POPBasicAnimation.h | 1 + .../Private/pop/POPBasicAnimationInternal.h | 1 + Pods/Headers/Private/pop/POPCGUtils.h | 1 + Pods/Headers/Private/pop/POPCustomAnimation.h | 1 + Pods/Headers/Private/pop/POPDecayAnimation.h | 1 + .../Private/pop/POPDecayAnimationInternal.h | 1 + Pods/Headers/Private/pop/POPDefines.h | 1 + Pods/Headers/Private/pop/POPGeometry.h | 1 + Pods/Headers/Private/pop/POPLayerExtras.h | 1 + Pods/Headers/Private/pop/POPMath.h | 1 + .../Private/pop/POPPropertyAnimation.h | 1 + .../pop/POPPropertyAnimationInternal.h | 1 + Pods/Headers/Private/pop/POPSpringAnimation.h | 1 + .../Private/pop/POPSpringAnimationInternal.h | 1 + Pods/Headers/Private/pop/POPSpringSolver.h | 1 + Pods/Headers/Private/pop/POPVector.h | 1 + .../Private/pop/TransformationMatrix.h | 1 + Pods/Headers/Private/pop/UnitBezier.h | 1 + .../DACircularProgressView.h | 1 + .../DALabeledCircularProgressView.h | 1 + .../Public/IDMPhotoBrowser/IDMCaptionView.h | 1 + .../Public/IDMPhotoBrowser/IDMPBConstants.h | 1 + .../Headers/Public/IDMPhotoBrowser/IDMPhoto.h | 1 + .../Public/IDMPhotoBrowser/IDMPhotoBrowser.h | 1 + .../Public/IDMPhotoBrowser/IDMPhotoProtocol.h | 1 + .../IDMTapDetectingImageView.h | 1 + .../IDMPhotoBrowser/IDMTapDetectingView.h | 1 + .../IDMPhotoBrowser/IDMZoomingScrollView.h | 1 + .../SDWebImage/NSData+ImageContentType.h | 1 + Pods/Headers/Public/SDWebImage/SDImageCache.h | 1 + .../Public/SDWebImage/SDWebImageCompat.h | 1 + .../Public/SDWebImage/SDWebImageDecoder.h | 1 + .../Public/SDWebImage/SDWebImageDownloader.h | 1 + .../SDWebImageDownloaderOperation.h | 1 + .../Public/SDWebImage/SDWebImageManager.h | 1 + .../Public/SDWebImage/SDWebImageOperation.h | 1 + .../Public/SDWebImage/SDWebImagePrefetcher.h | 1 + .../Public/SDWebImage/UIButton+WebCache.h | 1 + Pods/Headers/Public/SDWebImage/UIImage+GIF.h | 1 + .../Public/SDWebImage/UIImage+MultiFormat.h | 1 + .../UIImageView+HighlightedWebCache.h | 1 + .../Public/SDWebImage/UIImageView+WebCache.h | 1 + .../SDWebImage/UIView+WebCacheOperation.h | 1 + Pods/Headers/Public/pop/POP.h | 1 + .../Public/pop/POPAnimatableProperty.h | 1 + Pods/Headers/Public/pop/POPAnimation.h | 1 + Pods/Headers/Public/pop/POPAnimationEvent.h | 1 + Pods/Headers/Public/pop/POPAnimationExtras.h | 1 + Pods/Headers/Public/pop/POPAnimationTracer.h | 1 + Pods/Headers/Public/pop/POPAnimator.h | 1 + Pods/Headers/Public/pop/POPBasicAnimation.h | 1 + Pods/Headers/Public/pop/POPCustomAnimation.h | 1 + Pods/Headers/Public/pop/POPDecayAnimation.h | 1 + Pods/Headers/Public/pop/POPDefines.h | 1 + Pods/Headers/Public/pop/POPGeometry.h | 1 + Pods/Headers/Public/pop/POPLayerExtras.h | 1 + .../Headers/Public/pop/POPPropertyAnimation.h | 1 + Pods/Headers/Public/pop/POPSpringAnimation.h | 1 + Pods/IDMPhotoBrowser/Classes/IDMCaptionView.h | 33 + Pods/IDMPhotoBrowser/Classes/IDMCaptionView.m | 103 + Pods/IDMPhotoBrowser/Classes/IDMPBConstants.h | 28 + .../de.lproj/Localizable.strings | 45 + .../en.lproj/Localizable.strings | Bin 0 -> 2344 bytes .../es.lproj/Localizable.strings | Bin 0 -> 2424 bytes .../fr.lproj/Localizable.strings | Bin 0 -> 2416 bytes .../pt.lproj/Localizable.strings | 45 + .../ru.lproj/Localizable.strings | Bin 0 -> 2434 bytes .../zh-Hans.lproj/Localizable.strings | Bin 0 -> 2218 bytes Pods/IDMPhotoBrowser/Classes/IDMPhoto.h | 43 + Pods/IDMPhotoBrowser/Classes/IDMPhoto.m | 288 ++ .../images/IDMPhotoBrowser_arrowLeft.png | Bin 0 -> 1135 bytes .../images/IDMPhotoBrowser_arrowLeft@2x.png | Bin 0 -> 1261 bytes .../images/IDMPhotoBrowser_arrowRight.png | Bin 0 -> 1115 bytes .../images/IDMPhotoBrowser_arrowRight@2x.png | Bin 0 -> 1253 bytes .../IDMPhotoBrowser/Classes/IDMPhotoBrowser.h | 86 + .../IDMPhotoBrowser/Classes/IDMPhotoBrowser.m | 1361 ++++++++++ .../Classes/IDMPhotoProtocol.h | 64 + .../Classes/IDMTapDetectingImageView.h | 27 + .../Classes/IDMTapDetectingImageView.m | 70 + .../Classes/IDMTapDetectingView.h | 27 + .../Classes/IDMTapDetectingView.m | 63 + .../Classes/IDMZoomingScrollView.h | 42 + .../Classes/IDMZoomingScrollView.m | 305 +++ Pods/IDMPhotoBrowser/LICENSE.txt | 21 + Pods/IDMPhotoBrowser/README.markdown | 184 ++ Pods/Manifest.lock | 14 + Pods/Pods.xcodeproj/project.pbxproj | 2396 ++++++++++++----- .../xcschemes/DACircularProgress.xcscheme | 60 + .../xcschemes/IDMPhotoBrowser.xcscheme | 60 + .../xcschemes/JSONModel.xcscheme | 2 +- .../xcschemes/MJRefresh.xcscheme | 2 +- .../xcschemes/Masonry.xcscheme | 2 +- .../xcschemes/PinYin4Objc.xcscheme | 2 +- .../xcschemes/Pods.xcscheme | 2 +- .../xcschemes/SDWebImage.xcscheme | 60 + .../xcschemes/TTTAttributedLabel.xcscheme | 2 +- .../UITableView+FDTemplateLayoutCell.xcscheme | 2 +- .../YSMChineseSort-YSMChineseSort.xcscheme | 2 +- .../xcschemes/YSMChineseSort.xcscheme | 2 +- .../xcschemes/pop.xcscheme | 60 + .../xcschemes/xcschememanagement.plist | 52 +- Pods/SDWebImage/LICENSE | 20 + Pods/SDWebImage/README.md | 334 +++ .../SDWebImage/NSData+ImageContentType.h | 26 + .../SDWebImage/NSData+ImageContentType.m | 49 + Pods/SDWebImage/SDWebImage/SDImageCache.h | 272 ++ Pods/SDWebImage/SDWebImage/SDImageCache.m | 650 +++++ Pods/SDWebImage/SDWebImage/SDWebImageCompat.h | 72 + Pods/SDWebImage/SDWebImage/SDWebImageCompat.m | 51 + .../SDWebImage/SDWebImage/SDWebImageDecoder.h | 18 + .../SDWebImage/SDWebImage/SDWebImageDecoder.m | 69 + .../SDWebImage/SDWebImageDownloader.h | 191 ++ .../SDWebImage/SDWebImageDownloader.m | 232 ++ .../SDWebImageDownloaderOperation.h | 78 + .../SDWebImageDownloaderOperation.m | 466 ++++ .../SDWebImage/SDWebImage/SDWebImageManager.h | 299 ++ .../SDWebImage/SDWebImage/SDWebImageManager.m | 370 +++ .../SDWebImage/SDWebImageOperation.h | 15 + .../SDWebImage/SDWebImagePrefetcher.h | 108 + .../SDWebImage/SDWebImagePrefetcher.m | 140 + .../SDWebImage/SDWebImage/UIButton+WebCache.h | 229 ++ .../SDWebImage/SDWebImage/UIButton+WebCache.m | 270 ++ Pods/SDWebImage/SDWebImage/UIImage+GIF.h | 19 + Pods/SDWebImage/SDWebImage/UIImage+GIF.m | 158 ++ .../SDWebImage/UIImage+MultiFormat.h | 15 + .../SDWebImage/UIImage+MultiFormat.m | 118 + .../UIImageView+HighlightedWebCache.h | 100 + .../UIImageView+HighlightedWebCache.m | 112 + .../SDWebImage/UIImageView+WebCache.h | 213 ++ .../SDWebImage/UIImageView+WebCache.m | 277 ++ .../SDWebImage/UIView+WebCacheOperation.h | 36 + .../SDWebImage/UIView+WebCacheOperation.m | 55 + .../DACircularProgress-dummy.m | 5 + .../DACircularProgress-prefix.pch | 4 + .../DACircularProgress.xcconfig | 5 + .../IDMPhotoBrowser/IDMPhotoBrowser-dummy.m | 5 + .../IDMPhotoBrowser-prefix.pch | 4 + .../IDMPhotoBrowser/IDMPhotoBrowser.xcconfig | 5 + .../JSONModel/JSONModel.xcconfig | 2 +- .../MJRefresh/MJRefresh.xcconfig | 2 +- .../Masonry/Masonry.xcconfig | 2 +- .../PinYin4Objc/PinYin4Objc.xcconfig | 2 +- .../Pods/Pods-acknowledgements.markdown | 108 + .../Pods/Pods-acknowledgements.plist | 124 + .../Pods/Pods-resources.sh | 4 + .../Pods/Pods.debug.xcconfig | 6 +- .../Pods/Pods.release.xcconfig | 6 +- .../SDWebImage/SDWebImage-dummy.m | 5 + .../SDWebImage/SDWebImage-prefix.pch | 4 + .../SDWebImage/SDWebImage.xcconfig | 5 + .../TTTAttributedLabel.xcconfig | 2 +- .../UITableView+FDTemplateLayoutCell.xcconfig | 2 +- .../YSMChineseSort/YSMChineseSort.xcconfig | 2 +- Pods/Target Support Files/pop/pop-dummy.m | 5 + Pods/Target Support Files/pop/pop-prefix.pch | 4 + Pods/Target Support Files/pop/pop.xcconfig | 7 + Pods/pop/LICENSE | 30 + Pods/pop/README.md | 203 ++ Pods/pop/pop/POP.h | 29 + Pods/pop/pop/POPAction.h | 67 + Pods/pop/pop/POPAnimatableProperty.h | 251 ++ Pods/pop/pop/POPAnimatableProperty.mm | 1307 +++++++++ Pods/pop/pop/POPAnimation.h | 188 ++ Pods/pop/pop/POPAnimation.mm | 303 +++ Pods/pop/pop/POPAnimationEvent.h | 69 + Pods/pop/pop/POPAnimationEvent.mm | 108 + Pods/pop/pop/POPAnimationEventInternal.h | 41 + Pods/pop/pop/POPAnimationExtras.h | 43 + Pods/pop/pop/POPAnimationExtras.mm | 117 + Pods/pop/pop/POPAnimationInternal.h | 505 ++++ Pods/pop/pop/POPAnimationPrivate.h | 16 + Pods/pop/pop/POPAnimationRuntime.h | 103 + Pods/pop/pop/POPAnimationRuntime.mm | 329 +++ Pods/pop/pop/POPAnimationTracer.h | 60 + Pods/pop/pop/POPAnimationTracer.mm | 191 ++ Pods/pop/pop/POPAnimationTracerInternal.h | 96 + Pods/pop/pop/POPAnimator.h | 47 + Pods/pop/pop/POPAnimator.mm | 806 ++++++ Pods/pop/pop/POPAnimatorPrivate.h | 68 + Pods/pop/pop/POPBasicAnimation.h | 71 + Pods/pop/pop/POPBasicAnimation.mm | 106 + Pods/pop/pop/POPBasicAnimationInternal.h | 97 + Pods/pop/pop/POPCGUtils.h | 152 ++ Pods/pop/pop/POPCGUtils.mm | 150 ++ Pods/pop/pop/POPCustomAnimation.h | 46 + Pods/pop/pop/POPCustomAnimation.mm | 75 + Pods/pop/pop/POPDecayAnimation.h | 66 + Pods/pop/pop/POPDecayAnimation.mm | 203 ++ Pods/pop/pop/POPDecayAnimationInternal.h | 127 + Pods/pop/pop/POPDefines.h | 37 + Pods/pop/pop/POPGeometry.h | 73 + Pods/pop/pop/POPGeometry.mm | 94 + Pods/pop/pop/POPLayerExtras.h | 196 ++ Pods/pop/pop/POPLayerExtras.mm | 288 ++ Pods/pop/pop/POPMath.h | 56 + Pods/pop/pop/POPMath.mm | 83 + Pods/pop/pop/POPPropertyAnimation.h | 65 + Pods/pop/pop/POPPropertyAnimation.mm | 125 + Pods/pop/pop/POPPropertyAnimationInternal.h | 359 +++ Pods/pop/pop/POPSpringAnimation.h | 67 + Pods/pop/pop/POPSpringAnimation.mm | 192 ++ Pods/pop/pop/POPSpringAnimationInternal.h | 132 + Pods/pop/pop/POPSpringSolver.h | 190 ++ Pods/pop/pop/POPVector.h | 394 +++ Pods/pop/pop/POPVector.mm | 334 +++ Pods/pop/pop/WebCore/FloatConversion.h | 56 + Pods/pop/pop/WebCore/TransformationMatrix.cpp | 1074 ++++++++ Pods/pop/pop/WebCore/TransformationMatrix.h | 279 ++ Pods/pop/pop/WebCore/UnitBezier.h | 123 + WeChat.xcodeproj/project.pbxproj | 20 + .../Controller/MomentsTableViewController.m | 63 +- WeChat/Found/View/MomentTableViewCell.h | 15 + WeChat/Found/View/MomentTableViewCell.m | 85 + .../View/PhotosCollectionViewController.h | 13 + .../View/PhotosCollectionViewController.m | 53 + _clang-format | 2 +- 264 files changed, 21353 insertions(+), 756 deletions(-) create mode 100644 Pods/DACircularProgress/DACircularProgress/DACircularProgressView.h create mode 100644 Pods/DACircularProgress/DACircularProgress/DACircularProgressView.m create mode 100644 Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.h create mode 100644 Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.m create mode 100755 Pods/DACircularProgress/LICENSE.md create mode 100755 Pods/DACircularProgress/README.md create mode 120000 Pods/Headers/Private/DACircularProgress/DACircularProgressView.h create mode 120000 Pods/Headers/Private/DACircularProgress/DALabeledCircularProgressView.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMCaptionView.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMPBConstants.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMPhoto.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoBrowser.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoProtocol.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingImageView.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingView.h create mode 120000 Pods/Headers/Private/IDMPhotoBrowser/IDMZoomingScrollView.h create mode 120000 Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h create mode 120000 Pods/Headers/Private/SDWebImage/SDImageCache.h create mode 120000 Pods/Headers/Private/SDWebImage/SDWebImageCompat.h create mode 120000 Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h create mode 120000 Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h create mode 120000 Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h create mode 120000 Pods/Headers/Private/SDWebImage/SDWebImageManager.h create mode 120000 Pods/Headers/Private/SDWebImage/SDWebImageOperation.h create mode 120000 Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h create mode 120000 Pods/Headers/Private/SDWebImage/UIButton+WebCache.h create mode 120000 Pods/Headers/Private/SDWebImage/UIImage+GIF.h create mode 120000 Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h create mode 120000 Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h create mode 120000 Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h create mode 120000 Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h create mode 120000 Pods/Headers/Private/pop/FloatConversion.h create mode 120000 Pods/Headers/Private/pop/POP.h create mode 120000 Pods/Headers/Private/pop/POPAction.h create mode 120000 Pods/Headers/Private/pop/POPAnimatableProperty.h create mode 120000 Pods/Headers/Private/pop/POPAnimation.h create mode 120000 Pods/Headers/Private/pop/POPAnimationEvent.h create mode 120000 Pods/Headers/Private/pop/POPAnimationEventInternal.h create mode 120000 Pods/Headers/Private/pop/POPAnimationExtras.h create mode 120000 Pods/Headers/Private/pop/POPAnimationInternal.h create mode 120000 Pods/Headers/Private/pop/POPAnimationPrivate.h create mode 120000 Pods/Headers/Private/pop/POPAnimationRuntime.h create mode 120000 Pods/Headers/Private/pop/POPAnimationTracer.h create mode 120000 Pods/Headers/Private/pop/POPAnimationTracerInternal.h create mode 120000 Pods/Headers/Private/pop/POPAnimator.h create mode 120000 Pods/Headers/Private/pop/POPAnimatorPrivate.h create mode 120000 Pods/Headers/Private/pop/POPBasicAnimation.h create mode 120000 Pods/Headers/Private/pop/POPBasicAnimationInternal.h create mode 120000 Pods/Headers/Private/pop/POPCGUtils.h create mode 120000 Pods/Headers/Private/pop/POPCustomAnimation.h create mode 120000 Pods/Headers/Private/pop/POPDecayAnimation.h create mode 120000 Pods/Headers/Private/pop/POPDecayAnimationInternal.h create mode 120000 Pods/Headers/Private/pop/POPDefines.h create mode 120000 Pods/Headers/Private/pop/POPGeometry.h create mode 120000 Pods/Headers/Private/pop/POPLayerExtras.h create mode 120000 Pods/Headers/Private/pop/POPMath.h create mode 120000 Pods/Headers/Private/pop/POPPropertyAnimation.h create mode 120000 Pods/Headers/Private/pop/POPPropertyAnimationInternal.h create mode 120000 Pods/Headers/Private/pop/POPSpringAnimation.h create mode 120000 Pods/Headers/Private/pop/POPSpringAnimationInternal.h create mode 120000 Pods/Headers/Private/pop/POPSpringSolver.h create mode 120000 Pods/Headers/Private/pop/POPVector.h create mode 120000 Pods/Headers/Private/pop/TransformationMatrix.h create mode 120000 Pods/Headers/Private/pop/UnitBezier.h create mode 120000 Pods/Headers/Public/DACircularProgress/DACircularProgressView.h create mode 120000 Pods/Headers/Public/DACircularProgress/DALabeledCircularProgressView.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMCaptionView.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMPBConstants.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMPhoto.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoBrowser.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoProtocol.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingImageView.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingView.h create mode 120000 Pods/Headers/Public/IDMPhotoBrowser/IDMZoomingScrollView.h create mode 120000 Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h create mode 120000 Pods/Headers/Public/SDWebImage/SDImageCache.h create mode 120000 Pods/Headers/Public/SDWebImage/SDWebImageCompat.h create mode 120000 Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h create mode 120000 Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h create mode 120000 Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h create mode 120000 Pods/Headers/Public/SDWebImage/SDWebImageManager.h create mode 120000 Pods/Headers/Public/SDWebImage/SDWebImageOperation.h create mode 120000 Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h create mode 120000 Pods/Headers/Public/SDWebImage/UIButton+WebCache.h create mode 120000 Pods/Headers/Public/SDWebImage/UIImage+GIF.h create mode 120000 Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h create mode 120000 Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h create mode 120000 Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h create mode 120000 Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h create mode 120000 Pods/Headers/Public/pop/POP.h create mode 120000 Pods/Headers/Public/pop/POPAnimatableProperty.h create mode 120000 Pods/Headers/Public/pop/POPAnimation.h create mode 120000 Pods/Headers/Public/pop/POPAnimationEvent.h create mode 120000 Pods/Headers/Public/pop/POPAnimationExtras.h create mode 120000 Pods/Headers/Public/pop/POPAnimationTracer.h create mode 120000 Pods/Headers/Public/pop/POPAnimator.h create mode 120000 Pods/Headers/Public/pop/POPBasicAnimation.h create mode 120000 Pods/Headers/Public/pop/POPCustomAnimation.h create mode 120000 Pods/Headers/Public/pop/POPDecayAnimation.h create mode 120000 Pods/Headers/Public/pop/POPDefines.h create mode 120000 Pods/Headers/Public/pop/POPGeometry.h create mode 120000 Pods/Headers/Public/pop/POPLayerExtras.h create mode 120000 Pods/Headers/Public/pop/POPPropertyAnimation.h create mode 120000 Pods/Headers/Public/pop/POPSpringAnimation.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMCaptionView.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMCaptionView.m create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPBConstants.h create mode 100755 Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/de.lproj/Localizable.strings create mode 100755 Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/en.lproj/Localizable.strings create mode 100755 Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/es.lproj/Localizable.strings create mode 100755 Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/fr.lproj/Localizable.strings create mode 100755 Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/pt.lproj/Localizable.strings create mode 100755 Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/ru.lproj/Localizable.strings create mode 100755 Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/zh-Hans.lproj/Localizable.strings create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhoto.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhoto.m create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowLeft.png create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowLeft@2x.png create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRight.png create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRight@2x.png create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.m create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMPhotoProtocol.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.m create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.m create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.h create mode 100644 Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.m create mode 100644 Pods/IDMPhotoBrowser/LICENSE.txt create mode 100644 Pods/IDMPhotoBrowser/README.markdown create mode 100644 Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/DACircularProgress.xcscheme create mode 100644 Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/IDMPhotoBrowser.xcscheme create mode 100644 Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/SDWebImage.xcscheme create mode 100644 Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/pop.xcscheme create mode 100644 Pods/SDWebImage/LICENSE create mode 100644 Pods/SDWebImage/README.md create mode 100644 Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h create mode 100644 Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m create mode 100644 Pods/SDWebImage/SDWebImage/SDImageCache.h create mode 100644 Pods/SDWebImage/SDWebImage/SDImageCache.m create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageCompat.h create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageCompat.m create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageManager.h create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageManager.m create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImageOperation.h create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h create mode 100644 Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m create mode 100644 Pods/SDWebImage/SDWebImage/UIButton+WebCache.h create mode 100644 Pods/SDWebImage/SDWebImage/UIButton+WebCache.m create mode 100755 Pods/SDWebImage/SDWebImage/UIImage+GIF.h create mode 100755 Pods/SDWebImage/SDWebImage/UIImage+GIF.m create mode 100644 Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h create mode 100644 Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m create mode 100644 Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h create mode 100644 Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m create mode 100644 Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h create mode 100644 Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m create mode 100644 Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h create mode 100644 Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m create mode 100644 Pods/Target Support Files/DACircularProgress/DACircularProgress-dummy.m create mode 100644 Pods/Target Support Files/DACircularProgress/DACircularProgress-prefix.pch create mode 100644 Pods/Target Support Files/DACircularProgress/DACircularProgress.xcconfig create mode 100644 Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-dummy.m create mode 100644 Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-prefix.pch create mode 100644 Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser.xcconfig create mode 100644 Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m create mode 100644 Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch create mode 100644 Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig create mode 100644 Pods/Target Support Files/pop/pop-dummy.m create mode 100644 Pods/Target Support Files/pop/pop-prefix.pch create mode 100644 Pods/Target Support Files/pop/pop.xcconfig create mode 100644 Pods/pop/LICENSE create mode 100644 Pods/pop/README.md create mode 100644 Pods/pop/pop/POP.h create mode 100644 Pods/pop/pop/POPAction.h create mode 100644 Pods/pop/pop/POPAnimatableProperty.h create mode 100644 Pods/pop/pop/POPAnimatableProperty.mm create mode 100644 Pods/pop/pop/POPAnimation.h create mode 100644 Pods/pop/pop/POPAnimation.mm create mode 100644 Pods/pop/pop/POPAnimationEvent.h create mode 100644 Pods/pop/pop/POPAnimationEvent.mm create mode 100644 Pods/pop/pop/POPAnimationEventInternal.h create mode 100644 Pods/pop/pop/POPAnimationExtras.h create mode 100644 Pods/pop/pop/POPAnimationExtras.mm create mode 100644 Pods/pop/pop/POPAnimationInternal.h create mode 100644 Pods/pop/pop/POPAnimationPrivate.h create mode 100644 Pods/pop/pop/POPAnimationRuntime.h create mode 100644 Pods/pop/pop/POPAnimationRuntime.mm create mode 100644 Pods/pop/pop/POPAnimationTracer.h create mode 100644 Pods/pop/pop/POPAnimationTracer.mm create mode 100644 Pods/pop/pop/POPAnimationTracerInternal.h create mode 100644 Pods/pop/pop/POPAnimator.h create mode 100644 Pods/pop/pop/POPAnimator.mm create mode 100644 Pods/pop/pop/POPAnimatorPrivate.h create mode 100644 Pods/pop/pop/POPBasicAnimation.h create mode 100644 Pods/pop/pop/POPBasicAnimation.mm create mode 100644 Pods/pop/pop/POPBasicAnimationInternal.h create mode 100644 Pods/pop/pop/POPCGUtils.h create mode 100644 Pods/pop/pop/POPCGUtils.mm create mode 100644 Pods/pop/pop/POPCustomAnimation.h create mode 100644 Pods/pop/pop/POPCustomAnimation.mm create mode 100644 Pods/pop/pop/POPDecayAnimation.h create mode 100644 Pods/pop/pop/POPDecayAnimation.mm create mode 100644 Pods/pop/pop/POPDecayAnimationInternal.h create mode 100644 Pods/pop/pop/POPDefines.h create mode 100644 Pods/pop/pop/POPGeometry.h create mode 100644 Pods/pop/pop/POPGeometry.mm create mode 100644 Pods/pop/pop/POPLayerExtras.h create mode 100644 Pods/pop/pop/POPLayerExtras.mm create mode 100644 Pods/pop/pop/POPMath.h create mode 100644 Pods/pop/pop/POPMath.mm create mode 100644 Pods/pop/pop/POPPropertyAnimation.h create mode 100644 Pods/pop/pop/POPPropertyAnimation.mm create mode 100644 Pods/pop/pop/POPPropertyAnimationInternal.h create mode 100644 Pods/pop/pop/POPSpringAnimation.h create mode 100644 Pods/pop/pop/POPSpringAnimation.mm create mode 100644 Pods/pop/pop/POPSpringAnimationInternal.h create mode 100644 Pods/pop/pop/POPSpringSolver.h create mode 100644 Pods/pop/pop/POPVector.h create mode 100644 Pods/pop/pop/POPVector.mm create mode 100644 Pods/pop/pop/WebCore/FloatConversion.h create mode 100644 Pods/pop/pop/WebCore/TransformationMatrix.cpp create mode 100644 Pods/pop/pop/WebCore/TransformationMatrix.h create mode 100644 Pods/pop/pop/WebCore/UnitBezier.h create mode 100644 WeChat/Found/View/MomentTableViewCell.h create mode 100644 WeChat/Found/View/MomentTableViewCell.m create mode 100644 WeChat/Found/View/PhotosCollectionViewController.h create mode 100644 WeChat/Found/View/PhotosCollectionViewController.m diff --git a/Podfile b/Podfile index 55d92ba..9a114be 100644 --- a/Podfile +++ b/Podfile @@ -8,4 +8,5 @@ pod 'Masonry' pod 'UITableView+FDTemplateLayoutCell' pod 'JSONModel' pod 'TTTAttributedLabel' -pod 'MJRefresh' \ No newline at end of file +pod 'MJRefresh' +pod 'IDMPhotoBrowser' \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock index 1df0a75..15342ba 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,14 +1,24 @@ PODS: + - DACircularProgress (2.3.1) + - IDMPhotoBrowser (1.8.4): + - DACircularProgress + - pop + - SDWebImage - JSONModel (1.2.0) - Masonry (1.0.0) - MJRefresh (3.1.0) - PinYin4Objc (1.1.1) + - pop (1.0.9) + - SDWebImage (3.7.5): + - SDWebImage/Core (= 3.7.5) + - SDWebImage/Core (3.7.5) - TTTAttributedLabel (1.13.4) - UITableView+FDTemplateLayoutCell (1.4) - YSMChineseSort (0.1.1): - PinYin4Objc (~> 1.1.1) DEPENDENCIES: + - IDMPhotoBrowser - JSONModel - Masonry - MJRefresh @@ -17,10 +27,14 @@ DEPENDENCIES: - YSMChineseSort (~> 0.1.0) SPEC CHECKSUMS: + DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71 + IDMPhotoBrowser: b574fe3229754e701f32df271afbc4ac7e4e1997 JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c Masonry: b529bb169217897b6354d4b56b1fada6d475b13d MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4 PinYin4Objc: 3fa9673610368330e2dfb688b1d19a35c3930a78 + pop: f667631a5108a2e60d9e8797c9b32ddaf2080bce + SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461 TTTAttributedLabel: 0a2ac7b2dd726d32a070dafb01446026b11e624f UITableView+FDTemplateLayoutCell: 234e1582bcc4e18461af91155123bb96538ed030 YSMChineseSort: ef532bfe993ff1b4dc9bcd644ead1a43b2632b88 diff --git a/Pods/DACircularProgress/DACircularProgress/DACircularProgressView.h b/Pods/DACircularProgress/DACircularProgress/DACircularProgressView.h new file mode 100644 index 0000000..391b449 --- /dev/null +++ b/Pods/DACircularProgress/DACircularProgress/DACircularProgressView.h @@ -0,0 +1,28 @@ +// +// DACircularProgressView.h +// DACircularProgress +// +// Created by Daniel Amitay on 2/6/12. +// Copyright (c) 2012 Daniel Amitay. All rights reserved. +// + +#import + +@interface DACircularProgressView : UIView + +@property(nonatomic, strong) UIColor *trackTintColor UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) UIColor *progressTintColor UI_APPEARANCE_SELECTOR; +@property(nonatomic, strong) UIColor *innerTintColor UI_APPEARANCE_SELECTOR; +@property(nonatomic) NSInteger roundedCorners UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-( +@property(nonatomic) CGFloat thicknessRatio UI_APPEARANCE_SELECTOR; +@property(nonatomic) NSInteger clockwiseProgress UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-( +@property(nonatomic) CGFloat progress; + +@property(nonatomic) CGFloat indeterminateDuration UI_APPEARANCE_SELECTOR; +@property(nonatomic) NSInteger indeterminate UI_APPEARANCE_SELECTOR; // Can not use BOOL with UI_APPEARANCE_SELECTOR :-( + +- (void)setProgress:(CGFloat)progress animated:(BOOL)animated; +- (void)setProgress:(CGFloat)progress animated:(BOOL)animated initialDelay:(CFTimeInterval)initialDelay; +- (void)setProgress:(CGFloat)progress animated:(BOOL)animated initialDelay:(CFTimeInterval)initialDelay withDuration:(CFTimeInterval)duration; + +@end diff --git a/Pods/DACircularProgress/DACircularProgress/DACircularProgressView.m b/Pods/DACircularProgress/DACircularProgress/DACircularProgressView.m new file mode 100644 index 0000000..ea39dcd --- /dev/null +++ b/Pods/DACircularProgress/DACircularProgress/DACircularProgressView.m @@ -0,0 +1,321 @@ +// +// DACircularProgressView.m +// DACircularProgress +// +// Created by Daniel Amitay on 2/6/12. +// Copyright (c) 2012 Daniel Amitay. All rights reserved. +// + +#import "DACircularProgressView.h" + +#import + +@interface DACircularProgressLayer : CALayer + +@property(nonatomic, strong) UIColor *trackTintColor; +@property(nonatomic, strong) UIColor *progressTintColor; +@property(nonatomic, strong) UIColor *innerTintColor; +@property(nonatomic) NSInteger roundedCorners; +@property(nonatomic) CGFloat thicknessRatio; +@property(nonatomic) CGFloat progress; +@property(nonatomic) NSInteger clockwiseProgress; + +@end + +@implementation DACircularProgressLayer + +@dynamic trackTintColor; +@dynamic progressTintColor; +@dynamic innerTintColor; +@dynamic roundedCorners; +@dynamic thicknessRatio; +@dynamic progress; +@dynamic clockwiseProgress; + ++ (BOOL)needsDisplayForKey:(NSString *)key +{ + if ([key isEqualToString:@"progress"]) { + return YES; + } else { + return [super needsDisplayForKey:key]; + } +} + +- (void)drawInContext:(CGContextRef)context +{ + CGRect rect = self.bounds; + CGPoint centerPoint = CGPointMake(rect.size.width / 2.0f, rect.size.height / 2.0f); + CGFloat radius = MIN(rect.size.height, rect.size.width) / 2.0f; + + BOOL clockwise = (self.clockwiseProgress != 0); + + CGFloat progress = MIN(self.progress, 1.0f - FLT_EPSILON); + CGFloat radians = 0; + if (clockwise) { + radians = (float)((progress * 2.0f * M_PI) - M_PI_2); + } else { + radians = (float)(3 * M_PI_2 - (progress * 2.0f * M_PI)); + } + + CGContextSetFillColorWithColor(context, self.trackTintColor.CGColor); + CGMutablePathRef trackPath = CGPathCreateMutable(); + CGPathMoveToPoint(trackPath, NULL, centerPoint.x, centerPoint.y); + CGPathAddArc(trackPath, NULL, centerPoint.x, centerPoint.y, radius, (float)(2.0f * M_PI), 0.0f, TRUE); + CGPathCloseSubpath(trackPath); + CGContextAddPath(context, trackPath); + CGContextFillPath(context); + CGPathRelease(trackPath); + + if (progress > 0.0f) { + CGContextSetFillColorWithColor(context, self.progressTintColor.CGColor); + CGMutablePathRef progressPath = CGPathCreateMutable(); + CGPathMoveToPoint(progressPath, NULL, centerPoint.x, centerPoint.y); + CGPathAddArc(progressPath, NULL, centerPoint.x, centerPoint.y, radius, (float)(3.0f * M_PI_2), radians, !clockwise); + CGPathCloseSubpath(progressPath); + CGContextAddPath(context, progressPath); + CGContextFillPath(context); + CGPathRelease(progressPath); + } + + if (progress > 0.0f && self.roundedCorners) { + CGFloat pathWidth = radius * self.thicknessRatio; + CGFloat xOffset = radius * (1.0f + ((1.0f - (self.thicknessRatio / 2.0f)) * cosf(radians))); + CGFloat yOffset = radius * (1.0f + ((1.0f - (self.thicknessRatio / 2.0f)) * sinf(radians))); + CGPoint endPoint = CGPointMake(xOffset, yOffset); + + CGRect startEllipseRect = (CGRect) { + .origin.x = centerPoint.x - pathWidth / 2.0f, + .origin.y = 0.0f, + .size.width = pathWidth, + .size.height = pathWidth + }; + CGContextAddEllipseInRect(context, startEllipseRect); + CGContextFillPath(context); + + CGRect endEllipseRect = (CGRect) { + .origin.x = endPoint.x - pathWidth / 2.0f, + .origin.y = endPoint.y - pathWidth / 2.0f, + .size.width = pathWidth, + .size.height = pathWidth + }; + CGContextAddEllipseInRect(context, endEllipseRect); + CGContextFillPath(context); + } + + CGContextSetBlendMode(context, kCGBlendModeClear); + CGFloat innerRadius = radius * (1.0f - self.thicknessRatio); + CGRect clearRect = (CGRect) { + .origin.x = centerPoint.x - innerRadius, + .origin.y = centerPoint.y - innerRadius, + .size.width = innerRadius * 2.0f, + .size.height = innerRadius * 2.0f + }; + CGContextAddEllipseInRect(context, clearRect); + CGContextFillPath(context); + + if (self.innerTintColor) { + CGContextSetBlendMode(context, kCGBlendModeNormal); + CGContextSetFillColorWithColor(context, [self.innerTintColor CGColor]); + CGContextAddEllipseInRect(context, clearRect); + CGContextFillPath(context); + } +} + +@end + +@interface DACircularProgressView () + +@end + +@implementation DACircularProgressView + ++ (void) initialize +{ + if (self == [DACircularProgressView class]) { + DACircularProgressView *circularProgressViewAppearance = [DACircularProgressView appearance]; + [circularProgressViewAppearance setTrackTintColor:[[UIColor whiteColor] colorWithAlphaComponent:0.3f]]; + [circularProgressViewAppearance setProgressTintColor:[UIColor whiteColor]]; + [circularProgressViewAppearance setInnerTintColor:nil]; + [circularProgressViewAppearance setBackgroundColor:[UIColor clearColor]]; + [circularProgressViewAppearance setThicknessRatio:0.3f]; + [circularProgressViewAppearance setRoundedCorners:NO]; + [circularProgressViewAppearance setClockwiseProgress:YES]; + + [circularProgressViewAppearance setIndeterminateDuration:2.0f]; + [circularProgressViewAppearance setIndeterminate:NO]; + } +} + ++ (Class)layerClass +{ + return [DACircularProgressLayer class]; +} + +- (DACircularProgressLayer *)circularProgressLayer +{ + return (DACircularProgressLayer *)self.layer; +} + +- (id)init +{ + return [super initWithFrame:CGRectMake(0.0f, 0.0f, 40.0f, 40.0f)]; +} + +- (void)didMoveToWindow +{ + CGFloat windowContentsScale = self.window.screen.scale; + self.circularProgressLayer.contentsScale = windowContentsScale; + [self.circularProgressLayer setNeedsDisplay]; +} + + +#pragma mark - Progress + +- (CGFloat)progress +{ + return self.circularProgressLayer.progress; +} + +- (void)setProgress:(CGFloat)progress +{ + [self setProgress:progress animated:NO]; +} + +- (void)setProgress:(CGFloat)progress animated:(BOOL)animated +{ + [self setProgress:progress animated:animated initialDelay:0.0]; +} + +- (void)setProgress:(CGFloat)progress + animated:(BOOL)animated + initialDelay:(CFTimeInterval)initialDelay +{ + CGFloat pinnedProgress = MIN(MAX(progress, 0.0f), 1.0f); + [self setProgress:progress + animated:animated + initialDelay:initialDelay + withDuration:fabs(self.progress - pinnedProgress)]; +} + +- (void)setProgress:(CGFloat)progress + animated:(BOOL)animated + initialDelay:(CFTimeInterval)initialDelay + withDuration:(CFTimeInterval)duration +{ + [self.layer removeAnimationForKey:@"indeterminateAnimation"]; + [self.circularProgressLayer removeAnimationForKey:@"progress"]; + + CGFloat pinnedProgress = MIN(MAX(progress, 0.0f), 1.0f); + if (animated) { + CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"progress"]; + animation.duration = duration; + animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + animation.fillMode = kCAFillModeForwards; + animation.fromValue = [NSNumber numberWithFloat:self.progress]; + animation.toValue = [NSNumber numberWithFloat:pinnedProgress]; + animation.beginTime = CACurrentMediaTime() + initialDelay; + animation.delegate = self; + [self.circularProgressLayer addAnimation:animation forKey:@"progress"]; + } else { + [self.circularProgressLayer setNeedsDisplay]; + self.circularProgressLayer.progress = pinnedProgress; + } +} + +- (void)animationDidStop:(CAAnimation *)animation finished:(BOOL)flag +{ + NSNumber *pinnedProgressNumber = [animation valueForKey:@"toValue"]; + self.circularProgressLayer.progress = [pinnedProgressNumber floatValue]; +} + + +#pragma mark - UIAppearance methods + +- (UIColor *)trackTintColor +{ + return self.circularProgressLayer.trackTintColor; +} + +- (void)setTrackTintColor:(UIColor *)trackTintColor +{ + self.circularProgressLayer.trackTintColor = trackTintColor; + [self.circularProgressLayer setNeedsDisplay]; +} + +- (UIColor *)progressTintColor +{ + return self.circularProgressLayer.progressTintColor; +} + +- (void)setProgressTintColor:(UIColor *)progressTintColor +{ + self.circularProgressLayer.progressTintColor = progressTintColor; + [self.circularProgressLayer setNeedsDisplay]; +} + +- (UIColor *)innerTintColor +{ + return self.circularProgressLayer.innerTintColor; +} + +- (void)setInnerTintColor:(UIColor *)innerTintColor +{ + self.circularProgressLayer.innerTintColor = innerTintColor; + [self.circularProgressLayer setNeedsDisplay]; +} + +- (NSInteger)roundedCorners +{ + return self.roundedCorners; +} + +- (void)setRoundedCorners:(NSInteger)roundedCorners +{ + self.circularProgressLayer.roundedCorners = roundedCorners; + [self.circularProgressLayer setNeedsDisplay]; +} + +- (CGFloat)thicknessRatio +{ + return self.circularProgressLayer.thicknessRatio; +} + +- (void)setThicknessRatio:(CGFloat)thicknessRatio +{ + self.circularProgressLayer.thicknessRatio = MIN(MAX(thicknessRatio, 0.f), 1.f); + [self.circularProgressLayer setNeedsDisplay]; +} + +- (NSInteger)indeterminate +{ + CAAnimation *spinAnimation = [self.layer animationForKey:@"indeterminateAnimation"]; + return (spinAnimation == nil ? 0 : 1); +} + +- (void)setIndeterminate:(NSInteger)indeterminate +{ + if (indeterminate) { + if (!self.indeterminate) { + CABasicAnimation *spinAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; + spinAnimation.byValue = [NSNumber numberWithDouble:indeterminate > 0 ? 2.0f*M_PI : -2.0f*M_PI]; + spinAnimation.duration = self.indeterminateDuration; + spinAnimation.repeatCount = HUGE_VALF; + [self.layer addAnimation:spinAnimation forKey:@"indeterminateAnimation"]; + } + } else { + [self.layer removeAnimationForKey:@"indeterminateAnimation"]; + } +} + +- (NSInteger)clockwiseProgress +{ + return self.circularProgressLayer.clockwiseProgress; +} + +- (void)setClockwiseProgress:(NSInteger)clockwiseProgres +{ + self.circularProgressLayer.clockwiseProgress = clockwiseProgres; + [self.circularProgressLayer setNeedsDisplay]; +} + +@end diff --git a/Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.h b/Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.h new file mode 100644 index 0000000..1d4e56c --- /dev/null +++ b/Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.h @@ -0,0 +1,23 @@ +// +// DALabeledCircularProgressView.h +// DACircularProgressExample +// +// Created by Josh Sklar on 4/8/14. +// Copyright (c) 2014 Shout Messenger. All rights reserved. +// + +#import "DACircularProgressView.h" + +/** + @class DALabeledCircularProgressView + + @brief Subclass of DACircularProgressView that adds a UILabel. + */ +@interface DALabeledCircularProgressView : DACircularProgressView + +/** + UILabel placed right on the DACircularProgressView. + */ +@property (strong, nonatomic) UILabel *progressLabel; + +@end diff --git a/Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.m b/Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.m new file mode 100644 index 0000000..c0e2bda --- /dev/null +++ b/Pods/DACircularProgress/DACircularProgress/DALabeledCircularProgressView.m @@ -0,0 +1,47 @@ +// +// DALabeledCircularProgressView.m +// DACircularProgressExample +// +// Created by Josh Sklar on 4/8/14. +// Copyright (c) 2014 Shout Messenger. All rights reserved. +// + +#import "DALabeledCircularProgressView.h" + +@implementation DALabeledCircularProgressView + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initializeLabel]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)aDecoder +{ + self = [super initWithCoder:aDecoder]; + if (self) { + [self initializeLabel]; + } + return self; +} + + +#pragma mark - Internal methods + +/** + Creates and initializes + -[DALabeledCircularProgressView progressLabel]. + */ +- (void)initializeLabel +{ + self.progressLabel = [[UILabel alloc] initWithFrame:self.bounds]; + self.progressLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; + self.progressLabel.textAlignment = NSTextAlignmentCenter; + self.progressLabel.backgroundColor = [UIColor clearColor]; + [self addSubview:self.progressLabel]; +} + +@end diff --git a/Pods/DACircularProgress/LICENSE.md b/Pods/DACircularProgress/LICENSE.md new file mode 100755 index 0000000..94d0610 --- /dev/null +++ b/Pods/DACircularProgress/LICENSE.md @@ -0,0 +1,23 @@ +# License + +## MIT License + +Copyright (c) 2013 Daniel Amitay (http://danielamitay.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/Pods/DACircularProgress/README.md b/Pods/DACircularProgress/README.md new file mode 100755 index 0000000..3c40031 --- /dev/null +++ b/Pods/DACircularProgress/README.md @@ -0,0 +1,77 @@ +## DACircularProgress + +`DACircularProgress` is a `UIView` subclass with circular `UIProgressView` properties. + +It was originally built to be an imitation of Facebook's photo progress indicator. + +View the included example project for a demonstration. + +![Screenshot](https://github.com/danielamitay/DACircularProgress/raw/master/screenshot.png) + +## Installation + +To use `DACircularProgress`: + +- Copy over the `DACircularProgress` folder to your project folder. +- Make sure that your project includes ``. +- `#import "DACircularProgressView.h"` + +### Example Code + +```objective-c + +self.progressView = [[DACircularProgressView alloc] initWithFrame:CGRectMake(140.0f, 30.0f, 40.0f, 40.0f)]; +self.progressView.roundedCorners = YES; +self.progressView.trackTintColor = [UIColor clearColor]; +[self.view addSubview:self.progressView]; +``` + +- You can also use Interface Builder by adding a `UIView` element and setting its class to `DACircularProgress` + +## Notes + +### Compatibility + +iOS5.0+ + +### Automatic Reference Counting (ARC) support + +`DACircularProgress` was made with ARC enabled by default. + +## Contact + +- [Personal website](http://danielamitay.com) +- [GitHub](http://github.com/danielamitay) +- [Twitter](http://twitter.com/danielamitay) +- [LinkedIn](http://www.linkedin.com/in/danielamitay) +- [Email](hello@danielamitay.com) + +If you use/enjoy `DACircularProgress`, let me know! + +## Credits + +`DACircularProgress` is brought to you by [Daniel Amitay](http://www.amitay.us) and [contributors to the project](https://github.com/danielamitay/DACircularProgress/contributors). A special thanks to [Cédric Luthi](https://github.com/0xced) for a significant amount of changes. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/danielamitay/DACircularProgress/issues/new). + +## License + +### MIT License + +Copyright (c) 2013 Daniel Amitay (http://danielamitay.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Pods/Headers/Private/DACircularProgress/DACircularProgressView.h b/Pods/Headers/Private/DACircularProgress/DACircularProgressView.h new file mode 120000 index 0000000..b67e984 --- /dev/null +++ b/Pods/Headers/Private/DACircularProgress/DACircularProgressView.h @@ -0,0 +1 @@ +../../../DACircularProgress/DACircularProgress/DACircularProgressView.h \ No newline at end of file diff --git a/Pods/Headers/Private/DACircularProgress/DALabeledCircularProgressView.h b/Pods/Headers/Private/DACircularProgress/DALabeledCircularProgressView.h new file mode 120000 index 0000000..89a694f --- /dev/null +++ b/Pods/Headers/Private/DACircularProgress/DALabeledCircularProgressView.h @@ -0,0 +1 @@ +../../../DACircularProgress/DACircularProgress/DALabeledCircularProgressView.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMCaptionView.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMCaptionView.h new file mode 120000 index 0000000..3ae38e6 --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMCaptionView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMCaptionView.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMPBConstants.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMPBConstants.h new file mode 120000 index 0000000..ec4e26b --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMPBConstants.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPBConstants.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMPhoto.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMPhoto.h new file mode 120000 index 0000000..e262bac --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMPhoto.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPhoto.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoBrowser.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoBrowser.h new file mode 120000 index 0000000..82c1d6d --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoBrowser.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPhotoBrowser.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoProtocol.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoProtocol.h new file mode 120000 index 0000000..2a58b94 --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMPhotoProtocol.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPhotoProtocol.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingImageView.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingImageView.h new file mode 120000 index 0000000..220f5cf --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingImageView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMTapDetectingImageView.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingView.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingView.h new file mode 120000 index 0000000..916d10d --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMTapDetectingView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMTapDetectingView.h \ No newline at end of file diff --git a/Pods/Headers/Private/IDMPhotoBrowser/IDMZoomingScrollView.h b/Pods/Headers/Private/IDMPhotoBrowser/IDMZoomingScrollView.h new file mode 120000 index 0000000..418bc6f --- /dev/null +++ b/Pods/Headers/Private/IDMPhotoBrowser/IDMZoomingScrollView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMZoomingScrollView.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h b/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h new file mode 120000 index 0000000..8457498 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/NSData+ImageContentType.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDImageCache.h b/Pods/Headers/Private/SDWebImage/SDImageCache.h new file mode 120000 index 0000000..0040b06 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDImageCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDImageCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h b/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h new file mode 120000 index 0000000..6ca2478 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageCompat.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h b/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h new file mode 120000 index 0000000..a2f3a68 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDecoder.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h b/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h new file mode 120000 index 0000000..303b03b --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloader.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h b/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h new file mode 120000 index 0000000..99441c4 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageManager.h b/Pods/Headers/Private/SDWebImage/SDWebImageManager.h new file mode 120000 index 0000000..1b81848 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageManager.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageManager.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h b/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h new file mode 120000 index 0000000..20e5b89 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageOperation.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h b/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h new file mode 120000 index 0000000..50585c6 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h b/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h new file mode 120000 index 0000000..19d2d8e --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIButton+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImage+GIF.h b/Pods/Headers/Private/SDWebImage/UIImage+GIF.h new file mode 120000 index 0000000..14d5aad --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImage+GIF.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+GIF.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h b/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h new file mode 120000 index 0000000..1fb9650 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h b/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h new file mode 120000 index 0000000..fd4dea4 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h b/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h new file mode 120000 index 0000000..0c53a47 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h b/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h new file mode 120000 index 0000000..f9890c4 --- /dev/null +++ b/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/FloatConversion.h b/Pods/Headers/Private/pop/FloatConversion.h new file mode 120000 index 0000000..aea012a --- /dev/null +++ b/Pods/Headers/Private/pop/FloatConversion.h @@ -0,0 +1 @@ +../../../pop/pop/WebCore/FloatConversion.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POP.h b/Pods/Headers/Private/pop/POP.h new file mode 120000 index 0000000..dd15660 --- /dev/null +++ b/Pods/Headers/Private/pop/POP.h @@ -0,0 +1 @@ +../../../pop/pop/POP.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAction.h b/Pods/Headers/Private/pop/POPAction.h new file mode 120000 index 0000000..78f9372 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAction.h @@ -0,0 +1 @@ +../../../pop/pop/POPAction.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimatableProperty.h b/Pods/Headers/Private/pop/POPAnimatableProperty.h new file mode 120000 index 0000000..48fd8c4 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimatableProperty.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimatableProperty.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimation.h b/Pods/Headers/Private/pop/POPAnimation.h new file mode 120000 index 0000000..dfe8a85 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationEvent.h b/Pods/Headers/Private/pop/POPAnimationEvent.h new file mode 120000 index 0000000..5d40492 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationEvent.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationEvent.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationEventInternal.h b/Pods/Headers/Private/pop/POPAnimationEventInternal.h new file mode 120000 index 0000000..8263df6 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationEventInternal.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationEventInternal.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationExtras.h b/Pods/Headers/Private/pop/POPAnimationExtras.h new file mode 120000 index 0000000..3a1bc7e --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationExtras.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationExtras.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationInternal.h b/Pods/Headers/Private/pop/POPAnimationInternal.h new file mode 120000 index 0000000..6aebf45 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationInternal.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationInternal.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationPrivate.h b/Pods/Headers/Private/pop/POPAnimationPrivate.h new file mode 120000 index 0000000..ea5956d --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationPrivate.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationPrivate.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationRuntime.h b/Pods/Headers/Private/pop/POPAnimationRuntime.h new file mode 120000 index 0000000..0651d06 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationRuntime.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationRuntime.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationTracer.h b/Pods/Headers/Private/pop/POPAnimationTracer.h new file mode 120000 index 0000000..64fff66 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationTracer.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationTracer.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimationTracerInternal.h b/Pods/Headers/Private/pop/POPAnimationTracerInternal.h new file mode 120000 index 0000000..b76b731 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimationTracerInternal.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationTracerInternal.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimator.h b/Pods/Headers/Private/pop/POPAnimator.h new file mode 120000 index 0000000..89707ea --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimator.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimator.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPAnimatorPrivate.h b/Pods/Headers/Private/pop/POPAnimatorPrivate.h new file mode 120000 index 0000000..89650c6 --- /dev/null +++ b/Pods/Headers/Private/pop/POPAnimatorPrivate.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimatorPrivate.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPBasicAnimation.h b/Pods/Headers/Private/pop/POPBasicAnimation.h new file mode 120000 index 0000000..50184f2 --- /dev/null +++ b/Pods/Headers/Private/pop/POPBasicAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPBasicAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPBasicAnimationInternal.h b/Pods/Headers/Private/pop/POPBasicAnimationInternal.h new file mode 120000 index 0000000..fa8cb0b --- /dev/null +++ b/Pods/Headers/Private/pop/POPBasicAnimationInternal.h @@ -0,0 +1 @@ +../../../pop/pop/POPBasicAnimationInternal.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPCGUtils.h b/Pods/Headers/Private/pop/POPCGUtils.h new file mode 120000 index 0000000..d050fb4 --- /dev/null +++ b/Pods/Headers/Private/pop/POPCGUtils.h @@ -0,0 +1 @@ +../../../pop/pop/POPCGUtils.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPCustomAnimation.h b/Pods/Headers/Private/pop/POPCustomAnimation.h new file mode 120000 index 0000000..5025bd6 --- /dev/null +++ b/Pods/Headers/Private/pop/POPCustomAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPCustomAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPDecayAnimation.h b/Pods/Headers/Private/pop/POPDecayAnimation.h new file mode 120000 index 0000000..dba2796 --- /dev/null +++ b/Pods/Headers/Private/pop/POPDecayAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPDecayAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPDecayAnimationInternal.h b/Pods/Headers/Private/pop/POPDecayAnimationInternal.h new file mode 120000 index 0000000..4d5c959 --- /dev/null +++ b/Pods/Headers/Private/pop/POPDecayAnimationInternal.h @@ -0,0 +1 @@ +../../../pop/pop/POPDecayAnimationInternal.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPDefines.h b/Pods/Headers/Private/pop/POPDefines.h new file mode 120000 index 0000000..4b10036 --- /dev/null +++ b/Pods/Headers/Private/pop/POPDefines.h @@ -0,0 +1 @@ +../../../pop/pop/POPDefines.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPGeometry.h b/Pods/Headers/Private/pop/POPGeometry.h new file mode 120000 index 0000000..9b29189 --- /dev/null +++ b/Pods/Headers/Private/pop/POPGeometry.h @@ -0,0 +1 @@ +../../../pop/pop/POPGeometry.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPLayerExtras.h b/Pods/Headers/Private/pop/POPLayerExtras.h new file mode 120000 index 0000000..e11f4c6 --- /dev/null +++ b/Pods/Headers/Private/pop/POPLayerExtras.h @@ -0,0 +1 @@ +../../../pop/pop/POPLayerExtras.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPMath.h b/Pods/Headers/Private/pop/POPMath.h new file mode 120000 index 0000000..cc52b21 --- /dev/null +++ b/Pods/Headers/Private/pop/POPMath.h @@ -0,0 +1 @@ +../../../pop/pop/POPMath.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPPropertyAnimation.h b/Pods/Headers/Private/pop/POPPropertyAnimation.h new file mode 120000 index 0000000..0fae4c5 --- /dev/null +++ b/Pods/Headers/Private/pop/POPPropertyAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPPropertyAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPPropertyAnimationInternal.h b/Pods/Headers/Private/pop/POPPropertyAnimationInternal.h new file mode 120000 index 0000000..5783767 --- /dev/null +++ b/Pods/Headers/Private/pop/POPPropertyAnimationInternal.h @@ -0,0 +1 @@ +../../../pop/pop/POPPropertyAnimationInternal.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPSpringAnimation.h b/Pods/Headers/Private/pop/POPSpringAnimation.h new file mode 120000 index 0000000..152f663 --- /dev/null +++ b/Pods/Headers/Private/pop/POPSpringAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPSpringAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPSpringAnimationInternal.h b/Pods/Headers/Private/pop/POPSpringAnimationInternal.h new file mode 120000 index 0000000..afdc982 --- /dev/null +++ b/Pods/Headers/Private/pop/POPSpringAnimationInternal.h @@ -0,0 +1 @@ +../../../pop/pop/POPSpringAnimationInternal.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPSpringSolver.h b/Pods/Headers/Private/pop/POPSpringSolver.h new file mode 120000 index 0000000..6ed1ee6 --- /dev/null +++ b/Pods/Headers/Private/pop/POPSpringSolver.h @@ -0,0 +1 @@ +../../../pop/pop/POPSpringSolver.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/POPVector.h b/Pods/Headers/Private/pop/POPVector.h new file mode 120000 index 0000000..73f01f9 --- /dev/null +++ b/Pods/Headers/Private/pop/POPVector.h @@ -0,0 +1 @@ +../../../pop/pop/POPVector.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/TransformationMatrix.h b/Pods/Headers/Private/pop/TransformationMatrix.h new file mode 120000 index 0000000..f1232b9 --- /dev/null +++ b/Pods/Headers/Private/pop/TransformationMatrix.h @@ -0,0 +1 @@ +../../../pop/pop/WebCore/TransformationMatrix.h \ No newline at end of file diff --git a/Pods/Headers/Private/pop/UnitBezier.h b/Pods/Headers/Private/pop/UnitBezier.h new file mode 120000 index 0000000..fbd11a0 --- /dev/null +++ b/Pods/Headers/Private/pop/UnitBezier.h @@ -0,0 +1 @@ +../../../pop/pop/WebCore/UnitBezier.h \ No newline at end of file diff --git a/Pods/Headers/Public/DACircularProgress/DACircularProgressView.h b/Pods/Headers/Public/DACircularProgress/DACircularProgressView.h new file mode 120000 index 0000000..b67e984 --- /dev/null +++ b/Pods/Headers/Public/DACircularProgress/DACircularProgressView.h @@ -0,0 +1 @@ +../../../DACircularProgress/DACircularProgress/DACircularProgressView.h \ No newline at end of file diff --git a/Pods/Headers/Public/DACircularProgress/DALabeledCircularProgressView.h b/Pods/Headers/Public/DACircularProgress/DALabeledCircularProgressView.h new file mode 120000 index 0000000..89a694f --- /dev/null +++ b/Pods/Headers/Public/DACircularProgress/DALabeledCircularProgressView.h @@ -0,0 +1 @@ +../../../DACircularProgress/DACircularProgress/DALabeledCircularProgressView.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMCaptionView.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMCaptionView.h new file mode 120000 index 0000000..3ae38e6 --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMCaptionView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMCaptionView.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMPBConstants.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMPBConstants.h new file mode 120000 index 0000000..ec4e26b --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMPBConstants.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPBConstants.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMPhoto.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMPhoto.h new file mode 120000 index 0000000..e262bac --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMPhoto.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPhoto.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoBrowser.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoBrowser.h new file mode 120000 index 0000000..82c1d6d --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoBrowser.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPhotoBrowser.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoProtocol.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoProtocol.h new file mode 120000 index 0000000..2a58b94 --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMPhotoProtocol.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMPhotoProtocol.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingImageView.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingImageView.h new file mode 120000 index 0000000..220f5cf --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingImageView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMTapDetectingImageView.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingView.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingView.h new file mode 120000 index 0000000..916d10d --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMTapDetectingView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMTapDetectingView.h \ No newline at end of file diff --git a/Pods/Headers/Public/IDMPhotoBrowser/IDMZoomingScrollView.h b/Pods/Headers/Public/IDMPhotoBrowser/IDMZoomingScrollView.h new file mode 120000 index 0000000..418bc6f --- /dev/null +++ b/Pods/Headers/Public/IDMPhotoBrowser/IDMZoomingScrollView.h @@ -0,0 +1 @@ +../../../IDMPhotoBrowser/Classes/IDMZoomingScrollView.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h b/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h new file mode 120000 index 0000000..8457498 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/NSData+ImageContentType.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDImageCache.h b/Pods/Headers/Public/SDWebImage/SDImageCache.h new file mode 120000 index 0000000..0040b06 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDImageCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDImageCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h b/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h new file mode 120000 index 0000000..6ca2478 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageCompat.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h b/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h new file mode 120000 index 0000000..a2f3a68 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDecoder.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h b/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h new file mode 120000 index 0000000..303b03b --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloader.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h b/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h new file mode 120000 index 0000000..99441c4 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageManager.h b/Pods/Headers/Public/SDWebImage/SDWebImageManager.h new file mode 120000 index 0000000..1b81848 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageManager.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageManager.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h b/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h new file mode 120000 index 0000000..20e5b89 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImageOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h b/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h new file mode 120000 index 0000000..50585c6 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h b/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h new file mode 120000 index 0000000..19d2d8e --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIButton+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImage+GIF.h b/Pods/Headers/Public/SDWebImage/UIImage+GIF.h new file mode 120000 index 0000000..14d5aad --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImage+GIF.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+GIF.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h b/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h new file mode 120000 index 0000000..1fb9650 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h b/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h new file mode 120000 index 0000000..fd4dea4 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h b/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h new file mode 120000 index 0000000..0c53a47 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIImageView+WebCache.h \ No newline at end of file diff --git a/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h b/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h new file mode 120000 index 0000000..f9890c4 --- /dev/null +++ b/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h @@ -0,0 +1 @@ +../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POP.h b/Pods/Headers/Public/pop/POP.h new file mode 120000 index 0000000..dd15660 --- /dev/null +++ b/Pods/Headers/Public/pop/POP.h @@ -0,0 +1 @@ +../../../pop/pop/POP.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPAnimatableProperty.h b/Pods/Headers/Public/pop/POPAnimatableProperty.h new file mode 120000 index 0000000..48fd8c4 --- /dev/null +++ b/Pods/Headers/Public/pop/POPAnimatableProperty.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimatableProperty.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPAnimation.h b/Pods/Headers/Public/pop/POPAnimation.h new file mode 120000 index 0000000..dfe8a85 --- /dev/null +++ b/Pods/Headers/Public/pop/POPAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPAnimationEvent.h b/Pods/Headers/Public/pop/POPAnimationEvent.h new file mode 120000 index 0000000..5d40492 --- /dev/null +++ b/Pods/Headers/Public/pop/POPAnimationEvent.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationEvent.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPAnimationExtras.h b/Pods/Headers/Public/pop/POPAnimationExtras.h new file mode 120000 index 0000000..3a1bc7e --- /dev/null +++ b/Pods/Headers/Public/pop/POPAnimationExtras.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationExtras.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPAnimationTracer.h b/Pods/Headers/Public/pop/POPAnimationTracer.h new file mode 120000 index 0000000..64fff66 --- /dev/null +++ b/Pods/Headers/Public/pop/POPAnimationTracer.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimationTracer.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPAnimator.h b/Pods/Headers/Public/pop/POPAnimator.h new file mode 120000 index 0000000..89707ea --- /dev/null +++ b/Pods/Headers/Public/pop/POPAnimator.h @@ -0,0 +1 @@ +../../../pop/pop/POPAnimator.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPBasicAnimation.h b/Pods/Headers/Public/pop/POPBasicAnimation.h new file mode 120000 index 0000000..50184f2 --- /dev/null +++ b/Pods/Headers/Public/pop/POPBasicAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPBasicAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPCustomAnimation.h b/Pods/Headers/Public/pop/POPCustomAnimation.h new file mode 120000 index 0000000..5025bd6 --- /dev/null +++ b/Pods/Headers/Public/pop/POPCustomAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPCustomAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPDecayAnimation.h b/Pods/Headers/Public/pop/POPDecayAnimation.h new file mode 120000 index 0000000..dba2796 --- /dev/null +++ b/Pods/Headers/Public/pop/POPDecayAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPDecayAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPDefines.h b/Pods/Headers/Public/pop/POPDefines.h new file mode 120000 index 0000000..4b10036 --- /dev/null +++ b/Pods/Headers/Public/pop/POPDefines.h @@ -0,0 +1 @@ +../../../pop/pop/POPDefines.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPGeometry.h b/Pods/Headers/Public/pop/POPGeometry.h new file mode 120000 index 0000000..9b29189 --- /dev/null +++ b/Pods/Headers/Public/pop/POPGeometry.h @@ -0,0 +1 @@ +../../../pop/pop/POPGeometry.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPLayerExtras.h b/Pods/Headers/Public/pop/POPLayerExtras.h new file mode 120000 index 0000000..e11f4c6 --- /dev/null +++ b/Pods/Headers/Public/pop/POPLayerExtras.h @@ -0,0 +1 @@ +../../../pop/pop/POPLayerExtras.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPPropertyAnimation.h b/Pods/Headers/Public/pop/POPPropertyAnimation.h new file mode 120000 index 0000000..0fae4c5 --- /dev/null +++ b/Pods/Headers/Public/pop/POPPropertyAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPPropertyAnimation.h \ No newline at end of file diff --git a/Pods/Headers/Public/pop/POPSpringAnimation.h b/Pods/Headers/Public/pop/POPSpringAnimation.h new file mode 120000 index 0000000..152f663 --- /dev/null +++ b/Pods/Headers/Public/pop/POPSpringAnimation.h @@ -0,0 +1 @@ +../../../pop/pop/POPSpringAnimation.h \ No newline at end of file diff --git a/Pods/IDMPhotoBrowser/Classes/IDMCaptionView.h b/Pods/IDMPhotoBrowser/Classes/IDMCaptionView.h new file mode 100644 index 0000000..a4bf299 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMCaptionView.h @@ -0,0 +1,33 @@ +// +// IDMCaptionView.h +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 30/12/2011. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import "IDMPhotoProtocol.h" + +@interface IDMCaptionView : UIView + +// Init +- (id)initWithPhoto:(id)photo; + +// To create your own custom caption view, subclass this view +// and override the following two methods (as well as any other +// UIView methods that you see fit): + +// Override -setupCaption so setup your subviews and customise the appearance +// of your custom caption +// You can access the photo's data by accessing the _photo ivar +// If you need more data per photo then simply subclass IDMPhoto and return your +// subclass to the photo browsers -photoBrowser:photoAtIndex: delegate method +- (void)setupCaption; + +// Override -sizeThatFits: and return a CGSize specifying the height of your +// custom caption view. With width property is ignored and the caption is displayed +// the full width of the screen +- (CGSize)sizeThatFits:(CGSize)size; + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMCaptionView.m b/Pods/IDMPhotoBrowser/Classes/IDMCaptionView.m new file mode 100644 index 0000000..7bd3a49 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMCaptionView.m @@ -0,0 +1,103 @@ +// +// IDMCaptionView.m +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 30/12/2011. +// Copyright (c) 2011 __MyCompanyName__. All rights reserved. +// + +#import "IDMCaptionView.h" +#import "IDMPhoto.h" +#import + +static const CGFloat labelPadding = 10; + +// Private +@interface IDMCaptionView () { + id _photo; + UILabel *_label; +} +@end + +@implementation IDMCaptionView + +- (id)initWithPhoto:(id)photo { + CGRect screenBound = [[UIScreen mainScreen] bounds]; + CGFloat screenWidth = screenBound.size.width; + + if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft || + [[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeRight) { + screenWidth = screenBound.size.height; + } + + self = [super initWithFrame:CGRectMake(0, 0, screenWidth, 44)]; // Random initial frame + if (self) { + _photo = photo; + self.opaque = NO; + + [self setBackground]; + + [self setupCaption]; + } + + return self; +} + +- (CGSize)sizeThatFits:(CGSize)size { + if (_label.text.length == 0) return CGSizeZero; + + CGFloat maxHeight = 9999; + if (_label.numberOfLines > 0) maxHeight = _label.font.leading*_label.numberOfLines; + + /*CGSize textSizeOLD = [_label.text sizeWithFont:_label.font + constrainedToSize:CGSizeMake(size.width - labelPadding*2, maxHeight) + lineBreakMode:_label.lineBreakMode];*/ + + NSString *text = _label.text; + CGFloat width = size.width - labelPadding*2; + UIFont *font = _label.font; + + NSAttributedString *attributedText = [[NSAttributedString alloc] initWithString:text + attributes:@{NSFontAttributeName: font}]; + + CGRect rect = [attributedText boundingRectWithSize:(CGSize){width, maxHeight} + options:NSStringDrawingUsesLineFragmentOrigin + context:nil]; + + CGSize textSize = rect.size; + + return CGSizeMake(size.width, textSize.height + labelPadding * 2); +} + +- (void)setupCaption { + _label = [[UILabel alloc] initWithFrame:CGRectMake(labelPadding, 0, + self.bounds.size.width-labelPadding*2, + self.bounds.size.height)]; + _label.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; + _label.opaque = NO; + _label.backgroundColor = [UIColor clearColor]; + _label.textAlignment = NSTextAlignmentCenter; + _label.lineBreakMode = NSLineBreakByWordWrapping; + _label.numberOfLines = 3; + _label.textColor = [UIColor whiteColor]; + _label.shadowColor = [UIColor colorWithWhite:0 alpha:0.5]; + _label.shadowOffset = CGSizeMake(0, 1); + _label.font = [UIFont systemFontOfSize:17]; + if ([_photo respondsToSelector:@selector(caption)]) { + _label.text = [_photo caption] ? [_photo caption] : @" "; + } + + [self addSubview:_label]; +} + +- (void)setBackground { + UIView *fadeView = [[UIView alloc] initWithFrame:CGRectMake(0, -100, 10000, 130+100)]; // Static width, autoresizingMask is not working + CAGradientLayer *gradient = [CAGradientLayer layer]; + gradient.frame = fadeView.bounds; + gradient.colors = [NSArray arrayWithObjects:(id)[[UIColor colorWithWhite:0 alpha:0.0] CGColor], (id)[[UIColor colorWithWhite:0 alpha:0.8] CGColor], nil]; + [fadeView.layer insertSublayer:gradient atIndex:0]; + fadeView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; //UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin; + [self addSubview:fadeView]; +} + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPBConstants.h b/Pods/IDMPhotoBrowser/Classes/IDMPBConstants.h new file mode 100644 index 0000000..df3b37a --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMPBConstants.h @@ -0,0 +1,28 @@ +// +// IDMPhotoBrowserConstants.h +// PhotoBrowserDemo +// +// Created by Eduardo Callado on 10/7/13. +// +// + +#define PADDING 10 +#define PAGE_INDEX_TAG_OFFSET 1000 +#define PAGE_INDEX(page) ([(page) tag] - PAGE_INDEX_TAG_OFFSET) + +// Debug Logging +#if 0 // Set to 1 to enable debug logging + #define IDMLog(x, ...) NSLog(x, ## __VA_ARGS__); +#else + #define IDMLog(x, ...) +#endif + +// +// System Versioning Preprocessor Macros +// + +#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) +#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) +#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) +#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) +#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/de.lproj/Localizable.strings b/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/de.lproj/Localizable.strings new file mode 100755 index 0000000..acb99de --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/de.lproj/Localizable.strings @@ -0,0 +1,45 @@ +/* No comment provided by engineer. */ +"Cancel" = "Abbrechen"; + +/* Informing the user an item has finished copying */ +"Copied" = "Kopiert"; + +/* No comment provided by engineer. */ +"Copy" = "Kopieren"; + +/* Displayed with ellipsis as 'Copying...' when an item is in the process of being copied */ +"Copying" = "Kopiere"; + +/* No comment provided by engineer. */ +"Dismiss" = "Schließen"; + +/* No comment provided by engineer. */ +"Done" = "Fertig"; + +/* No comment provided by engineer. */ +"Email" = "Email"; + +/* No comment provided by engineer. */ +"Email failed to send. Please try again." = "Senden fehlgeschlagen. Bitte erneut versuchen."; + +/* Informing the user a process has failed */ +"Failed" = "Fehlgeschlagen"; + +/* Used in the context: 'Showing 1 of 3 items' */ +"of" = "von"; + +/* No comment provided by engineer. */ +"Photo" = "Foto"; + +/* Displayed with ellipsis as 'Preparing...' when an item is in the process of being prepared */ +"Preparing" = "Vorbereiten"; + +/* No comment provided by engineer. */ +"Save" = "Sichern"; + +/* Informing the user an item has been saved */ +"Saved" = "Gesichert"; + +/* Displayed with ellipsis as 'Saving...' when an item is in the process of being saved */ +"Saving" = "Sichere"; + diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/en.lproj/Localizable.strings b/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/en.lproj/Localizable.strings new file mode 100755 index 0000000000000000000000000000000000000000..b4c8a2185fe1d3e1fc96ac3da2490852412b43be GIT binary patch literal 2344 zcmcImO;5r=6ntlX#l{N>2Z-^e@uZk=F(kwvP-%fC&=Oif{=7P~&&|GqCWN#hmUecx zGjHApet(T*AWmMT#C4AA2A@m{sqws(9gw}`k^)PCyvq?+t}lTWxXZ9-2y7rD>B)^e zNdkNhe2ph3kN7)9AF#8B{bZhC_W~?C@bZmIV707p-pPkl{{7Cs(_y{F^9Cy`AQiqB z{!EU0o}fa;u!YL-uBeN6?sr*T7PY$CbVL=MvL4}!WqgLZ3L4jl?f4tb0T|t&=WBd& ztXF;?J)r}AIBp{zA{#@XP7dCa0(Z=ab&ouJCK|lfTr+Q#UoGJ+^PTy9%!)dz4%&QM z_VXAu56wv1^Hx1$)SiR$ zoCv9(15;?rd~LFWYxFfIMuNWPxdMA)mZI`@-fN?ufa{XE5~f_N{5V@|q+yP{nD}EP zP1Ndm^X_mmHT#X-#3`G}C$9Hc@5>AwTcU5ZXPn#u)jquQ=XLs3zPp1Su16jEWck~x z_NiCLj7L6;S=MW3*%bAXVa6r+Ru{UPXPkI}ORG6}dalAo98amju4dZ|F6^N&a!15^ yJ-M*bo4)~}$~ocLz3gJ;W32`!0%Q7z3Sw5rwK-RguCx7rbRmo3e-*1IMEC=Eq$IUb3p5&|UOlH<{ zz!)t;D^1T&RaZ~-{{D4lr&if#Tl1XqT=AJ(V;jbI))Lv-!e+!~M84SrPtD&DZTL55 z&4}2ko!OBc+Xt(OPl+!XRra25KU%Zn*xs@Fh&@8TWXCl~E!aBshShG#~n=5S(%&S3tv@oi)hW>^&@77)Fn7Qh5J~KF&sOX zF3IrWZ%+5bq>0pD@>ww7`8p{h9Zt}`%zH##Mno&ScV!y>sWzpC!qHgKqOC|R=z}kD$iz6g+n#nAo0%lW6xwt?kzd)-@e1uc#Qt?M8^K)Y&HYl zt8=_igHpP!jFmn+T&5X8{tNu@o^q|wUp->xonZpEIcpTtEo;4p)VN&x8rEdJ&Y4xu zX<1pbFM5qSkm{zs+#5{Xox}vHDcSXv^=;nXK#w$imeLnipQFiq3dW_euRQ zJ0o|XQi0TMEr;mTQ8#8fs;e_;7xPafjH(uKPCTKXPE2_?+ z!EhZ=Ju+d%y-$knv&j0EbLzxHzHhG3VdwQsYJcReg$MNP*ZH{~=)XPE{nxue9+d9` jRW~*%l9-e(D7oyb@X{L)NJH2D|2YP7u6LPbzuJEQ&c=l~ literal 0 HcmV?d00001 diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/fr.lproj/Localizable.strings b/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/fr.lproj/Localizable.strings new file mode 100755 index 0000000000000000000000000000000000000000..1ed678ed48276c3ec0969a92ad9067836f76fd28 GIT binary patch literal 2416 zcmchZ-D=xF5QXPDPa%902(3fuT}v-YejreaA@l*%ScwIW94y&s`i6ar-ufllerLAJ zt}I$YP=c|%Iy{p;9{tgz3v;(EpPmQQ7kb==?C8f0s=&B5j%U+sab_HRHN zRuwi=up>LR1Dn{1mEc$4OYRE$z;|LF!5Z6u$$nz*u|42~d|$A0jh{81^~@Wv&K6h} zoM`<-;ZH5t@3_BZX93dkd+ldx);b}MisBBQ@mYzP@Y<~svlF+jZMVm2Ohp2pq0gZf zr|@fGxg@%Wzwz9INe}71s*6P%F`!m zRVTMRrN&Crrr^BL7-wNW!FE*O0;>%>YkLK3L zapD9_9g(I^9(|lJ=N_AQ%(LizIOmFMpT!r~OB1W#h3Xg0-^#vmeaHTxU3%1-1YthD z0S(>x*3XBj*m}=LHrh`bx2Uu~dB>}ane$T>B#$|k*W*)X+zkE|v#;bg=0(Gi- nJ$P6BMr|Uay!wZn_TRKmt%u<4xhvt{aR$%-S3mxjiZ$>Di!Fyp literal 0 HcmV?d00001 diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/pt.lproj/Localizable.strings b/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/pt.lproj/Localizable.strings new file mode 100755 index 0000000..9f5d7f9 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/pt.lproj/Localizable.strings @@ -0,0 +1,45 @@ +/* No comment provided by engineer. */ +"Cancel" = "Cancelar"; + +/* Informing the user an item has finished copying */ +"Copied" = "Copiado"; + +/* No comment provided by engineer. */ +"Copy" = "Copiar"; + +/* Displayed with ellipsis as 'Copying...' when an item is in the process of being copied */ +"Copying" = "Copiando"; + +/* No comment provided by engineer. */ +"Dismiss" = "Fechar"; + +/* No comment provided by engineer. */ +"Done" = "Fechar"; + +/* No comment provided by engineer. */ +"Email" = "Email"; + +/* No comment provided by engineer. */ +"Email failed to send. Please try again." = "Email falhou ao enviar. Por favor, tente novamente."; + +/* Informing the user a process has failed */ +"Failed" = "Falhou"; + +/* Used in the context: 'Showing 1 of 3 items' */ +"of" = "de"; + +/* No comment provided by engineer. */ +"Photo" = "Foto"; + +/* Displayed with ellipsis as 'Preparing...' when an item is in the process of being prepared */ +"Preparing" = "Preparando"; + +/* No comment provided by engineer. */ +"Save" = "Salvar"; + +/* Informing the user an item has been saved */ +"Saved" = "Salvada"; + +/* Displayed with ellipsis as 'Saving...' when an item is in the process of being saved */ +"Saving" = "Salvando"; + diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/ru.lproj/Localizable.strings b/Pods/IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle/ru.lproj/Localizable.strings new file mode 100755 index 0000000000000000000000000000000000000000..ec2c44a800f5876487bf3488ce776fd40b28cd2c GIT binary patch literal 2434 zcmcJQUr!TJ5XI-=KJn^J8sW?bshK3m8{9yHFn7N5$jL!bA@M} zd4_Fb=bVt(FU!1##GjflKjHg=nR6@|?^C~Lz*swkQBhoiGe0XLlYQVSFb2Vb5ToqZBAAQT3=O9#pGMf3>F`TOsQol~w3XBJ4i$9KckSH^hY zPL(C}5ydN4CF7L^^|-ujAHcsf61_el_KvT!)z#P``sfjFQGZ2SQG3gaHF}UHga4q% z2`nUVuddPey`l@Y)K{rAK0*2FDm|31eIwRH#-39fiM8RZ>Gs`cblPP6kuH*$xNQ3@ z*04)AiA5ahN-tUajx1~M2X=KBzrn8aYCaQterMguXOWpBa6F_de8wG=DEZCh8?5pG3wSz>9Wcl)Vl5Whu)d_ z9+2bFe8kak@9+3uUWIf$I#omT_nJIN53}4qw%>KBq?A6`;~h9yUC&cj%zcGA&l#OZ z5#v=ozIEHvsA~)Iy*$2;;o%yL(fc}n54~PmQ@zac{?MAA{b%I$u0Mh_F0BX8s@j~D g98LcoJoN?t-N)8J@U`j+xIfC^c`@&bv-rRJ2f%eLP#ZLTO8k|3m4*av}|>!d8W4 zPkMNAy$)*|Um<+5uuVu#MkFnZQh|LR_9p%US-_o^r{Z}lE%Wdgfgcgq;8nxvUEuMg zI&85VU|%4|5~*_obyk4&82>G-9KaIcT~m7+_~s5WBlknFGiO;ov^SKO<?n<_yD3JM1yGrtURC{F0IN_{Av-ii-*OUE z(6`*zhL6n%IX@JKuBS`mSE;Gji~F0$i`0}K#TxefrvJ?pvbAbwfXmqQ`-&5XWke=E z{+5c4lf&-});*_RC}()iVLc;7^i~HQMo;#}G;ZB7Gitw{PLb+E!-MM +#import "IDMPhotoProtocol.h" +#import + +// This class models a photo/image and it's caption +// If you want to handle photos, caching, decompression +// yourself then you can simply ensure your custom data model +// conforms to IDMPhotoProtocol +@interface IDMPhoto : NSObject + +// Progress download block, used to update the circularView +typedef void (^IDMProgressUpdateBlock)(CGFloat progress); + +// Properties +@property (nonatomic, strong) NSString *caption; +@property (nonatomic, strong) NSURL *photoURL; +@property (nonatomic, strong) IDMProgressUpdateBlock progressUpdateBlock; +@property (nonatomic, strong) UIImage *placeholderImage; + +// Class ++ (IDMPhoto *)photoWithImage:(UIImage *)image; ++ (IDMPhoto *)photoWithFilePath:(NSString *)path; ++ (IDMPhoto *)photoWithURL:(NSURL *)url; + ++ (NSArray *)photosWithImages:(NSArray *)imagesArray; ++ (NSArray *)photosWithFilePaths:(NSArray *)pathsArray; ++ (NSArray *)photosWithURLs:(NSArray *)urlsArray; + +// Init +- (id)initWithImage:(UIImage *)image; +- (id)initWithFilePath:(NSString *)path; +- (id)initWithURL:(NSURL *)url; + +@end + diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPhoto.m b/Pods/IDMPhotoBrowser/Classes/IDMPhoto.m new file mode 100644 index 0000000..29481a4 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMPhoto.m @@ -0,0 +1,288 @@ +// +// IDMPhoto.m +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 17/10/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import "IDMPhoto.h" +#import "IDMPhotoBrowser.h" + +// Private +@interface IDMPhoto () { + // Image Sources + NSString *_photoPath; + + // Image + UIImage *_underlyingImage; + + // Other + NSString *_caption; + BOOL _loadingInProgress; +} + +// Properties +@property (nonatomic, strong) UIImage *underlyingImage; + +// Methods +- (void)imageLoadingComplete; + +@end + +// IDMPhoto +@implementation IDMPhoto + +// Properties +@synthesize underlyingImage = _underlyingImage, +photoURL = _photoURL, +caption = _caption; + +#pragma mark Class Methods + ++ (IDMPhoto *)photoWithImage:(UIImage *)image { + return [[IDMPhoto alloc] initWithImage:image]; +} + ++ (IDMPhoto *)photoWithFilePath:(NSString *)path { + return [[IDMPhoto alloc] initWithFilePath:path]; +} + ++ (IDMPhoto *)photoWithURL:(NSURL *)url { + return [[IDMPhoto alloc] initWithURL:url]; +} + ++ (NSArray *)photosWithImages:(NSArray *)imagesArray { + NSMutableArray *photos = [NSMutableArray arrayWithCapacity:imagesArray.count]; + + for (UIImage *image in imagesArray) { + if ([image isKindOfClass:[UIImage class]]) { + IDMPhoto *photo = [IDMPhoto photoWithImage:image]; + [photos addObject:photo]; + } + } + + return photos; +} + ++ (NSArray *)photosWithFilePaths:(NSArray *)pathsArray { + NSMutableArray *photos = [NSMutableArray arrayWithCapacity:pathsArray.count]; + + for (NSString *path in pathsArray) { + if ([path isKindOfClass:[NSString class]]) { + IDMPhoto *photo = [IDMPhoto photoWithFilePath:path]; + [photos addObject:photo]; + } + } + + return photos; +} + ++ (NSArray *)photosWithURLs:(NSArray *)urlsArray { + NSMutableArray *photos = [NSMutableArray arrayWithCapacity:urlsArray.count]; + + for (id url in urlsArray) { + if ([url isKindOfClass:[NSURL class]]) { + IDMPhoto *photo = [IDMPhoto photoWithURL:url]; + [photos addObject:photo]; + } + else if ([url isKindOfClass:[NSString class]]) { + IDMPhoto *photo = [IDMPhoto photoWithURL:[NSURL URLWithString:url]]; + [photos addObject:photo]; + } + } + + return photos; +} + +#pragma mark NSObject + +- (id)initWithImage:(UIImage *)image { + if ((self = [super init])) { + self.underlyingImage = image; + } + return self; +} + +- (id)initWithFilePath:(NSString *)path { + if ((self = [super init])) { + _photoPath = [path copy]; + } + return self; +} + +- (id)initWithURL:(NSURL *)url { + if ((self = [super init])) { + _photoURL = [url copy]; + } + return self; +} + +#pragma mark IDMPhoto Protocol Methods + +- (UIImage *)underlyingImage { + return _underlyingImage; +} + +- (void)loadUnderlyingImageAndNotify { + NSAssert([[NSThread currentThread] isMainThread], @"This method must be called on the main thread."); + _loadingInProgress = YES; + if (self.underlyingImage) { + // Image already loaded + [self imageLoadingComplete]; + } else { + if (_photoPath) { + // Load async from file + [self performSelectorInBackground:@selector(loadImageFromFileAsync) withObject:nil]; + } else if (_photoURL) { + // Load async from web (using SDWebImageManager) + SDWebImageManager *manager = [SDWebImageManager sharedManager]; + [manager downloadImageWithURL:_photoURL options:SDWebImageRetryFailed progress:^(NSInteger receivedSize, NSInteger expectedSize) { + CGFloat progress = ((CGFloat)receivedSize)/((CGFloat)expectedSize); + if (self.progressUpdateBlock) { + self.progressUpdateBlock(progress); + } + } completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (image) { + self.underlyingImage = image; + [self performSelectorOnMainThread:@selector(imageLoadingComplete) withObject:nil waitUntilDone:NO]; + } + }]; + + } else { + // Failed - no source + self.underlyingImage = nil; + [self imageLoadingComplete]; + } + } +} + +// Release if we can get it again from path or url +- (void)unloadUnderlyingImage { + _loadingInProgress = NO; + + if (self.underlyingImage && (_photoPath || _photoURL)) { + self.underlyingImage = nil; + } +} + +#pragma mark - Async Loading + +/*- (UIImage *)decodedImageWithImage:(UIImage *)image { + CGImageRef imageRef = image.CGImage; + // System only supports RGB, set explicitly and prevent context error + // if the downloaded image is not the supported format + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + + CGContextRef context = CGBitmapContextCreate(NULL, + CGImageGetWidth(imageRef), + CGImageGetHeight(imageRef), + 8, + // width * 4 will be enough because are in ARGB format, don't read from the image + CGImageGetWidth(imageRef) * 4, + colorSpace, + // kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little + // makes system don't need to do extra conversion when displayed. + kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little); + CGColorSpaceRelease(colorSpace); + + if ( ! context) { + return nil; + } + + CGRect rect = (CGRect){CGPointZero, CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)}; + CGContextDrawImage(context, rect, imageRef); + CGImageRef decompressedImageRef = CGBitmapContextCreateImage(context); + CGContextRelease(context); + + UIImage *decompressedImage = [[UIImage alloc] initWithCGImage:decompressedImageRef]; + CGImageRelease(decompressedImageRef); + return decompressedImage; +}*/ + +- (UIImage *)decodedImageWithImage:(UIImage *)image { + if (image.images) + { + // Do not decode animated images + return image; + } + + CGImageRef imageRef = image.CGImage; + CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)); + CGRect imageRect = (CGRect){.origin = CGPointZero, .size = imageSize}; + + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef); + + int infoMask = (bitmapInfo & kCGBitmapAlphaInfoMask); + BOOL anyNonAlpha = (infoMask == kCGImageAlphaNone || + infoMask == kCGImageAlphaNoneSkipFirst || + infoMask == kCGImageAlphaNoneSkipLast); + + // CGBitmapContextCreate doesn't support kCGImageAlphaNone with RGB. + // https://developer.apple.com/library/mac/#qa/qa1037/_index.html + if (infoMask == kCGImageAlphaNone && CGColorSpaceGetNumberOfComponents(colorSpace) > 1) + { + // Unset the old alpha info. + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + + // Set noneSkipFirst. + bitmapInfo |= kCGImageAlphaNoneSkipFirst; + } + // Some PNGs tell us they have alpha but only 3 components. Odd. + else if (!anyNonAlpha && CGColorSpaceGetNumberOfComponents(colorSpace) == 3) + { + // Unset the old alpha info. + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaPremultipliedFirst; + } + + // It calculates the bytes-per-row based on the bitsPerComponent and width arguments. + CGContextRef context = CGBitmapContextCreate(NULL, + imageSize.width, + imageSize.height, + CGImageGetBitsPerComponent(imageRef), + 0, + colorSpace, + bitmapInfo); + CGColorSpaceRelease(colorSpace); + + // If failed, return undecompressed image + if (!context) return image; + + CGContextDrawImage(context, imageRect, imageRef); + CGImageRef decompressedImageRef = CGBitmapContextCreateImage(context); + + CGContextRelease(context); + + UIImage *decompressedImage = [UIImage imageWithCGImage:decompressedImageRef scale:image.scale orientation:image.imageOrientation]; + CGImageRelease(decompressedImageRef); + return decompressedImage; +} + +// Called in background +// Load image in background from local file +- (void)loadImageFromFileAsync { + @autoreleasepool { + @try { + self.underlyingImage = [UIImage imageWithContentsOfFile:_photoPath]; + if (!_underlyingImage) { + //IDMLog(@"Error loading photo from path: %@", _photoPath); + } + } @finally { + self.underlyingImage = [self decodedImageWithImage: self.underlyingImage]; + [self performSelectorOnMainThread:@selector(imageLoadingComplete) withObject:nil waitUntilDone:NO]; + } + } +} + +// Called on main +- (void)imageLoadingComplete { + NSAssert([[NSThread currentThread] isMainThread], @"This method must be called on the main thread."); + // Complete so notify + _loadingInProgress = NO; + [[NSNotificationCenter defaultCenter] postNotificationName:IDMPhoto_LOADING_DID_END_NOTIFICATION + object:self]; +} + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowLeft.png b/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..412d996c9bdbc4851b8a393b6b8e84bb8a34c222 GIT binary patch literal 1135 zcmbVMPiWIn7>~|P9XjPgTsCxSN-FA55J=s_=@JWRdFwu=Xq9Rx+OzI5&MFgzHNyg&JVzwh^b@B1>- z*L!Sx>%LZoVYa7xlq?`Yl!N-GdUM*;h$iW5*HO?}mMMXWhziQ)sO8G#C|l!|>D=4qSWq(|BT;r$R6f%O z64*f?!Z_x*Xa!8bgFsNTF_2%e9a#l&zebH5vEfQkO z99Jrp{H1^&JHs55B+26t1Ru5Vxsw)A%Rb9(Z!jpx)f~en2DX65s21=ziLzAbY6zyC z$*d7uZaq;nWn5XcIq2s()AZu1S-T{Q{>WI@+RaVch|3}uk2@MYkD>MknC9-^jyyxE zMn2&f^ib4M1#9CbvPfEqvh<5zH*}c~L}(VnK|U<-Vg$kn9|=U_VHoE_3QPp}2FJSC zNIVn}QZX12;t(c1oG2+!QDUJO9pepb+H#3%X{h1X@cgb~rGH}Ogo9LqogBuajSA>1 zVuIZwwn3s_1RWVwGc0f8uy;VK@hZqMCXk+TunB4zmW_24Bw{I%%9iSp3qnkagu=m8 zQsm=&n5|>=|H&Fh#c*DE{8cWEEn0)#bglU5Vy%6UMSI4f&GGiughCr@Hm$^R<#&aj z)oNFhbbe-A^i=n=*$sO8_57ww_cyL!@ax2tt4F$TH&-5C_~zT`PA9i6EN-X_%!?nv z%+i}X&6W4_3p*}%4xU^70QY=8cC*U@-?i4kxuuoOO;EhicIVJTW^DJ)=Piq3$6Uw$ zDzg#19KW=6XuC17vsfqF!xh^AGL?|f?bkKL_}ph zhd@%5#!&`I^7LERQ6E9H7M1L%J(@bg=XKR1IXa%QYG5=$^hL^sl%GI0$f0pX3zPT1 z{+0xa941HnDJEsaP*EAEm}s~%n9Wxv@*$aw90Gl19uug@mOxpZ)GWRnCO3F_Ja@Kf z5^Sj06Jc`GsnJv##B>t@zsF1E83+N#d7#hFanKD|2C_7RUyg!4-p}!D05l#FTQlVX zpAi!cTX+>Fi?(g>G+io{JSDG3H^*rh3WXdFmZh);Wld|gRHihmr^z59D{m@>t>_wX z7^R#(Wrs=Z>1GJ3kxFe5YgQvsIAwHMGHB>wXjOIM+R(P_4EooNZMCiJw1Mahvh*o4 zkLywBX@YU?9&gA|#NO~jrhDf%QQK*!$KAciCEkZgRB5y+`(}n5sG5eAH`B=Vw0L>OIjW^?JC%A1M7P% zmXDc8vUM}7>yyn6NEdZmw~D#}V#6Fbn3D2}=4|vj1=@^PM5gjKk`tz`f{hIG%61-b zi6Fy@g4frGoMoe-pg-VC#5qP_0%QX#|DUYU*csYskN>nwa|`#NGu>)_yx6)vNW*u= z#Fyiid&dU^;o6%NquKILxwZB6NNd>D**fbAQ!6d?KX=Z7i?GX8U+7=^J93uFx#|Kq zxxW9Y+c((V;F~k@t;*P|Up!I!dB)8XwP-qYX{`FpP`|OedijTy^pcS7`|bSFT{rms z`}t3E9g9mJ@7woKK3=6h6RNilUp-Z;bslxMEe(5S9*B#lE-ZKc*p>V6bEdts`&dWs z*#q+wKI5LPpFY^J&^^>f)sF4IO27j*-;7@XH(Tnf1BYf~mqC2FrT>@KT11&GR zT)X!4$nw3NwSqHQyYpo+cJAJ5l|8?%oO%7y$aiy({PP#FCHm;zSLPng4xCHu>3#6> z>id5c#*SBCI=O!Lytn7w6ARuui?Q}Ut~_jMdycqq;>C|vKOycrKcHlMP`o0%@!mgN Cl%|pZ literal 0 HcmV?d00001 diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRight.png b/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRight.png new file mode 100644 index 0000000000000000000000000000000000000000..4f9fe7766ec523d9c43d4a72ea01ca6de0ae400a GIT binary patch literal 1115 zcmbVLO-$2Z7%qZJ2oQ`hL8I|YIiS(?Z)?|8=GfLvMi`K>#2GJ?_G4>Ce`r74AjXJr z5FyS4xAFiFCs87YMyzpEQXEJ`HERrll%eEd1}fV0oEX*o%N;SdM1!EBM%e#0wG^1ht36-W+XQ%E-x@FT4tq1%zygrc0#~ zRq|7olc(8GDCBW)oDW<0+-VajWuNJG)fr^ys*Y|W-7%ILCU(=5f%hT+AvYwe;8{3~N$Yd1S>LplRpYsyjaeT;Y2!8msZJMs*%8fnPU z@uesevZYQL&_pRYOyUzt(>00li#UtH02AaGL1bBx5&dE;$i^66X5)UQ&ap36jPZUh znP5dO#;~^$Hj+Sjch< zmJQ+~0yvjeRNeG8&U+VBjaP<_egkSr$1=cfh9!Mp1@UN7z_LTN$T=<=68T^tnGl#5 z6C`U`?SHaHV==T>9{-d}eGAv1H{C0Kyx40WXyTr6aC4k}`819jYat~^v*pdPok}Ir zc#U{Gd8wl~+X@cPHFx}MTOXOt&1V-c_I_?!-<}nZzVGhu8X&f|HhOQKxEt>K*!Z&DI~0zTK!Uc09fgYuKu=$$_pe`4DJ literal 0 HcmV?d00001 diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRight@2x.png b/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRight@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d45324b10b658417a542e34373fb50f6f7751942 GIT binary patch literal 1253 zcmeAS@N?(olHy`uVBq!ia0vp^GC-`v!3HFKYIk}9DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_cg49ppsArU1JzCKpT`MG+DAT@dwxdlMo3=B5*6$OdO*{LN8 zNvY|XdA3ULckfqH$V{%1*XSQL?vFu&J;D8jzb> zlBiITo0C^;Rbi_HHrEQs1_|pcDS(xfWZNo192Makpx~Tel&WB=XRMoSU}&gdW~OIo zVrph)sH0$HU}&Uo07PcGh9*{~W>!Y#3Q(W~w5=#5%__*n4QdyVXRDM^Qc_^0uU}qX zu2*iXmtT~wZ)j<02{OaTNEfI=x41H|B(Xv_uUHvof=g;~a#3bMNoIbY0?5R~r2Ntn zTP2`NAzsKW@b!fooL3ADC}5E3S0onb8|oS8=jMX^1y)^L5|oN?23FO@A(aKG`a!A1 z`K3k4!1zd0hG_4vsO)9&zsf(x#Dnw{I%?QK~t zE>I%Y{)3(K$gOKjYTvWkX~_O^+_%KjTT|4duS~&aivjDz8G*IOxMdvT{SDRKGLA8? zanw+>i9RoG@KEg4bIlWL$~8MITHAPc6n)VZ&f4{0#_Qc#x3+s_NCbT=6_iR7sjY2M zseR3H`j=kpuWO>$-rWw#n6dlYQX#AFOU1;#?rm;;d0KJJo70sHLazXwtPyTw> zTkQ4L^)pNKg~t&lg$K7u6y$UpdZ?Jy)xE4Qee|#Lf5{@DV?oC+pV%&ZRrK&q;iIZq z&o7^Jm++1g7Jk`n5UDP{@ZFZ>ufF(u+*{eToq?I5;%ixQjhp6OP{HHr>gTe~DWM4f D_f@IC literal 0 HcmV?d00001 diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.h b/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.h new file mode 100644 index 0000000..23c0e2a --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.h @@ -0,0 +1,86 @@ +// +// IDMPhotoBrowser.h +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 14/10/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import +#import + +#import "IDMPhoto.h" +#import "IDMPhotoProtocol.h" +#import "IDMCaptionView.h" + +// Delgate +@class IDMPhotoBrowser; +@protocol IDMPhotoBrowserDelegate +@optional +- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser didShowPhotoAtIndex:(NSUInteger)index; +- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser didDismissAtPageIndex:(NSUInteger)index; +- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser willDismissAtPageIndex:(NSUInteger)index; +- (void)photoBrowser:(IDMPhotoBrowser *)photoBrowser didDismissActionSheetWithButtonIndex:(NSUInteger)buttonIndex photoIndex:(NSUInteger)photoIndex; +- (IDMCaptionView *)photoBrowser:(IDMPhotoBrowser *)photoBrowser captionViewForPhotoAtIndex:(NSUInteger)index; +@end + +// IDMPhotoBrowser +@interface IDMPhotoBrowser : UIViewController + +// Properties +@property (nonatomic, strong) id delegate; + +// Toolbar customization +@property (nonatomic) BOOL displayToolbar; +@property (nonatomic) BOOL displayCounterLabel; +@property (nonatomic) BOOL displayArrowButton; +@property (nonatomic) BOOL displayActionButton; +@property (nonatomic, strong) NSArray *actionButtonTitles; +@property (nonatomic, weak) UIImage *leftArrowImage, *leftArrowSelectedImage; +@property (nonatomic, weak) UIImage *rightArrowImage, *rightArrowSelectedImage; + +// View customization +@property (nonatomic) BOOL displayDoneButton; +@property (nonatomic) BOOL useWhiteBackgroundColor; +@property (nonatomic, weak) UIImage *doneButtonImage; +@property (nonatomic, weak) UIColor *trackTintColor, *progressTintColor; + +@property (nonatomic, weak) UIImage *scaleImage; + +@property (nonatomic) BOOL arrowButtonsChangePhotosAnimated; + +@property (nonatomic) BOOL forceHideStatusBar; +@property (nonatomic) BOOL usePopAnimation; +@property (nonatomic) BOOL disableVerticalSwipe; + +// Default value: true. Set to false to tell the photo viewer not to hide the interface when scrolling +@property (nonatomic) BOOL autoHideInterface; + +// Defines zooming of the background (default 1.0) +@property (nonatomic) float backgroundScaleFactor; + +// Animation time (default .28) +@property (nonatomic) float animationDuration; + +// Init +- (id)initWithPhotos:(NSArray *)photosArray; + +// Init (animated) +- (id)initWithPhotos:(NSArray *)photosArray animatedFromView:(UIView*)view; + +// Init with NSURL objects +- (id)initWithPhotoURLs:(NSArray *)photoURLsArray; + +// Init with NSURL objects (animated) +- (id)initWithPhotoURLs:(NSArray *)photoURLsArray animatedFromView:(UIView*)view; + +// Reloads the photo browser and refetches data +- (void)reloadData; + +// Set page that photo browser starts on +- (void)setInitialPageIndex:(NSUInteger)index; + +// Get IDMPhoto at index +- (id)photoAtIndex:(NSUInteger)index; + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.m b/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.m new file mode 100644 index 0000000..bc1710e --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMPhotoBrowser.m @@ -0,0 +1,1361 @@ +// +// IDMPhotoBrowser.m +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 14/10/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import +#import "IDMPhotoBrowser.h" +#import "IDMZoomingScrollView.h" + +#import "pop/POP.h" + +#ifndef IDMPhotoBrowserLocalizedStrings +#define IDMPhotoBrowserLocalizedStrings(key) \ +NSLocalizedStringFromTableInBundle((key), nil, [NSBundle bundleWithPath:[[NSBundle bundleForClass: [IDMPhotoBrowser class]] pathForResource:@"IDMPBLocalizations" ofType:@"bundle"]], nil) +#endif + +// Private +@interface IDMPhotoBrowser () { + // Data + NSMutableArray *_photos; + + // Views + UIScrollView *_pagingScrollView; + + // Gesture + UIPanGestureRecognizer *_panGesture; + + // Paging + NSMutableSet *_visiblePages, *_recycledPages; + NSUInteger _pageIndexBeforeRotation; + NSUInteger _currentPageIndex; + + // Buttons + UIButton *_doneButton; + + // Toolbar + UIToolbar *_toolbar; + UIBarButtonItem *_previousButton, *_nextButton, *_actionButton; + UIBarButtonItem *_counterButton; + UILabel *_counterLabel; + + // Actions + UIActionSheet *_actionsSheet; + UIActivityViewController *activityViewController; + + // Control + NSTimer *_controlVisibilityTimer; + + // Appearance + //UIStatusBarStyle _previousStatusBarStyle; + BOOL _statusBarOriginallyHidden; + + // Present + UIView *_senderViewForAnimation; + + // Misc + BOOL _performingLayout; + BOOL _rotating; + BOOL _viewIsActive; // active as in it's in the view heirarchy + BOOL _autoHide; + NSInteger _initalPageIndex; + + BOOL _isdraggingPhoto; + + CGRect _senderViewOriginalFrame; + //UIImage *_backgroundScreenshot; + + UIWindow *_applicationWindow; + + // iOS 7 + UIViewController *_applicationTopViewController; + int _previousModalPresentationStyle; +} + +// Private Properties +@property (nonatomic, strong) UIActionSheet *actionsSheet; +@property (nonatomic, strong) UIActivityViewController *activityViewController; + +// Private Methods + +// Layout +- (void)performLayout; + +// Paging +- (void)tilePages; +- (BOOL)isDisplayingPageForIndex:(NSUInteger)index; +- (IDMZoomingScrollView *)pageDisplayedAtIndex:(NSUInteger)index; +- (IDMZoomingScrollView *)pageDisplayingPhoto:(id)photo; +- (IDMZoomingScrollView *)dequeueRecycledPage; +- (void)configurePage:(IDMZoomingScrollView *)page forIndex:(NSUInteger)index; +- (void)didStartViewingPageAtIndex:(NSUInteger)index; + +// Frames +- (CGRect)frameForPagingScrollView; +- (CGRect)frameForPageAtIndex:(NSUInteger)index; +- (CGSize)contentSizeForPagingScrollView; +- (CGPoint)contentOffsetForPageAtIndex:(NSUInteger)index; +- (CGRect)frameForToolbarAtOrientation:(UIInterfaceOrientation)orientation; +- (CGRect)frameForDoneButtonAtOrientation:(UIInterfaceOrientation)orientation; +- (CGRect)frameForCaptionView:(IDMCaptionView *)captionView atIndex:(NSUInteger)index; + +// Toolbar +- (void)updateToolbar; + +// Navigation +- (void)jumpToPageAtIndex:(NSUInteger)index; +- (void)gotoPreviousPage; +- (void)gotoNextPage; + +// Controls +- (void)cancelControlHiding; +- (void)hideControlsAfterDelay; +- (void)setControlsHidden:(BOOL)hidden animated:(BOOL)animated permanent:(BOOL)permanent; +- (void)toggleControls; +- (BOOL)areControlsHidden; + +// Data +- (NSUInteger)numberOfPhotos; +- (id)photoAtIndex:(NSUInteger)index; +- (UIImage *)imageForPhoto:(id)photo; +- (void)loadAdjacentPhotosIfNecessary:(id)photo; +- (void)releaseAllUnderlyingPhotos; + +@end + +// IDMPhotoBrowser +@implementation IDMPhotoBrowser + +// Properties +@synthesize displayDoneButton = _displayDoneButton, displayToolbar = _displayToolbar, displayActionButton = _displayActionButton, displayCounterLabel = _displayCounterLabel, useWhiteBackgroundColor = _useWhiteBackgroundColor, doneButtonImage = _doneButtonImage; +@synthesize leftArrowImage = _leftArrowImage, rightArrowImage = _rightArrowImage, leftArrowSelectedImage = _leftArrowSelectedImage, rightArrowSelectedImage = _rightArrowSelectedImage; +@synthesize displayArrowButton = _displayArrowButton, actionButtonTitles = _actionButtonTitles; +@synthesize arrowButtonsChangePhotosAnimated = _arrowButtonsChangePhotosAnimated; +@synthesize forceHideStatusBar = _forceHideStatusBar; +@synthesize usePopAnimation = _usePopAnimation; +@synthesize disableVerticalSwipe = _disableVerticalSwipe; +@synthesize actionsSheet = _actionsSheet, activityViewController = _activityViewController; +@synthesize trackTintColor = _trackTintColor, progressTintColor = _progressTintColor; +@synthesize delegate = _delegate; + +#pragma mark - NSObject + +- (id)init { + if ((self = [super init])) { + // Defaults + self.hidesBottomBarWhenPushed = YES; + _currentPageIndex = 0; + _performingLayout = NO; // Reset on view did appear + _rotating = NO; + _viewIsActive = NO; + _visiblePages = [NSMutableSet new]; + _recycledPages = [NSMutableSet new]; + _photos = [NSMutableArray new]; + + _initalPageIndex = 0; + _autoHide = YES; + _autoHideInterface = YES; + + _displayDoneButton = YES; + _doneButtonImage = nil; + + _displayToolbar = YES; + _displayActionButton = YES; + _displayArrowButton = YES; + _displayCounterLabel = NO; + + _forceHideStatusBar = NO; + _usePopAnimation = NO; + _disableVerticalSwipe = NO; + + _useWhiteBackgroundColor = NO; + _leftArrowImage = _rightArrowImage = _leftArrowSelectedImage = _rightArrowSelectedImage = nil; + + _arrowButtonsChangePhotosAnimated = YES; + + _backgroundScaleFactor = 1.0; + _animationDuration = 0.28; + _senderViewForAnimation = nil; + _scaleImage = nil; + + _isdraggingPhoto = NO; + + if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) + self.automaticallyAdjustsScrollViewInsets = NO; + + _applicationWindow = [[[UIApplication sharedApplication] delegate] window]; + + if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) + { + self.modalPresentationStyle = UIModalPresentationCustom; + self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + self.modalPresentationCapturesStatusBarAppearance = YES; + } + else + { + _applicationTopViewController = [self topviewController]; + _previousModalPresentationStyle = _applicationTopViewController.modalPresentationStyle; + _applicationTopViewController.modalPresentationStyle = UIModalPresentationCurrentContext; + self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + } + + self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + + // Listen for IDMPhoto notifications + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(handleIDMPhotoLoadingDidEndNotification:) + name:IDMPhoto_LOADING_DID_END_NOTIFICATION + object:nil]; + } + + return self; +} + +- (id)initWithPhotos:(NSArray *)photosArray { + if ((self = [self init])) { + _photos = [[NSMutableArray alloc] initWithArray:photosArray]; + } + return self; +} + +- (id)initWithPhotos:(NSArray *)photosArray animatedFromView:(UIView*)view { + if ((self = [self init])) { + _photos = [[NSMutableArray alloc] initWithArray:photosArray]; + _senderViewForAnimation = view; + } + return self; +} + +- (id)initWithPhotoURLs:(NSArray *)photoURLsArray { + if ((self = [self init])) { + NSArray *photosArray = [IDMPhoto photosWithURLs:photoURLsArray]; + _photos = [[NSMutableArray alloc] initWithArray:photosArray]; + } + return self; +} + +- (id)initWithPhotoURLs:(NSArray *)photoURLsArray animatedFromView:(UIView*)view { + if ((self = [self init])) { + NSArray *photosArray = [IDMPhoto photosWithURLs:photoURLsArray]; + _photos = [[NSMutableArray alloc] initWithArray:photosArray]; + _senderViewForAnimation = view; + } + return self; +} + +- (void)dealloc { + _pagingScrollView.delegate = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [self releaseAllUnderlyingPhotos]; +} + +- (void)releaseAllUnderlyingPhotos { + for (id p in _photos) { if (p != [NSNull null]) [p unloadUnderlyingImage]; } // Release photos +} + +- (void)didReceiveMemoryWarning { + // Release any cached data, images, etc that aren't in use. + [self releaseAllUnderlyingPhotos]; + [_recycledPages removeAllObjects]; + + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; +} + +#pragma mark - Pan Gesture + +- (void)panGestureRecognized:(id)sender { + // Initial Setup + IDMZoomingScrollView *scrollView = [self pageDisplayedAtIndex:_currentPageIndex]; + //IDMTapDetectingImageView *scrollView.photoImageView = scrollView.photoImageView; + + static float firstX, firstY; + + float viewHeight = scrollView.frame.size.height; + float viewHalfHeight = viewHeight/2; + + CGPoint translatedPoint = [(UIPanGestureRecognizer*)sender translationInView:self.view]; + + // Gesture Began + if ([(UIPanGestureRecognizer*)sender state] == UIGestureRecognizerStateBegan) { + [self setControlsHidden:YES animated:YES permanent:YES]; + + firstX = [scrollView center].x; + firstY = [scrollView center].y; + + _senderViewForAnimation.hidden = (_currentPageIndex == _initalPageIndex); + + _isdraggingPhoto = YES; + [self setNeedsStatusBarAppearanceUpdate]; + } + + translatedPoint = CGPointMake(firstX, firstY+translatedPoint.y); + [scrollView setCenter:translatedPoint]; + + float newY = scrollView.center.y - viewHalfHeight; + float newAlpha = 1 - fabsf(newY)/viewHeight; //abs(newY)/viewHeight * 1.8; + + self.view.opaque = YES; + + self.view.backgroundColor = [UIColor colorWithWhite:(_useWhiteBackgroundColor ? 1 : 0) alpha:newAlpha]; + + // Gesture Ended + if ([(UIPanGestureRecognizer*)sender state] == UIGestureRecognizerStateEnded) { + if(scrollView.center.y > viewHalfHeight+40 || scrollView.center.y < viewHalfHeight-40) // Automatic Dismiss View + { + if (_senderViewForAnimation && _currentPageIndex == _initalPageIndex) { + [self performCloseAnimationWithScrollView:scrollView]; + return; + } + + CGFloat finalX = firstX, finalY; + + CGFloat windowsHeigt = [_applicationWindow frame].size.height; + + if(scrollView.center.y > viewHalfHeight+30) // swipe down + finalY = windowsHeigt*2; + else // swipe up + finalY = -viewHalfHeight; + + CGFloat animationDuration = 0.35; + + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:animationDuration]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; + [UIView setAnimationDelegate:self]; + [scrollView setCenter:CGPointMake(finalX, finalY)]; + self.view.backgroundColor = [UIColor colorWithWhite:0 alpha:0]; + [UIView commitAnimations]; + + [self performSelector:@selector(doneButtonPressed:) withObject:self afterDelay:animationDuration]; + } + else // Continue Showing View + { + _isdraggingPhoto = NO; + [self setNeedsStatusBarAppearanceUpdate]; + + self.view.backgroundColor = [UIColor colorWithWhite:(_useWhiteBackgroundColor ? 1 : 0) alpha:1]; + + CGFloat velocityY = (.35*[(UIPanGestureRecognizer*)sender velocityInView:self.view].y); + + CGFloat finalX = firstX; + CGFloat finalY = viewHalfHeight; + + CGFloat animationDuration = (ABS(velocityY)*.0002)+.2; + + [UIView beginAnimations:nil context:NULL]; + [UIView setAnimationDuration:animationDuration]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; + [UIView setAnimationDelegate:self]; + [scrollView setCenter:CGPointMake(finalX, finalY)]; + [UIView commitAnimations]; + } + } +} + +#pragma mark - Animation + +- (void)performPresentAnimation { + self.view.alpha = 0.0f; + _pagingScrollView.alpha = 0.0f; + + UIImage *imageFromView = _scaleImage ? _scaleImage : [self getImageFromView:_senderViewForAnimation]; + + _senderViewOriginalFrame = [_senderViewForAnimation.superview convertRect:_senderViewForAnimation.frame toView:nil]; + + UIView *fadeView = [[UIView alloc] initWithFrame:_applicationWindow.bounds]; + fadeView.backgroundColor = [UIColor clearColor]; + [_applicationWindow addSubview:fadeView]; + + UIImageView *resizableImageView = [[UIImageView alloc] initWithImage:imageFromView]; + resizableImageView.frame = _senderViewOriginalFrame; + resizableImageView.clipsToBounds = YES; + resizableImageView.contentMode = _senderViewForAnimation ? _senderViewForAnimation.contentMode : UIViewContentModeScaleAspectFill; + resizableImageView.backgroundColor = [UIColor clearColor]; + [_applicationWindow addSubview:resizableImageView]; + _senderViewForAnimation.hidden = YES; + + void (^completion)() = ^() { + self.view.alpha = 1.0f; + _pagingScrollView.alpha = 1.0f; + resizableImageView.backgroundColor = [UIColor colorWithWhite:(_useWhiteBackgroundColor) ? 1 : 0 alpha:1]; + [fadeView removeFromSuperview]; + [resizableImageView removeFromSuperview]; + }; + + [UIView animateWithDuration:_animationDuration animations:^{ + fadeView.backgroundColor = self.useWhiteBackgroundColor ? [UIColor whiteColor] : [UIColor blackColor]; + } completion:nil]; + + CGRect finalImageViewFrame = [self animationFrameForImage:imageFromView presenting:YES scrollView:nil]; + + if(_usePopAnimation) + { + [self animateView:resizableImageView + toFrame:finalImageViewFrame + completion:completion]; + } + else + { + [UIView animateWithDuration:_animationDuration animations:^{ + resizableImageView.layer.frame = finalImageViewFrame; + } completion:^(BOOL finished) { + completion(); + }]; + } +} + +- (void)performCloseAnimationWithScrollView:(IDMZoomingScrollView*)scrollView { + float fadeAlpha = 1 - fabs(scrollView.frame.origin.y)/scrollView.frame.size.height; + + UIImage *imageFromView = [scrollView.photo underlyingImage]; + if (!imageFromView && [scrollView.photo respondsToSelector:@selector(placeholderImage)]) { + imageFromView = [scrollView.photo placeholderImage]; + } + + UIView *fadeView = [[UIView alloc] initWithFrame:_applicationWindow.bounds]; + fadeView.backgroundColor = self.useWhiteBackgroundColor ? [UIColor whiteColor] : [UIColor blackColor]; + fadeView.alpha = fadeAlpha; + [_applicationWindow addSubview:fadeView]; + + CGRect imageViewFrame = [self animationFrameForImage:imageFromView presenting:NO scrollView:scrollView]; + + UIImageView *resizableImageView = [[UIImageView alloc] initWithImage:imageFromView]; + resizableImageView.frame = imageViewFrame; + resizableImageView.contentMode = _senderViewForAnimation ? _senderViewForAnimation.contentMode : UIViewContentModeScaleAspectFill; + resizableImageView.backgroundColor = [UIColor clearColor]; + resizableImageView.clipsToBounds = YES; + [_applicationWindow addSubview:resizableImageView]; + self.view.hidden = YES; + + void (^completion)() = ^() { + _senderViewForAnimation.hidden = NO; + _senderViewForAnimation = nil; + _scaleImage = nil; + + [fadeView removeFromSuperview]; + [resizableImageView removeFromSuperview]; + + [self prepareForClosePhotoBrowser]; + [self dismissPhotoBrowserAnimated:NO]; + }; + + [UIView animateWithDuration:_animationDuration animations:^{ + fadeView.alpha = 0; + self.view.backgroundColor = [UIColor clearColor]; + } completion:nil]; + + CGRect senderViewOriginalFrame = _senderViewForAnimation.superview ? [_senderViewForAnimation.superview convertRect:_senderViewForAnimation.frame toView:nil] : _senderViewOriginalFrame; + + if(_usePopAnimation) + { + [self animateView:resizableImageView + toFrame:senderViewOriginalFrame + completion:completion]; + } + else + { + [UIView animateWithDuration:_animationDuration animations:^{ + resizableImageView.layer.frame = senderViewOriginalFrame; + } completion:^(BOOL finished) { + completion(); + }]; + } +} + +- (CGRect)animationFrameForImage:(UIImage *)image presenting:(BOOL)presenting scrollView:(UIScrollView *)scrollView +{ + if (!image) { + return CGRectZero; + } + + CGSize imageSize = image.size; + + CGFloat maxWidth = CGRectGetWidth(_applicationWindow.bounds); + CGFloat maxHeight = CGRectGetHeight(_applicationWindow.bounds); + + CGRect animationFrame = CGRectZero; + + CGFloat aspect = imageSize.width / imageSize.height; + if (maxWidth / aspect <= maxHeight) { + animationFrame.size = CGSizeMake(maxWidth, maxWidth / aspect); + } + else { + animationFrame.size = CGSizeMake(maxHeight * aspect, maxHeight); + } + + animationFrame.origin.x = roundf((maxWidth - animationFrame.size.width) / 2.0f); + animationFrame.origin.y = roundf((maxHeight - animationFrame.size.height) / 2.0f); + + if (!presenting) { + animationFrame.origin.y += scrollView.frame.origin.y; + } + + return animationFrame; +} + +#pragma mark - Genaral + +- (void)prepareForClosePhotoBrowser { + // Gesture + [_applicationWindow removeGestureRecognizer:_panGesture]; + + _autoHide = NO; + + // Controls + [NSObject cancelPreviousPerformRequestsWithTarget:self]; // Cancel any pending toggles from taps +} + +- (void)dismissPhotoBrowserAnimated:(BOOL)animated { + self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + + if ([_delegate respondsToSelector:@selector(photoBrowser:willDismissAtPageIndex:)]) + [_delegate photoBrowser:self willDismissAtPageIndex:_currentPageIndex]; + + [self dismissViewControllerAnimated:animated completion:^{ + if ([_delegate respondsToSelector:@selector(photoBrowser:didDismissAtPageIndex:)]) + [_delegate photoBrowser:self didDismissAtPageIndex:_currentPageIndex]; + + if (SYSTEM_VERSION_LESS_THAN(@"8.0")) + { + _applicationTopViewController.modalPresentationStyle = _previousModalPresentationStyle; + } + }]; +} + +- (UIButton*)customToolbarButtonImage:(UIImage*)image imageSelected:(UIImage*)selectedImage action:(SEL)action { + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + [button setBackgroundImage:image forState:UIControlStateNormal]; + [button setBackgroundImage:selectedImage forState:UIControlStateDisabled]; + [button addTarget:self action:action forControlEvents:UIControlEventTouchUpInside]; + [button setContentMode:UIViewContentModeCenter]; + [button setFrame:CGRectMake(0,0, image.size.width, image.size.height)]; + return button; +} + +- (UIImage*)getImageFromView:(UIView *)view { + UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 2); + [view.layer renderInContext:UIGraphicsGetCurrentContext()]; + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + return image; +} + +- (UIViewController *)topviewController +{ + UIViewController *topviewController = [UIApplication sharedApplication].keyWindow.rootViewController; + + while (topviewController.presentedViewController) { + topviewController = topviewController.presentedViewController; + } + + return topviewController; +} + +#pragma mark - View Lifecycle + +- (void)viewDidLoad { + // View + self.view.backgroundColor = [UIColor colorWithWhite:(_useWhiteBackgroundColor ? 1 : 0) alpha:1]; + + self.view.clipsToBounds = YES; + + // Setup paging scrolling view + CGRect pagingScrollViewFrame = [self frameForPagingScrollView]; + _pagingScrollView = [[UIScrollView alloc] initWithFrame:pagingScrollViewFrame]; + //_pagingScrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + _pagingScrollView.pagingEnabled = YES; + _pagingScrollView.delegate = self; + _pagingScrollView.showsHorizontalScrollIndicator = NO; + _pagingScrollView.showsVerticalScrollIndicator = NO; + _pagingScrollView.backgroundColor = [UIColor clearColor]; + _pagingScrollView.contentSize = [self contentSizeForPagingScrollView]; + [self.view addSubview:_pagingScrollView]; + + // Transition animation + [self performPresentAnimation]; + + UIInterfaceOrientation currentOrientation = [UIApplication sharedApplication].statusBarOrientation; + + // Toolbar + _toolbar = [[UIToolbar alloc] initWithFrame:[self frameForToolbarAtOrientation:currentOrientation]]; + _toolbar.backgroundColor = [UIColor clearColor]; + _toolbar.clipsToBounds = YES; + _toolbar.translucent = YES; + [_toolbar setBackgroundImage:[UIImage new] + forToolbarPosition:UIToolbarPositionAny + barMetrics:UIBarMetricsDefault]; + + // Close Button + _doneButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_doneButton setFrame:[self frameForDoneButtonAtOrientation:currentOrientation]]; + [_doneButton setAlpha:1.0f]; + [_doneButton addTarget:self action:@selector(doneButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; + + if(!_doneButtonImage) { + [_doneButton setTitleColor:[UIColor colorWithWhite:0.9 alpha:0.9] forState:UIControlStateNormal|UIControlStateHighlighted]; + [_doneButton setTitle:IDMPhotoBrowserLocalizedStrings(@"Done") forState:UIControlStateNormal]; + [_doneButton.titleLabel setFont:[UIFont boldSystemFontOfSize:11.0f]]; + [_doneButton setBackgroundColor:[UIColor colorWithWhite:0.1 alpha:0.5]]; + _doneButton.layer.cornerRadius = 3.0f; + _doneButton.layer.borderColor = [UIColor colorWithWhite:0.9 alpha:0.9].CGColor; + _doneButton.layer.borderWidth = 1.0f; + } + else { + [_doneButton setImage:_doneButtonImage forState:UIControlStateNormal]; + _doneButton.contentMode = UIViewContentModeScaleAspectFit; + } + + UIImage *leftButtonImage = (_leftArrowImage == nil) ? + [UIImage imageNamed:@"IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowLeft.png"] : _leftArrowImage; + + UIImage *rightButtonImage = (_rightArrowImage == nil) ? + [UIImage imageNamed:@"IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRight.png"] : _rightArrowImage; + + UIImage *leftButtonSelectedImage = (_leftArrowSelectedImage == nil) ? + [UIImage imageNamed:@"IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowLeftSelected.png"] : _leftArrowSelectedImage; + + UIImage *rightButtonSelectedImage = (_rightArrowSelectedImage == nil) ? + [UIImage imageNamed:@"IDMPhotoBrowser.bundle/images/IDMPhotoBrowser_arrowRightSelected.png"] : _rightArrowSelectedImage; + + // Arrows + _previousButton = [[UIBarButtonItem alloc] initWithCustomView:[self customToolbarButtonImage:leftButtonImage + imageSelected:leftButtonSelectedImage + action:@selector(gotoPreviousPage)]]; + + _nextButton = [[UIBarButtonItem alloc] initWithCustomView:[self customToolbarButtonImage:rightButtonImage + imageSelected:rightButtonSelectedImage + action:@selector(gotoNextPage)]]; + + // Counter Label + _counterLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 95, 40)]; + _counterLabel.textAlignment = NSTextAlignmentCenter; + _counterLabel.backgroundColor = [UIColor clearColor]; + _counterLabel.font = [UIFont fontWithName:@"Helvetica" size:17]; + + if(_useWhiteBackgroundColor == NO) { + _counterLabel.textColor = [UIColor whiteColor]; + _counterLabel.shadowColor = [UIColor darkTextColor]; + _counterLabel.shadowOffset = CGSizeMake(0, 1); + } + else { + _counterLabel.textColor = [UIColor blackColor]; + } + + // Counter Button + _counterButton = [[UIBarButtonItem alloc] initWithCustomView:_counterLabel]; + + // Action Button + _actionButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction + target:self + action:@selector(actionButtonPressed:)]; + + // Gesture + _panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureRecognized:)]; + [_panGesture setMinimumNumberOfTouches:1]; + [_panGesture setMaximumNumberOfTouches:1]; + + // Update + //[self reloadData]; + + // Super + [super viewDidLoad]; +} + +- (void)viewWillAppear:(BOOL)animated { + // Update + [self reloadData]; + + // Super + [super viewWillAppear:animated]; + + // Status Bar + _statusBarOriginallyHidden = [UIApplication sharedApplication].statusBarHidden; + + // Update UI + [self hideControlsAfterDelay]; +} + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + _viewIsActive = YES; +} + +// Release any retained subviews of the main view. +- (void)viewDidUnload { + _currentPageIndex = 0; + _pagingScrollView = nil; + _visiblePages = nil; + _recycledPages = nil; + _toolbar = nil; + _doneButton = nil; + _previousButton = nil; + _nextButton = nil; + + [super viewDidUnload]; +} + +#pragma mark - Status Bar + +- (UIStatusBarStyle)preferredStatusBarStyle { + return _useWhiteBackgroundColor ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent; +} + +- (BOOL)prefersStatusBarHidden { + if(_forceHideStatusBar) { + return YES; + } + + if(_isdraggingPhoto) { + if(_statusBarOriginallyHidden) { + return YES; + } + else { + return NO; + } + } + else { + return [self areControlsHidden]; + } +} + +- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation { + return UIStatusBarAnimationFade; +} + +#pragma mark - Layout + +- (void)viewWillLayoutSubviews { + // Flag + _performingLayout = YES; + + UIInterfaceOrientation currentOrientation = [UIApplication sharedApplication].statusBarOrientation; + + // Toolbar + _toolbar.frame = [self frameForToolbarAtOrientation:currentOrientation]; + + // Done button + _doneButton.frame = [self frameForDoneButtonAtOrientation:currentOrientation]; + + + // Remember index + NSUInteger indexPriorToLayout = _currentPageIndex; + + // Get paging scroll view frame to determine if anything needs changing + CGRect pagingScrollViewFrame = [self frameForPagingScrollView]; + + // Frame needs changing + _pagingScrollView.frame = pagingScrollViewFrame; + + // Recalculate contentSize based on current orientation + _pagingScrollView.contentSize = [self contentSizeForPagingScrollView]; + + // Adjust frames and configuration of each visible page + for (IDMZoomingScrollView *page in _visiblePages) { + NSUInteger index = PAGE_INDEX(page); + page.frame = [self frameForPageAtIndex:index]; + page.captionView.frame = [self frameForCaptionView:page.captionView atIndex:index]; + [page setMaxMinZoomScalesForCurrentBounds]; + } + + // Adjust contentOffset to preserve page location based on values collected prior to location + _pagingScrollView.contentOffset = [self contentOffsetForPageAtIndex:indexPriorToLayout]; + [self didStartViewingPageAtIndex:_currentPageIndex]; // initial + + // Reset + _currentPageIndex = indexPriorToLayout; + _performingLayout = NO; + + // Super + [super viewWillLayoutSubviews]; +} + +- (void)performLayout { + // Setup + _performingLayout = YES; + NSUInteger numberOfPhotos = [self numberOfPhotos]; + + // Setup pages + [_visiblePages removeAllObjects]; + [_recycledPages removeAllObjects]; + + // Toolbar + if (_displayToolbar) { + [self.view addSubview:_toolbar]; + } else { + [_toolbar removeFromSuperview]; + } + + // Close button + if(_displayDoneButton && !self.navigationController.navigationBar) + [self.view addSubview:_doneButton]; + + // Toolbar items & navigation + UIBarButtonItem *fixedLeftSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace + target:self action:nil]; + fixedLeftSpace.width = 32; // To balance action button + UIBarButtonItem *flexSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace + target:self action:nil]; + NSMutableArray *items = [NSMutableArray new]; + + if (_displayActionButton) + [items addObject:fixedLeftSpace]; + [items addObject:flexSpace]; + + if (numberOfPhotos > 1 && _displayArrowButton) + [items addObject:_previousButton]; + + if(_displayCounterLabel) { + [items addObject:flexSpace]; + [items addObject:_counterButton]; + } + + [items addObject:flexSpace]; + if (numberOfPhotos > 1 && _displayArrowButton) + [items addObject:_nextButton]; + [items addObject:flexSpace]; + + if(_displayActionButton) + [items addObject:_actionButton]; + + [_toolbar setItems:items]; + [self updateToolbar]; + + // Content offset + _pagingScrollView.contentOffset = [self contentOffsetForPageAtIndex:_currentPageIndex]; + [self tilePages]; + _performingLayout = NO; + + if(! _disableVerticalSwipe) + [self.view addGestureRecognizer:_panGesture]; +} + +#pragma mark - Data + +- (void)reloadData { + // Get data + [self releaseAllUnderlyingPhotos]; + + // Update + [self performLayout]; + + // Layout + [self.view setNeedsLayout]; +} + +- (NSUInteger)numberOfPhotos { + return _photos.count; +} + +- (id)photoAtIndex:(NSUInteger)index { + return _photos[index]; +} + +- (IDMCaptionView *)captionViewForPhotoAtIndex:(NSUInteger)index { + IDMCaptionView *captionView = nil; + if ([_delegate respondsToSelector:@selector(photoBrowser:captionViewForPhotoAtIndex:)]) { + captionView = [_delegate photoBrowser:self captionViewForPhotoAtIndex:index]; + } else { + id photo = [self photoAtIndex:index]; + if ([photo respondsToSelector:@selector(caption)]) { + if ([photo caption]) captionView = [[IDMCaptionView alloc] initWithPhoto:photo]; + } + } + captionView.alpha = [self areControlsHidden] ? 0 : 1; // Initial alpha + + return captionView; +} + +- (UIImage *)imageForPhoto:(id)photo { + if (photo) { + // Get image or obtain in background + if ([photo underlyingImage]) { + return [photo underlyingImage]; + } else { + [photo loadUnderlyingImageAndNotify]; + if ([photo respondsToSelector:@selector(placeholderImage)]) { + return [photo placeholderImage]; + } + } + } + + return nil; +} + +- (void)loadAdjacentPhotosIfNecessary:(id)photo { + IDMZoomingScrollView *page = [self pageDisplayingPhoto:photo]; + if (page) { + // If page is current page then initiate loading of previous and next pages + NSUInteger pageIndex = PAGE_INDEX(page); + if (_currentPageIndex == pageIndex) { + if (pageIndex > 0) { + // Preload index - 1 + id photo = [self photoAtIndex:pageIndex-1]; + if (![photo underlyingImage]) { + [photo loadUnderlyingImageAndNotify]; + IDMLog(@"Pre-loading image at index %i", pageIndex-1); + } + } + if (pageIndex < [self numberOfPhotos] - 1) { + // Preload index + 1 + id photo = [self photoAtIndex:pageIndex+1]; + if (![photo underlyingImage]) { + [photo loadUnderlyingImageAndNotify]; + IDMLog(@"Pre-loading image at index %i", pageIndex+1); + } + } + } + } +} + +#pragma mark - IDMPhoto Loading Notification + +- (void)handleIDMPhotoLoadingDidEndNotification:(NSNotification *)notification { + id photo = [notification object]; + IDMZoomingScrollView *page = [self pageDisplayingPhoto:photo]; + if (page) { + if ([photo underlyingImage]) { + // Successful load + [page displayImage]; + [self loadAdjacentPhotosIfNecessary:photo]; + } else { + // Failed to load + [page displayImageFailure]; + } + } +} + +#pragma mark - Paging + +- (void)tilePages { + // Calculate which pages should be visible + // Ignore padding as paging bounces encroach on that + // and lead to false page loads + CGRect visibleBounds = _pagingScrollView.bounds; + NSInteger iFirstIndex = (NSInteger) floorf((CGRectGetMinX(visibleBounds)+PADDING*2) / CGRectGetWidth(visibleBounds)); + NSInteger iLastIndex = (NSInteger) floorf((CGRectGetMaxX(visibleBounds)-PADDING*2-1) / CGRectGetWidth(visibleBounds)); + if (iFirstIndex < 0) iFirstIndex = 0; + if (iFirstIndex > [self numberOfPhotos] - 1) iFirstIndex = [self numberOfPhotos] - 1; + if (iLastIndex < 0) iLastIndex = 0; + if (iLastIndex > [self numberOfPhotos] - 1) iLastIndex = [self numberOfPhotos] - 1; + + // Recycle no longer needed pages + NSInteger pageIndex; + for (IDMZoomingScrollView *page in _visiblePages) { + pageIndex = PAGE_INDEX(page); + if (pageIndex < (NSUInteger)iFirstIndex || pageIndex > (NSUInteger)iLastIndex) { + [_recycledPages addObject:page]; + [page prepareForReuse]; + [page removeFromSuperview]; + IDMLog(@"Removed page at index %i", PAGE_INDEX(page)); + } + } + [_visiblePages minusSet:_recycledPages]; + while (_recycledPages.count > 2) // Only keep 2 recycled pages + [_recycledPages removeObject:[_recycledPages anyObject]]; + + // Add missing pages + for (NSUInteger index = (NSUInteger)iFirstIndex; index <= (NSUInteger)iLastIndex; index++) { + if (![self isDisplayingPageForIndex:index]) { + // Add new page + IDMZoomingScrollView *page; + page = [[IDMZoomingScrollView alloc] initWithPhotoBrowser:self]; + page.backgroundColor = [UIColor clearColor]; + page.opaque = YES; + + [self configurePage:page forIndex:index]; + [_visiblePages addObject:page]; + [_pagingScrollView addSubview:page]; + IDMLog(@"Added page at index %i", index); + + // Add caption + IDMCaptionView *captionView = [self captionViewForPhotoAtIndex:index]; + captionView.frame = [self frameForCaptionView:captionView atIndex:index]; + [_pagingScrollView addSubview:captionView]; + page.captionView = captionView; + } + } +} + +- (BOOL)isDisplayingPageForIndex:(NSUInteger)index { + for (IDMZoomingScrollView *page in _visiblePages) + if (PAGE_INDEX(page) == index) return YES; + return NO; +} + +- (IDMZoomingScrollView *)pageDisplayedAtIndex:(NSUInteger)index { + IDMZoomingScrollView *thePage = nil; + for (IDMZoomingScrollView *page in _visiblePages) { + if (PAGE_INDEX(page) == index) { + thePage = page; break; + } + } + return thePage; +} + +- (IDMZoomingScrollView *)pageDisplayingPhoto:(id)photo { + IDMZoomingScrollView *thePage = nil; + for (IDMZoomingScrollView *page in _visiblePages) { + if (page.photo == photo) { + thePage = page; break; + } + } + return thePage; +} + +- (void)configurePage:(IDMZoomingScrollView *)page forIndex:(NSUInteger)index { + page.frame = [self frameForPageAtIndex:index]; + page.tag = PAGE_INDEX_TAG_OFFSET + index; + page.photo = [self photoAtIndex:index]; + + __block __weak IDMPhoto *photo = (IDMPhoto*)page.photo; + __weak IDMZoomingScrollView* weakPage = page; + photo.progressUpdateBlock = ^(CGFloat progress){ + [weakPage setProgress:progress forPhoto:photo]; + }; +} + +- (IDMZoomingScrollView *)dequeueRecycledPage { + IDMZoomingScrollView *page = [_recycledPages anyObject]; + if (page) { + [_recycledPages removeObject:page]; + } + return page; +} + +// Handle page changes +- (void)didStartViewingPageAtIndex:(NSUInteger)index { + // Load adjacent images if needed and the photo is already + // loaded. Also called after photo has been loaded in background + id currentPhoto = [self photoAtIndex:index]; + if ([currentPhoto underlyingImage]) { + // photo loaded so load ajacent now + [self loadAdjacentPhotosIfNecessary:currentPhoto]; + } + if ([_delegate respondsToSelector:@selector(photoBrowser:didShowPhotoAtIndex:)]) { + [_delegate photoBrowser:self didShowPhotoAtIndex:index]; + } +} + +#pragma mark - Frame Calculations + +- (CGRect)frameForPagingScrollView { + CGRect frame = self.view.bounds; + frame.origin.x -= PADDING; + frame.size.width += (2 * PADDING); + return frame; +} + +- (CGRect)frameForPageAtIndex:(NSUInteger)index { + // We have to use our paging scroll view's bounds, not frame, to calculate the page placement. When the device is in + // landscape orientation, the frame will still be in portrait because the pagingScrollView is the root view controller's + // view, so its frame is in window coordinate space, which is never rotated. Its bounds, however, will be in landscape + // because it has a rotation transform applied. + CGRect bounds = _pagingScrollView.bounds; + CGRect pageFrame = bounds; + pageFrame.size.width -= (2 * PADDING); + pageFrame.origin.x = (bounds.size.width * index) + PADDING; + return pageFrame; +} + +- (CGSize)contentSizeForPagingScrollView { + // We have to use the paging scroll view's bounds to calculate the contentSize, for the same reason outlined above. + CGRect bounds = _pagingScrollView.bounds; + return CGSizeMake(bounds.size.width * [self numberOfPhotos], bounds.size.height); +} + +- (CGPoint)contentOffsetForPageAtIndex:(NSUInteger)index { + CGFloat pageWidth = _pagingScrollView.bounds.size.width; + CGFloat newOffset = index * pageWidth; + return CGPointMake(newOffset, 0); +} + +- (BOOL)isLandscape:(UIInterfaceOrientation)orientation +{ + return UIInterfaceOrientationIsLandscape(orientation); +} + +- (CGRect)frameForToolbarAtOrientation:(UIInterfaceOrientation)orientation { + CGFloat height = 44; + + if ([self isLandscape:orientation]) + height = 32; + + return CGRectMake(0, self.view.bounds.size.height - height, self.view.bounds.size.width, height); +} + +- (CGRect)frameForDoneButtonAtOrientation:(UIInterfaceOrientation)orientation { + CGRect screenBound = self.view.bounds; + CGFloat screenWidth = screenBound.size.width; + + // if ([self isLandscape:orientation]) screenWidth = screenBound.size.height; + + return CGRectMake(screenWidth - 75, 30, 55, 26); +} + +- (CGRect)frameForCaptionView:(IDMCaptionView *)captionView atIndex:(NSUInteger)index { + CGRect pageFrame = [self frameForPageAtIndex:index]; + + CGSize captionSize = [captionView sizeThatFits:CGSizeMake(pageFrame.size.width, 0)]; + CGRect captionFrame = CGRectMake(pageFrame.origin.x, pageFrame.size.height - captionSize.height - (_toolbar.superview?_toolbar.frame.size.height:0), pageFrame.size.width, captionSize.height); + + return captionFrame; +} + +#pragma mark - UIScrollView Delegate + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + // Checks + if (!_viewIsActive || _performingLayout || _rotating) return; + + // Tile pages + [self tilePages]; + + // Calculate current page + CGRect visibleBounds = _pagingScrollView.bounds; + NSInteger index = (NSInteger) (floorf(CGRectGetMidX(visibleBounds) / CGRectGetWidth(visibleBounds))); + if (index < 0) index = 0; + if (index > [self numberOfPhotos] - 1) index = [self numberOfPhotos] - 1; + NSUInteger previousCurrentPage = _currentPageIndex; + _currentPageIndex = index; + if (_currentPageIndex != previousCurrentPage) { + [self didStartViewingPageAtIndex:index]; + + if(_arrowButtonsChangePhotosAnimated) [self updateToolbar]; + } +} + +- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { + // Hide controls when dragging begins + if(_autoHideInterface){ + [self setControlsHidden:YES animated:YES permanent:NO]; + } +} + +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { + // Update toolbar when page changes + if(! _arrowButtonsChangePhotosAnimated) [self updateToolbar]; +} + +#pragma mark - Toolbar + +- (void)updateToolbar { + // Counter + if ([self numberOfPhotos] > 1) { + _counterLabel.text = [NSString stringWithFormat:@"%lu %@ %lu", (unsigned long)(_currentPageIndex+1), IDMPhotoBrowserLocalizedStrings(@"of"), (unsigned long)[self numberOfPhotos]]; + } else { + _counterLabel.text = nil; + } + + // Buttons + _previousButton.enabled = (_currentPageIndex > 0); + _nextButton.enabled = (_currentPageIndex < [self numberOfPhotos]-1); +} + +- (void)jumpToPageAtIndex:(NSUInteger)index { + // Change page + if (index < [self numberOfPhotos]) { + CGRect pageFrame = [self frameForPageAtIndex:index]; + + if(_arrowButtonsChangePhotosAnimated) + { + [_pagingScrollView setContentOffset:CGPointMake(pageFrame.origin.x - PADDING, 0) animated:YES]; + } + else + { + _pagingScrollView.contentOffset = CGPointMake(pageFrame.origin.x - PADDING, 0); + [self updateToolbar]; + } + } + + // Update timer to give more time + [self hideControlsAfterDelay]; +} + +- (void)gotoPreviousPage { [self jumpToPageAtIndex:_currentPageIndex-1]; } +- (void)gotoNextPage { [self jumpToPageAtIndex:_currentPageIndex+1]; } + +#pragma mark - Control Hiding / Showing + +// If permanent then we don't set timers to hide again +- (void)setControlsHidden:(BOOL)hidden animated:(BOOL)animated permanent:(BOOL)permanent { + // Cancel any timers + [self cancelControlHiding]; + + // Captions + NSMutableSet *captionViews = [[NSMutableSet alloc] initWithCapacity:_visiblePages.count]; + for (IDMZoomingScrollView *page in _visiblePages) { + if (page.captionView) [captionViews addObject:page.captionView]; + } + + // Hide/show bars + [UIView animateWithDuration:(animated ? 0.1 : 0) animations:^(void) { + CGFloat alpha = hidden ? 0 : 1; + [self.navigationController.navigationBar setAlpha:alpha]; + [_toolbar setAlpha:alpha]; + [_doneButton setAlpha:alpha]; + for (UIView *v in captionViews) v.alpha = alpha; + } completion:^(BOOL finished) {}]; + + // Control hiding timer + // Will cancel existing timer but only begin hiding if they are visible + if (!permanent) [self hideControlsAfterDelay]; + + [self setNeedsStatusBarAppearanceUpdate]; +} + +- (void)cancelControlHiding { + // If a timer exists then cancel and release + if (_controlVisibilityTimer) { + [_controlVisibilityTimer invalidate]; + _controlVisibilityTimer = nil; + } +} + +// Enable/disable control visiblity timer +- (void)hideControlsAfterDelay { + + if (![self autoHideInterface]) { + return; + } + + if (![self areControlsHidden]) { + [self cancelControlHiding]; + _controlVisibilityTimer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(hideControls) userInfo:nil repeats:NO]; + } +} + +- (BOOL)areControlsHidden { return (_toolbar.alpha == 0); } +- (void)hideControls { if(_autoHide && _autoHideInterface) [self setControlsHidden:YES animated:YES permanent:NO]; } +- (void)toggleControls { [self setControlsHidden:![self areControlsHidden] animated:YES permanent:NO]; } + + +#pragma mark - Properties + +- (void)setInitialPageIndex:(NSUInteger)index { + // Validate + if (index >= [self numberOfPhotos]) index = [self numberOfPhotos]-1; + _initalPageIndex = index; + _currentPageIndex = index; + if ([self isViewLoaded]) { + [self jumpToPageAtIndex:index]; + if (!_viewIsActive) [self tilePages]; // Force tiling if view is not visible + } +} + +#pragma mark - Buttons + +- (void)doneButtonPressed:(id)sender { + if (_senderViewForAnimation && _currentPageIndex == _initalPageIndex) { + IDMZoomingScrollView *scrollView = [self pageDisplayedAtIndex:_currentPageIndex]; + [self performCloseAnimationWithScrollView:scrollView]; + } + else { + _senderViewForAnimation.hidden = NO; + [self prepareForClosePhotoBrowser]; + [self dismissPhotoBrowserAnimated:YES]; + } +} + +- (void)actionButtonPressed:(id)sender { + id photo = [self photoAtIndex:_currentPageIndex]; + + if ([self numberOfPhotos] > 0 && [photo underlyingImage]) { + if(!_actionButtonTitles) + { + // Activity view + NSMutableArray *activityItems = [NSMutableArray arrayWithObject:[photo underlyingImage]]; + if (photo.caption) [activityItems addObject:photo.caption]; + + self.activityViewController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; + + __typeof__(self) __weak selfBlock = self; + + if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) + { + [self.activityViewController setCompletionWithItemsHandler:^(NSString *activityType, BOOL completed, NSArray *returnedItems, NSError *activityError) { + [selfBlock hideControlsAfterDelay]; + selfBlock.activityViewController = nil; + }]; + } + else + { + [self.activityViewController setCompletionHandler:^(NSString *activityType, BOOL completed) { + [selfBlock hideControlsAfterDelay]; + selfBlock.activityViewController = nil; + }]; + } + + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + [self presentViewController:self.activityViewController animated:YES completion:nil]; + } + else { // iPad + UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:self.activityViewController]; + [popover presentPopoverFromRect:CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/4, 0, 0) + inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny + animated:YES]; + } + } + else + { + // Action sheet + self.actionsSheet = [UIActionSheet new]; + self.actionsSheet.delegate = self; + for(NSString *action in _actionButtonTitles) { + [self.actionsSheet addButtonWithTitle:action]; + } + + self.actionsSheet.cancelButtonIndex = [self.actionsSheet addButtonWithTitle:IDMPhotoBrowserLocalizedStrings(@"Cancel")]; + self.actionsSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent; + + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + [_actionsSheet showInView:self.view]; + } else { + [_actionsSheet showFromBarButtonItem:sender animated:YES]; + } + } + + // Keep controls hidden + [self setControlsHidden:NO animated:YES permanent:YES]; + } +} + +#pragma mark - Action Sheet Delegate + +- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex { + if (actionSheet == _actionsSheet) { + self.actionsSheet = nil; + + if (buttonIndex != actionSheet.cancelButtonIndex) { + if ([_delegate respondsToSelector:@selector(photoBrowser:didDismissActionSheetWithButtonIndex:photoIndex:)]) { + [_delegate photoBrowser:self didDismissActionSheetWithButtonIndex:buttonIndex photoIndex:_currentPageIndex]; + return; + } + } + } + + [self hideControlsAfterDelay]; // Continue as normal... +} + +#pragma mark - pop Animation + +- (void)animateView:(UIView *)view toFrame:(CGRect)frame completion:(void (^)(void))completion +{ + POPSpringAnimation *animation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewFrame]; + [animation setSpringBounciness:6]; + [animation setDynamicsMass:1]; + [animation setToValue:[NSValue valueWithCGRect:frame]]; + [view pop_addAnimation:animation forKey:nil]; + + if (completion) + { + [animation setCompletionBlock:^(POPAnimation *animation, BOOL finished) { + completion(); + }]; + } +} + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMPhotoProtocol.h b/Pods/IDMPhotoBrowser/Classes/IDMPhotoProtocol.h new file mode 100644 index 0000000..19b273d --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMPhotoProtocol.h @@ -0,0 +1,64 @@ +// +// IDMPhotoProtocol.h +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 02/01/2012. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import +#import "IDMPBConstants.h" + +// Name of notification used when a photo has completed loading process +// Used to notify browser display the image +#define IDMPhoto_LOADING_DID_END_NOTIFICATION @"IDMPhoto_LOADING_DID_END_NOTIFICATION" + +// If you wish to use your own data models for photo then they must conform +// to this protocol. See instructions for details on each method. +// Otherwise you can use the IDMPhoto object or subclass it yourself to +// store more information per photo. +// +// You can see the IDMPhoto class for an example implementation of this protocol +// +@protocol IDMPhoto + +@required + +// Return underlying UIImage to be displayed +// Return nil if the image is not immediately available (loaded into memory, preferably +// already decompressed) and needs to be loaded from a source (cache, file, web, etc) +// IMPORTANT: You should *NOT* use this method to initiate +// fetching of images from any external of source. That should be handled +// in -loadUnderlyingImageAndNotify: which may be called by the photo browser if this +// methods returns nil. +- (UIImage *)underlyingImage; + +// Called when the browser has determined the underlying images is not +// already loaded into memory but needs it. +// You must load the image asyncronously (and decompress it for better performance). +// See IDMPhoto object for an example implementation. +// When the underlying UIImage is loaded (or failed to load) you should post the following +// notification: +// +// [[NSNotificationCenter defaultCenter] postNotificationName:IDMPhoto_LOADING_DID_END_NOTIFICATION +// object:self]; +// +- (void)loadUnderlyingImageAndNotify; + +// This is called when the photo browser has determined the photo data +// is no longer needed or there are low memory conditions +// You should release any underlying (possibly large and decompressed) image data +// as long as the image can be re-loaded (from cache, file, or URL) +- (void)unloadUnderlyingImage; + +@optional + +// Return a caption string to be displayed over the image +// Return nil to display no caption +- (NSString *)caption; + +// Return placeholder UIImage to be displayed while loading underlyingImage +// Return nil if there is no placeholder +- (UIImage *)placeholderImage; + +@end \ No newline at end of file diff --git a/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.h b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.h new file mode 100644 index 0000000..96a3865 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.h @@ -0,0 +1,27 @@ +// +// IDMTapDetectingImageView.h +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 04/11/2009. +// Copyright 2009 d3i. All rights reserved. +// + +#import + +@protocol IDMTapDetectingImageViewDelegate; + +@interface IDMTapDetectingImageView : UIImageView { + id __weak tapDelegate; +} +@property (nonatomic, weak) id tapDelegate; +- (void)handleSingleTap:(UITouch *)touch; +- (void)handleDoubleTap:(UITouch *)touch; +- (void)handleTripleTap:(UITouch *)touch; +@end + +@protocol IDMTapDetectingImageViewDelegate +@optional +- (void)imageView:(UIImageView *)imageView singleTapDetected:(UITouch *)touch; +- (void)imageView:(UIImageView *)imageView doubleTapDetected:(UITouch *)touch; +- (void)imageView:(UIImageView *)imageView tripleTapDetected:(UITouch *)touch; +@end \ No newline at end of file diff --git a/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.m b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.m new file mode 100644 index 0000000..5f2d305 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingImageView.m @@ -0,0 +1,70 @@ +// +// IDMTapDetectingImageView.m +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 04/11/2009. +// Copyright 2009 d3i. All rights reserved. +// + +#import "IDMTapDetectingImageView.h" + +@implementation IDMTapDetectingImageView + +@synthesize tapDelegate; + +- (id)initWithFrame:(CGRect)frame { + if ((self = [super initWithFrame:frame])) { + self.userInteractionEnabled = YES; + } + return self; +} + +- (id)initWithImage:(UIImage *)image { + if ((self = [super initWithImage:image])) { + self.userInteractionEnabled = YES; + } + return self; +} + +- (id)initWithImage:(UIImage *)image highlightedImage:(UIImage *)highlightedImage { + if ((self = [super initWithImage:image highlightedImage:highlightedImage])) { + self.userInteractionEnabled = YES; + } + return self; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + UITouch *touch = [touches anyObject]; + NSUInteger tapCount = touch.tapCount; + switch (tapCount) { + case 1: + [self handleSingleTap:touch]; + break; + case 2: + [self handleDoubleTap:touch]; + break; + case 3: + [self handleTripleTap:touch]; + break; + default: + break; + } + [[self nextResponder] touchesEnded:touches withEvent:event]; +} + +- (void)handleSingleTap:(UITouch *)touch { + if ([tapDelegate respondsToSelector:@selector(imageView:singleTapDetected:)]) + [tapDelegate imageView:self singleTapDetected:touch]; +} + +- (void)handleDoubleTap:(UITouch *)touch { + if ([tapDelegate respondsToSelector:@selector(imageView:doubleTapDetected:)]) + [tapDelegate imageView:self doubleTapDetected:touch]; +} + +- (void)handleTripleTap:(UITouch *)touch { + if ([tapDelegate respondsToSelector:@selector(imageView:tripleTapDetected:)]) + [tapDelegate imageView:self tripleTapDetected:touch]; +} + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.h b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.h new file mode 100644 index 0000000..a4f9aee --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.h @@ -0,0 +1,27 @@ +// +// IDMTapDetectingView.h +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 04/11/2009. +// Copyright 2009 d3i. All rights reserved. +// + +#import + +@protocol IDMTapDetectingViewDelegate; + +@interface IDMTapDetectingView : UIView { + id __weak tapDelegate; +} +@property (nonatomic, weak) id tapDelegate; +- (void)handleSingleTap:(UITouch *)touch; +- (void)handleDoubleTap:(UITouch *)touch; +- (void)handleTripleTap:(UITouch *)touch; +@end + +@protocol IDMTapDetectingViewDelegate +@optional +- (void)view:(UIView *)view singleTapDetected:(UITouch *)touch; +- (void)view:(UIView *)view doubleTapDetected:(UITouch *)touch; +- (void)view:(UIView *)view tripleTapDetected:(UITouch *)touch; +@end \ No newline at end of file diff --git a/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.m b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.m new file mode 100644 index 0000000..92e010d --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMTapDetectingView.m @@ -0,0 +1,63 @@ +// +// IDMTapDetectingView.m +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 04/11/2009. +// Copyright 2009 d3i. All rights reserved. +// + +#import "IDMTapDetectingView.h" + +@implementation IDMTapDetectingView + +@synthesize tapDelegate; + +- (id)init { + if ((self = [super init])) { + self.userInteractionEnabled = YES; + } + return self; +} + +- (id)initWithFrame:(CGRect)frame { + if ((self = [super initWithFrame:frame])) { + self.userInteractionEnabled = YES; + } + return self; +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + UITouch *touch = [touches anyObject]; + NSUInteger tapCount = touch.tapCount; + switch (tapCount) { + case 1: + [self handleSingleTap:touch]; + break; + case 2: + [self handleDoubleTap:touch]; + break; + case 3: + [self handleTripleTap:touch]; + break; + default: + break; + } + [[self nextResponder] touchesEnded:touches withEvent:event]; +} + +- (void)handleSingleTap:(UITouch *)touch { + if ([tapDelegate respondsToSelector:@selector(view:singleTapDetected:)]) + [tapDelegate view:self singleTapDetected:touch]; +} + +- (void)handleDoubleTap:(UITouch *)touch { + if ([tapDelegate respondsToSelector:@selector(view:doubleTapDetected:)]) + [tapDelegate view:self doubleTapDetected:touch]; +} + +- (void)handleTripleTap:(UITouch *)touch { + if ([tapDelegate respondsToSelector:@selector(view:tripleTapDetected:)]) + [tapDelegate view:self tripleTapDetected:touch]; +} + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.h b/Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.h new file mode 100644 index 0000000..3393ec4 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.h @@ -0,0 +1,42 @@ +// +// IDMZoomingScrollView.h +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 14/10/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import +#import "IDMPhotoProtocol.h" +#import "IDMTapDetectingImageView.h" +#import "IDMTapDetectingView.h" + +#import + +@class IDMPhotoBrowser, IDMPhoto, IDMCaptionView; + +@interface IDMZoomingScrollView : UIScrollView { + + IDMPhotoBrowser *__weak _photoBrowser; + id _photo; + + // This view references the related caption view for simplified handling in photo browser + IDMCaptionView *_captionView; + + IDMTapDetectingView *_tapView; // for background taps + + DACircularProgressView *_progressView; +} + +@property (nonatomic, strong) IDMTapDetectingImageView *photoImageView; +@property (nonatomic, strong) IDMCaptionView *captionView; +@property (nonatomic, strong) id photo; + +- (id)initWithPhotoBrowser:(IDMPhotoBrowser *)browser; +- (void)displayImage; +- (void)displayImageFailure; +- (void)setProgress:(CGFloat)progress forPhoto:(IDMPhoto*)photo; +- (void)setMaxMinZoomScalesForCurrentBounds; +- (void)prepareForReuse; + +@end diff --git a/Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.m b/Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.m new file mode 100644 index 0000000..29cd211 --- /dev/null +++ b/Pods/IDMPhotoBrowser/Classes/IDMZoomingScrollView.m @@ -0,0 +1,305 @@ +// +// IDMZoomingScrollView.m +// IDMPhotoBrowser +// +// Created by Michael Waterfall on 14/10/2010. +// Copyright 2010 d3i. All rights reserved. +// + +#import "IDMZoomingScrollView.h" +#import "IDMPhotoBrowser.h" +#import "IDMPhoto.h" + +// Declare private methods of browser +@interface IDMPhotoBrowser () +- (UIImage *)imageForPhoto:(id)photo; +- (void)cancelControlHiding; +- (void)hideControlsAfterDelay; +- (void)toggleControls; +@end + +// Private methods and properties +@interface IDMZoomingScrollView () +@property (nonatomic, weak) IDMPhotoBrowser *photoBrowser; +- (void)handleSingleTap:(CGPoint)touchPoint; +- (void)handleDoubleTap:(CGPoint)touchPoint; +@end + +@implementation IDMZoomingScrollView + +@synthesize photoImageView = _photoImageView, photoBrowser = _photoBrowser, photo = _photo, captionView = _captionView; + +- (id)initWithPhotoBrowser:(IDMPhotoBrowser *)browser { + if ((self = [super init])) { + // Delegate + self.photoBrowser = browser; + + // Tap view for background + _tapView = [[IDMTapDetectingView alloc] initWithFrame:self.bounds]; + _tapView.tapDelegate = self; + _tapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + _tapView.backgroundColor = [UIColor clearColor]; + [self addSubview:_tapView]; + + // Image view + _photoImageView = [[IDMTapDetectingImageView alloc] initWithFrame:CGRectZero]; + _photoImageView.tapDelegate = self; + _photoImageView.backgroundColor = [UIColor clearColor]; + [self addSubview:_photoImageView]; + + CGRect screenBound = [[UIScreen mainScreen] bounds]; + CGFloat screenWidth = screenBound.size.width; + CGFloat screenHeight = screenBound.size.height; + + if ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft || + [[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeRight) { + screenWidth = screenBound.size.height; + screenHeight = screenBound.size.width; + } + + // Progress view + _progressView = [[DACircularProgressView alloc] initWithFrame:CGRectMake((screenWidth-35.)/2., (screenHeight-35.)/2, 35.0f, 35.0f)]; + [_progressView setProgress:0.0f]; + _progressView.tag = 101; + _progressView.thicknessRatio = 0.1; + _progressView.roundedCorners = NO; + _progressView.trackTintColor = browser.trackTintColor ? self.photoBrowser.trackTintColor : [UIColor colorWithWhite:0.2 alpha:1]; + _progressView.progressTintColor = browser.progressTintColor ? self.photoBrowser.progressTintColor : [UIColor colorWithWhite:1.0 alpha:1]; + [self addSubview:_progressView]; + + // Setup + self.backgroundColor = [UIColor clearColor]; + self.delegate = self; + self.showsHorizontalScrollIndicator = NO; + self.showsVerticalScrollIndicator = NO; + self.decelerationRate = UIScrollViewDecelerationRateFast; + self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + } + + return self; +} + +- (void)setPhoto:(id)photo { + _photoImageView.image = nil; // Release image + if (_photo != photo) { + _photo = photo; + } + [self displayImage]; +} + +- (void)prepareForReuse { + self.photo = nil; + [_captionView removeFromSuperview]; + self.captionView = nil; +} + +#pragma mark - Image + +// Get and display image +- (void)displayImage { + if (_photo) { + // Reset + self.maximumZoomScale = 1; + self.minimumZoomScale = 1; + self.zoomScale = 1; + + self.contentSize = CGSizeMake(0, 0); + + // Get image from browser as it handles ordering of fetching + UIImage *img = [self.photoBrowser imageForPhoto:_photo]; + if (img) { + // Hide ProgressView + //_progressView.alpha = 0.0f; + [_progressView removeFromSuperview]; + + // Set image + _photoImageView.image = img; + _photoImageView.hidden = NO; + + // Setup photo frame + CGRect photoImageViewFrame; + photoImageViewFrame.origin = CGPointZero; + photoImageViewFrame.size = img.size; + + _photoImageView.frame = photoImageViewFrame; + self.contentSize = photoImageViewFrame.size; + + // Set zoom to minimum zoom + [self setMaxMinZoomScalesForCurrentBounds]; + } else { + // Hide image view + _photoImageView.hidden = YES; + + _progressView.alpha = 1.0f; + } + + [self setNeedsLayout]; + } +} + +- (void)setProgress:(CGFloat)progress forPhoto:(IDMPhoto*)photo { + IDMPhoto *p = (IDMPhoto*)self.photo; + + if ([photo.photoURL.absoluteString isEqualToString:p.photoURL.absoluteString]) { + if (_progressView.progress < progress) { + [_progressView setProgress:progress animated:YES]; + } + } +} + +// Image failed so just show black! +- (void)displayImageFailure { + [_progressView removeFromSuperview]; +} + +#pragma mark - Setup + +- (void)setMaxMinZoomScalesForCurrentBounds { + // Reset + self.maximumZoomScale = 1; + self.minimumZoomScale = 1; + self.zoomScale = 1; + + // Bail + if (_photoImageView.image == nil) return; + + // Sizes + CGSize boundsSize = self.bounds.size; + boundsSize.width -= 0.1; + boundsSize.height -= 0.1; + + CGSize imageSize = _photoImageView.frame.size; + + // Calculate Min + CGFloat xScale = boundsSize.width / imageSize.width; // the scale needed to perfectly fit the image width-wise + CGFloat yScale = boundsSize.height / imageSize.height; // the scale needed to perfectly fit the image height-wise + CGFloat minScale = MIN(xScale, yScale); // use minimum of these to allow the image to become fully visible + + // If image is smaller than the screen then ensure we show it at + // min scale of 1 + if (xScale > 1 && yScale > 1) { + //minScale = 1.0; + } + + // Calculate Max + CGFloat maxScale = 4.0; // Allow double scale + // on high resolution screens we have double the pixel density, so we will be seeing every pixel if we limit the + // maximum zoom scale to 0.5. + if ([UIScreen instancesRespondToSelector:@selector(scale)]) { + maxScale = maxScale / [[UIScreen mainScreen] scale]; + + if (maxScale < minScale) { + maxScale = minScale * 2; + } + } + + // Set + self.maximumZoomScale = maxScale; + self.minimumZoomScale = minScale; + self.zoomScale = minScale; + + // Reset position + _photoImageView.frame = CGRectMake(0, 0, _photoImageView.frame.size.width, _photoImageView.frame.size.height); + [self setNeedsLayout]; +} + +#pragma mark - Layout + +- (void)layoutSubviews { + // Update tap view frame + _tapView.frame = self.bounds; + + // Super + [super layoutSubviews]; + + // Center the image as it becomes smaller than the size of the screen + CGSize boundsSize = self.bounds.size; + CGRect frameToCenter = _photoImageView.frame; + + // Horizontally + if (frameToCenter.size.width < boundsSize.width) { + frameToCenter.origin.x = floorf((boundsSize.width - frameToCenter.size.width) / 2.0); + } else { + frameToCenter.origin.x = 0; + } + + // Vertically + if (frameToCenter.size.height < boundsSize.height) { + frameToCenter.origin.y = floorf((boundsSize.height - frameToCenter.size.height) / 2.0); + } else { + frameToCenter.origin.y = 0; + } + + // Center + if (!CGRectEqualToRect(_photoImageView.frame, frameToCenter)) + _photoImageView.frame = frameToCenter; +} + +#pragma mark - UIScrollViewDelegate + +- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { + return _photoImageView; +} + +- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { + [_photoBrowser cancelControlHiding]; +} + +- (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *)view { + [_photoBrowser cancelControlHiding]; +} + +- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { + [_photoBrowser hideControlsAfterDelay]; +} + +- (void)scrollViewDidZoom:(UIScrollView *)scrollView { + [self setNeedsLayout]; + [self layoutIfNeeded]; +} + +#pragma mark - Tap Detection + +- (void)handleSingleTap:(CGPoint)touchPoint { + [_photoBrowser performSelector:@selector(toggleControls) withObject:nil afterDelay:0.2]; +} + +- (void)handleDoubleTap:(CGPoint)touchPoint { + + // Cancel any single tap handling + [NSObject cancelPreviousPerformRequestsWithTarget:_photoBrowser]; + + // Zoom + if (self.zoomScale == self.maximumZoomScale) { + + // Zoom out + [self setZoomScale:self.minimumZoomScale animated:YES]; + + } else { + + // Zoom in + [self zoomToRect:CGRectMake(touchPoint.x, touchPoint.y, 1, 1) animated:YES]; + + } + + // Delay controls + [_photoBrowser hideControlsAfterDelay]; +} + +// Image View +- (void)imageView:(UIImageView *)imageView singleTapDetected:(UITouch *)touch { + [self handleSingleTap:[touch locationInView:imageView]]; +} +- (void)imageView:(UIImageView *)imageView doubleTapDetected:(UITouch *)touch { + [self handleDoubleTap:[touch locationInView:imageView]]; +} + +// Background View +- (void)view:(UIView *)view singleTapDetected:(UITouch *)touch { + [self handleSingleTap:[touch locationInView:view]]; +} +- (void)view:(UIView *)view doubleTapDetected:(UITouch *)touch { + [self handleDoubleTap:[touch locationInView:view]]; +} + +@end diff --git a/Pods/IDMPhotoBrowser/LICENSE.txt b/Pods/IDMPhotoBrowser/LICENSE.txt new file mode 100644 index 0000000..8fe046a --- /dev/null +++ b/Pods/IDMPhotoBrowser/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Ideais Mobile + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/Pods/IDMPhotoBrowser/README.markdown b/Pods/IDMPhotoBrowser/README.markdown new file mode 100644 index 0000000..aa19d3b --- /dev/null +++ b/Pods/IDMPhotoBrowser/README.markdown @@ -0,0 +1,184 @@ +# IDMPhotoBrowser ![](http://cocoapod-badges.herokuapp.com/v/IDMPhotoBrowser/badge.png) ![](http://cocoapod-badges.herokuapp.com/p/IDMPhotoBrowser/badge.png) + +IDMPhotoBrowser is a new implementation based on [MWPhotoBrowser](https://github.com/mwaterfall/MWPhotoBrowser). + +We've added both user experience and technical features inspired by Facebook's and Tweetbot's photo browsers. + +## New features: +- Uses ARC +- Uses AFNetworking for image loading +- Image progress shown +- Minimalistic Facebook-like interface, swipe up/down to dismiss +- Ability to add custom actions on the action sheet + +## Features + +- Can display one or more images by providing either `UIImage` objects, file paths to images on the device, or URLs to images online +- Handles the downloading and caching of photos from the web seamlessly +- Photos can be zoomed and panned, and optional captions can be displayed + +## Screenshots + +[![Alt][screenshot1_thumb]][screenshot1] [![Alt][screenshot2_thumb]][screenshot2] [![Alt][screenshot3_thumb]][screenshot3] [![Alt][screenshot4_thumb]][screenshot4] [![Alt][screenshot5_thumb]][screenshot5] +[screenshot1_thumb]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_thumb1.png +[screenshot1]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_ss1.png +[screenshot2_thumb]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_thumb2.png +[screenshot2]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_ss2.png +[screenshot3_thumb]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_thumb3.png +[screenshot3]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_ss3.png +[screenshot4_thumb]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_thumb4.png +[screenshot4]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_ss4.png +[screenshot5_thumb]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_thumb5.png +[screenshot5]: https://raw.github.com/appkraft/IDMPhotoBrowser/master/Screenshots/idmphotobrowser_ss5.png + +## Usage + +See the code snippet below for an example of how to implement the photo browser. + +First create a photos array containing IDMPhoto objects: + +``` objective-c +// URLs array +NSArray *photosURL = @[[NSURL URLWithString:@"http://farm4.static.flickr.com/3567/3523321514_371d9ac42f_b.jpg"], +[NSURL URLWithString:@"http://farm4.static.flickr.com/3629/3339128908_7aecabc34b_b.jpg"], +[NSURL URLWithString:@"http://farm4.static.flickr.com/3364/3338617424_7ff836d55f_b.jpg"], +[NSURL URLWithString:@"http://farm4.static.flickr.com/3590/3329114220_5fbc5bc92b_b.jpg"]]; + +// Create an array to store IDMPhoto objects +NSMutableArray *photos = [NSMutableArray new]; + +for (NSURL *url in photosURL) { + IDMPhoto *photo = [IDMPhoto photoWithURL:url]; + [photos addObject:photo]; +} + +// Or use this constructor to receive an NSArray of IDMPhoto objects from your NSURL objects +NSArray *photos = [IDMPhoto photosWithURLs:photosURL]; +```` + +There are two main ways to presente the photoBrowser, with a fade on screen or with a zooming effect from an existing view. + +Using a simple fade transition: + +``` objective-c +IDMPhotoBrowser *browser = [[IDMPhotoBrowser alloc] initWithPhotos:photos]; +``` + +Zooming effect from a view: + +``` objective-c +IDMPhotoBrowser *browser = [[IDMPhotoBrowser alloc] initWithPhotos:photos animatedFromView:sender]; +``` + +When using this animation you can set the `scaleImage` property, in case the image from the view is not the same as the one that will be shown on the browser, so it will dynamically scale it: + +``` objective-c +browser.scaleImage = buttonSender.currentImage; +``` + +Presenting using a modal view controller: + +``` objective-c +[self presentViewController:browser animated:YES completion:nil]; +``` + +### Customization + +##### Toolbar + +You can customize the toolbar. There are three boolean properties you can set: displayActionButton (default is YES), displayArrowButton (default is YES) and displayCounterLabel (default is NO). If you dont want the toolbar at all, you can set displayToolbar = NO. + +Toolbar setup example: +``` objective-c +browser.displayActionButton = NO; +browser.displayArrowButton = YES; +browser.displayCounterLabel = YES; +``` + +It is possible to use your own image on the toolbar arrows: +``` objective-c +browser.leftArrowImage = [UIImage imageNamed:@"IDMPhotoBrowser_customArrowLeft.png"]; +browser.rightArrowImage = [UIImage imageNamed:@"IDMPhotoBrowser_customArrowRight.png"]; +browser.leftArrowSelectedImage = [UIImage imageNamed:@"IDMPhotoBrowser_customArrowLeftSelected.png"]; +browser.rightArrowSelectedImage = [UIImage imageNamed:@"IDMPhotoBrowser_customArrowRightSelected.png"]; +``` + +If you want to use custom actions, set the actionButtonTitles array with the titles for the actionSheet. Then, implement the photoBrowser:didDismissActionSheetWithButtonIndex:photoIndex: method, from the IDMPhotoBrowser delegate + +``` objective-c +browser.actionButtonTitles = @[@"Option 1", @"Option 2", @"Option 3", @"Option 4"]; +``` + +#### Others + +Others customizations you can make are: use white background color, don't display the done button and change the done button background image: +``` objective-c +browser.useWhiteBackgroundColor = YES; +browser.displayDoneButton = NO; +browser.doneBackgroundImage = [UIImage imageNamed:@"IDMPhotoBrowser_customDoneButton.png"]; +``` + +If you want to keep the interface shown when the user is scrolling : +``` objective-c +browser.autoHideInterface = NO; +``` + +You can use a smooth [pop](https://github.com/facebook/pop) animation when presenting and dismissing a photo: +``` objective-c +browser.usePopAnimation = YES; +``` + +If the presenting view controller doesn't have a status bar, in some cases you can force it to be hidden: +``` objective-c +browser.forceHideStatusBar = YES; +``` + +It's possible to disable the vertical dismiss swipe gesture: +``` objective-c +browser.disableVerticalSwipe = YES; +``` + +### Photo Captions + +Photo captions can be displayed simply by setting the `caption` property on specific photos: +``` objective-c +IDMPhoto *photo = [IDMPhoto photoWithFilePath:[[NSBundle mainBundle] pathForResource:@"photo2l" ofType:@"jpg"]]; +photo.caption = @"Campervan"; +``` + +No caption will be displayed if the caption property is not set. + +#### Custom Captions + +By default, the caption is a simple black transparent view with a label displaying the photo's caption in white. If you want to implement your own caption view, follow these steps: + +1. Optionally use a subclass of `IDMPhoto` for your photos so you can store more data than a simple caption string. +2. Subclass `IDMCaptionView` and override `-setupCaption` and `-sizeThatFits:` (and any other UIView methods you see fit) to layout your own view and set it's size. More information on this can be found in `IDMCaptionView.h` +3. Implement the `-photoBrowser:captionViewForPhotoAtIndex:` IDMPhotoBrowser delegate method (shown below). + +Example delegate method for custom caption view: +``` objective-c +- (IDMCaptionView *)photoBrowser:(IDMPhotoBrowser *)photoBrowser captionViewForPhotoAtIndex:(NSUInteger)index { + IDMPhoto *photo = [self.photos objectAtIndex:index]; + MyIDMCaptionViewSubclass *captionView = [[MyIDMCaptionViewSubclass alloc] initWithPhoto:photo]; + return captionView; +} +``` + +## Adding to your project + +### Using CocoaPods + +Just add `pod 'IDMPhotoBrowser'` to your Podfile. + +### Including Source Directly Into Your Project + +#### Opensource libraries used + +- [AFNetWorking](https://github.com/AFNetworking/AFNetworking) +- [DACircularProgress](https://github.com/danielamitay/DACircularProgress) +- [pop](https://github.com/facebook/pop) + +## Licence + +This project uses MIT License. diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index 1df0a75..15342ba 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,14 +1,24 @@ PODS: + - DACircularProgress (2.3.1) + - IDMPhotoBrowser (1.8.4): + - DACircularProgress + - pop + - SDWebImage - JSONModel (1.2.0) - Masonry (1.0.0) - MJRefresh (3.1.0) - PinYin4Objc (1.1.1) + - pop (1.0.9) + - SDWebImage (3.7.5): + - SDWebImage/Core (= 3.7.5) + - SDWebImage/Core (3.7.5) - TTTAttributedLabel (1.13.4) - UITableView+FDTemplateLayoutCell (1.4) - YSMChineseSort (0.1.1): - PinYin4Objc (~> 1.1.1) DEPENDENCIES: + - IDMPhotoBrowser - JSONModel - Masonry - MJRefresh @@ -17,10 +27,14 @@ DEPENDENCIES: - YSMChineseSort (~> 0.1.0) SPEC CHECKSUMS: + DACircularProgress: 4dd437c0fc3da5161cb289e07ac449493d41db71 + IDMPhotoBrowser: b574fe3229754e701f32df271afbc4ac7e4e1997 JSONModel: 12523685c4b623553ccf844bbbf7007624317b2c Masonry: b529bb169217897b6354d4b56b1fada6d475b13d MJRefresh: 743e6404967d1c2c688472ea3ecfde247d872db4 PinYin4Objc: 3fa9673610368330e2dfb688b1d19a35c3930a78 + pop: f667631a5108a2e60d9e8797c9b32ddaf2080bce + SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461 TTTAttributedLabel: 0a2ac7b2dd726d32a070dafb01446026b11e624f UITableView+FDTemplateLayoutCell: 234e1582bcc4e18461af91155123bb96538ed030 YSMChineseSort: ef532bfe993ff1b4dc9bcd644ead1a43b2632b88 diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 152a2c7..2a2205a 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,429 +7,751 @@ objects = { /* Begin PBXBuildFile section */ - 025CF885DB86DAA42D623C0A72A45573 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9F81E8DFC2A3B3D39023F9D20076AAD /* CoreText.framework */; }; - 04E0EFD308A39DA6783F9004C5689973 /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 89CE2CCD15AC43644EC665FC80FC4FDC /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 06AB294DA4E217789369C15285EDFDD8 /* UITableView+FDIndexPathHeightCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 992631B9ADA11D0AF4B931C9B9BF6981 /* UITableView+FDIndexPathHeightCache.m */; }; - 09D04A9AB71B5A4FE9175F80496EA5FD /* UIScrollView+MJRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = F24AB7D8D522807F8DDF864653DEA34F /* UIScrollView+MJRefresh.m */; }; - 0CA854067A03ACA022283A4E25420DBB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 506A5B2617A7166468E55C721EA33493 /* UIKit.framework */; }; - 0E33D27691C990C7C837220DC264B868 /* PinyinFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = A179169E4A590DB543D30FE85102C4B3 /* PinyinFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 133B30495D945B737235B107AAE7DAAB /* MJRefreshHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = B8EA540C679759E0B07DFE093B862A87 /* MJRefreshHeader.m */; }; - 19A2AEA6F18B93212006AFB2A7A25AF8 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 04A139FA2433E59AD1E2A6342ACEA526 /* JSONModel.m */; }; - 1BA3D9FB5D5145BF698C941C0F843518 /* MJRefreshBackGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = EB1D662FB20B25C3570CABD76FDE5B0D /* MJRefreshBackGifFooter.m */; }; - 200CA5D919CC71EA6A769541C92716D3 /* MJRefreshBackStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 84A55A0B63C96C75A2C80A1FB20C2AA8 /* MJRefreshBackStateFooter.m */; }; - 216E5A12ACFD64B84DC1A2E253336D9B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - 2280D55B18C853A6AA3AE9565EE91F19 /* UIView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1092377F03E9F611E7BED66A64F8F2 /* UIView+MJExtension.m */; }; - 2658969E817E3F0063EACD27458BCD2F /* NSString+PinYin4Cocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = F51FACFA1DA40F2BFF7DE4AF066C37EB /* NSString+PinYin4Cocoa.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 28694EB59EDECCCC8AFCAE2C78FA3226 /* UITableView+FDTemplateLayoutCellDebug.m in Sources */ = {isa = PBXBuildFile; fileRef = F8EB05C453E1F4DB9CAAE5DA3FC226EF /* UITableView+FDTemplateLayoutCellDebug.m */; }; - 2894369EF8D702DF360B6763B36E8444 /* MJRefreshAutoFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = C683E5772D725AD2A840CF0258F6D8D9 /* MJRefreshAutoFooter.m */; }; - 2905381350CEFFBFFA9BC8B5D027F190 /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FDA33D1101FCCA6F6C816DAB1BFBF83 /* MASConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2979E54C4AFD27076576E82ADEED2F00 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 98919257D1E9A476841E1EB1EA99AA8B /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2F85D170E76C661AB0D9E9A8B206C78D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - 2F8D135BE069298B3FE7C13988B2CF08 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = E82793A62DCDD5AE50D01583E90F1B86 /* JSONModelClassProperty.m */; }; - 331718BFB4A91CFFE026492905231562 /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 53AAE583469D53DE4097EE2AE6E3B5CA /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 335DCBC17D2469F228020EF6C7B41F7C /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = D5232190BE858269AB597857D283A636 /* MASConstraintMaker.m */; }; - 33BDAC7BB12C334CA28A108B8C1883C8 /* UITableView+FDTemplateLayoutCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 402994F0BB29BB59972868F339F890F1 /* UITableView+FDTemplateLayoutCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 393E2E501D0B38AE7DD535362026926D /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = CDB744299B40CBC6B12380695A2CE122 /* JSONAPI.m */; }; - 3F63C119F95A6735AE627BBB1BEBC4B1 /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 27AF53FB39EB0EF1D0E32CF00EC80FD5 /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 432BD50F1E699EDF2EA007E850FFCEF7 /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E9416C1D61E4308BFBF679E027C24B9 /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 444602F3A422E5EC1DA8EF2A3DFA01EB /* MJRefreshStateHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E16F6383F788296BE1E9759DDE726F29 /* MJRefreshStateHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 44F50504254959A81B2E96AD6261B2A9 /* MJRefreshFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = D0C8386E6976D64B83358653D942559A /* MJRefreshFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 47F9D9E27A28CEA429B60ED172E5D799 /* PinyinHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = E637111271B65E7F38533AAC71FD9DBC /* PinyinHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4856B77569991A1F8ECA90AC1734C181 /* PinYin4Objc.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FB0FD21BBE6B0A8E3E015F3E6E3A653 /* PinYin4Objc.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4A717270FAA9A1A75B2DB47028668973 /* PinyinHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = D87BCAF24DBA703F0E0914A3F65A6B39 /* PinyinHelper.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 4B2A904C218C82FA49EA02814077A576 /* NSString+PinYin4Cocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 244DD47EA93F5170C98BB89128FB9C82 /* NSString+PinYin4Cocoa.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4BDE97C783ED286933A60CAE9292B775 /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = A45CBC432B6EC86F59D3D4A3C8EABECD /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4D372BE2720BF45D696A2AFBCC8D20D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - 52B9F1F399DEADDDFBE3F17BAA8D6D14 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 8155CAF69A3AB81FB66D93898BE424EF /* JSONModelArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5457FCC2699281B5A4203BA1559F593F /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DC56D96495296516119B92404862DF82 /* NSArray+MASAdditions.m */; }; - 56EB6A682E7DD4235B12CB93A6DA1AD8 /* UITableView+FDTemplateLayoutCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C04E285D0D99BB08B81242F1D1984C36 /* UITableView+FDTemplateLayoutCell.m */; }; - 585CDAC34F08FB220FF26FF55CA899B7 /* MJRefreshGifHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C1F07C1CF6D3A54B51C5F88DA5A6BD6 /* MJRefreshGifHeader.m */; }; - 59DFAF46993F71E88A7336D2A8A3731D /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D4F8F9F929AF48A51A5ED3E93455A31 /* JSONHTTPClient.m */; }; - 5B0C9EFDC6F467762EC5D68DA0E7F3F8 /* NSArray+SortContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E86AA905DE27EDC540A266587776F28 /* NSArray+SortContact.m */; }; - 5CBFDC026AAED77902F3CAC48A96FE69 /* MJRefreshStateHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 379CE28F0C097FB83B3A626FF0F79369 /* MJRefreshStateHeader.m */; }; - 5FBA673E534DD7485FD75764258C8046 /* MJRefreshAutoStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = BC5FC3D7C00BAC3BD9E488922B15804C /* MJRefreshAutoStateFooter.m */; }; - 60455C808237A133A533D119BCA573BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - 64323FB96FB49B6E239193A018CA56D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - 6CF9B693754B004AD7FB2F8A6C0C8F36 /* MJRefreshBackGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 265EE952C306666CB507538F8B82D422 /* MJRefreshBackGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6E80858B842657D04234289E938017AC /* MJRefreshBackNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 716C8EBD3D5278AAB75E35838F0CC792 /* MJRefreshBackNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6EE360D085C7EDD97B0A48A415012D37 /* MJRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = E91674EECE1FB09178AEE68AB90BB413 /* MJRefreshFooter.m */; }; - 7259EB905DF2E9B7A2512581B9018C54 /* PinyinFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = DA55306A70D8FBBBC000B2B4C0638739 /* PinyinFormatter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - 740B64AC8CA44CDC54A3A2CCB396A0EB /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 70AAC39145F753135AD672D979F27055 /* JSONModelClassProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 751AF0AB3C1F0FDB5EB43C81463351F6 /* TTTAttributedLabel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F97EAF06A7C1FA3925B5E0C607B4D72 /* TTTAttributedLabel-dummy.m */; }; - 77F797A5A72065EE7351CF41728C2EC3 /* UIView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 108BC97870793B0A4ED2890DA53859DC /* UIView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7A64FBA532EE50A1600EB1DE4E595CFC /* HanyuPinyinOutputFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = F2B3CE471AEDA3AF65ADDEEADA047781 /* HanyuPinyinOutputFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7EC57A971BC81BEFCD4D52ACF58BB517 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = D5455867D208929771E81347BF6365A6 /* JSONValueTransformer.m */; }; - 81344449D3B0C65E8C85215E0B18CC3C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - 81403CAF6C4C1D3DC8B199289C3A6F59 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 9540DC8E3FA7BCA42A0F9E973C2F853D /* View+MASAdditions.m */; }; - 81599471BAB0420D54E1ADF8507A5113 /* Masonry-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 72DD34B2C5BB1A99FCD973E9D3CBE74C /* Masonry-dummy.m */; }; - 8572EA2DB7894989FDA4C085E70D96C8 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E53EFB9338AC676059DE9DB04156419 /* NSArray+JSONModel.m */; }; - 85AC21BC7BD345D84F489F7A52D39E44 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7FE4C395EE223C66C4E1F5E45F75ACBC /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 870F921B6CFDBD0486AEF0906D2865C8 /* PinYin4Objc-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1ABCD3A1F8B2EE96E1067F98418DE182 /* PinYin4Objc-dummy.m */; }; - 880C99DF50E8C41EBE032934BE7F9905 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 729A9676D71788C6C80520E709EE28B0 /* JSONModelArray.m */; }; - 891A5DA07C60C95DAD969B542CCDE442 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 262AA66DB404120AC390895C04058A46 /* JSONModel+networking.m */; }; - 8CD001B0217CFDD1F5D8A3A6C3A8A5DC /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 295DD9E3B3FE9F00057EA9584DFE11AB /* JSONKeyMapper.m */; }; - 8F11ABA0C553B18981097015226E5748 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 8374FA501C17158A8357C13D4971BEE3 /* NSArray+JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F68B37533C5AC9C8588BD0449D32673 /* MJRefresh-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 166CB277E41065AC669F904C6CAAEEF3 /* MJRefresh-dummy.m */; }; - 904EC3379A9E226064CB03DC1ACA2EEA /* UIScrollView+MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B4D83E1AA69F9442AAC9C50191099E8 /* UIScrollView+MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9205037BA8C22574B33FC96C5EA829A3 /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = C0AC9BC1ACB56B13F4C80A25CA78D5A7 /* Masonry.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 922ACEFE37E22A36A6F0209742B7B51A /* MJRefreshConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 608745171B81D78D56418BD5298C5850 /* MJRefreshConst.m */; }; - 9230119085130B273ECF20F076081DA1 /* MJRefreshComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = E28EE09B7C9E1A0D13D8E93745AD5E9A /* MJRefreshComponent.m */; }; - 932430D4A2289A39BE7C50EEAA60246A /* UIScrollView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CC87E001C0125932CBD4A198D7BF7BE /* UIScrollView+MJExtension.m */; }; - 93C240930CC0010E1BB946E61BCA6833 /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */; }; - 99D8C610BC84BE231C5D3D280F3B12AF /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 194AB03C6C6F3F341E7BC05475926214 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9A6AE1EF2E94AEB6912BE845583E7D57 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 506A5B2617A7166468E55C721EA33493 /* UIKit.framework */; }; - 9BF8D708AC9892125B0AA4E540361FF8 /* MJRefreshAutoNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = D53534C0032FCBEA723CEBC9889B3B50 /* MJRefreshAutoNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A049B322C75DF1C944935D7D0D7F1E7E /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = B9C35C2283ABAB903DA2011CDC0021A0 /* JSONModelError.m */; }; - A07740D16F33C488F368C99537B23E68 /* ChineseToPinyinResource.m in Sources */ = {isa = PBXBuildFile; fileRef = FE53CA993CE97B4634EBBBB4FBF5A8E6 /* ChineseToPinyinResource.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - A44AF130E4C5313CD193D9BF68853026 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 2393444564FC0605ECE53CC159CFB65D /* MASViewAttribute.m */; }; - A7D31BD1F3AD4ED4612467FAD332F388 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = ABC43486CC00B132925386552C2F098C /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A89B33DBDA4E99005E1F1BDB95A296CC /* MJRefreshBackFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E2509AED9F1C8AF13DB4B4CBAAB7D30 /* MJRefreshBackFooter.m */; }; - AF62B956405F7734F5A9B8F3FD4B1B96 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = BD0519846ABDF5F454E38B92BE576548 /* ViewController+MASAdditions.m */; }; - B19CA8B0FD349AEAD2D5A1C6B46AF47D /* MJRefreshNormalHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = BDF61128AE8597E743825ACD29B63A0F /* MJRefreshNormalHeader.m */; }; - B2B7C90BA9C4DBD9851C75AC801B0E8E /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DF702903EBFEE79D6004194960E4DFED /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B513F6964590E520E6EB546D67348FEE /* YSMChineseSort-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B5BC41839D61806FE296FBD69D89695C /* YSMChineseSort-dummy.m */; }; - B5A8A60810B99D763E3A3F076F63509D /* MJRefreshBackFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 860C1D8F052B9D9709DA1F9AB96A3472 /* MJRefreshBackFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B82A170962598E7EAE9A8752574B7B74 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 114EF80D2BD8D4C8B4D14854FDF5763C /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B949BBE407B72B2AC88B4EE342544518 /* NSArray+SortContact.h in Headers */ = {isa = PBXBuildFile; fileRef = F523ED943717C0B39CCC9A2BAB89DBFF /* NSArray+SortContact.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B9B44F1EDC36C095666CA0AE98371C09 /* UIScrollView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 629E2759EE4E74AC82272C66A4F1472E /* UIScrollView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BA68E12BC2C67CD3464E95D627F55D10 /* ChineseToPinyinResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 5599B1B854360AEC686956D662D6D612 /* ChineseToPinyinResource.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BBAB11F0AAF1C3D24914BD224335FF34 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FBDCDC8219668A958122180B9FC509EB /* QuartzCore.framework */; }; - BCD4B362C6194513150915437754E2D4 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = EB0BBDC7A2C2C6AC7DAF522DE6E80401 /* MASCompositeConstraint.m */; }; - BDD210D7537DD15CFE59AE126005E5F8 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = FB0D67FE6FA1DBBA850826157D525B9D /* MASLayoutConstraint.m */; }; - BE024118D329F8F566BD1811A1DC16CB /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = C2FDD8FD3810999BC6DB4E4747D09E94 /* MASConstraint.m */; }; - BE9BC2852A591E4211551B16EA430231 /* HanyuPinyinOutputFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D00595A2FAA330D4A37CA66A9782DDB /* HanyuPinyinOutputFormat.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - C10C8F3964FCCDA719D80697DEF7C7F4 /* TTTAttributedLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = B6B2587D468A89FE7C5DEBA0C6B5F0BD /* TTTAttributedLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C1DAA515EEE44666FC7C3CCAB35036F9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - C591CE6B9FA1950409E543A70B3ECABE /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C0A2DF1DDC309CC90717844CB58795A /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C636DF1A72420C0572374C7CE398666E /* UITableView+FDIndexPathHeightCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 413E5E519C4C0E07E21867B9961258C1 /* UITableView+FDIndexPathHeightCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C66A994F14BA080776BB3E2AD8CC55B4 /* MJRefreshAutoStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0015C02ACBC7B4A2470894BEF42E4FF7 /* MJRefreshAutoStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C67F32FF951D1979EF0E6B4ADED5E8A8 /* MJRefreshNormalHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = ED080B415FCA0D06F1CBBA4DD9AEB92E /* MJRefreshNormalHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C6EE194D232E9FE87097C0F1DF91B9FA /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E7F62D78DD5201550F5897FDE7C2CB1 /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C771EC503400FDE9FF3A97EFDA33CB10 /* UITableView+FDKeyedHeightCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CAB11BCB567EED038C6C815924E163B /* UITableView+FDKeyedHeightCache.m */; }; - D054768D94E678B8A0D7F2AB4FF45E54 /* MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = BE80F14D93DC9A087A352090CB46BF6B /* MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D1D5F0D1B38D0BEE62C63E57A3157B05 /* UITableView+FDTemplateLayoutCellDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = C6755CC8949292F50CA94D98739DB156 /* UITableView+FDTemplateLayoutCellDebug.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D2718FB5214DA8A524CE735932323F82 /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 5480118F8BB16A1236A4405AAB3500F0 /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D344FA97151933D2805D823B5D3EE6C2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */; }; - D3D9F12613E23AD64C1FA5F7081A3668 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = D6C79995E4720A97DD5FA2CF803EDFDE /* NSLayoutConstraint+MASDebugAdditions.m */; }; - D595C17C62C58E80EEC6F9EBCCF4050A /* MJRefreshGifHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 66F306B09A1B51D72F8A8983CCA6B656 /* MJRefreshGifHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DA8BAA5F8E5949555BC8B94E309E23D8 /* MJRefreshAutoGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E664ED6095EB282BD0662FF3FAAD993 /* MJRefreshAutoGifFooter.m */; }; - DD1F717B0527C71229B3339324E35E55 /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C1F281059FE59E348AE3D408D40B7FBF /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E0529B7C623EB5752662665A05DAAFBA /* MJRefreshAutoNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 4904D67267599E7E519DD02278723D6D /* MJRefreshAutoNormalFooter.m */; }; - E3DDD796CBF6578BBF8BE00D28461690 /* UITableView+FDKeyedHeightCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F45340F46AE53C910A67D143542D131 /* UITableView+FDKeyedHeightCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E6B49FBCE3957DB67F691ACCC4CAF4BE /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E9DE917A33FBFD702F4602E82C83A6C /* MASViewConstraint.m */; }; - EA03AF12E0E3E8ADC50DA70F2C5BF39E /* MJRefreshHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 26944A0DCB69E7C690D532498EE5A7B2 /* MJRefreshHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EB02AEF303313F801392DE8D90AFF0F7 /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = D3C853B58C23B5474521C4A1D747FFC4 /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EC049854BB7B8CCA06FE85533453368A /* TTTAttributedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54A90CEA122D707B60AE68ED3AEB14A7 /* TTTAttributedLabel.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - EC6CCC98505D2067BC98B4E6223C9DF8 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2077746E54A868478E91B968E5E2419E /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EE27B8D800BD5CBC5A23FACF87210920 /* JSONModel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9DB3C85178DB4CBEEDF2800083779482 /* JSONModel-dummy.m */; }; - EFCDCCD66269CA908494B11E024DC736 /* MJRefreshAutoGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = CC9EB027E595EDF272D8A53EFCCA88C5 /* MJRefreshAutoGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F0D01ED940723EED434E4EF4BCFF53F9 /* MJRefreshBackNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = CB741FD3BD4D41C37E9CED9F949A047E /* MJRefreshBackNormalFooter.m */; }; - F432A374A040EBAB69C9EABC6C4D699A /* MJRefreshComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = AF7CE18D1B84C33C6BD9BC6022D24EBD /* MJRefreshComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F4D2A0918C2C064F1A16B4CA2D42089A /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 82B9795D1EB2AE6FCAD4BC43665EED97 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F58455418F190BC37D1FD19EA3EA5B01 /* MJRefreshBackStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 98A31D0AB67D4F7DD0893E540FD6ACA0 /* MJRefreshBackStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F7B5D2658B77049DDEC0AAA88E6FCEA7 /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 49DE71827E6C4D699FCD67DFB4F4DC00 /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F7B852F0917A6D6540DAB54F736D681B /* MJRefreshConst.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A6C8C6220ABC63DABE701783C546073 /* MJRefreshConst.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F8CD872E3654E4B4DD4AEED9D4920B30 /* UITableView+FDTemplateLayoutCell-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B35EFB1E624A7D9772655C2C8469941D /* UITableView+FDTemplateLayoutCell-dummy.m */; }; - FD39EBE3398E1A99965AC003B273450D /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = BC55D01DC7EBA332F11F0C3601FAA35C /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FE1CA77809C3BEC1B31288C8F48767E9 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2C0AB3C85FA5E9164DD219A4ABB70A8 /* CoreGraphics.framework */; }; - FF1FEB28260D52C222E2F87FBBC05277 /* MJRefreshAutoFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 78765D61B87853B1771A316038FC100B /* MJRefreshAutoFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FF682E8B083BAEBBDF38C52D89D45E37 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 61129BE053D83E3DC62113140D0FD5A3 /* MASUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0189AC8B3E7DD90D04BE837373DDD3A2 /* POPGeometry.mm in Sources */ = {isa = PBXBuildFile; fileRef = DB2D9BBE951DE2BBDC0C279EB23523A4 /* POPGeometry.mm */; }; + 02F0747781ED4D186756BE6A1AD2E1DC /* POPAnimationTracerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = B33DE76334232BCFD0EC9BE80E316271 /* POPAnimationTracerInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0362F70E638B4C2BED58C2B7B94DAC6D /* NSArray+SortContact.m in Sources */ = {isa = PBXBuildFile; fileRef = 49F798C2DB0BA45F742D0D4F7EE583A6 /* NSArray+SortContact.m */; }; + 045E0036DF09AA43B0BA38F3EFF49CC0 /* IDMPhoto.h in Headers */ = {isa = PBXBuildFile; fileRef = 54DDC2556259EC51F45B90FBDB46F0A0 /* IDMPhoto.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 04706744CB1F16A63AA4AAB7DF68DFD1 /* POPAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2073D654EEFFFD80F3FAD86185F86C5C /* POPAnimation.mm */; }; + 04E0EFD308A39DA6783F9004C5689973 /* JSONValueTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = D27659C37717BC239E1B156A6B3CC939 /* JSONValueTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 072C184628072EDE522629576F1716DE /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F411472A5D1F24C6C3E0D98B8DBC8FC0 /* QuartzCore.framework */; }; + 083ACE49CA43CD2AB6419B6CC89F33BE /* POPAnimationExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = CE0B683EB25531510BA51DEA3F0E46D3 /* POPAnimationExtras.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0997F2663FC453CD86B29AD7543D8946 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 09D04A9AB71B5A4FE9175F80496EA5FD /* UIScrollView+MJRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = C6851E168BAAD9B15E560D5E8CE0C39E /* UIScrollView+MJRefresh.m */; }; + 0B4FF7BF198272E062EC014FF3812142 /* IDMPhoto.m in Sources */ = {isa = PBXBuildFile; fileRef = 75283415DB209D6F08BFEFACA2B5BA22 /* IDMPhoto.m */; }; + 0C1A29BFF65C6F2801B1BE0058718A19 /* DACircularProgressView.h in Headers */ = {isa = PBXBuildFile; fileRef = A179598B75F3FB8C9F7E23E9FE9BCEED /* DACircularProgressView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0E33D27691C990C7C837220DC264B868 /* PinyinFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 722235735C34723AC15450C82F7CB484 /* PinyinFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0F06F4FB536165C9BE73639A3AEA5FCD /* POPDecayAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 28AC1A25438A4788F38A1FE61D25873E /* POPDecayAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0F43FEACB0C18DD4C724B1655AF47728 /* DALabeledCircularProgressView.h in Headers */ = {isa = PBXBuildFile; fileRef = 28C39D892F249A76BD1FD55EB399037D /* DALabeledCircularProgressView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0FC431030D42C784D41429B720C4E102 /* TTTAttributedLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F7C21E045882F8A5C339AEB1CC1E5A4 /* TTTAttributedLabel.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 133B30495D945B737235B107AAE7DAAB /* MJRefreshHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 56610F595C7B7F9D420B17EC54E1FFC0 /* MJRefreshHeader.m */; }; + 135D54442A8B27BAC49596D30213429E /* UIImageView+HighlightedWebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 52358869ECD2DE6B1A50EACAFA24542D /* UIImageView+HighlightedWebCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 15236BB62E7C3D3824B0A23878156C76 /* POPSpringSolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 76C0F9ECAA796E941D55BDFAB3286225 /* POPSpringSolver.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 155CAE1127CB6A618657E08D61C34E88 /* POPAnimationTracer.mm in Sources */ = {isa = PBXBuildFile; fileRef = FC82E23D8D387420D9DCFFBF18AC28AD /* POPAnimationTracer.mm */; }; + 17B4FA9F91107B63A2D6313D6F9E3776 /* UIImage+MultiFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = D2A676F93CF68E9C6B2BB6D0588F008F /* UIImage+MultiFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 17F8551CC49F436FDFA4BE5CF73F7968 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B2DD8DF9B488F67B0EBBDDDF6C6749C /* MobileCoreServices.framework */; }; + 18C613BD7419721FF0F98D981E7AB62B /* SDWebImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AE88D34DDE07E360E1872C4E9623AA8 /* SDWebImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 19085A34C44E5DCDF0FAA764FEAE2E6A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 19A2AEA6F18B93212006AFB2A7A25AF8 /* JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4EF37BAF62CF8582D9A6B9A80782851D /* JSONModel.m */; }; + 1BA3D9FB5D5145BF698C941C0F843518 /* MJRefreshBackGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 79D930AE04A4648BF1E9D8B0C598B72B /* MJRefreshBackGifFooter.m */; }; + 200CA5D919CC71EA6A769541C92716D3 /* MJRefreshBackStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = A7409198F3D4A6C26117DD1103D9420C /* MJRefreshBackStateFooter.m */; }; + 20671B4EA598886CDFAAE7401DA23CCD /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E0D3F4252F6746D8945F43C5B4575DE /* SystemConfiguration.framework */; }; + 208E56AB6FC95590965759F76A03D7A2 /* POPGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AE916D814A89B259CA3E10A48A1C7BB /* POPGeometry.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 21324EC368B2B268691DD4C85176573F /* POPLayerExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 619197C57E3C79F9E4097180D8A241C6 /* POPLayerExtras.mm */; }; + 216E5A12ACFD64B84DC1A2E253336D9B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 21E80BC511E52B7D6F88DFD7DEFF39C9 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20B102320451631CFB91D7C63149A385 /* Security.framework */; }; + 2280D55B18C853A6AA3AE9565EE91F19 /* UIView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C582380906B1834EB86BAF0EE10739D /* UIView+MJExtension.m */; }; + 2658969E817E3F0063EACD27458BCD2F /* NSString+PinYin4Cocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = 457E97137A678AF2B43309C85EF23A2B /* NSString+PinYin4Cocoa.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 26B6A5D57096A7177250C574B02068CF /* UIButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F3A5ECFFF1876B15DCEBC2D88D0A4F /* UIButton+WebCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 26BAEC49451A13CAC1BD897294760E79 /* UITableView+FDKeyedHeightCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DD62082A2D04DA726684E4237945303 /* UITableView+FDKeyedHeightCache.m */; }; + 2894369EF8D702DF360B6763B36E8444 /* MJRefreshAutoFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = E9BD213588F034DF026A3B6040CB66D0 /* MJRefreshAutoFooter.m */; }; + 2905381350CEFFBFFA9BC8B5D027F190 /* MASConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = F678F737360EB4AA52AFD66AFEE4C9C6 /* MASConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2979E54C4AFD27076576E82ADEED2F00 /* NSLayoutConstraint+MASDebugAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A63707853F7D8CA90F09EC7616D3795 /* NSLayoutConstraint+MASDebugAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2DEFE54FB9DB324493324D3A6A775B75 /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 95A95EDCBDBEE5EF756292EE9CC2909A /* UIImage+GIF.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 2F2EC6983D905333D7E339A8C7EC3F6D /* POPVector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F48F73F466EA2E4D336D4D325948237 /* POPVector.mm */; }; + 2F30218BBC15CED7DC5E04B17E991F2B /* IDMZoomingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 037CD0BF7580FDE101418A3B7C8BDB69 /* IDMZoomingScrollView.m */; }; + 2F85D170E76C661AB0D9E9A8B206C78D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 2F8D135BE069298B3FE7C13988B2CF08 /* JSONModelClassProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = AE64325D5A6054A51455ABD7131A7E85 /* JSONModelClassProperty.m */; }; + 31B8933B81E77A3B66691FCA29466969 /* SDWebImageDownloaderOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 958F296B9DE81822BD052DF062E62F95 /* SDWebImageDownloaderOperation.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 331718BFB4A91CFFE026492905231562 /* ViewController+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = D2E75E3C7B3C6A6156B6D581EA7EAE7E /* ViewController+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 335DCBC17D2469F228020EF6C7B41F7C /* MASConstraintMaker.m in Sources */ = {isa = PBXBuildFile; fileRef = C20F821FBC9C1EBFE2DB5D80F925322B /* MASConstraintMaker.m */; }; + 3796D6487EE817473AEE3D6C27B5EC0C /* POPAnimationRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 291162C2CB2CE29CE40291D569C7AF7A /* POPAnimationRuntime.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 39173B8D335E1DC2AD03FA6D1000066E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DDC7354722EA418030BBB4DF3CE2A98 /* CoreGraphics.framework */; }; + 393E2E501D0B38AE7DD535362026926D /* JSONAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A22B3D7F903B85213AF2A676502CC3B /* JSONAPI.m */; }; + 3AFE9CE62199BC568CFDA5938B360436 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 3B11886CB4F3882CC19C3F6C0B6AC7DC /* POPMath.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6D89C04B5E0B827072ECF1187FC17412 /* POPMath.mm */; }; + 3B6BD22B9257021C354CA4186980D38B /* UITableView+FDTemplateLayoutCellDebug.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C4B4DE1E6664F9A8BBA5E004C8008A5 /* UITableView+FDTemplateLayoutCellDebug.m */; }; + 3F63C119F95A6735AE627BBB1BEBC4B1 /* MASViewAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = A27251AD5DAAD610AA3CF3C25A1201B1 /* MASViewAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3F87F7677EC9F847EABDDEE59EF3049D /* POPAnimationEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 00A53338DA18C075C4411873BE1BE24C /* POPAnimationEventInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 40EAED65327A78804BDA983E892028ED /* POPSpringAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = B259B725C6BF44FC001F94486FD3E89B /* POPSpringAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 432BD50F1E699EDF2EA007E850FFCEF7 /* View+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = A98D0355096CC2FF9DFB01816E792F1A /* View+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 436DED593090861F297BF1889F1E4818 /* UIImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 323A8D73926C818BD47E390B27568BD9 /* UIImageView+WebCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 444602F3A422E5EC1DA8EF2A3DFA01EB /* MJRefreshStateHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = C9F1F22B83B223B57306C77328649B6F /* MJRefreshStateHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 44C1C7E5E3D822E53C8F0221E61F7D31 /* POPAnimationEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = D79C3EC86DDC13EF7A79DB741F5C4169 /* POPAnimationEvent.mm */; }; + 44F50504254959A81B2E96AD6261B2A9 /* MJRefreshFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 601583FDDC451DC7AA23F4764EAEDF3C /* MJRefreshFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 45D003B8436E189FE3663B0DC577D2D1 /* SDWebImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 435EC560283D577C2E4ABCAB14A6D88A /* SDWebImageManager.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 4702A774296D10A3AD515B23C8A4BCBA /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE943BA8D183AE3E4EF2B0EC76532FA4 /* CoreText.framework */; }; + 47F9D9E27A28CEA429B60ED172E5D799 /* PinyinHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = B0160B8165FA7D3D73707CF887164068 /* PinyinHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4856B77569991A1F8ECA90AC1734C181 /* PinYin4Objc.h in Headers */ = {isa = PBXBuildFile; fileRef = A02059944564A4710941D5907B767D67 /* PinYin4Objc.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 48A70BB45594C1DEA179A3419BFAA01A /* UITableView+FDKeyedHeightCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1862D04C22EE693EAE7C412438AF7A0D /* UITableView+FDKeyedHeightCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4A717270FAA9A1A75B2DB47028668973 /* PinyinHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = BD487E4D661FFAE233A6697527B48C1E /* PinyinHelper.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 4B2A904C218C82FA49EA02814077A576 /* NSString+PinYin4Cocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 126095C34CFE4A360FC5EE277879B164 /* NSString+PinYin4Cocoa.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4BDE97C783ED286933A60CAE9292B775 /* JSONKeyMapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 27347BF09BE2451ABCF03BC054FA86D7 /* JSONKeyMapper.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4BFA4E938B621F76F1E75B49609570E3 /* UITableView+FDTemplateLayoutCell-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = BA05632501A67B41E1101F890EDF9689 /* UITableView+FDTemplateLayoutCell-dummy.m */; }; + 4C7AE371AD65277F456320898A1C78D3 /* IDMTapDetectingView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C019930E3CCA9F1C687D167A708E679 /* IDMTapDetectingView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 50859C101D28838C3E3BF949D3015D77 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F411472A5D1F24C6C3E0D98B8DBC8FC0 /* QuartzCore.framework */; }; + 5185323C93A3673038B57C4567CCF13F /* POPAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D633806E1344B3D5C92F6C7D202865 /* POPAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 52B9F1F399DEADDDFBE3F17BAA8D6D14 /* JSONModelArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 68146AE7FB96ACCFD685911BCBA1A6DD /* JSONModelArray.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 53C576313D9C0CC458A354A998FC5460 /* POPSpringAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4F03CF4D582711879D702156CA37560E /* POPSpringAnimation.mm */; }; + 53FB0CBA14BE53F79F4EB4E7B46C523B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 5457FCC2699281B5A4203BA1559F593F /* NSArray+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6284A9DD31DB9BA3AB9B994CCA1B2DBB /* NSArray+MASAdditions.m */; }; + 553B757D178B7E2019558C5685BD76C0 /* IDMPhotoProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 6848DD727C78658F5608AA1DDE3DFD25 /* IDMPhotoProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 564E30E22610C1DB5FEEB038493FD080 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F411472A5D1F24C6C3E0D98B8DBC8FC0 /* QuartzCore.framework */; }; + 567B36099CD2B3F5B23C5D615DAAF4C2 /* POPBasicAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 12C94D0ACAA2D5B7A3D5E96E27316DD7 /* POPBasicAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56CC1FC460015587FF770657ECFC4421 /* POPCGUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 50108F824FE50D69D8B1D4BE105EB27D /* POPCGUtils.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 56FB20883F37B756F8FB8BB2E90EB778 /* POP.h in Headers */ = {isa = PBXBuildFile; fileRef = CFF4D15F9ECBD3D25BEFB261FBD92068 /* POP.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 57FE6CB625FFF2DB856E775FD04621A0 /* POPPropertyAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = BABBC6C9BF41ABB1C39E62AF0D2859F4 /* POPPropertyAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 585CDAC34F08FB220FF26FF55CA899B7 /* MJRefreshGifHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C3BE9908EEDFEC021D8D7A8FB9BF54 /* MJRefreshGifHeader.m */; }; + 59DFAF46993F71E88A7336D2A8A3731D /* JSONHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = E2F21A47644F6ECF2B0F94CEF00B9791 /* JSONHTTPClient.m */; }; + 5ABA11E4EB7ADDDD21D6A84E4F09B989 /* UIImage+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = 4033ADE28AABA43D70A9F516B394D487 /* UIImage+GIF.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5AD900DBD7B45F3849235C49339FBECD /* POPDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 88EB7FC18F83EB6DE1E098D8ED89BCEF /* POPDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5AECCB414FABED7B3BBCF152EA817262 /* POPAnimationRuntime.mm in Sources */ = {isa = PBXBuildFile; fileRef = 129EBA169D8A8A3ADABDFE5D55BA0ACB /* POPAnimationRuntime.mm */; }; + 5CBFDC026AAED77902F3CAC48A96FE69 /* MJRefreshStateHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E0BEDD757BE9D6EDCC84C4D23AF9C490 /* MJRefreshStateHeader.m */; }; + 5EFFA28204033EDB0F51889F9BCC4C83 /* POPCustomAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 331123C3B0F567F58700DA713E2A6FAC /* POPCustomAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F4AECEF356E35995112F9167B219AD6 /* DACircularProgress-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8667A5506376A4E1EB5A699699796578 /* DACircularProgress-dummy.m */; }; + 5FBA673E534DD7485FD75764258C8046 /* MJRefreshAutoStateFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = BB0B7CC9E5B9AE724BBDF376C6DC486C /* MJRefreshAutoStateFooter.m */; }; + 60455C808237A133A533D119BCA573BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 63DA088BB9E415102AEA772F7ED1F114 /* UIImage+MultiFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 02D245545B91515A5C3865B38ED82AEC /* UIImage+MultiFormat.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 64AB78A6666CB51D352394983C95EAA3 /* UIButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 93030B1C30BA4D5705A137D96F5E4001 /* UIButton+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 64E5EE139751929C9EBB1D5621B7B0C1 /* POPAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BD44F8DC26673B026FE868741FCF62B /* POPAnimator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 656B0ED5390EF09903CDCD64B2E8E543 /* IDMTapDetectingImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7EEC0AE439BD692CD48793F3B17972D1 /* IDMTapDetectingImageView.m */; }; + 6A43F5DD40556CEF6465AAEF94776BA6 /* POPAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 664237D83309F76AC0689FF098D832EA /* POPAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6BDB4834B84460AB19CF11CB426BB826 /* POPBasicAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 17E20145B2726B1B479D9C3EE56EAE65 /* POPBasicAnimation.mm */; }; + 6CA2EA325854FC3E80DA4595C91D19E9 /* POPPropertyAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8400B900669AE074775B45BF2568B59 /* POPPropertyAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6CA6B230663A0FDC8E5F176F25BB1CA5 /* IDMTapDetectingImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = FF3AECE33276716D6D71F3D0A981C068 /* IDMTapDetectingImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6CF9B693754B004AD7FB2F8A6C0C8F36 /* MJRefreshBackGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DACE80931C1C0E445B755ED645CD7BC /* MJRefreshBackGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6E07DA5CD501121696AFFB6ED969F7D3 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1B543D9E97BAA47A650153F8F77420E6 /* MessageUI.framework */; }; + 6E7E7B6047FF01F5EB45DFED193554E7 /* POPBasicAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 488B5EE69DE24808D9ABF5DE1FD3768C /* POPBasicAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6E80858B842657D04234289E938017AC /* MJRefreshBackNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B4A46DF8B020025909E2A2E639F94F8 /* MJRefreshBackNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6EE360D085C7EDD97B0A48A415012D37 /* MJRefreshFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 20957418CA2DD99D9511119D2BCE5A52 /* MJRefreshFooter.m */; }; + 707CC58E2B410DF44334F820384C2675 /* POPSpringAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A0334FA11F94DB4B777D75FBD647FD2 /* POPSpringAnimation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7259EB905DF2E9B7A2512581B9018C54 /* PinyinFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = FDBB7874B1BDF1161E0DA045FE9E775D /* PinyinFormatter.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 740B64AC8CA44CDC54A3A2CCB396A0EB /* JSONModelClassProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = CD06886D4DAD8B6A2D62352A5412190D /* JSONModelClassProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 77F797A5A72065EE7351CF41728C2EC3 /* UIView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E1565A1A6C4375D3C9609E49ED4BF4E /* UIView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 787B3CDCAA678EBD24B90EFE26AA5410 /* UITableView+FDTemplateLayoutCellDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CC2028E7074C32F894993BA5B55DE42 /* UITableView+FDTemplateLayoutCellDebug.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7A64FBA532EE50A1600EB1DE4E595CFC /* HanyuPinyinOutputFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F50A5FE262CF789377EE12AFEF366C2 /* HanyuPinyinOutputFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7CA2AB7C84AEAA6A75161DDCB34755C6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 7DCD2BED90B909DB0217663529B4C6C7 /* TransformationMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6F2688B0B576882E5158A274F04B37FE /* TransformationMatrix.cpp */; }; + 7EC57A971BC81BEFCD4D52ACF58BB517 /* JSONValueTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 3ECA8773D22BF7142944DE3044D3290A /* JSONValueTransformer.m */; }; + 7F6931A1F5EE6ABECD6AFA6E1B138FAE /* TransformationMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = BFD83041FB402794FC9231126F387FD9 /* TransformationMatrix.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 81403CAF6C4C1D3DC8B199289C3A6F59 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = F71E53F4CD23771C14FB8E46BFD102B9 /* View+MASAdditions.m */; }; + 81599471BAB0420D54E1ADF8507A5113 /* Masonry-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4091EF435FBD00570D30D199B977E8F2 /* Masonry-dummy.m */; }; + 81FD3C1AC273F59DB97467FF03C44976 /* POPAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = C54C102B0FA3620AA6B171E31DA9BA7D /* POPAnimationEvent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 82AC9861A9FE0BEFEC04D31C3B05ABB2 /* DACircularProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3281F3CBFA393181C9860EA986E9D86C /* DACircularProgressView.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 8572EA2DB7894989FDA4C085E70D96C8 /* NSArray+JSONModel.m in Sources */ = {isa = PBXBuildFile; fileRef = DE7B0857B924252CD878D7195FC137F3 /* NSArray+JSONModel.m */; }; + 85AC21BC7BD345D84F489F7A52D39E44 /* JSONAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 966B413390350C9C4A9B4E61F84D99F3 /* JSONAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 870F921B6CFDBD0486AEF0906D2865C8 /* PinYin4Objc-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 39DBA297EB2F45FBBCA9935614EA68D8 /* PinYin4Objc-dummy.m */; }; + 880C99DF50E8C41EBE032934BE7F9905 /* JSONModelArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 08C0E83F7FA713C800A98C87BC9C755D /* JSONModelArray.m */; }; + 881D01430733003411599A6BC79515BA /* pop-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4658B08823A3859A191F5D7D4CB1E009 /* pop-dummy.m */; }; + 891A5DA07C60C95DAD969B542CCDE442 /* JSONModel+networking.m in Sources */ = {isa = PBXBuildFile; fileRef = 09008B8C6E1D352C446EAB6490DE0163 /* JSONModel+networking.m */; }; + 8C603F929950A3E64025E0C041C5819B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 8CD001B0217CFDD1F5D8A3A6C3A8A5DC /* JSONKeyMapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C2F0EEFA72A0BE6400C1E4E987FBBF6 /* JSONKeyMapper.m */; }; + 8F11ABA0C553B18981097015226E5748 /* NSArray+JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 58C58481C311A9F568F2930781BF8728 /* NSArray+JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8F68B37533C5AC9C8588BD0449D32673 /* MJRefresh-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F96DCA7D3291CD434ECDB2C1B5E14FFC /* MJRefresh-dummy.m */; }; + 904D31627D12676A515EEAA157351AE7 /* SDWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = AD3B5FF56EE07EE2E3BAE1FC11BF120B /* SDWebImageOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 904EC3379A9E226064CB03DC1ACA2EEA /* UIScrollView+MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = 8175ADD73519FD5B22145B5FB59E0187 /* UIScrollView+MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 90688D0BECF0052611AFBF7665C185DC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + 91B496BA3035D46083B94313F8A9ED5D /* YSMChineseSort-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 23C70615AD8AF722FC9EC4E05BE1F999 /* YSMChineseSort-dummy.m */; }; + 9205037BA8C22574B33FC96C5EA829A3 /* Masonry.h in Headers */ = {isa = PBXBuildFile; fileRef = 66102C394B50EBFC4536C661543FD636 /* Masonry.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 922ACEFE37E22A36A6F0209742B7B51A /* MJRefreshConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F8ED4DABB3504C18EF5CFC626527946 /* MJRefreshConst.m */; }; + 9230119085130B273ECF20F076081DA1 /* MJRefreshComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 50DAAC04D4368B09C441F9CB95607968 /* MJRefreshComponent.m */; }; + 932430D4A2289A39BE7C50EEAA60246A /* UIScrollView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D6938BBDB982CBEE797AB8B0D2CBD5E /* UIScrollView+MJExtension.m */; }; + 977C7D7421562D2C69CCF5F185868775 /* SDWebImageDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7DB17CC2B735D8135A44C87008CB93 /* SDWebImageDecoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 97C7ECB0851BE769C65420C0F32FF513 /* UITableView+FDTemplateLayoutCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 40995FD3ED29E642A3EC1FF74B944187 /* UITableView+FDTemplateLayoutCell.m */; }; + 99D8C610BC84BE231C5D3D280F3B12AF /* MASCompositeConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 592378CB29A41D37184589A7B8AB39D8 /* MASCompositeConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9A6AE1EF2E94AEB6912BE845583E7D57 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF70E0C2156F49ECDDDD19B971901C7D /* UIKit.framework */; }; + 9BF8D708AC9892125B0AA4E540361FF8 /* MJRefreshAutoNormalFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AC939FD34B9461208B26D03A8B833B8 /* MJRefreshAutoNormalFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9CE2597902AC07AAB2ADFAFC2FA52500 /* SDWebImagePrefetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BD7170EE624B7DC0D1632D29942E5F9 /* SDWebImagePrefetcher.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 9F64D573C718557F2A49094459682477 /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = CF581AFBEED6C5F8F30EA627293B592E /* NSData+ImageContentType.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + 9FA7AF908C1CE8ECEFB47E1E1AB1BDAF /* POPAnimatableProperty.mm in Sources */ = {isa = PBXBuildFile; fileRef = B8FE56ECF5B2746B6CF80AEDB94726BA /* POPAnimatableProperty.mm */; }; + A049B322C75DF1C944935D7D0D7F1E7E /* JSONModelError.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C22DC725D39BDAD2354E6AFA68D38B1 /* JSONModelError.m */; }; + A07740D16F33C488F368C99537B23E68 /* ChineseToPinyinResource.m in Sources */ = {isa = PBXBuildFile; fileRef = 9644CD86CBE2AFE4EA7E8DF11C2C9B64 /* ChineseToPinyinResource.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + A2DDC48EA90671521DFCA0E247425850 /* UIView+WebCacheOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 91844EC3721E2B9499ECC0E6DB8443D0 /* UIView+WebCacheOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A2F2A5F211AB2D75C48577037B36D57D /* POPPropertyAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = A91A3553E76953F5FD3FF8812373BF79 /* POPPropertyAnimation.mm */; }; + A3B20901424BCE213D027B91679A2CED /* UITableView+FDTemplateLayoutCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AEFF1DC5157779282B5157C56205C39 /* UITableView+FDTemplateLayoutCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A44AF130E4C5313CD193D9BF68853026 /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = BC6870B5C4C02E0FC050B859D555FAD3 /* MASViewAttribute.m */; }; + A50A7F0C44DCCA59479A5124DE5FF985 /* SDWebImageCompat.h in Headers */ = {isa = PBXBuildFile; fileRef = 00A2F5EC5C9A0FE2984DC2FD88AE96E0 /* SDWebImageCompat.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A73CF2B77F87A836C254D53CA9ACE3CF /* SDWebImagePrefetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = DBB97CE145366FF86A9E10F452F95539 /* SDWebImagePrefetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A7D31BD1F3AD4ED4612467FAD332F388 /* NSArray+MASShorthandAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = B5DC2061AE147FC58D652D092476FCF4 /* NSArray+MASShorthandAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A89B33DBDA4E99005E1F1BDB95A296CC /* MJRefreshBackFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 300B834BFA95EC19BC702AB6B7422575 /* MJRefreshBackFooter.m */; }; + A8CBF7EF69D3F749C4B1AC5638A3F4F9 /* IDMCaptionView.h in Headers */ = {isa = PBXBuildFile; fileRef = 7F5721A1166050B3C7C69DCFBBD689A3 /* IDMCaptionView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A905CA5C84614C500E16CE76FD11FFA6 /* SDWebImageDownloaderOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 77E9A2676E0C7A44607650F49395F932 /* SDWebImageDownloaderOperation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A957A8891AE5DC8AF50754EC29FECF1C /* SDWebImageCompat.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BFF5BAC6EDADF23EAC3260247601BBD /* SDWebImageCompat.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + AB470E9C1D12660F993BF55A1DD6B83C /* IDMPBConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 21F2E03569D7983250053CAD25F7AE07 /* IDMPBConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ACA6823BEF7BBFACAC820A0CAB7B3D22 /* POPAnimatorPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AE39B1A7F17327A9C478D708E87B2C1 /* POPAnimatorPrivate.h */; settings = {ATTRIBUTES = (Project, ); }; }; + ADC446415ADB182351E6CC61ED0C0A2D /* SDWebImageDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C44999FC543A349DB56757BAA5FE78E /* SDWebImageDecoder.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + AF62B956405F7734F5A9B8F3FD4B1B96 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EBA5D5E7EA1B086645C4FCD714A439 /* ViewController+MASAdditions.m */; }; + B0229C84B85ED43582EDF2C788BA599E /* POPAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F641290367619A729B152CAD6ECA7374 /* POPAction.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B19CA8B0FD349AEAD2D5A1C6B46AF47D /* MJRefreshNormalHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D3EB355A4D5E22836968762C8DE666AA /* MJRefreshNormalHeader.m */; }; + B2B7C90BA9C4DBD9851C75AC801B0E8E /* MASConstraint+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = AEE43D429D59094C138679119D0E50F7 /* MASConstraint+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B3351FD684BAE516C41F11487E98FA5A /* UIImageView+HighlightedWebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 36D64856F67D7D55373FE038BF08E0DA /* UIImageView+HighlightedWebCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B365E1570CDC6F4B59B5E5BF43EFD0FD /* IDMTapDetectingView.m in Sources */ = {isa = PBXBuildFile; fileRef = C8CC4434B2C9D2B63C3AE0507A87BB5E /* IDMTapDetectingView.m */; }; + B5A8A60810B99D763E3A3F076F63509D /* MJRefreshBackFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 21A3310068C2C5A202BDC80518F1C83B /* MJRefreshBackFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B82A170962598E7EAE9A8752574B7B74 /* JSONModel.h in Headers */ = {isa = PBXBuildFile; fileRef = A0D639222C6907895C63E8BC9AA21097 /* JSONModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B9B44F1EDC36C095666CA0AE98371C09 /* UIScrollView+MJExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = C19234EC52C68A3C9BCB13FDA153EE8D /* UIScrollView+MJExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BA67CB61C29B6F5A73B2B0C5342B3FCE /* POPMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CE6FEB330B05CB480DA084F7B914F1D /* POPMath.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BA68E12BC2C67CD3464E95D627F55D10 /* ChineseToPinyinResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 8937858037D57D7901C493DB275056E3 /* ChineseToPinyinResource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BBA3610C7B7820702EC562B855F0AE86 /* POPAnimatableProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 8D0CFEB5547E29DC96E3A5D0CC3ACA29 /* POPAnimatableProperty.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BC1624F3A96664B2293B821344E95B8A /* POPAnimator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 90E07171D35423306235DC6A33DAD553 /* POPAnimator.mm */; }; + BCD4B362C6194513150915437754E2D4 /* MASCompositeConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = C96143B90D8C319073634830F10A46FC /* MASCompositeConstraint.m */; }; + BDD210D7537DD15CFE59AE126005E5F8 /* MASLayoutConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 48175D9CE5772F7196246F2E40077407 /* MASLayoutConstraint.m */; }; + BE024118D329F8F566BD1811A1DC16CB /* MASConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E2BDE5517C60068516D82E67CDA3BA7 /* MASConstraint.m */; }; + BE9BC2852A591E4211551B16EA430231 /* HanyuPinyinOutputFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 73CD966394775B507844F76DEB08CAD0 /* HanyuPinyinOutputFormat.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + BFAFA8E760A294C06035B829E0CD262B /* UIImageView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B106872C40FB15F8E27ED2FF268B19D8 /* UIImageView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C0082061058B312E7C6AECF7F5C194FA /* SDImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 818DE1BB0FB89317120BCAD92094C4E5 /* SDImageCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C07310EEBE9C647B2FC4BC0576E2F81F /* NSData+ImageContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = D7C331454E3F68E33C2970B5DBE0523C /* NSData+ImageContentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C0E89B692E9AAEFA924568388E90B75C /* IDMPhotoBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = 60E85060D0061807461444528FE8341D /* IDMPhotoBrowser.m */; }; + C1DAA515EEE44666FC7C3CCAB35036F9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + C22679D6A290E0A2917D1E1D432BF662 /* SDWebImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F3224AEAE0BCF6DCF60EAAFBDEBD440 /* SDWebImageDownloader.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + C375976CF27245440D56DEC6675AE700 /* POPLayerExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 088726AEBC0BDC74C8BC416A63D343B6 /* POPLayerExtras.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C4688B5B4B4FE89A8ECFC4ADC61B82EA /* POPDecayAnimationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 01F33684DD42E63B5E83A9833F29CE76 /* POPDecayAnimationInternal.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C50105D260716DE5B38B1B2E49783884 /* IDMPhotoBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = DAC9174A627C8471D375AB741B908F6D /* IDMPhotoBrowser.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C591CE6B9FA1950409E543A70B3ECABE /* JSONModelLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 5108EDA896DDC141872031770379AE12 /* JSONModelLib.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C66A994F14BA080776BB3E2AD8CC55B4 /* MJRefreshAutoStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B673C4695FC112D64B5AA029CE16B65 /* MJRefreshAutoStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C67F32FF951D1979EF0E6B4ADED5E8A8 /* MJRefreshNormalHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = BE9B32674E38906642E5A51895D31DB7 /* MJRefreshNormalHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C6EE194D232E9FE87097C0F1DF91B9FA /* MASLayoutConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 08284163F0B638C7B3CC54574AD62517 /* MASLayoutConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C89735ED483951490851B25D579D88F5 /* NSArray+SortContact.h in Headers */ = {isa = PBXBuildFile; fileRef = 2954AD84FA1ED7B42199B0E3AB1A6405 /* NSArray+SortContact.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CB10954DC1E4326FF0EBD48A7C5DDC6A /* TTTAttributedLabel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 275F75B43F7F4E0D56BAED84854DCC1F /* TTTAttributedLabel-dummy.m */; }; + CC57875F759209776FE66977D3767059 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4EF5C3BC029095FC59D4F9EB3CE86DF8 /* ImageIO.framework */; }; + CCB00EA146DB9E6649C4B64336FE5E2F /* UnitBezier.h in Headers */ = {isa = PBXBuildFile; fileRef = E0FCFA28C4B75AF19872AE93334DDDE1 /* UnitBezier.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CFF9EA79C21AD1BCD88C05FF495F6B57 /* POPAnimationExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AA626A1F9C480113E7DE6411F0819C6 /* POPAnimationExtras.mm */; }; + D054768D94E678B8A0D7F2AB4FF45E54 /* MJRefresh.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F3522455BDB502C297294134197D458 /* MJRefresh.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D07762B98FE3ED7C3678A99D2C954A63 /* SDWebImage-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E3A1CD4E99AAC9C0A83DC1325148FDD /* SDWebImage-dummy.m */; }; + D10F2CF4A58F98292F3C62BD9AEF35E4 /* POPAnimationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 4397F84CE439781D22521A71891EA42E /* POPAnimationPrivate.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D2718FB5214DA8A524CE735932323F82 /* JSONHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 92E4D49F377BB7903465B2CA8B68DB6F /* JSONHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D2EDE69078D55E3188DE57E2FE3C6A67 /* IDMCaptionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 65D2733D9D9131F55E63EFF184F003A7 /* IDMCaptionView.m */; }; + D3D9F12613E23AD64C1FA5F7081A3668 /* NSLayoutConstraint+MASDebugAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = DC5E4952CCA56281F423E61DF0079F10 /* NSLayoutConstraint+MASDebugAdditions.m */; }; + D595C17C62C58E80EEC6F9EBCCF4050A /* MJRefreshGifHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = D1429DB2D2ECDFFA567619A053DDB9FF /* MJRefreshGifHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D9D08CE1089A8AF139D3722A51A5C1AC /* POPVector.h in Headers */ = {isa = PBXBuildFile; fileRef = E076CA03270B75AC5403100C38D66C3B /* POPVector.h */; settings = {ATTRIBUTES = (Project, ); }; }; + DA1E499F4BDCA9724837D9460D8AD4A4 /* SDWebImageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AED7F96023BBAEDFA3DC825D01A8176 /* SDWebImageManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA8BAA5F8E5949555BC8B94E309E23D8 /* MJRefreshAutoGifFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = CE6BF7A4C0B755807A807565272A90CE /* MJRefreshAutoGifFooter.m */; }; + DC984A4ED65F72FD47975EEFFDFB1D7F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF70E0C2156F49ECDDDD19B971901C7D /* UIKit.framework */; }; + DD1F717B0527C71229B3339324E35E55 /* View+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = B4F3763B9D5217D0B6FF012FBBD3E625 /* View+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E0529B7C623EB5752662665A05DAAFBA /* MJRefreshAutoNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 771B828CF9F3BAE0C2D68F6596CE6824 /* MJRefreshAutoNormalFooter.m */; }; + E5B5FAF69B83503CE7F3D97156C30A81 /* UIView+WebCacheOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A74CC2A1B596B9EE130F16359A6C3D3 /* UIView+WebCacheOperation.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + E5E65DD9C6C28672207C63F3C891B72E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67E44771ABA063E83251203096C6616B /* Foundation.framework */; }; + E6B49FBCE3957DB67F691ACCC4CAF4BE /* MASViewConstraint.m in Sources */ = {isa = PBXBuildFile; fileRef = 586951E177479097254AA04C2136BE8E /* MASViewConstraint.m */; }; + E8BD31817E410ABB1FF22F46A03958CC /* IDMZoomingScrollView.h in Headers */ = {isa = PBXBuildFile; fileRef = CB3E30C6FCC1765E2FE0A3B668FD3BD3 /* IDMZoomingScrollView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EA03AF12E0E3E8ADC50DA70F2C5BF39E /* MJRefreshHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 916C2E1E4AC9E40A229DF8976E43533C /* MJRefreshHeader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EB02AEF303313F801392DE8D90AFF0F7 /* MASViewConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F72824508F9BD12374524D47878559A /* MASViewConstraint.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EB897F24AB040A5460EA0775DB902147 /* FloatConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC166188310D39A8A1DB4946A65420D /* FloatConversion.h */; settings = {ATTRIBUTES = (Project, ); }; }; + EC6CCC98505D2067BC98B4E6223C9DF8 /* MASConstraintMaker.h in Headers */ = {isa = PBXBuildFile; fileRef = 36534968955CC5F55F5DE074EF60E7B3 /* MASConstraintMaker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ED50D786E9D0349A9CEA668CF52A5DB8 /* UITableView+FDIndexPathHeightCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 6894B45B4BCF387B53AA0960AE6391EC /* UITableView+FDIndexPathHeightCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ED6201D1815B2765304A36C423299634 /* SDImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = F3DF532B4B697A98000651BB94AD597A /* SDImageCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + EE27B8D800BD5CBC5A23FACF87210920 /* JSONModel-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B756359C68074DA108D0BA960C8D5539 /* JSONModel-dummy.m */; }; + EF9006327AFFDBED3FD589DA04E2D36A /* DALabeledCircularProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 624C980497F879D4DEE2BBB60F28572B /* DALabeledCircularProgressView.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + EFCDCCD66269CA908494B11E024DC736 /* MJRefreshAutoGifFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AAC8071162219DD8F251B1D969C9960 /* MJRefreshAutoGifFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F0D01ED940723EED434E4EF4BCFF53F9 /* MJRefreshBackNormalFooter.m in Sources */ = {isa = PBXBuildFile; fileRef = 847A4E827146FA911E09E7C5398DE048 /* MJRefreshBackNormalFooter.m */; }; + F1195BAAB1529A464B453A76DA65A81D /* IDMPhotoBrowser-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = ED419767B2A23AAEACC9F1236BCFCB9F /* IDMPhotoBrowser-dummy.m */; }; + F2C8A8C2D970D8DF50859AAE79268C6C /* TTTAttributedLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = B182F9937220A7A3449E75D60C053153 /* TTTAttributedLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F432A374A040EBAB69C9EABC6C4D699A /* MJRefreshComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B2819E5CF36BB0216B2243E0848E24B /* MJRefreshComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F4D2A0918C2C064F1A16B4CA2D42089A /* JSONModelError.h in Headers */ = {isa = PBXBuildFile; fileRef = 8AF6EA1D86DCC5BBEF3367D6DF403038 /* JSONModelError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F58455418F190BC37D1FD19EA3EA5B01 /* MJRefreshBackStateFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FC4DB15964D13A3222F1850AAB97565 /* MJRefreshBackStateFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F6005DF8FE626123F25ECE09F986C0C1 /* UITableView+FDIndexPathHeightCache.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5FD9C8C13FEBED15FE648864C1E7B3 /* UITableView+FDIndexPathHeightCache.m */; }; + F6EE0D2B6BC3A66968B16013DF4E360A /* Pods-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */; }; + F7B5D2658B77049DDEC0AAA88E6FCEA7 /* JSONModel+networking.h in Headers */ = {isa = PBXBuildFile; fileRef = 7548E9C462347D487C5FCB8816384FD3 /* JSONModel+networking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F7B852F0917A6D6540DAB54F736D681B /* MJRefreshConst.h in Headers */ = {isa = PBXBuildFile; fileRef = F9C7BA89850F8191460702C1A05A9979 /* MJRefreshConst.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F8F35C58A179A9C65F272693F981496B /* POPCustomAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4224AA7B397316B196A22C85F2ECF355 /* POPCustomAnimation.mm */; }; + FAC77817F58BC43A560204EA0127958D /* POPCGUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 74270470E231980B45C370FB877B80CC /* POPCGUtils.mm */; }; + FC02D1C899CF0E4C6ED55B1621681742 /* POPDecayAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7491B38CDAC2B5F592EAAAE0CB685E2C /* POPDecayAnimation.mm */; }; + FD0F9E2143ACABB4C5A0A51A6CB8C0F7 /* POPAnimationTracer.h in Headers */ = {isa = PBXBuildFile; fileRef = B52D68B9D723D4B64A99F45478D4AF81 /* POPAnimationTracer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FD39EBE3398E1A99965AC003B273450D /* NSArray+MASAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7D7621692F16F3C9F2B63105E7B8DD7B /* NSArray+MASAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FF1FEB28260D52C222E2F87FBBC05277 /* MJRefreshAutoFooter.h in Headers */ = {isa = PBXBuildFile; fileRef = 01A66C72A4D572C130BA6A83A2C637D9 /* MJRefreshAutoFooter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FF682E8B083BAEBBDF38C52D89D45E37 /* MASUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEC6E8D28B647F236F4F3A33370FFB0 /* MASUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 03900599A476EE253332A6D2B02B63D4 /* PBXContainerItemProxy */ = { + 04FDC7E56ED668D6567395012D23669E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 53480ED0BE09FF49E34B1702D485CAAB; - remoteInfo = Masonry; + remoteGlobalIDString = 3299CAC9360F1CB3904663183E4377FA; + remoteInfo = SDWebImage; }; - 157D7A7E6F559B17949BD8F1F5591095 /* PBXContainerItemProxy */ = { + 1563CA6D7F1A2A34DA0D19B04606E928 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = CCE5DB49633E923856CEEF33620F9F3A; + remoteGlobalIDString = ACAE27A34969E14A7DA9829402D7B9A0; + remoteInfo = IDMPhotoBrowser; + }; + 1B24051A34A9BB21D76DB48910FC7BA7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2EA31293B21417A860AF4C7A2AF6D37F; remoteInfo = YSMChineseSort; }; - 2A35DE0560418EADAFD501CD000B2415 /* PBXContainerItemProxy */ = { + 1C71BA08246B2BB1FE60A81236969832 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 0CCBBF4BAA3FA48F98623D8875DC1DA7; - remoteInfo = PinYin4Objc; + remoteGlobalIDString = 8F74D9EA91F4C43190670066BAC37D44; + remoteInfo = MJRefresh; }; - 6DF4B977293D354C80F595986D970234 /* PBXContainerItemProxy */ = { + 1D6D4DD2DE5F29EA828DEF88FABBE281 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 225D3AF2360A78DBB2CC4B04810264A2; - remoteInfo = TTTAttributedLabel; + remoteGlobalIDString = 3299CAC9360F1CB3904663183E4377FA; + remoteInfo = SDWebImage; }; - CF28976655116E551283C116F5A72D24 /* PBXContainerItemProxy */ = { + 25B728094F4BB07F5EC939D283A54637 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 8EC7E635416C96DB820A12731344BB70; - remoteInfo = "UITableView+FDTemplateLayoutCell"; + remoteGlobalIDString = 752E10FA460B850F47C5FF0DB4FE4316; + remoteInfo = "YSMChineseSort-YSMChineseSort"; + }; + 276EE06A22F928895FC7225E5D6F8F07 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 430EAC388BE8F7F7139A997947AB1B89; + remoteInfo = pop; }; - D9893ED9BD4445A010B610A61431850E /* PBXContainerItemProxy */ = { + 3AF8E9C8CDCA7B86F519BCA6389EEBE1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 0CCBBF4BAA3FA48F98623D8875DC1DA7; remoteInfo = PinYin4Objc; }; - DA9DD33A3B5EF24B96E648FAC2E2D04F /* PBXContainerItemProxy */ = { + 4C35E476FC7E643FF1EA6B351424CA1D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 7A485A0ACE8DF44FD12B12F55BC78D56; - remoteInfo = "YSMChineseSort-YSMChineseSort"; + remoteGlobalIDString = 53480ED0BE09FF49E34B1702D485CAAB; + remoteInfo = Masonry; }; - E9CF60177721D624D1DDB4C8EE3C72D7 /* PBXContainerItemProxy */ = { + 62020C6060F814403049E657CEBF2F7A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = D83BD52D05C83FB0FA57065604C5BB28; + remoteInfo = "UITableView+FDTemplateLayoutCell"; + }; + 7F1AB7742A5FB7658C2AB86D1467F618 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 09FA060F1A0492FB25232F489AC4E573; remoteInfo = JSONModel; }; - F9A7C0849A86A2386783CD46DE32AB47 /* PBXContainerItemProxy */ = { + 810D3AB59C4C2CD6A9F75FB4ED5363E7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 8F74D9EA91F4C43190670066BAC37D44; - remoteInfo = MJRefresh; + remoteGlobalIDString = 9775596B3CA16905FC8F66DA8E2A3C67; + remoteInfo = DACircularProgress; + }; + 82674F1811E55B0858E288110233D317 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 91869A386018FE20DEC9E78C6B0CEA82; + remoteInfo = TTTAttributedLabel; + }; + AE74C139A3A41DA061149101739A4AA9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0CCBBF4BAA3FA48F98623D8875DC1DA7; + remoteInfo = PinYin4Objc; + }; + E22503AABEEB35137FA488927FA55485 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 9775596B3CA16905FC8F66DA8E2A3C67; + remoteInfo = DACircularProgress; + }; + F1333F08A2A7DE70A48C17A097902A9E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 430EAC388BE8F7F7139A997947AB1B89; + remoteInfo = pop; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0015C02ACBC7B4A2470894BEF42E4FF7 /* MJRefreshAutoStateFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoStateFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h; sourceTree = ""; }; - 04A139FA2433E59AD1E2A6342ACEA526 /* JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModel.m; path = JSONModel/JSONModel/JSONModel.m; sourceTree = ""; }; - 0E7F62D78DD5201550F5897FDE7C2CB1 /* MASLayoutConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASLayoutConstraint.h; path = Masonry/MASLayoutConstraint.h; sourceTree = ""; }; + 00A2F5EC5C9A0FE2984DC2FD88AE96E0 /* SDWebImageCompat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageCompat.h; path = SDWebImage/SDWebImageCompat.h; sourceTree = ""; }; + 00A53338DA18C075C4411873BE1BE24C /* POPAnimationEventInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationEventInternal.h; path = pop/POPAnimationEventInternal.h; sourceTree = ""; }; + 01A66C72A4D572C130BA6A83A2C637D9 /* MJRefreshAutoFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoFooter.h; path = MJRefresh/Base/MJRefreshAutoFooter.h; sourceTree = ""; }; + 01F33684DD42E63B5E83A9833F29CE76 /* POPDecayAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPDecayAnimationInternal.h; path = pop/POPDecayAnimationInternal.h; sourceTree = ""; }; + 02D245545B91515A5C3865B38ED82AEC /* UIImage+MultiFormat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImage+MultiFormat.m"; path = "SDWebImage/UIImage+MultiFormat.m"; sourceTree = ""; }; + 037CD0BF7580FDE101418A3B7C8BDB69 /* IDMZoomingScrollView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = IDMZoomingScrollView.m; path = Classes/IDMZoomingScrollView.m; sourceTree = ""; }; + 08284163F0B638C7B3CC54574AD62517 /* MASLayoutConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASLayoutConstraint.h; path = Masonry/MASLayoutConstraint.h; sourceTree = ""; }; + 088726AEBC0BDC74C8BC416A63D343B6 /* POPLayerExtras.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPLayerExtras.h; path = pop/POPLayerExtras.h; sourceTree = ""; }; + 08C0E83F7FA713C800A98C87BC9C755D /* JSONModelArray.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelArray.m; path = JSONModel/JSONModel/JSONModelArray.m; sourceTree = ""; }; + 09008B8C6E1D352C446EAB6490DE0163 /* JSONModel+networking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "JSONModel+networking.m"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.m"; sourceTree = ""; }; + 0AE39B1A7F17327A9C478D708E87B2C1 /* POPAnimatorPrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimatorPrivate.h; path = pop/POPAnimatorPrivate.h; sourceTree = ""; }; + 0AF0CA0D471618FC4B2F143628329A38 /* pop-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "pop-prefix.pch"; sourceTree = ""; }; + 0B00F8E3FCE28893A4ED9D57C9A41339 /* IDMPhotoBrowser-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "IDMPhotoBrowser-prefix.pch"; sourceTree = ""; }; + 0B4A46DF8B020025909E2A2E639F94F8 /* MJRefreshBackNormalFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackNormalFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h; sourceTree = ""; }; + 0C44999FC543A349DB56757BAA5FE78E /* SDWebImageDecoder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageDecoder.m; path = SDWebImage/SDWebImageDecoder.m; sourceTree = ""; }; + 0C582380906B1834EB86BAF0EE10739D /* UIView+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+MJExtension.m"; path = "MJRefresh/UIView+MJExtension.m"; sourceTree = ""; }; + 0CC2028E7074C32F894993BA5B55DE42 /* UITableView+FDTemplateLayoutCellDebug.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDTemplateLayoutCellDebug.h"; path = "Classes/UITableView+FDTemplateLayoutCellDebug.h"; sourceTree = ""; }; + 0CE6FEB330B05CB480DA084F7B914F1D /* POPMath.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPMath.h; path = pop/POPMath.h; sourceTree = ""; }; + 0F48F73F466EA2E4D336D4D325948237 /* POPVector.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPVector.mm; path = pop/POPVector.mm; sourceTree = ""; }; 10834806BD7B412BC24F347361FA2C8E /* Pods-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-acknowledgements.plist"; sourceTree = ""; }; - 108BC97870793B0A4ED2890DA53859DC /* UIView+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+MJExtension.h"; path = "MJRefresh/UIView+MJExtension.h"; sourceTree = ""; }; - 11146955450C791609794828F4F4F7B5 /* TTTAttributedLabel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = TTTAttributedLabel.xcconfig; sourceTree = ""; }; - 114EF80D2BD8D4C8B4D14854FDF5763C /* JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModel.h; path = JSONModel/JSONModel/JSONModel.h; sourceTree = ""; }; - 166CB277E41065AC669F904C6CAAEEF3 /* MJRefresh-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MJRefresh-dummy.m"; sourceTree = ""; }; - 194AB03C6C6F3F341E7BC05475926214 /* MASCompositeConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASCompositeConstraint.h; path = Masonry/MASCompositeConstraint.h; sourceTree = ""; }; - 1ABCD3A1F8B2EE96E1067F98418DE182 /* PinYin4Objc-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PinYin4Objc-dummy.m"; sourceTree = ""; }; - 1B4D83E1AA69F9442AAC9C50191099E8 /* UIScrollView+MJRefresh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+MJRefresh.h"; path = "MJRefresh/UIScrollView+MJRefresh.h"; sourceTree = ""; }; - 1C1F07C1CF6D3A54B51C5F88DA5A6BD6 /* MJRefreshGifHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshGifHeader.m; path = MJRefresh/Custom/Header/MJRefreshGifHeader.m; sourceTree = ""; }; - 1CAB11BCB567EED038C6C815924E163B /* UITableView+FDKeyedHeightCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDKeyedHeightCache.m"; path = "Classes/UITableView+FDKeyedHeightCache.m"; sourceTree = ""; }; - 1E9416C1D61E4308BFBF679E027C24B9 /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASShorthandAdditions.h"; path = "Masonry/View+MASShorthandAdditions.h"; sourceTree = ""; }; - 2077746E54A868478E91B968E5E2419E /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraintMaker.h; path = Masonry/MASConstraintMaker.h; sourceTree = ""; }; - 2393444564FC0605ECE53CC159CFB65D /* MASViewAttribute.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewAttribute.m; path = Masonry/MASViewAttribute.m; sourceTree = ""; }; - 244DD47EA93F5170C98BB89128FB9C82 /* NSString+PinYin4Cocoa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+PinYin4Cocoa.h"; path = "PinYin4Objc/Classes/NSString+PinYin4Cocoa.h"; sourceTree = ""; }; - 262AA66DB404120AC390895C04058A46 /* JSONModel+networking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "JSONModel+networking.m"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.m"; sourceTree = ""; }; - 265EE952C306666CB507538F8B82D422 /* MJRefreshBackGifFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackGifFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h; sourceTree = ""; }; - 26944A0DCB69E7C690D532498EE5A7B2 /* MJRefreshHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshHeader.h; path = MJRefresh/Base/MJRefreshHeader.h; sourceTree = ""; }; + 126095C34CFE4A360FC5EE277879B164 /* NSString+PinYin4Cocoa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+PinYin4Cocoa.h"; path = "PinYin4Objc/Classes/NSString+PinYin4Cocoa.h"; sourceTree = ""; }; + 129EBA169D8A8A3ADABDFE5D55BA0ACB /* POPAnimationRuntime.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPAnimationRuntime.mm; path = pop/POPAnimationRuntime.mm; sourceTree = ""; }; + 12C94D0ACAA2D5B7A3D5E96E27316DD7 /* POPBasicAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPBasicAnimation.h; path = pop/POPBasicAnimation.h; sourceTree = ""; }; + 17C3BE9908EEDFEC021D8D7A8FB9BF54 /* MJRefreshGifHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshGifHeader.m; path = MJRefresh/Custom/Header/MJRefreshGifHeader.m; sourceTree = ""; }; + 17E20145B2726B1B479D9C3EE56EAE65 /* POPBasicAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPBasicAnimation.mm; path = pop/POPBasicAnimation.mm; sourceTree = ""; }; + 185964FD2D3D8C87FC4E80A62F7D6C53 /* libJSONModel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJSONModel.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 1862D04C22EE693EAE7C412438AF7A0D /* UITableView+FDKeyedHeightCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDKeyedHeightCache.h"; path = "Classes/UITableView+FDKeyedHeightCache.h"; sourceTree = ""; }; + 1943C527E01F767B4777786BE2E5F6A9 /* IDMPhotoBrowser.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = IDMPhotoBrowser.xcconfig; sourceTree = ""; }; + 1AA626A1F9C480113E7DE6411F0819C6 /* POPAnimationExtras.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPAnimationExtras.mm; path = pop/POPAnimationExtras.mm; sourceTree = ""; }; + 1AAC8071162219DD8F251B1D969C9960 /* MJRefreshAutoGifFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoGifFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h; sourceTree = ""; }; + 1AEFF1DC5157779282B5157C56205C39 /* UITableView+FDTemplateLayoutCell.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDTemplateLayoutCell.h"; path = "Classes/UITableView+FDTemplateLayoutCell.h"; sourceTree = ""; }; + 1B543D9E97BAA47A650153F8F77420E6 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/MessageUI.framework; sourceTree = DEVELOPER_DIR; }; + 1F7C21E045882F8A5C339AEB1CC1E5A4 /* TTTAttributedLabel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = TTTAttributedLabel.m; path = TTTAttributedLabel/TTTAttributedLabel.m; sourceTree = ""; }; + 1FC4DB15964D13A3222F1850AAB97565 /* MJRefreshBackStateFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackStateFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h; sourceTree = ""; }; + 2073D654EEFFFD80F3FAD86185F86C5C /* POPAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPAnimation.mm; path = pop/POPAnimation.mm; sourceTree = ""; }; + 20957418CA2DD99D9511119D2BCE5A52 /* MJRefreshFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshFooter.m; path = MJRefresh/Base/MJRefreshFooter.m; sourceTree = ""; }; + 20B102320451631CFB91D7C63149A385 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; + 21A3310068C2C5A202BDC80518F1C83B /* MJRefreshBackFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackFooter.h; path = MJRefresh/Base/MJRefreshBackFooter.h; sourceTree = ""; }; + 21F2E03569D7983250053CAD25F7AE07 /* IDMPBConstants.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMPBConstants.h; path = Classes/IDMPBConstants.h; sourceTree = ""; }; + 22F3A5ECFFF1876B15DCEBC2D88D0A4F /* UIButton+WebCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIButton+WebCache.m"; path = "SDWebImage/UIButton+WebCache.m"; sourceTree = ""; }; + 2301BD18CAC61ACB3251AC6447C1C62C /* libMasonry.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMasonry.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 23C70615AD8AF722FC9EC4E05BE1F999 /* YSMChineseSort-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YSMChineseSort-dummy.m"; sourceTree = ""; }; 272643F56613CA0D336AE3DBF19DC404 /* Pods-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-dummy.m"; sourceTree = ""; }; - 27AF53FB39EB0EF1D0E32CF00EC80FD5 /* MASViewAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewAttribute.h; path = Masonry/MASViewAttribute.h; sourceTree = ""; }; - 28F4E56CA712B7BD6F86E92BFFE0B477 /* MJRefresh.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = MJRefresh.bundle; path = MJRefresh/MJRefresh.bundle; sourceTree = ""; }; - 295DD9E3B3FE9F00057EA9584DFE11AB /* JSONKeyMapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONKeyMapper.m; path = JSONModel/JSONModelTransformations/JSONKeyMapper.m; sourceTree = ""; }; - 2A1092377F03E9F611E7BED66A64F8F2 /* UIView+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+MJExtension.m"; path = "MJRefresh/UIView+MJExtension.m"; sourceTree = ""; }; - 2CC87E001C0125932CBD4A198D7BF7BE /* UIScrollView+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+MJExtension.m"; path = "MJRefresh/UIScrollView+MJExtension.m"; sourceTree = ""; }; - 2D4F8F9F929AF48A51A5ED3E93455A31 /* JSONHTTPClient.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONHTTPClient.m; path = JSONModel/JSONModelNetworking/JSONHTTPClient.m; sourceTree = ""; }; - 33897DD00E1FE3795DB41FD5B3E38F95 /* libMasonry.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMasonry.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 379CE28F0C097FB83B3A626FF0F79369 /* MJRefreshStateHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshStateHeader.m; path = MJRefresh/Custom/Header/MJRefreshStateHeader.m; sourceTree = ""; }; + 27347BF09BE2451ABCF03BC054FA86D7 /* JSONKeyMapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONKeyMapper.h; path = JSONModel/JSONModelTransformations/JSONKeyMapper.h; sourceTree = ""; }; + 275F75B43F7F4E0D56BAED84854DCC1F /* TTTAttributedLabel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TTTAttributedLabel-dummy.m"; sourceTree = ""; }; + 27EBA5D5E7EA1B086645C4FCD714A439 /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "ViewController+MASAdditions.m"; path = "Masonry/ViewController+MASAdditions.m"; sourceTree = ""; }; + 280DD7D0E4F9B1FE05F7CB9533E8FE71 /* UITableView+FDTemplateLayoutCell.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "UITableView+FDTemplateLayoutCell.xcconfig"; sourceTree = ""; }; + 28AC1A25438A4788F38A1FE61D25873E /* POPDecayAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPDecayAnimation.h; path = pop/POPDecayAnimation.h; sourceTree = ""; }; + 28C39D892F249A76BD1FD55EB399037D /* DALabeledCircularProgressView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DALabeledCircularProgressView.h; path = DACircularProgress/DALabeledCircularProgressView.h; sourceTree = ""; }; + 291162C2CB2CE29CE40291D569C7AF7A /* POPAnimationRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationRuntime.h; path = pop/POPAnimationRuntime.h; sourceTree = ""; }; + 2954AD84FA1ED7B42199B0E3AB1A6405 /* NSArray+SortContact.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+SortContact.h"; path = "Pod/Classes/NSArray+SortContact.h"; sourceTree = ""; }; + 2A74CC2A1B596B9EE130F16359A6C3D3 /* UIView+WebCacheOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIView+WebCacheOperation.m"; path = "SDWebImage/UIView+WebCacheOperation.m"; sourceTree = ""; }; + 2AE88D34DDE07E360E1872C4E9623AA8 /* SDWebImageDownloader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageDownloader.h; path = SDWebImage/SDWebImageDownloader.h; sourceTree = ""; }; + 2BFF5BAC6EDADF23EAC3260247601BBD /* SDWebImageCompat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageCompat.m; path = SDWebImage/SDWebImageCompat.m; sourceTree = ""; }; + 2C019930E3CCA9F1C687D167A708E679 /* IDMTapDetectingView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMTapDetectingView.h; path = Classes/IDMTapDetectingView.h; sourceTree = ""; }; + 2C22DC725D39BDAD2354E6AFA68D38B1 /* JSONModelError.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelError.m; path = JSONModel/JSONModel/JSONModelError.m; sourceTree = ""; }; + 2C2F0EEFA72A0BE6400C1E4E987FBBF6 /* JSONKeyMapper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONKeyMapper.m; path = JSONModel/JSONModelTransformations/JSONKeyMapper.m; sourceTree = ""; }; + 2CF69A8012E2FB4E99AEAA41CF605274 /* DACircularProgress.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DACircularProgress.xcconfig; sourceTree = ""; }; + 2E1565A1A6C4375D3C9609E49ED4BF4E /* UIView+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+MJExtension.h"; path = "MJRefresh/UIView+MJExtension.h"; sourceTree = ""; }; + 2E3A1CD4E99AAC9C0A83DC1325148FDD /* SDWebImage-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SDWebImage-dummy.m"; sourceTree = ""; }; + 2F3522455BDB502C297294134197D458 /* MJRefresh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefresh.h; path = MJRefresh/MJRefresh.h; sourceTree = ""; }; + 2FEA08431B9AABCA9D59F5D2C63FF5F2 /* TTTAttributedLabel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = TTTAttributedLabel.xcconfig; sourceTree = ""; }; + 300B834BFA95EC19BC702AB6B7422575 /* MJRefreshBackFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackFooter.m; path = MJRefresh/Base/MJRefreshBackFooter.m; sourceTree = ""; }; + 323A8D73926C818BD47E390B27568BD9 /* UIImageView+WebCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+WebCache.m"; path = "SDWebImage/UIImageView+WebCache.m"; sourceTree = ""; }; + 3281F3CBFA393181C9860EA986E9D86C /* DACircularProgressView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DACircularProgressView.m; path = DACircularProgress/DACircularProgressView.m; sourceTree = ""; }; + 331123C3B0F567F58700DA713E2A6FAC /* POPCustomAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPCustomAnimation.h; path = pop/POPCustomAnimation.h; sourceTree = ""; }; + 36534968955CC5F55F5DE074EF60E7B3 /* MASConstraintMaker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraintMaker.h; path = Masonry/MASConstraintMaker.h; sourceTree = ""; }; + 36D64856F67D7D55373FE038BF08E0DA /* UIImageView+HighlightedWebCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+HighlightedWebCache.h"; path = "SDWebImage/UIImageView+HighlightedWebCache.h"; sourceTree = ""; }; 37DB56D75062CC75FCB0966E1C6E8A8E /* Pods-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-acknowledgements.markdown"; sourceTree = ""; }; - 385AB0ECD603E7EEDE152305DA48A659 /* libYSMChineseSort.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libYSMChineseSort.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 3C0A2DF1DDC309CC90717844CB58795A /* JSONModelLib.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; }; - 3D6D3488E6B1CAC493FF602F0BA02435 /* MJRefresh-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJRefresh-prefix.pch"; sourceTree = ""; }; - 402994F0BB29BB59972868F339F890F1 /* UITableView+FDTemplateLayoutCell.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDTemplateLayoutCell.h"; path = "Classes/UITableView+FDTemplateLayoutCell.h"; sourceTree = ""; }; - 413E5E519C4C0E07E21867B9961258C1 /* UITableView+FDIndexPathHeightCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDIndexPathHeightCache.h"; path = "Classes/UITableView+FDIndexPathHeightCache.h"; sourceTree = ""; }; - 47DA9E3BFA04A090AD4B6FC59B2127D4 /* MJRefresh.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MJRefresh.xcconfig; sourceTree = ""; }; - 4904D67267599E7E519DD02278723D6D /* MJRefreshAutoNormalFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoNormalFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m; sourceTree = ""; }; - 49DE71827E6C4D699FCD67DFB4F4DC00 /* JSONModel+networking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "JSONModel+networking.h"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.h"; sourceTree = ""; }; - 4B3758B342B78C5099F62059028C7C05 /* libPinYin4Objc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPinYin4Objc.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 39DBA297EB2F45FBBCA9935614EA68D8 /* PinYin4Objc-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PinYin4Objc-dummy.m"; sourceTree = ""; }; + 3B673C4695FC112D64B5AA029CE16B65 /* MJRefreshAutoStateFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoStateFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.h; sourceTree = ""; }; + 3BD44F8DC26673B026FE868741FCF62B /* POPAnimator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimator.h; path = pop/POPAnimator.h; sourceTree = ""; }; + 3E0D3F4252F6746D8945F43C5B4575DE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; }; + 3E1E45502509280E1C54EFD799C1221F /* libUITableView+FDTemplateLayoutCell.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libUITableView+FDTemplateLayoutCell.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3ECA8773D22BF7142944DE3044D3290A /* JSONValueTransformer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONValueTransformer.m; path = JSONModel/JSONModelTransformations/JSONValueTransformer.m; sourceTree = ""; }; + 3F6DF0B2ECC28D92105C28D72E3D8BAC /* libPinYin4Objc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPinYin4Objc.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3F8ED4DABB3504C18EF5CFC626527946 /* MJRefreshConst.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshConst.m; path = MJRefresh/MJRefreshConst.m; sourceTree = ""; }; + 4029EFB0C263ECD8D3E88B44F7A2C894 /* SDWebImage-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SDWebImage-prefix.pch"; sourceTree = ""; }; + 4033ADE28AABA43D70A9F516B394D487 /* UIImage+GIF.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImage+GIF.h"; path = "SDWebImage/UIImage+GIF.h"; sourceTree = ""; }; + 4091EF435FBD00570D30D199B977E8F2 /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = ""; }; + 40995FD3ED29E642A3EC1FF74B944187 /* UITableView+FDTemplateLayoutCell.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDTemplateLayoutCell.m"; path = "Classes/UITableView+FDTemplateLayoutCell.m"; sourceTree = ""; }; + 41D633806E1344B3D5C92F6C7D202865 /* POPAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationInternal.h; path = pop/POPAnimationInternal.h; sourceTree = ""; }; + 4224AA7B397316B196A22C85F2ECF355 /* POPCustomAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPCustomAnimation.mm; path = pop/POPCustomAnimation.mm; sourceTree = ""; }; + 435EC560283D577C2E4ABCAB14A6D88A /* SDWebImageManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageManager.m; path = SDWebImage/SDWebImageManager.m; sourceTree = ""; }; + 4397F84CE439781D22521A71891EA42E /* POPAnimationPrivate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationPrivate.h; path = pop/POPAnimationPrivate.h; sourceTree = ""; }; + 44454EEE03C91B178CCFC237EDEC12EE /* MJRefresh-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MJRefresh-prefix.pch"; sourceTree = ""; }; + 457E97137A678AF2B43309C85EF23A2B /* NSString+PinYin4Cocoa.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+PinYin4Cocoa.m"; path = "PinYin4Objc/Classes/NSString+PinYin4Cocoa.m"; sourceTree = ""; }; + 4658B08823A3859A191F5D7D4CB1E009 /* pop-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "pop-dummy.m"; sourceTree = ""; }; + 48175D9CE5772F7196246F2E40077407 /* MASLayoutConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASLayoutConstraint.m; path = Masonry/MASLayoutConstraint.m; sourceTree = ""; }; + 488B5EE69DE24808D9ABF5DE1FD3768C /* POPBasicAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPBasicAnimationInternal.h; path = pop/POPBasicAnimationInternal.h; sourceTree = ""; }; + 49F798C2DB0BA45F742D0D4F7EE583A6 /* NSArray+SortContact.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+SortContact.m"; path = "Pod/Classes/NSArray+SortContact.m"; sourceTree = ""; }; + 4A63707853F7D8CA90F09EC7616D3795 /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSLayoutConstraint+MASDebugAdditions.h"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = ""; }; + 4E2BDE5517C60068516D82E67CDA3BA7 /* MASConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraint.m; path = Masonry/MASConstraint.m; sourceTree = ""; }; 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.debug.xcconfig; sourceTree = ""; }; - 4FB0FD21BBE6B0A8E3E015F3E6E3A653 /* PinYin4Objc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PinYin4Objc.h; path = PinYin4Objc/Classes/PinYin4Objc.h; sourceTree = ""; }; - 506A5B2617A7166468E55C721EA33493 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 53AAE583469D53DE4097EE2AE6E3B5CA /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "ViewController+MASAdditions.h"; path = "Masonry/ViewController+MASAdditions.h"; sourceTree = ""; }; - 5480118F8BB16A1236A4405AAB3500F0 /* JSONHTTPClient.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONHTTPClient.h; path = JSONModel/JSONModelNetworking/JSONHTTPClient.h; sourceTree = ""; }; - 54A90CEA122D707B60AE68ED3AEB14A7 /* TTTAttributedLabel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = TTTAttributedLabel.m; path = TTTAttributedLabel/TTTAttributedLabel.m; sourceTree = ""; }; - 5599B1B854360AEC686956D662D6D612 /* ChineseToPinyinResource.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ChineseToPinyinResource.h; path = PinYin4Objc/Classes/ChineseToPinyinResource.h; sourceTree = ""; }; - 5A6C8C6220ABC63DABE701783C546073 /* MJRefreshConst.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshConst.h; path = MJRefresh/MJRefreshConst.h; sourceTree = ""; }; - 5F45340F46AE53C910A67D143542D131 /* UITableView+FDKeyedHeightCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDKeyedHeightCache.h"; path = "Classes/UITableView+FDKeyedHeightCache.h"; sourceTree = ""; }; - 5FDA33D1101FCCA6F6C816DAB1BFBF83 /* MASConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraint.h; path = Masonry/MASConstraint.h; sourceTree = ""; }; - 608745171B81D78D56418BD5298C5850 /* MJRefreshConst.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshConst.m; path = MJRefresh/MJRefreshConst.m; sourceTree = ""; }; - 61129BE053D83E3DC62113140D0FD5A3 /* MASUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASUtilities.h; path = Masonry/MASUtilities.h; sourceTree = ""; }; - 629E2759EE4E74AC82272C66A4F1472E /* UIScrollView+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+MJExtension.h"; path = "MJRefresh/UIScrollView+MJExtension.h"; sourceTree = ""; }; - 66F306B09A1B51D72F8A8983CCA6B656 /* MJRefreshGifHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshGifHeader.h; path = MJRefresh/Custom/Header/MJRefreshGifHeader.h; sourceTree = ""; }; + 4EF37BAF62CF8582D9A6B9A80782851D /* JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModel.m; path = JSONModel/JSONModel/JSONModel.m; sourceTree = ""; }; + 4EF5C3BC029095FC59D4F9EB3CE86DF8 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/ImageIO.framework; sourceTree = DEVELOPER_DIR; }; + 4F03CF4D582711879D702156CA37560E /* POPSpringAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPSpringAnimation.mm; path = pop/POPSpringAnimation.mm; sourceTree = ""; }; + 4F72824508F9BD12374524D47878559A /* MASViewConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewConstraint.h; path = Masonry/MASViewConstraint.h; sourceTree = ""; }; + 50108F824FE50D69D8B1D4BE105EB27D /* POPCGUtils.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPCGUtils.h; path = pop/POPCGUtils.h; sourceTree = ""; }; + 5043054F1CD651B62A0F199A751ABC02 /* MJRefresh.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MJRefresh.xcconfig; sourceTree = ""; }; + 50DAAC04D4368B09C441F9CB95607968 /* MJRefreshComponent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshComponent.m; path = MJRefresh/Base/MJRefreshComponent.m; sourceTree = ""; }; + 5108EDA896DDC141872031770379AE12 /* JSONModelLib.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelLib.h; path = JSONModel/JSONModelLib.h; sourceTree = ""; }; + 515C5FDE440908C994DB168AD707A32D /* YSMChineseSort.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YSMChineseSort.xcconfig; sourceTree = ""; }; + 52358869ECD2DE6B1A50EACAFA24542D /* UIImageView+HighlightedWebCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+HighlightedWebCache.m"; path = "SDWebImage/UIImageView+HighlightedWebCache.m"; sourceTree = ""; }; + 54DDC2556259EC51F45B90FBDB46F0A0 /* IDMPhoto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMPhoto.h; path = Classes/IDMPhoto.h; sourceTree = ""; }; + 556C5F473947176F771ECBBEF568E1F5 /* libYSMChineseSort.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libYSMChineseSort.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 56610F595C7B7F9D420B17EC54E1FFC0 /* MJRefreshHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshHeader.m; path = MJRefresh/Base/MJRefreshHeader.m; sourceTree = ""; }; + 586951E177479097254AA04C2136BE8E /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewConstraint.m; path = Masonry/MASViewConstraint.m; sourceTree = ""; }; + 58C58481C311A9F568F2930781BF8728 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+JSONModel.h"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.h"; sourceTree = ""; }; + 592378CB29A41D37184589A7B8AB39D8 /* MASCompositeConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASCompositeConstraint.h; path = Masonry/MASCompositeConstraint.h; sourceTree = ""; }; + 5C4B4DE1E6664F9A8BBA5E004C8008A5 /* UITableView+FDTemplateLayoutCellDebug.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDTemplateLayoutCellDebug.m"; path = "Classes/UITableView+FDTemplateLayoutCellDebug.m"; sourceTree = ""; }; + 5DACE80931C1C0E445B755ED645CD7BC /* MJRefreshBackGifFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackGifFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.h; sourceTree = ""; }; + 5FA34B2C3CD8242B9496375A934EB028 /* unicode_to_hanyu_pinyin.txt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = unicode_to_hanyu_pinyin.txt; path = PinYin4Objc/Resources/unicode_to_hanyu_pinyin.txt; sourceTree = ""; }; + 601583FDDC451DC7AA23F4764EAEDF3C /* MJRefreshFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshFooter.h; path = MJRefresh/Base/MJRefreshFooter.h; sourceTree = ""; }; + 60E85060D0061807461444528FE8341D /* IDMPhotoBrowser.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = IDMPhotoBrowser.m; path = Classes/IDMPhotoBrowser.m; sourceTree = ""; }; + 619197C57E3C79F9E4097180D8A241C6 /* POPLayerExtras.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPLayerExtras.mm; path = pop/POPLayerExtras.mm; sourceTree = ""; }; + 624C980497F879D4DEE2BBB60F28572B /* DALabeledCircularProgressView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DALabeledCircularProgressView.m; path = DACircularProgress/DALabeledCircularProgressView.m; sourceTree = ""; }; + 6284A9DD31DB9BA3AB9B994CCA1B2DBB /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MASAdditions.m"; path = "Masonry/NSArray+MASAdditions.m"; sourceTree = ""; }; + 65D2733D9D9131F55E63EFF184F003A7 /* IDMCaptionView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = IDMCaptionView.m; path = Classes/IDMCaptionView.m; sourceTree = ""; }; + 66102C394B50EBFC4536C661543FD636 /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Masonry.h; path = Masonry/Masonry.h; sourceTree = ""; }; + 664237D83309F76AC0689FF098D832EA /* POPAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimation.h; path = pop/POPAnimation.h; sourceTree = ""; }; + 67E44771ABA063E83251203096C6616B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 68146AE7FB96ACCFD685911BCBA1A6DD /* JSONModelArray.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelArray.h; path = JSONModel/JSONModel/JSONModelArray.h; sourceTree = ""; }; + 6848DD727C78658F5608AA1DDE3DFD25 /* IDMPhotoProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMPhotoProtocol.h; path = Classes/IDMPhotoProtocol.h; sourceTree = ""; }; + 6870213F34B9D773F96C619298EA8DD7 /* TTTAttributedLabel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TTTAttributedLabel-prefix.pch"; sourceTree = ""; }; + 6894B45B4BCF387B53AA0960AE6391EC /* UITableView+FDIndexPathHeightCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDIndexPathHeightCache.h"; path = "Classes/UITableView+FDIndexPathHeightCache.h"; sourceTree = ""; }; 6911BECA35E7518D864239B7E898EEF3 /* Pods-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-frameworks.sh"; sourceTree = ""; }; - 70AAC39145F753135AD672D979F27055 /* JSONModelClassProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelClassProperty.h; path = JSONModel/JSONModel/JSONModelClassProperty.h; sourceTree = ""; }; - 716C8EBD3D5278AAB75E35838F0CC792 /* MJRefreshBackNormalFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackNormalFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.h; sourceTree = ""; }; - 71900F83030CECC4C09E10507D1B387D /* Masonry-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-prefix.pch"; sourceTree = ""; }; - 729A9676D71788C6C80520E709EE28B0 /* JSONModelArray.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelArray.m; path = JSONModel/JSONModel/JSONModelArray.m; sourceTree = ""; }; - 72DD34B2C5BB1A99FCD973E9D3CBE74C /* Masonry-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Masonry-dummy.m"; sourceTree = ""; }; - 75F49A3D99189DE7C38FBF5DACA66777 /* Masonry.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.xcconfig; sourceTree = ""; }; - 78765D61B87853B1771A316038FC100B /* MJRefreshAutoFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoFooter.h; path = MJRefresh/Base/MJRefreshAutoFooter.h; sourceTree = ""; }; - 7E53EFB9338AC676059DE9DB04156419 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+JSONModel.m"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.m"; sourceTree = ""; }; - 7E664ED6095EB282BD0662FF3FAAD993 /* MJRefreshAutoGifFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoGifFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.m; sourceTree = ""; }; - 7FE4C395EE223C66C4E1F5E45F75ACBC /* JSONAPI.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONAPI.h; path = JSONModel/JSONModelNetworking/JSONAPI.h; sourceTree = ""; }; - 8155CAF69A3AB81FB66D93898BE424EF /* JSONModelArray.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelArray.h; path = JSONModel/JSONModel/JSONModelArray.h; sourceTree = ""; }; - 82B9795D1EB2AE6FCAD4BC43665EED97 /* JSONModelError.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelError.h; path = JSONModel/JSONModel/JSONModelError.h; sourceTree = ""; }; - 8374FA501C17158A8357C13D4971BEE3 /* NSArray+JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+JSONModel.h"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.h"; sourceTree = ""; }; - 84A55A0B63C96C75A2C80A1FB20C2AA8 /* MJRefreshBackStateFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackStateFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m; sourceTree = ""; }; - 860C1D8F052B9D9709DA1F9AB96A3472 /* MJRefreshBackFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackFooter.h; path = MJRefresh/Base/MJRefreshBackFooter.h; sourceTree = ""; }; - 89CE2CCD15AC43644EC665FC80FC4FDC /* JSONValueTransformer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONValueTransformer.h; path = JSONModel/JSONModelTransformations/JSONValueTransformer.h; sourceTree = ""; }; - 8C0B8FC26FF9649762D0078C1B3F6574 /* libMJRefresh.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMJRefresh.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 8D00595A2FAA330D4A37CA66A9782DDB /* HanyuPinyinOutputFormat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HanyuPinyinOutputFormat.m; path = PinYin4Objc/Classes/HanyuPinyinOutputFormat.m; sourceTree = ""; }; - 9540DC8E3FA7BCA42A0F9E973C2F853D /* View+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "View+MASAdditions.m"; path = "Masonry/View+MASAdditions.m"; sourceTree = ""; }; - 98919257D1E9A476841E1EB1EA99AA8B /* NSLayoutConstraint+MASDebugAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSLayoutConstraint+MASDebugAdditions.h"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.h"; sourceTree = ""; }; - 98A31D0AB67D4F7DD0893E540FD6ACA0 /* MJRefreshBackStateFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshBackStateFooter.h; path = MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.h; sourceTree = ""; }; + 6AE916D814A89B259CA3E10A48A1C7BB /* POPGeometry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPGeometry.h; path = pop/POPGeometry.h; sourceTree = ""; }; + 6AED7F96023BBAEDFA3DC825D01A8176 /* SDWebImageManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageManager.h; path = SDWebImage/SDWebImageManager.h; sourceTree = ""; }; + 6B2DD8DF9B488F67B0EBBDDDF6C6749C /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; }; + 6BD7170EE624B7DC0D1632D29942E5F9 /* SDWebImagePrefetcher.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImagePrefetcher.m; path = SDWebImage/SDWebImagePrefetcher.m; sourceTree = ""; }; + 6D89C04B5E0B827072ECF1187FC17412 /* POPMath.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPMath.mm; path = pop/POPMath.mm; sourceTree = ""; }; + 6F2688B0B576882E5158A274F04B37FE /* TransformationMatrix.cpp */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; name = TransformationMatrix.cpp; path = pop/WebCore/TransformationMatrix.cpp; sourceTree = ""; }; + 6F50A5FE262CF789377EE12AFEF366C2 /* HanyuPinyinOutputFormat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HanyuPinyinOutputFormat.h; path = PinYin4Objc/Classes/HanyuPinyinOutputFormat.h; sourceTree = ""; }; + 722235735C34723AC15450C82F7CB484 /* PinyinFormatter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PinyinFormatter.h; path = PinYin4Objc/Classes/PinyinFormatter.h; sourceTree = ""; }; + 73CD966394775B507844F76DEB08CAD0 /* HanyuPinyinOutputFormat.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = HanyuPinyinOutputFormat.m; path = PinYin4Objc/Classes/HanyuPinyinOutputFormat.m; sourceTree = ""; }; + 74270470E231980B45C370FB877B80CC /* POPCGUtils.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPCGUtils.mm; path = pop/POPCGUtils.mm; sourceTree = ""; }; + 7491B38CDAC2B5F592EAAAE0CB685E2C /* POPDecayAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPDecayAnimation.mm; path = pop/POPDecayAnimation.mm; sourceTree = ""; }; + 75283415DB209D6F08BFEFACA2B5BA22 /* IDMPhoto.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = IDMPhoto.m; path = Classes/IDMPhoto.m; sourceTree = ""; }; + 7548E9C462347D487C5FCB8816384FD3 /* JSONModel+networking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "JSONModel+networking.h"; path = "JSONModel/JSONModelNetworking/JSONModel+networking.h"; sourceTree = ""; }; + 76C0F9ECAA796E941D55BDFAB3286225 /* POPSpringSolver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPSpringSolver.h; path = pop/POPSpringSolver.h; sourceTree = ""; }; + 771B828CF9F3BAE0C2D68F6596CE6824 /* MJRefreshAutoNormalFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoNormalFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m; sourceTree = ""; }; + 77E9A2676E0C7A44607650F49395F932 /* SDWebImageDownloaderOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageDownloaderOperation.h; path = SDWebImage/SDWebImageDownloaderOperation.h; sourceTree = ""; }; + 79D930AE04A4648BF1E9D8B0C598B72B /* MJRefreshBackGifFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackGifFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.m; sourceTree = ""; }; + 7A22B3D7F903B85213AF2A676502CC3B /* JSONAPI.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONAPI.m; path = JSONModel/JSONModelNetworking/JSONAPI.m; sourceTree = ""; }; + 7B4BBF925B05595F49F75954868545D0 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 7BC166188310D39A8A1DB4946A65420D /* FloatConversion.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FloatConversion.h; path = pop/WebCore/FloatConversion.h; sourceTree = ""; }; + 7D7621692F16F3C9F2B63105E7B8DD7B /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASAdditions.h"; path = "Masonry/NSArray+MASAdditions.h"; sourceTree = ""; }; + 7DDC7354722EA418030BBB4DF3CE2A98 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; + 7EEC0AE439BD692CD48793F3B17972D1 /* IDMTapDetectingImageView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = IDMTapDetectingImageView.m; path = Classes/IDMTapDetectingImageView.m; sourceTree = ""; }; + 7F5721A1166050B3C7C69DCFBBD689A3 /* IDMCaptionView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMCaptionView.h; path = Classes/IDMCaptionView.h; sourceTree = ""; }; + 8175ADD73519FD5B22145B5FB59E0187 /* UIScrollView+MJRefresh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+MJRefresh.h"; path = "MJRefresh/UIScrollView+MJRefresh.h"; sourceTree = ""; }; + 818DE1BB0FB89317120BCAD92094C4E5 /* SDImageCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDImageCache.h; path = SDWebImage/SDImageCache.h; sourceTree = ""; }; + 83C97131AF441D78E8EB4A4838190206 /* PinYin4Objc.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PinYin4Objc.xcconfig; sourceTree = ""; }; + 847A4E827146FA911E09E7C5398DE048 /* MJRefreshBackNormalFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackNormalFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.m; sourceTree = ""; }; + 8667A5506376A4E1EB5A699699796578 /* DACircularProgress-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "DACircularProgress-dummy.m"; sourceTree = ""; }; + 88D0EFFAF595EDD6D2E40C4D4EA49B7B /* DACircularProgress-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DACircularProgress-prefix.pch"; sourceTree = ""; }; + 88EB7FC18F83EB6DE1E098D8ED89BCEF /* POPDefines.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPDefines.h; path = pop/POPDefines.h; sourceTree = ""; }; + 8937858037D57D7901C493DB275056E3 /* ChineseToPinyinResource.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ChineseToPinyinResource.h; path = PinYin4Objc/Classes/ChineseToPinyinResource.h; sourceTree = ""; }; + 8AC939FD34B9461208B26D03A8B833B8 /* MJRefreshAutoNormalFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoNormalFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h; sourceTree = ""; }; + 8AF6EA1D86DCC5BBEF3367D6DF403038 /* JSONModelError.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelError.h; path = JSONModel/JSONModel/JSONModelError.h; sourceTree = ""; }; + 8B2819E5CF36BB0216B2243E0848E24B /* MJRefreshComponent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshComponent.h; path = MJRefresh/Base/MJRefreshComponent.h; sourceTree = ""; }; + 8CEE65C1CEFEE748BC555C724F0070CD /* libIDMPhotoBrowser.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libIDMPhotoBrowser.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D0CFEB5547E29DC96E3A5D0CC3ACA29 /* POPAnimatableProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimatableProperty.h; path = pop/POPAnimatableProperty.h; sourceTree = ""; }; + 8DD62082A2D04DA726684E4237945303 /* UITableView+FDKeyedHeightCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDKeyedHeightCache.m"; path = "Classes/UITableView+FDKeyedHeightCache.m"; sourceTree = ""; }; + 8F3224AEAE0BCF6DCF60EAAFBDEBD440 /* SDWebImageDownloader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageDownloader.m; path = SDWebImage/SDWebImageDownloader.m; sourceTree = ""; }; + 90E07171D35423306235DC6A33DAD553 /* POPAnimator.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPAnimator.mm; path = pop/POPAnimator.mm; sourceTree = ""; }; + 916C2E1E4AC9E40A229DF8976E43533C /* MJRefreshHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshHeader.h; path = MJRefresh/Base/MJRefreshHeader.h; sourceTree = ""; }; + 91844EC3721E2B9499ECC0E6DB8443D0 /* UIView+WebCacheOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIView+WebCacheOperation.h"; path = "SDWebImage/UIView+WebCacheOperation.h"; sourceTree = ""; }; + 919CA54B608FED655C2BE65A114EFBDD /* PinYin4Objc-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PinYin4Objc-prefix.pch"; sourceTree = ""; }; + 92E4D49F377BB7903465B2CA8B68DB6F /* JSONHTTPClient.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONHTTPClient.h; path = JSONModel/JSONModelNetworking/JSONHTTPClient.h; sourceTree = ""; }; + 93030B1C30BA4D5705A137D96F5E4001 /* UIButton+WebCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIButton+WebCache.h"; path = "SDWebImage/UIButton+WebCache.h"; sourceTree = ""; }; + 958F296B9DE81822BD052DF062E62F95 /* SDWebImageDownloaderOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDWebImageDownloaderOperation.m; path = SDWebImage/SDWebImageDownloaderOperation.m; sourceTree = ""; }; + 95A95EDCBDBEE5EF756292EE9CC2909A /* UIImage+GIF.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIImage+GIF.m"; path = "SDWebImage/UIImage+GIF.m"; sourceTree = ""; }; + 95C1DDA1A8ADA106F59D36C806E7BEDC /* IDMPhotoBrowser.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = IDMPhotoBrowser.bundle; path = Classes/IDMPhotoBrowser.bundle; sourceTree = ""; }; + 9644CD86CBE2AFE4EA7E8DF11C2C9B64 /* ChineseToPinyinResource.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ChineseToPinyinResource.m; path = PinYin4Objc/Classes/ChineseToPinyinResource.m; sourceTree = ""; }; + 966B413390350C9C4A9B4E61F84D99F3 /* JSONAPI.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONAPI.h; path = JSONModel/JSONModelNetworking/JSONAPI.h; sourceTree = ""; }; 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Pods.release.xcconfig; sourceTree = ""; }; - 992631B9ADA11D0AF4B931C9B9BF6981 /* UITableView+FDIndexPathHeightCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDIndexPathHeightCache.m"; path = "Classes/UITableView+FDIndexPathHeightCache.m"; sourceTree = ""; }; - 9DB3C85178DB4CBEEDF2800083779482 /* JSONModel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JSONModel-dummy.m"; sourceTree = ""; }; - 9E1255D8AF96726BBEF138EBBC4D9DFB /* unicode_to_hanyu_pinyin.txt */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = unicode_to_hanyu_pinyin.txt; path = PinYin4Objc/Resources/unicode_to_hanyu_pinyin.txt; sourceTree = ""; }; - 9E2509AED9F1C8AF13DB4B4CBAAB7D30 /* MJRefreshBackFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackFooter.m; path = MJRefresh/Base/MJRefreshBackFooter.m; sourceTree = ""; }; - 9E86AA905DE27EDC540A266587776F28 /* NSArray+SortContact.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+SortContact.m"; path = "Pod/Classes/NSArray+SortContact.m"; sourceTree = ""; }; - 9E9DE917A33FBFD702F4602E82C83A6C /* MASViewConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewConstraint.m; path = Masonry/MASViewConstraint.m; sourceTree = ""; }; - 9F97EAF06A7C1FA3925B5E0C607B4D72 /* TTTAttributedLabel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "TTTAttributedLabel-dummy.m"; sourceTree = ""; }; - A179169E4A590DB543D30FE85102C4B3 /* PinyinFormatter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PinyinFormatter.h; path = PinYin4Objc/Classes/PinyinFormatter.h; sourceTree = ""; }; + 9A0334FA11F94DB4B777D75FBD647FD2 /* POPSpringAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPSpringAnimation.h; path = pop/POPSpringAnimation.h; sourceTree = ""; }; + 9D6938BBDB982CBEE797AB8B0D2CBD5E /* UIScrollView+MJExtension.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+MJExtension.m"; path = "MJRefresh/UIScrollView+MJExtension.m"; sourceTree = ""; }; + 9F3C3390D56C3905C41D2A9C241F307D /* pop.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = pop.xcconfig; sourceTree = ""; }; + A02059944564A4710941D5907B767D67 /* PinYin4Objc.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PinYin4Objc.h; path = PinYin4Objc/Classes/PinYin4Objc.h; sourceTree = ""; }; + A0D639222C6907895C63E8BC9AA21097 /* JSONModel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModel.h; path = JSONModel/JSONModel/JSONModel.h; sourceTree = ""; }; + A179598B75F3FB8C9F7E23E9FE9BCEED /* DACircularProgressView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DACircularProgressView.h; path = DACircularProgress/DACircularProgressView.h; sourceTree = ""; }; A1A36D34413696BE466E2CA0AFF194DA /* Pods-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-resources.sh"; sourceTree = ""; }; - A45CBC432B6EC86F59D3D4A3C8EABECD /* JSONKeyMapper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONKeyMapper.h; path = JSONModel/JSONModelTransformations/JSONKeyMapper.h; sourceTree = ""; }; - A6D7E9684728BD794691AC96247B49FD /* PinYin4Objc.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PinYin4Objc.xcconfig; sourceTree = ""; }; - ABC43486CC00B132925386552C2F098C /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASShorthandAdditions.h"; path = "Masonry/NSArray+MASShorthandAdditions.h"; sourceTree = ""; }; - ACCACFB0809EA5ADABC2881344AA8F18 /* libUITableView+FDTemplateLayoutCell.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libUITableView+FDTemplateLayoutCell.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - AF7CE18D1B84C33C6BD9BC6022D24EBD /* MJRefreshComponent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshComponent.h; path = MJRefresh/Base/MJRefreshComponent.h; sourceTree = ""; }; - AFE722FF2CB2B0C7FFDC74681CCF0050 /* JSONModel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JSONModel.xcconfig; sourceTree = ""; }; - B2B4D7C452A9D8A194A199D55CD2C8EE /* YSMChineseSort.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = YSMChineseSort.xcconfig; sourceTree = ""; }; - B35EFB1E624A7D9772655C2C8469941D /* UITableView+FDTemplateLayoutCell-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UITableView+FDTemplateLayoutCell-dummy.m"; sourceTree = ""; }; - B5BC41839D61806FE296FBD69D89695C /* YSMChineseSort-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "YSMChineseSort-dummy.m"; sourceTree = ""; }; - B6B2587D468A89FE7C5DEBA0C6B5F0BD /* TTTAttributedLabel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TTTAttributedLabel.h; path = TTTAttributedLabel/TTTAttributedLabel.h; sourceTree = ""; }; - B8EA540C679759E0B07DFE093B862A87 /* MJRefreshHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshHeader.m; path = MJRefresh/Base/MJRefreshHeader.m; sourceTree = ""; }; - B9529DC31D52C66C519E0ABB964626F3 /* UITableView+FDTemplateLayoutCell-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UITableView+FDTemplateLayoutCell-prefix.pch"; sourceTree = ""; }; - B9C35C2283ABAB903DA2011CDC0021A0 /* JSONModelError.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelError.m; path = JSONModel/JSONModel/JSONModelError.m; sourceTree = ""; }; + A27251AD5DAAD610AA3CF3C25A1201B1 /* MASViewAttribute.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewAttribute.h; path = Masonry/MASViewAttribute.h; sourceTree = ""; }; + A5C82050A45E0E68F0D1ED78D1029CE2 /* libpop.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libpop.a; sourceTree = BUILT_PRODUCTS_DIR; }; + A7409198F3D4A6C26117DD1103D9420C /* MJRefreshBackStateFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackStateFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m; sourceTree = ""; }; + A8400B900669AE074775B45BF2568B59 /* POPPropertyAnimation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPPropertyAnimation.h; path = pop/POPPropertyAnimation.h; sourceTree = ""; }; + A91A3553E76953F5FD3FF8812373BF79 /* POPPropertyAnimation.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPPropertyAnimation.mm; path = pop/POPPropertyAnimation.mm; sourceTree = ""; }; + A98D0355096CC2FF9DFB01816E792F1A /* View+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASShorthandAdditions.h"; path = "Masonry/View+MASShorthandAdditions.h"; sourceTree = ""; }; + AA7DB17CC2B735D8135A44C87008CB93 /* SDWebImageDecoder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageDecoder.h; path = SDWebImage/SDWebImageDecoder.h; sourceTree = ""; }; + ABFA7ACA7668DA807ECB90A21571F293 /* libTTTAttributedLabel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTTTAttributedLabel.a; sourceTree = BUILT_PRODUCTS_DIR; }; + AD3B5FF56EE07EE2E3BAE1FC11BF120B /* SDWebImageOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImageOperation.h; path = SDWebImage/SDWebImageOperation.h; sourceTree = ""; }; + AE64325D5A6054A51455ABD7131A7E85 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelClassProperty.m; path = JSONModel/JSONModel/JSONModelClassProperty.m; sourceTree = ""; }; + AEE43D429D59094C138679119D0E50F7 /* MASConstraint+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MASConstraint+Private.h"; path = "Masonry/MASConstraint+Private.h"; sourceTree = ""; }; + B0160B8165FA7D3D73707CF887164068 /* PinyinHelper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PinyinHelper.h; path = PinYin4Objc/Classes/PinyinHelper.h; sourceTree = ""; }; + B0446BDC5761491A9612B2065651DCDD /* MJRefresh.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = MJRefresh.bundle; path = MJRefresh/MJRefresh.bundle; sourceTree = ""; }; + B106872C40FB15F8E27ED2FF268B19D8 /* UIImageView+WebCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImageView+WebCache.h"; path = "SDWebImage/UIImageView+WebCache.h"; sourceTree = ""; }; + B182F9937220A7A3449E75D60C053153 /* TTTAttributedLabel.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TTTAttributedLabel.h; path = TTTAttributedLabel/TTTAttributedLabel.h; sourceTree = ""; }; + B259B725C6BF44FC001F94486FD3E89B /* POPSpringAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPSpringAnimationInternal.h; path = pop/POPSpringAnimationInternal.h; sourceTree = ""; }; + B33DE76334232BCFD0EC9BE80E316271 /* POPAnimationTracerInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationTracerInternal.h; path = pop/POPAnimationTracerInternal.h; sourceTree = ""; }; + B4F3763B9D5217D0B6FF012FBBD3E625 /* View+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASAdditions.h"; path = "Masonry/View+MASAdditions.h"; sourceTree = ""; }; + B52D68B9D723D4B64A99F45478D4AF81 /* POPAnimationTracer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationTracer.h; path = pop/POPAnimationTracer.h; sourceTree = ""; }; + B5DC2061AE147FC58D652D092476FCF4 /* NSArray+MASShorthandAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASShorthandAdditions.h"; path = "Masonry/NSArray+MASShorthandAdditions.h"; sourceTree = ""; }; + B756359C68074DA108D0BA960C8D5539 /* JSONModel-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "JSONModel-dummy.m"; sourceTree = ""; }; + B8FE56ECF5B2746B6CF80AEDB94726BA /* POPAnimatableProperty.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPAnimatableProperty.mm; path = pop/POPAnimatableProperty.mm; sourceTree = ""; }; + BA05632501A67B41E1101F890EDF9689 /* UITableView+FDTemplateLayoutCell-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "UITableView+FDTemplateLayoutCell-dummy.m"; sourceTree = ""; }; BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - BC55D01DC7EBA332F11F0C3601FAA35C /* NSArray+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+MASAdditions.h"; path = "Masonry/NSArray+MASAdditions.h"; sourceTree = ""; }; - BC5FC3D7C00BAC3BD9E488922B15804C /* MJRefreshAutoStateFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoStateFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m; sourceTree = ""; }; - BD0519846ABDF5F454E38B92BE576548 /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "ViewController+MASAdditions.m"; path = "Masonry/ViewController+MASAdditions.m"; sourceTree = ""; }; - BDF61128AE8597E743825ACD29B63A0F /* MJRefreshNormalHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshNormalHeader.m; path = MJRefresh/Custom/Header/MJRefreshNormalHeader.m; sourceTree = ""; }; - BE5C4AC77DAEFAC9A2BDA12930B9E1B6 /* TTTAttributedLabel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "TTTAttributedLabel-prefix.pch"; sourceTree = ""; }; - BE80F14D93DC9A087A352090CB46BF6B /* MJRefresh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefresh.h; path = MJRefresh/MJRefresh.h; sourceTree = ""; }; - C04E285D0D99BB08B81242F1D1984C36 /* UITableView+FDTemplateLayoutCell.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDTemplateLayoutCell.m"; path = "Classes/UITableView+FDTemplateLayoutCell.m"; sourceTree = ""; }; - C0AC9BC1ACB56B13F4C80A25CA78D5A7 /* Masonry.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Masonry.h; path = Masonry/Masonry.h; sourceTree = ""; }; - C1F281059FE59E348AE3D408D40B7FBF /* View+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "View+MASAdditions.h"; path = "Masonry/View+MASAdditions.h"; sourceTree = ""; }; - C2C0AB3C85FA5E9164DD219A4ABB70A8 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; }; - C2FDD8FD3810999BC6DB4E4747D09E94 /* MASConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraint.m; path = Masonry/MASConstraint.m; sourceTree = ""; }; - C480B857793319BC86DB94F031449B91 /* YSMChineseSort-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YSMChineseSort-prefix.pch"; sourceTree = ""; }; - C6755CC8949292F50CA94D98739DB156 /* UITableView+FDTemplateLayoutCellDebug.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UITableView+FDTemplateLayoutCellDebug.h"; path = "Classes/UITableView+FDTemplateLayoutCellDebug.h"; sourceTree = ""; }; - C683E5772D725AD2A840CF0258F6D8D9 /* MJRefreshAutoFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoFooter.m; path = MJRefresh/Base/MJRefreshAutoFooter.m; sourceTree = ""; }; - CB741FD3BD4D41C37E9CED9F949A047E /* MJRefreshBackNormalFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackNormalFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.m; sourceTree = ""; }; - CC9EB027E595EDF272D8A53EFCCA88C5 /* MJRefreshAutoGifFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoGifFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.h; sourceTree = ""; }; - CCA4EB0B02893969F7740CB6D1D35F71 /* JSONModel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JSONModel-prefix.pch"; sourceTree = ""; }; - CCC18D58CD18A065EC4FD8984818BE8A /* UITableView+FDTemplateLayoutCell.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "UITableView+FDTemplateLayoutCell.xcconfig"; sourceTree = ""; }; - CDB744299B40CBC6B12380695A2CE122 /* JSONAPI.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONAPI.m; path = JSONModel/JSONModelNetworking/JSONAPI.m; sourceTree = ""; }; - D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - D0C8386E6976D64B83358653D942559A /* MJRefreshFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshFooter.h; path = MJRefresh/Base/MJRefreshFooter.h; sourceTree = ""; }; - D3C853B58C23B5474521C4A1D747FFC4 /* MASViewConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASViewConstraint.h; path = Masonry/MASViewConstraint.h; sourceTree = ""; }; - D5232190BE858269AB597857D283A636 /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraintMaker.m; path = Masonry/MASConstraintMaker.m; sourceTree = ""; }; - D53534C0032FCBEA723CEBC9889B3B50 /* MJRefreshAutoNormalFooter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshAutoNormalFooter.h; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h; sourceTree = ""; }; - D5455867D208929771E81347BF6365A6 /* JSONValueTransformer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONValueTransformer.m; path = JSONModel/JSONModelTransformations/JSONValueTransformer.m; sourceTree = ""; }; - D6C79995E4720A97DD5FA2CF803EDFDE /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSLayoutConstraint+MASDebugAdditions.m"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = ""; }; - D76C8D04012461FE1A24C2F219DDBCE4 /* libTTTAttributedLabel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTTTAttributedLabel.a; sourceTree = BUILT_PRODUCTS_DIR; }; - D801B3073D4C672D2DDA7BED383EF3DD /* libJSONModel.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJSONModel.a; sourceTree = BUILT_PRODUCTS_DIR; }; - D87BCAF24DBA703F0E0914A3F65A6B39 /* PinyinHelper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PinyinHelper.m; path = PinYin4Objc/Classes/PinyinHelper.m; sourceTree = ""; }; - DA55306A70D8FBBBC000B2B4C0638739 /* PinyinFormatter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PinyinFormatter.m; path = PinYin4Objc/Classes/PinyinFormatter.m; sourceTree = ""; }; - DC56D96495296516119B92404862DF82 /* NSArray+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+MASAdditions.m"; path = "Masonry/NSArray+MASAdditions.m"; sourceTree = ""; }; - DF702903EBFEE79D6004194960E4DFED /* MASConstraint+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "MASConstraint+Private.h"; path = "Masonry/MASConstraint+Private.h"; sourceTree = ""; }; - E16F6383F788296BE1E9759DDE726F29 /* MJRefreshStateHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshStateHeader.h; path = MJRefresh/Custom/Header/MJRefreshStateHeader.h; sourceTree = ""; }; - E28EE09B7C9E1A0D13D8E93745AD5E9A /* MJRefreshComponent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshComponent.m; path = MJRefresh/Base/MJRefreshComponent.m; sourceTree = ""; }; - E637111271B65E7F38533AAC71FD9DBC /* PinyinHelper.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PinyinHelper.h; path = PinYin4Objc/Classes/PinyinHelper.h; sourceTree = ""; }; - E82793A62DCDD5AE50D01583E90F1B86 /* JSONModelClassProperty.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONModelClassProperty.m; path = JSONModel/JSONModel/JSONModelClassProperty.m; sourceTree = ""; }; - E91674EECE1FB09178AEE68AB90BB413 /* MJRefreshFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshFooter.m; path = MJRefresh/Base/MJRefreshFooter.m; sourceTree = ""; }; - EB0BBDC7A2C2C6AC7DAF522DE6E80401 /* MASCompositeConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASCompositeConstraint.m; path = Masonry/MASCompositeConstraint.m; sourceTree = ""; }; - EB1D662FB20B25C3570CABD76FDE5B0D /* MJRefreshBackGifFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshBackGifFooter.m; path = MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.m; sourceTree = ""; }; - ED080B415FCA0D06F1CBBA4DD9AEB92E /* MJRefreshNormalHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshNormalHeader.h; path = MJRefresh/Custom/Header/MJRefreshNormalHeader.h; sourceTree = ""; }; - EFF1806A8459281F945DE066204E81C8 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; - F24AB7D8D522807F8DDF864653DEA34F /* UIScrollView+MJRefresh.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+MJRefresh.m"; path = "MJRefresh/UIScrollView+MJRefresh.m"; sourceTree = ""; }; - F2B3CE471AEDA3AF65ADDEEADA047781 /* HanyuPinyinOutputFormat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = HanyuPinyinOutputFormat.h; path = PinYin4Objc/Classes/HanyuPinyinOutputFormat.h; sourceTree = ""; }; - F51FACFA1DA40F2BFF7DE4AF066C37EB /* NSString+PinYin4Cocoa.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+PinYin4Cocoa.m"; path = "PinYin4Objc/Classes/NSString+PinYin4Cocoa.m"; sourceTree = ""; }; - F523ED943717C0B39CCC9A2BAB89DBFF /* NSArray+SortContact.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSArray+SortContact.h"; path = "Pod/Classes/NSArray+SortContact.h"; sourceTree = ""; }; - F693C8E0B30EEA3CBB97082DC8ED4E52 /* YSMChineseSort.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YSMChineseSort.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - F8EB05C453E1F4DB9CAAE5DA3FC226EF /* UITableView+FDTemplateLayoutCellDebug.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDTemplateLayoutCellDebug.m"; path = "Classes/UITableView+FDTemplateLayoutCellDebug.m"; sourceTree = ""; }; - F9F81E8DFC2A3B3D39023F9D20076AAD /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; }; - FB0D67FE6FA1DBBA850826157D525B9D /* MASLayoutConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASLayoutConstraint.m; path = Masonry/MASLayoutConstraint.m; sourceTree = ""; }; - FBDCDC8219668A958122180B9FC509EB /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; - FE0EF6F6E467F553244D57F0DCC3C10C /* PinYin4Objc-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PinYin4Objc-prefix.pch"; sourceTree = ""; }; - FE53CA993CE97B4634EBBBB4FBF5A8E6 /* ChineseToPinyinResource.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ChineseToPinyinResource.m; path = PinYin4Objc/Classes/ChineseToPinyinResource.m; sourceTree = ""; }; + BABBC6C9BF41ABB1C39E62AF0D2859F4 /* POPPropertyAnimationInternal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPPropertyAnimationInternal.h; path = pop/POPPropertyAnimationInternal.h; sourceTree = ""; }; + BB0B7CC9E5B9AE724BBDF376C6DC486C /* MJRefreshAutoStateFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoStateFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m; sourceTree = ""; }; + BC6870B5C4C02E0FC050B859D555FAD3 /* MASViewAttribute.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASViewAttribute.m; path = Masonry/MASViewAttribute.m; sourceTree = ""; }; + BCDE9C6E508352839D591D51C3808F2E /* libSDWebImage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDWebImage.a; sourceTree = BUILT_PRODUCTS_DIR; }; + BD487E4D661FFAE233A6697527B48C1E /* PinyinHelper.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PinyinHelper.m; path = PinYin4Objc/Classes/PinyinHelper.m; sourceTree = ""; }; + BE9B32674E38906642E5A51895D31DB7 /* MJRefreshNormalHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshNormalHeader.h; path = MJRefresh/Custom/Header/MJRefreshNormalHeader.h; sourceTree = ""; }; + BFC11DE36C7EF2E5EBAC81F23DBC21C4 /* UITableView+FDTemplateLayoutCell-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "UITableView+FDTemplateLayoutCell-prefix.pch"; sourceTree = ""; }; + BFD83041FB402794FC9231126F387FD9 /* TransformationMatrix.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = TransformationMatrix.h; path = pop/WebCore/TransformationMatrix.h; sourceTree = ""; }; + C19234EC52C68A3C9BCB13FDA153EE8D /* UIScrollView+MJExtension.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIScrollView+MJExtension.h"; path = "MJRefresh/UIScrollView+MJExtension.h"; sourceTree = ""; }; + C20F821FBC9C1EBFE2DB5D80F925322B /* MASConstraintMaker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASConstraintMaker.m; path = Masonry/MASConstraintMaker.m; sourceTree = ""; }; + C41D618E8BB1E1A816EF4EC4DCBCA18B /* YSMChineseSort.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YSMChineseSort.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + C54C102B0FA3620AA6B171E31DA9BA7D /* POPAnimationEvent.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationEvent.h; path = pop/POPAnimationEvent.h; sourceTree = ""; }; + C6851E168BAAD9B15E560D5E8CE0C39E /* UIScrollView+MJRefresh.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UIScrollView+MJRefresh.m"; path = "MJRefresh/UIScrollView+MJRefresh.m"; sourceTree = ""; }; + C8CC4434B2C9D2B63C3AE0507A87BB5E /* IDMTapDetectingView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = IDMTapDetectingView.m; path = Classes/IDMTapDetectingView.m; sourceTree = ""; }; + C96143B90D8C319073634830F10A46FC /* MASCompositeConstraint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MASCompositeConstraint.m; path = Masonry/MASCompositeConstraint.m; sourceTree = ""; }; + C9F1F22B83B223B57306C77328649B6F /* MJRefreshStateHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshStateHeader.h; path = MJRefresh/Custom/Header/MJRefreshStateHeader.h; sourceTree = ""; }; + CB3E30C6FCC1765E2FE0A3B668FD3BD3 /* IDMZoomingScrollView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMZoomingScrollView.h; path = Classes/IDMZoomingScrollView.h; sourceTree = ""; }; + CD06886D4DAD8B6A2D62352A5412190D /* JSONModelClassProperty.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONModelClassProperty.h; path = JSONModel/JSONModel/JSONModelClassProperty.h; sourceTree = ""; }; + CDEC6E8D28B647F236F4F3A33370FFB0 /* MASUtilities.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASUtilities.h; path = Masonry/MASUtilities.h; sourceTree = ""; }; + CE0B683EB25531510BA51DEA3F0E46D3 /* POPAnimationExtras.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAnimationExtras.h; path = pop/POPAnimationExtras.h; sourceTree = ""; }; + CE6BF7A4C0B755807A807565272A90CE /* MJRefreshAutoGifFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoGifFooter.m; path = MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.m; sourceTree = ""; }; + CF581AFBEED6C5F8F30EA627293B592E /* NSData+ImageContentType.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+ImageContentType.m"; path = "SDWebImage/NSData+ImageContentType.m"; sourceTree = ""; }; + CFF4D15F9ECBD3D25BEFB261FBD92068 /* POP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POP.h; path = pop/POP.h; sourceTree = ""; }; + D1429DB2D2ECDFFA567619A053DDB9FF /* MJRefreshGifHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshGifHeader.h; path = MJRefresh/Custom/Header/MJRefreshGifHeader.h; sourceTree = ""; }; + D27659C37717BC239E1B156A6B3CC939 /* JSONValueTransformer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = JSONValueTransformer.h; path = JSONModel/JSONModelTransformations/JSONValueTransformer.h; sourceTree = ""; }; + D2A676F93CF68E9C6B2BB6D0588F008F /* UIImage+MultiFormat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "UIImage+MultiFormat.h"; path = "SDWebImage/UIImage+MultiFormat.h"; sourceTree = ""; }; + D2E75E3C7B3C6A6156B6D581EA7EAE7E /* ViewController+MASAdditions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "ViewController+MASAdditions.h"; path = "Masonry/ViewController+MASAdditions.h"; sourceTree = ""; }; + D3EB355A4D5E22836968762C8DE666AA /* MJRefreshNormalHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshNormalHeader.m; path = MJRefresh/Custom/Header/MJRefreshNormalHeader.m; sourceTree = ""; }; + D40DC5E37C17750A3926569FC9FCB44D /* JSONModel-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "JSONModel-prefix.pch"; sourceTree = ""; }; + D58E6FB186078F4B0AE9D6D98ABF43A0 /* Masonry.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Masonry.xcconfig; sourceTree = ""; }; + D6B1D7C68CAD15BADF86AFC8098C1BC9 /* JSONModel.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = JSONModel.xcconfig; sourceTree = ""; }; + D79C3EC86DDC13EF7A79DB741F5C4169 /* POPAnimationEvent.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPAnimationEvent.mm; path = pop/POPAnimationEvent.mm; sourceTree = ""; }; + D7C331454E3F68E33C2970B5DBE0523C /* NSData+ImageContentType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+ImageContentType.h"; path = "SDWebImage/NSData+ImageContentType.h"; sourceTree = ""; }; + D872C7A1A204904DEB7950EFDE8BCEAB /* libDACircularProgress.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libDACircularProgress.a; sourceTree = BUILT_PRODUCTS_DIR; }; + DA5FD9C8C13FEBED15FE648864C1E7B3 /* UITableView+FDIndexPathHeightCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "UITableView+FDIndexPathHeightCache.m"; path = "Classes/UITableView+FDIndexPathHeightCache.m"; sourceTree = ""; }; + DAC9174A627C8471D375AB741B908F6D /* IDMPhotoBrowser.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMPhotoBrowser.h; path = Classes/IDMPhotoBrowser.h; sourceTree = ""; }; + DB2D9BBE951DE2BBDC0C279EB23523A4 /* POPGeometry.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPGeometry.mm; path = pop/POPGeometry.mm; sourceTree = ""; }; + DBB97CE145366FF86A9E10F452F95539 /* SDWebImagePrefetcher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SDWebImagePrefetcher.h; path = SDWebImage/SDWebImagePrefetcher.h; sourceTree = ""; }; + DC5E4952CCA56281F423E61DF0079F10 /* NSLayoutConstraint+MASDebugAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSLayoutConstraint+MASDebugAdditions.m"; path = "Masonry/NSLayoutConstraint+MASDebugAdditions.m"; sourceTree = ""; }; + DE7B0857B924252CD878D7195FC137F3 /* NSArray+JSONModel.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSArray+JSONModel.m"; path = "JSONModel/JSONModelCategories/NSArray+JSONModel.m"; sourceTree = ""; }; + E076CA03270B75AC5403100C38D66C3B /* POPVector.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPVector.h; path = pop/POPVector.h; sourceTree = ""; }; + E082C0EE53FD574070E00A683AC02FBA /* SDWebImage.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SDWebImage.xcconfig; sourceTree = ""; }; + E0BEDD757BE9D6EDCC84C4D23AF9C490 /* MJRefreshStateHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshStateHeader.m; path = MJRefresh/Custom/Header/MJRefreshStateHeader.m; sourceTree = ""; }; + E0FCFA28C4B75AF19872AE93334DDDE1 /* UnitBezier.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = UnitBezier.h; path = pop/WebCore/UnitBezier.h; sourceTree = ""; }; + E203C0AD981254FF507490D88F385302 /* IDMPBLocalizations.bundle */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "wrapper.plug-in"; name = IDMPBLocalizations.bundle; path = Classes/IDMPBLocalizations.bundle; sourceTree = ""; }; + E2F21A47644F6ECF2B0F94CEF00B9791 /* JSONHTTPClient.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = JSONHTTPClient.m; path = JSONModel/JSONModelNetworking/JSONHTTPClient.m; sourceTree = ""; }; + E9BD213588F034DF026A3B6040CB66D0 /* MJRefreshAutoFooter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = MJRefreshAutoFooter.m; path = MJRefresh/Base/MJRefreshAutoFooter.m; sourceTree = ""; }; + EAFC9B94826257F1390122BE9CA855C9 /* libMJRefresh.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libMJRefresh.a; sourceTree = BUILT_PRODUCTS_DIR; }; + ED419767B2A23AAEACC9F1236BCFCB9F /* IDMPhotoBrowser-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "IDMPhotoBrowser-dummy.m"; sourceTree = ""; }; + EF70E0C2156F49ECDDDD19B971901C7D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + F01CE36E0C4E3778F686FB8BF20A24AC /* YSMChineseSort-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "YSMChineseSort-prefix.pch"; sourceTree = ""; }; + F3DF532B4B697A98000651BB94AD597A /* SDImageCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SDImageCache.m; path = SDWebImage/SDImageCache.m; sourceTree = ""; }; + F411472A5D1F24C6C3E0D98B8DBC8FC0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; }; + F641290367619A729B152CAD6ECA7374 /* POPAction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = POPAction.h; path = pop/POPAction.h; sourceTree = ""; }; + F678F737360EB4AA52AFD66AFEE4C9C6 /* MASConstraint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MASConstraint.h; path = Masonry/MASConstraint.h; sourceTree = ""; }; + F71E53F4CD23771C14FB8E46BFD102B9 /* View+MASAdditions.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "View+MASAdditions.m"; path = "Masonry/View+MASAdditions.m"; sourceTree = ""; }; + F96DCA7D3291CD434ECDB2C1B5E14FFC /* MJRefresh-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MJRefresh-dummy.m"; sourceTree = ""; }; + F9C7BA89850F8191460702C1A05A9979 /* MJRefreshConst.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = MJRefreshConst.h; path = MJRefresh/MJRefreshConst.h; sourceTree = ""; }; + F9D5D84539BABF5B9C4AF37445184757 /* Masonry-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Masonry-prefix.pch"; sourceTree = ""; }; + FC82E23D8D387420D9DCFFBF18AC28AD /* POPAnimationTracer.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; name = POPAnimationTracer.mm; path = pop/POPAnimationTracer.mm; sourceTree = ""; }; + FDBB7874B1BDF1161E0DA045FE9E775D /* PinyinFormatter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PinyinFormatter.m; path = PinYin4Objc/Classes/PinyinFormatter.m; sourceTree = ""; }; + FE943BA8D183AE3E4EF2B0EC76532FA4 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; }; + FF3AECE33276716D6D71F3D0A981C068 /* IDMTapDetectingImageView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = IDMTapDetectingImageView.h; path = Classes/IDMTapDetectingImageView.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 7FD38D643615E559DD74281DAC6E2E3B /* Frameworks */ = { + 1D60A9876386472E1363ACC08FFEEF06 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FE1CA77809C3BEC1B31288C8F48767E9 /* CoreGraphics.framework in Frameworks */, - 025CF885DB86DAA42D623C0A72A45573 /* CoreText.framework in Frameworks */, - 81344449D3B0C65E8C85215E0B18CC3C /* Foundation.framework in Frameworks */, - BBAB11F0AAF1C3D24914BD224335FF34 /* QuartzCore.framework in Frameworks */, - 0CA854067A03ACA022283A4E25420DBB /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 99150F972A6BC5CBF8EC03B3418857EB /* Frameworks */ = { + 22E74FDC14AC2799FED69091D9A35B21 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 60455C808237A133A533D119BCA573BB /* Foundation.framework in Frameworks */, + E5E65DD9C6C28672207C63F3C891B72E /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - C55161FA848F2C418926FA82A164D204 /* Frameworks */ = { + 409B5ADB0926D34D3A1115F1AF49DCE9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4D372BE2720BF45D696A2AFBCC8D20D8 /* Foundation.framework in Frameworks */, + 39173B8D335E1DC2AD03FA6D1000066E /* CoreGraphics.framework in Frameworks */, + 4702A774296D10A3AD515B23C8A4BCBA /* CoreText.framework in Frameworks */, + 3AFE9CE62199BC568CFDA5938B360436 /* Foundation.framework in Frameworks */, + 50859C101D28838C3E3BF949D3015D77 /* QuartzCore.framework in Frameworks */, + DC984A4ED65F72FD47975EEFFDFB1D7F /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - EB932C7244160CC464D5F7E2A9713D3F /* Frameworks */ = { + 5F3D2195FAF510E94F9A49BE3236D874 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 216E5A12ACFD64B84DC1A2E253336D9B /* Foundation.framework in Frameworks */, + 8C603F929950A3E64025E0C041C5819B /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F13B9B65D55969F9FCC7E70C3112F3E2 /* Frameworks */ = { + 63942D6707F82794EE4810A4A54A662C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 64323FB96FB49B6E239193A018CA56D8 /* Foundation.framework in Frameworks */, + 19085A34C44E5DCDF0FAA764FEAE2E6A /* Foundation.framework in Frameworks */, + 6E07DA5CD501121696AFFB6ED969F7D3 /* MessageUI.framework in Frameworks */, + 17F8551CC49F436FDFA4BE5CF73F7968 /* MobileCoreServices.framework in Frameworks */, + 564E30E22610C1DB5FEEB038493FD080 /* QuartzCore.framework in Frameworks */, + 21E80BC511E52B7D6F88DFD7DEFF39C9 /* Security.framework in Frameworks */, + 20671B4EA598886CDFAAE7401DA23CCD /* SystemConfiguration.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F6AAF5593D0C5E24B3377E5C3999D0AA /* Frameworks */ = { + 7590ECF8FBEB328626CD5B57D9E849EE /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C1DAA515EEE44666FC7C3CCAB35036F9 /* Foundation.framework in Frameworks */, + 0997F2663FC453CD86B29AD7543D8946 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - FAB9E9D9BBDB93399D3C2B91469EC4B6 /* Frameworks */ = { + 98CDFE18ACA3E7B8AEF608A3C9E3AF88 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2F85D170E76C661AB0D9E9A8B206C78D /* Foundation.framework in Frameworks */, - 9A6AE1EF2E94AEB6912BE845583E7D57 /* UIKit.framework in Frameworks */, + 90688D0BECF0052611AFBF7665C185DC /* Foundation.framework in Frameworks */, + CC57875F759209776FE66977D3767059 /* ImageIO.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - FC32E90E02D5D1E69639C31FB0BD75F1 /* Frameworks */ = { + 99150F972A6BC5CBF8EC03B3418857EB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D344FA97151933D2805D823B5D3EE6C2 /* Foundation.framework in Frameworks */, + 60455C808237A133A533D119BCA573BB /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - FC4E1A8B86B052440711824A41CBCAC4 /* Frameworks */ = { + B1B6BCA7856FFF34CADF7E594C16BB14 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 7CA2AB7C84AEAA6A75161DDCB34755C6 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EB932C7244160CC464D5F7E2A9713D3F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 216E5A12ACFD64B84DC1A2E253336D9B /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F2A9AAC03867BB4990470BAC5912E030 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 53FB0CBA14BE53F79F4EB4E7B46C523B /* Foundation.framework in Frameworks */, + 072C184628072EDE522629576F1716DE /* QuartzCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F6AAF5593D0C5E24B3377E5C3999D0AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C1DAA515EEE44666FC7C3CCAB35036F9 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FAB9E9D9BBDB93399D3C2B91469EC4B6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2F85D170E76C661AB0D9E9A8B206C78D /* Foundation.framework in Frameworks */, + 9A6AE1EF2E94AEB6912BE845583E7D57 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -444,228 +766,352 @@ name = "Targets Support Files"; sourceTree = ""; }; - 03D03CB5C77905F8CACB41A042C6505A /* Resources */ = { + 06CE768CE92F81ABFB027A64B3EC24C9 /* Resources */ = { isa = PBXGroup; children = ( - 9E1255D8AF96726BBEF138EBBC4D9DFB /* unicode_to_hanyu_pinyin.txt */, + E203C0AD981254FF507490D88F385302 /* IDMPBLocalizations.bundle */, + 95C1DDA1A8ADA106F59D36C806E7BEDC /* IDMPhotoBrowser.bundle */, ); name = Resources; sourceTree = ""; }; - 20B56609144CE204DFA8221F742B2D76 /* Frameworks */ = { + 0D0DB6CC2EE0CE0ED426487A594C5BE8 /* Support Files */ = { isa = PBXGroup; children = ( - 67ACCD40386E4BF5A9E17B8DA0AF47A4 /* iOS */, + 515C5FDE440908C994DB168AD707A32D /* YSMChineseSort.xcconfig */, + 23C70615AD8AF722FC9EC4E05BE1F999 /* YSMChineseSort-dummy.m */, + F01CE36E0C4E3778F686FB8BF20A24AC /* YSMChineseSort-prefix.pch */, ); - name = Frameworks; + name = "Support Files"; + path = "../Target Support Files/YSMChineseSort"; sourceTree = ""; }; - 2A71397E211E544906B4632C27CF46E9 /* Support Files */ = { + 1AE7AC72D740CE1D2B94EAA568089D96 /* Support Files */ = { isa = PBXGroup; children = ( - A6D7E9684728BD794691AC96247B49FD /* PinYin4Objc.xcconfig */, - 1ABCD3A1F8B2EE96E1067F98418DE182 /* PinYin4Objc-dummy.m */, - FE0EF6F6E467F553244D57F0DCC3C10C /* PinYin4Objc-prefix.pch */, + 2FEA08431B9AABCA9D59F5D2C63FF5F2 /* TTTAttributedLabel.xcconfig */, + 275F75B43F7F4E0D56BAED84854DCC1F /* TTTAttributedLabel-dummy.m */, + 6870213F34B9D773F96C619298EA8DD7 /* TTTAttributedLabel-prefix.pch */, ); name = "Support Files"; - path = "../Target Support Files/PinYin4Objc"; + path = "../Target Support Files/TTTAttributedLabel"; sourceTree = ""; }; - 2EA0E99574F8BE6B7F5E014B3C1302CE /* Support Files */ = { + 2C0361D0D326B521F0EC6FD9A48970D4 /* TTTAttributedLabel */ = { isa = PBXGroup; children = ( - AFE722FF2CB2B0C7FFDC74681CCF0050 /* JSONModel.xcconfig */, - 9DB3C85178DB4CBEEDF2800083779482 /* JSONModel-dummy.m */, - CCA4EB0B02893969F7740CB6D1D35F71 /* JSONModel-prefix.pch */, + B182F9937220A7A3449E75D60C053153 /* TTTAttributedLabel.h */, + 1F7C21E045882F8A5C339AEB1CC1E5A4 /* TTTAttributedLabel.m */, + 1AE7AC72D740CE1D2B94EAA568089D96 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/JSONModel"; + path = TTTAttributedLabel; sourceTree = ""; }; - 3C433707F710EBB5EB4F75FB174903AE /* Pods */ = { + 2E16F4B4246F2DA1AC5CC5A5DB8AE8D9 /* Support Files */ = { isa = PBXGroup; children = ( - 6F639D2F4A1F1FD62FF27F88E5D60B38 /* JSONModel */, - 6DD56681E767E737EB85B81DE31BE0E0 /* Masonry */, - 3FBD09037E99B00AB453B3B983A5D3B3 /* MJRefresh */, - C4485D090C98CAC47C4D3F23F7732F90 /* PinYin4Objc */, - 798D415BD92D4868DB57DA2F0CB69AC3 /* TTTAttributedLabel */, - DD0E1160B059B688BDB8DBD55EC2A20C /* UITableView+FDTemplateLayoutCell */, - 7F9E3289E9CD640AC6C317809DB49B01 /* YSMChineseSort */, + E082C0EE53FD574070E00A683AC02FBA /* SDWebImage.xcconfig */, + 2E3A1CD4E99AAC9C0A83DC1325148FDD /* SDWebImage-dummy.m */, + 4029EFB0C263ECD8D3E88B44F7A2C894 /* SDWebImage-prefix.pch */, ); - name = Pods; + name = "Support Files"; + path = "../Target Support Files/SDWebImage"; sourceTree = ""; }; - 3FBD09037E99B00AB453B3B983A5D3B3 /* MJRefresh */ = { + 329E60FA189B382E0028C2D448A2FBCD /* Support Files */ = { isa = PBXGroup; children = ( - BE80F14D93DC9A087A352090CB46BF6B /* MJRefresh.h */, - 78765D61B87853B1771A316038FC100B /* MJRefreshAutoFooter.h */, - C683E5772D725AD2A840CF0258F6D8D9 /* MJRefreshAutoFooter.m */, - CC9EB027E595EDF272D8A53EFCCA88C5 /* MJRefreshAutoGifFooter.h */, - 7E664ED6095EB282BD0662FF3FAAD993 /* MJRefreshAutoGifFooter.m */, - D53534C0032FCBEA723CEBC9889B3B50 /* MJRefreshAutoNormalFooter.h */, - 4904D67267599E7E519DD02278723D6D /* MJRefreshAutoNormalFooter.m */, - 0015C02ACBC7B4A2470894BEF42E4FF7 /* MJRefreshAutoStateFooter.h */, - BC5FC3D7C00BAC3BD9E488922B15804C /* MJRefreshAutoStateFooter.m */, - 860C1D8F052B9D9709DA1F9AB96A3472 /* MJRefreshBackFooter.h */, - 9E2509AED9F1C8AF13DB4B4CBAAB7D30 /* MJRefreshBackFooter.m */, - 265EE952C306666CB507538F8B82D422 /* MJRefreshBackGifFooter.h */, - EB1D662FB20B25C3570CABD76FDE5B0D /* MJRefreshBackGifFooter.m */, - 716C8EBD3D5278AAB75E35838F0CC792 /* MJRefreshBackNormalFooter.h */, - CB741FD3BD4D41C37E9CED9F949A047E /* MJRefreshBackNormalFooter.m */, - 98A31D0AB67D4F7DD0893E540FD6ACA0 /* MJRefreshBackStateFooter.h */, - 84A55A0B63C96C75A2C80A1FB20C2AA8 /* MJRefreshBackStateFooter.m */, - AF7CE18D1B84C33C6BD9BC6022D24EBD /* MJRefreshComponent.h */, - E28EE09B7C9E1A0D13D8E93745AD5E9A /* MJRefreshComponent.m */, - 5A6C8C6220ABC63DABE701783C546073 /* MJRefreshConst.h */, - 608745171B81D78D56418BD5298C5850 /* MJRefreshConst.m */, - D0C8386E6976D64B83358653D942559A /* MJRefreshFooter.h */, - E91674EECE1FB09178AEE68AB90BB413 /* MJRefreshFooter.m */, - 66F306B09A1B51D72F8A8983CCA6B656 /* MJRefreshGifHeader.h */, - 1C1F07C1CF6D3A54B51C5F88DA5A6BD6 /* MJRefreshGifHeader.m */, - 26944A0DCB69E7C690D532498EE5A7B2 /* MJRefreshHeader.h */, - B8EA540C679759E0B07DFE093B862A87 /* MJRefreshHeader.m */, - ED080B415FCA0D06F1CBBA4DD9AEB92E /* MJRefreshNormalHeader.h */, - BDF61128AE8597E743825ACD29B63A0F /* MJRefreshNormalHeader.m */, - E16F6383F788296BE1E9759DDE726F29 /* MJRefreshStateHeader.h */, - 379CE28F0C097FB83B3A626FF0F79369 /* MJRefreshStateHeader.m */, - 629E2759EE4E74AC82272C66A4F1472E /* UIScrollView+MJExtension.h */, - 2CC87E001C0125932CBD4A198D7BF7BE /* UIScrollView+MJExtension.m */, - 1B4D83E1AA69F9442AAC9C50191099E8 /* UIScrollView+MJRefresh.h */, - F24AB7D8D522807F8DDF864653DEA34F /* UIScrollView+MJRefresh.m */, - 108BC97870793B0A4ED2890DA53859DC /* UIView+MJExtension.h */, - 2A1092377F03E9F611E7BED66A64F8F2 /* UIView+MJExtension.m */, - 5EEA302A8FF3CF470409CB2F246FE4E3 /* Resources */, - BBBB469F016E0777922422F1E89EF061 /* Support Files */, + 9F3C3390D56C3905C41D2A9C241F307D /* pop.xcconfig */, + 4658B08823A3859A191F5D7D4CB1E009 /* pop-dummy.m */, + 0AF0CA0D471618FC4B2F143628329A38 /* pop-prefix.pch */, ); - path = MJRefresh; + name = "Support Files"; + path = "../Target Support Files/pop"; sourceTree = ""; }; - 4C2C734A6EDA10D56D946CB6839657A9 /* Support Files */ = { + 37916DB411288704E848C9FF0BDD3372 /* Core */ = { isa = PBXGroup; children = ( - 75F49A3D99189DE7C38FBF5DACA66777 /* Masonry.xcconfig */, - 72DD34B2C5BB1A99FCD973E9D3CBE74C /* Masonry-dummy.m */, - 71900F83030CECC4C09E10507D1B387D /* Masonry-prefix.pch */, + D7C331454E3F68E33C2970B5DBE0523C /* NSData+ImageContentType.h */, + CF581AFBEED6C5F8F30EA627293B592E /* NSData+ImageContentType.m */, + 818DE1BB0FB89317120BCAD92094C4E5 /* SDImageCache.h */, + F3DF532B4B697A98000651BB94AD597A /* SDImageCache.m */, + 00A2F5EC5C9A0FE2984DC2FD88AE96E0 /* SDWebImageCompat.h */, + 2BFF5BAC6EDADF23EAC3260247601BBD /* SDWebImageCompat.m */, + AA7DB17CC2B735D8135A44C87008CB93 /* SDWebImageDecoder.h */, + 0C44999FC543A349DB56757BAA5FE78E /* SDWebImageDecoder.m */, + 2AE88D34DDE07E360E1872C4E9623AA8 /* SDWebImageDownloader.h */, + 8F3224AEAE0BCF6DCF60EAAFBDEBD440 /* SDWebImageDownloader.m */, + 77E9A2676E0C7A44607650F49395F932 /* SDWebImageDownloaderOperation.h */, + 958F296B9DE81822BD052DF062E62F95 /* SDWebImageDownloaderOperation.m */, + 6AED7F96023BBAEDFA3DC825D01A8176 /* SDWebImageManager.h */, + 435EC560283D577C2E4ABCAB14A6D88A /* SDWebImageManager.m */, + AD3B5FF56EE07EE2E3BAE1FC11BF120B /* SDWebImageOperation.h */, + DBB97CE145366FF86A9E10F452F95539 /* SDWebImagePrefetcher.h */, + 6BD7170EE624B7DC0D1632D29942E5F9 /* SDWebImagePrefetcher.m */, + 93030B1C30BA4D5705A137D96F5E4001 /* UIButton+WebCache.h */, + 22F3A5ECFFF1876B15DCEBC2D88D0A4F /* UIButton+WebCache.m */, + 4033ADE28AABA43D70A9F516B394D487 /* UIImage+GIF.h */, + 95A95EDCBDBEE5EF756292EE9CC2909A /* UIImage+GIF.m */, + D2A676F93CF68E9C6B2BB6D0588F008F /* UIImage+MultiFormat.h */, + 02D245545B91515A5C3865B38ED82AEC /* UIImage+MultiFormat.m */, + 36D64856F67D7D55373FE038BF08E0DA /* UIImageView+HighlightedWebCache.h */, + 52358869ECD2DE6B1A50EACAFA24542D /* UIImageView+HighlightedWebCache.m */, + B106872C40FB15F8E27ED2FF268B19D8 /* UIImageView+WebCache.h */, + 323A8D73926C818BD47E390B27568BD9 /* UIImageView+WebCache.m */, + 91844EC3721E2B9499ECC0E6DB8443D0 /* UIView+WebCacheOperation.h */, + 2A74CC2A1B596B9EE130F16359A6C3D3 /* UIView+WebCacheOperation.m */, + ); + name = Core; + sourceTree = ""; + }; + 38A2DFBD07A089B3347FD63C5CC1BAB9 /* Pods */ = { + isa = PBXGroup; + children = ( + 6FD24171FCD5D938D47DA808B3254CC1 /* DACircularProgress */, + A2D93D25452000A6F8AC960A0AF839F1 /* IDMPhotoBrowser */, + 619F017581E8B18AFB8CC321B7BBA016 /* JSONModel */, + C062355C634EA792A36AAFFFDD6687FA /* Masonry */, + F07DDA1BCB62A210068AF1FF8D5E9BE7 /* MJRefresh */, + 94A8C374500218A811E9AB775BD4B4F6 /* PinYin4Objc */, + 99CC79695A605CA61D22A0F1EC1B0B39 /* pop */, + F52BAB9B442121B5E81D73415F189117 /* SDWebImage */, + 2C0361D0D326B521F0EC6FD9A48970D4 /* TTTAttributedLabel */, + AE0CFD0BB2CC9199556559701723484F /* UITableView+FDTemplateLayoutCell */, + 8EE64B85E0861DBE9AF8A1AA7DCF50DE /* YSMChineseSort */, ); - name = "Support Files"; - path = "../Target Support Files/Masonry"; + name = Pods; sourceTree = ""; }; - 5EEA302A8FF3CF470409CB2F246FE4E3 /* Resources */ = { + 4DC98D2BC8F3BDE9DA5B43CB139FD212 /* Support Files */ = { isa = PBXGroup; children = ( - 28F4E56CA712B7BD6F86E92BFFE0B477 /* MJRefresh.bundle */, + D6B1D7C68CAD15BADF86AFC8098C1BC9 /* JSONModel.xcconfig */, + B756359C68074DA108D0BA960C8D5539 /* JSONModel-dummy.m */, + D40DC5E37C17750A3926569FC9FCB44D /* JSONModel-prefix.pch */, ); - name = Resources; + name = "Support Files"; + path = "../Target Support Files/JSONModel"; sourceTree = ""; }; - 67ACCD40386E4BF5A9E17B8DA0AF47A4 /* iOS */ = { + 619F017581E8B18AFB8CC321B7BBA016 /* JSONModel */ = { isa = PBXGroup; children = ( - C2C0AB3C85FA5E9164DD219A4ABB70A8 /* CoreGraphics.framework */, - F9F81E8DFC2A3B3D39023F9D20076AAD /* CoreText.framework */, - D06DE372ABB13C90BA607C6CB5F826C4 /* Foundation.framework */, - FBDCDC8219668A958122180B9FC509EB /* QuartzCore.framework */, - 506A5B2617A7166468E55C721EA33493 /* UIKit.framework */, + 966B413390350C9C4A9B4E61F84D99F3 /* JSONAPI.h */, + 7A22B3D7F903B85213AF2A676502CC3B /* JSONAPI.m */, + 92E4D49F377BB7903465B2CA8B68DB6F /* JSONHTTPClient.h */, + E2F21A47644F6ECF2B0F94CEF00B9791 /* JSONHTTPClient.m */, + 27347BF09BE2451ABCF03BC054FA86D7 /* JSONKeyMapper.h */, + 2C2F0EEFA72A0BE6400C1E4E987FBBF6 /* JSONKeyMapper.m */, + A0D639222C6907895C63E8BC9AA21097 /* JSONModel.h */, + 4EF37BAF62CF8582D9A6B9A80782851D /* JSONModel.m */, + 7548E9C462347D487C5FCB8816384FD3 /* JSONModel+networking.h */, + 09008B8C6E1D352C446EAB6490DE0163 /* JSONModel+networking.m */, + 68146AE7FB96ACCFD685911BCBA1A6DD /* JSONModelArray.h */, + 08C0E83F7FA713C800A98C87BC9C755D /* JSONModelArray.m */, + CD06886D4DAD8B6A2D62352A5412190D /* JSONModelClassProperty.h */, + AE64325D5A6054A51455ABD7131A7E85 /* JSONModelClassProperty.m */, + 8AF6EA1D86DCC5BBEF3367D6DF403038 /* JSONModelError.h */, + 2C22DC725D39BDAD2354E6AFA68D38B1 /* JSONModelError.m */, + 5108EDA896DDC141872031770379AE12 /* JSONModelLib.h */, + D27659C37717BC239E1B156A6B3CC939 /* JSONValueTransformer.h */, + 3ECA8773D22BF7142944DE3044D3290A /* JSONValueTransformer.m */, + 58C58481C311A9F568F2930781BF8728 /* NSArray+JSONModel.h */, + DE7B0857B924252CD878D7195FC137F3 /* NSArray+JSONModel.m */, + 4DC98D2BC8F3BDE9DA5B43CB139FD212 /* Support Files */, ); - name = iOS; + path = JSONModel; sourceTree = ""; }; - 6DD56681E767E737EB85B81DE31BE0E0 /* Masonry */ = { + 662AA70942673D3D8423A8F7793D2C73 /* Resources */ = { isa = PBXGroup; children = ( - 194AB03C6C6F3F341E7BC05475926214 /* MASCompositeConstraint.h */, - EB0BBDC7A2C2C6AC7DAF522DE6E80401 /* MASCompositeConstraint.m */, - 5FDA33D1101FCCA6F6C816DAB1BFBF83 /* MASConstraint.h */, - C2FDD8FD3810999BC6DB4E4747D09E94 /* MASConstraint.m */, - DF702903EBFEE79D6004194960E4DFED /* MASConstraint+Private.h */, - 2077746E54A868478E91B968E5E2419E /* MASConstraintMaker.h */, - D5232190BE858269AB597857D283A636 /* MASConstraintMaker.m */, - 0E7F62D78DD5201550F5897FDE7C2CB1 /* MASLayoutConstraint.h */, - FB0D67FE6FA1DBBA850826157D525B9D /* MASLayoutConstraint.m */, - C0AC9BC1ACB56B13F4C80A25CA78D5A7 /* Masonry.h */, - 61129BE053D83E3DC62113140D0FD5A3 /* MASUtilities.h */, - 27AF53FB39EB0EF1D0E32CF00EC80FD5 /* MASViewAttribute.h */, - 2393444564FC0605ECE53CC159CFB65D /* MASViewAttribute.m */, - D3C853B58C23B5474521C4A1D747FFC4 /* MASViewConstraint.h */, - 9E9DE917A33FBFD702F4602E82C83A6C /* MASViewConstraint.m */, - BC55D01DC7EBA332F11F0C3601FAA35C /* NSArray+MASAdditions.h */, - DC56D96495296516119B92404862DF82 /* NSArray+MASAdditions.m */, - ABC43486CC00B132925386552C2F098C /* NSArray+MASShorthandAdditions.h */, - 98919257D1E9A476841E1EB1EA99AA8B /* NSLayoutConstraint+MASDebugAdditions.h */, - D6C79995E4720A97DD5FA2CF803EDFDE /* NSLayoutConstraint+MASDebugAdditions.m */, - C1F281059FE59E348AE3D408D40B7FBF /* View+MASAdditions.h */, - 9540DC8E3FA7BCA42A0F9E973C2F853D /* View+MASAdditions.m */, - 1E9416C1D61E4308BFBF679E027C24B9 /* View+MASShorthandAdditions.h */, - 53AAE583469D53DE4097EE2AE6E3B5CA /* ViewController+MASAdditions.h */, - BD0519846ABDF5F454E38B92BE576548 /* ViewController+MASAdditions.m */, - 4C2C734A6EDA10D56D946CB6839657A9 /* Support Files */, + 5FA34B2C3CD8242B9496375A934EB028 /* unicode_to_hanyu_pinyin.txt */, ); - path = Masonry; + name = Resources; sourceTree = ""; }; - 6F639D2F4A1F1FD62FF27F88E5D60B38 /* JSONModel */ = { + 69887635C29D9F1E0541F55D7A960122 /* Support Files */ = { isa = PBXGroup; children = ( - 7FE4C395EE223C66C4E1F5E45F75ACBC /* JSONAPI.h */, - CDB744299B40CBC6B12380695A2CE122 /* JSONAPI.m */, - 5480118F8BB16A1236A4405AAB3500F0 /* JSONHTTPClient.h */, - 2D4F8F9F929AF48A51A5ED3E93455A31 /* JSONHTTPClient.m */, - A45CBC432B6EC86F59D3D4A3C8EABECD /* JSONKeyMapper.h */, - 295DD9E3B3FE9F00057EA9584DFE11AB /* JSONKeyMapper.m */, - 114EF80D2BD8D4C8B4D14854FDF5763C /* JSONModel.h */, - 04A139FA2433E59AD1E2A6342ACEA526 /* JSONModel.m */, - 49DE71827E6C4D699FCD67DFB4F4DC00 /* JSONModel+networking.h */, - 262AA66DB404120AC390895C04058A46 /* JSONModel+networking.m */, - 8155CAF69A3AB81FB66D93898BE424EF /* JSONModelArray.h */, - 729A9676D71788C6C80520E709EE28B0 /* JSONModelArray.m */, - 70AAC39145F753135AD672D979F27055 /* JSONModelClassProperty.h */, - E82793A62DCDD5AE50D01583E90F1B86 /* JSONModelClassProperty.m */, - 82B9795D1EB2AE6FCAD4BC43665EED97 /* JSONModelError.h */, - B9C35C2283ABAB903DA2011CDC0021A0 /* JSONModelError.m */, - 3C0A2DF1DDC309CC90717844CB58795A /* JSONModelLib.h */, - 89CE2CCD15AC43644EC665FC80FC4FDC /* JSONValueTransformer.h */, - D5455867D208929771E81347BF6365A6 /* JSONValueTransformer.m */, - 8374FA501C17158A8357C13D4971BEE3 /* NSArray+JSONModel.h */, - 7E53EFB9338AC676059DE9DB04156419 /* NSArray+JSONModel.m */, - 2EA0E99574F8BE6B7F5E014B3C1302CE /* Support Files */, + 1943C527E01F767B4777786BE2E5F6A9 /* IDMPhotoBrowser.xcconfig */, + ED419767B2A23AAEACC9F1236BCFCB9F /* IDMPhotoBrowser-dummy.m */, + 0B00F8E3FCE28893A4ED9D57C9A41339 /* IDMPhotoBrowser-prefix.pch */, ); - path = JSONModel; + name = "Support Files"; + path = "../Target Support Files/IDMPhotoBrowser"; sourceTree = ""; }; - 798D415BD92D4868DB57DA2F0CB69AC3 /* TTTAttributedLabel */ = { + 6FD24171FCD5D938D47DA808B3254CC1 /* DACircularProgress */ = { isa = PBXGroup; children = ( - B6B2587D468A89FE7C5DEBA0C6B5F0BD /* TTTAttributedLabel.h */, - 54A90CEA122D707B60AE68ED3AEB14A7 /* TTTAttributedLabel.m */, - D071B5127064736CBDDC84957CBC9FFD /* Support Files */, + A179598B75F3FB8C9F7E23E9FE9BCEED /* DACircularProgressView.h */, + 3281F3CBFA393181C9860EA986E9D86C /* DACircularProgressView.m */, + 28C39D892F249A76BD1FD55EB399037D /* DALabeledCircularProgressView.h */, + 624C980497F879D4DEE2BBB60F28572B /* DALabeledCircularProgressView.m */, + E0D4701EAC50216B310DDA27091033BF /* Support Files */, ); - path = TTTAttributedLabel; + path = DACircularProgress; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( BA6428E9F66FD5A23C0A2E06ED26CD2F /* Podfile */, - 20B56609144CE204DFA8221F742B2D76 /* Frameworks */, - 3C433707F710EBB5EB4F75FB174903AE /* Pods */, - D37714A969D15B542A25B58A39E56F6E /* Products */, + 876F80F8AFD1240ED0B7B9EA9C5BFAD8 /* Frameworks */, + 38A2DFBD07A089B3347FD63C5CC1BAB9 /* Pods */, + C5BF940FCA922DCAC97CA918BC1E04C8 /* Products */, 037C0CA694176A3C0915F62C9D20B3E6 /* Targets Support Files */, ); sourceTree = ""; }; - 7F9E3289E9CD640AC6C317809DB49B01 /* YSMChineseSort */ = { + 86A6768726E50EAD573141C32DB95168 /* Support Files */ = { isa = PBXGroup; children = ( - F523ED943717C0B39CCC9A2BAB89DBFF /* NSArray+SortContact.h */, - 9E86AA905DE27EDC540A266587776F28 /* NSArray+SortContact.m */, - B4029F0D17B6D561C9D3BD702D218BBB /* Support Files */, + 280DD7D0E4F9B1FE05F7CB9533E8FE71 /* UITableView+FDTemplateLayoutCell.xcconfig */, + BA05632501A67B41E1101F890EDF9689 /* UITableView+FDTemplateLayoutCell-dummy.m */, + BFC11DE36C7EF2E5EBAC81F23DBC21C4 /* UITableView+FDTemplateLayoutCell-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/UITableView+FDTemplateLayoutCell"; + sourceTree = ""; + }; + 876F80F8AFD1240ED0B7B9EA9C5BFAD8 /* Frameworks */ = { + isa = PBXGroup; + children = ( + DDDBBCC79CAF03BDF2C66F2E8904E361 /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 8EE64B85E0861DBE9AF8A1AA7DCF50DE /* YSMChineseSort */ = { + isa = PBXGroup; + children = ( + 2954AD84FA1ED7B42199B0E3AB1A6405 /* NSArray+SortContact.h */, + 49F798C2DB0BA45F742D0D4F7EE583A6 /* NSArray+SortContact.m */, + 0D0DB6CC2EE0CE0ED426487A594C5BE8 /* Support Files */, ); path = YSMChineseSort; sourceTree = ""; }; + 94A8C374500218A811E9AB775BD4B4F6 /* PinYin4Objc */ = { + isa = PBXGroup; + children = ( + 8937858037D57D7901C493DB275056E3 /* ChineseToPinyinResource.h */, + 9644CD86CBE2AFE4EA7E8DF11C2C9B64 /* ChineseToPinyinResource.m */, + 6F50A5FE262CF789377EE12AFEF366C2 /* HanyuPinyinOutputFormat.h */, + 73CD966394775B507844F76DEB08CAD0 /* HanyuPinyinOutputFormat.m */, + 126095C34CFE4A360FC5EE277879B164 /* NSString+PinYin4Cocoa.h */, + 457E97137A678AF2B43309C85EF23A2B /* NSString+PinYin4Cocoa.m */, + A02059944564A4710941D5907B767D67 /* PinYin4Objc.h */, + 722235735C34723AC15450C82F7CB484 /* PinyinFormatter.h */, + FDBB7874B1BDF1161E0DA045FE9E775D /* PinyinFormatter.m */, + B0160B8165FA7D3D73707CF887164068 /* PinyinHelper.h */, + BD487E4D661FFAE233A6697527B48C1E /* PinyinHelper.m */, + 662AA70942673D3D8423A8F7793D2C73 /* Resources */, + CDFB13DD698C29F0D47619715566FBC8 /* Support Files */, + ); + path = PinYin4Objc; + sourceTree = ""; + }; + 99CC79695A605CA61D22A0F1EC1B0B39 /* pop */ = { + isa = PBXGroup; + children = ( + 7BC166188310D39A8A1DB4946A65420D /* FloatConversion.h */, + CFF4D15F9ECBD3D25BEFB261FBD92068 /* POP.h */, + F641290367619A729B152CAD6ECA7374 /* POPAction.h */, + 8D0CFEB5547E29DC96E3A5D0CC3ACA29 /* POPAnimatableProperty.h */, + B8FE56ECF5B2746B6CF80AEDB94726BA /* POPAnimatableProperty.mm */, + 664237D83309F76AC0689FF098D832EA /* POPAnimation.h */, + 2073D654EEFFFD80F3FAD86185F86C5C /* POPAnimation.mm */, + C54C102B0FA3620AA6B171E31DA9BA7D /* POPAnimationEvent.h */, + D79C3EC86DDC13EF7A79DB741F5C4169 /* POPAnimationEvent.mm */, + 00A53338DA18C075C4411873BE1BE24C /* POPAnimationEventInternal.h */, + CE0B683EB25531510BA51DEA3F0E46D3 /* POPAnimationExtras.h */, + 1AA626A1F9C480113E7DE6411F0819C6 /* POPAnimationExtras.mm */, + 41D633806E1344B3D5C92F6C7D202865 /* POPAnimationInternal.h */, + 4397F84CE439781D22521A71891EA42E /* POPAnimationPrivate.h */, + 291162C2CB2CE29CE40291D569C7AF7A /* POPAnimationRuntime.h */, + 129EBA169D8A8A3ADABDFE5D55BA0ACB /* POPAnimationRuntime.mm */, + B52D68B9D723D4B64A99F45478D4AF81 /* POPAnimationTracer.h */, + FC82E23D8D387420D9DCFFBF18AC28AD /* POPAnimationTracer.mm */, + B33DE76334232BCFD0EC9BE80E316271 /* POPAnimationTracerInternal.h */, + 3BD44F8DC26673B026FE868741FCF62B /* POPAnimator.h */, + 90E07171D35423306235DC6A33DAD553 /* POPAnimator.mm */, + 0AE39B1A7F17327A9C478D708E87B2C1 /* POPAnimatorPrivate.h */, + 12C94D0ACAA2D5B7A3D5E96E27316DD7 /* POPBasicAnimation.h */, + 17E20145B2726B1B479D9C3EE56EAE65 /* POPBasicAnimation.mm */, + 488B5EE69DE24808D9ABF5DE1FD3768C /* POPBasicAnimationInternal.h */, + 50108F824FE50D69D8B1D4BE105EB27D /* POPCGUtils.h */, + 74270470E231980B45C370FB877B80CC /* POPCGUtils.mm */, + 331123C3B0F567F58700DA713E2A6FAC /* POPCustomAnimation.h */, + 4224AA7B397316B196A22C85F2ECF355 /* POPCustomAnimation.mm */, + 28AC1A25438A4788F38A1FE61D25873E /* POPDecayAnimation.h */, + 7491B38CDAC2B5F592EAAAE0CB685E2C /* POPDecayAnimation.mm */, + 01F33684DD42E63B5E83A9833F29CE76 /* POPDecayAnimationInternal.h */, + 88EB7FC18F83EB6DE1E098D8ED89BCEF /* POPDefines.h */, + 6AE916D814A89B259CA3E10A48A1C7BB /* POPGeometry.h */, + DB2D9BBE951DE2BBDC0C279EB23523A4 /* POPGeometry.mm */, + 088726AEBC0BDC74C8BC416A63D343B6 /* POPLayerExtras.h */, + 619197C57E3C79F9E4097180D8A241C6 /* POPLayerExtras.mm */, + 0CE6FEB330B05CB480DA084F7B914F1D /* POPMath.h */, + 6D89C04B5E0B827072ECF1187FC17412 /* POPMath.mm */, + A8400B900669AE074775B45BF2568B59 /* POPPropertyAnimation.h */, + A91A3553E76953F5FD3FF8812373BF79 /* POPPropertyAnimation.mm */, + BABBC6C9BF41ABB1C39E62AF0D2859F4 /* POPPropertyAnimationInternal.h */, + 9A0334FA11F94DB4B777D75FBD647FD2 /* POPSpringAnimation.h */, + 4F03CF4D582711879D702156CA37560E /* POPSpringAnimation.mm */, + B259B725C6BF44FC001F94486FD3E89B /* POPSpringAnimationInternal.h */, + 76C0F9ECAA796E941D55BDFAB3286225 /* POPSpringSolver.h */, + E076CA03270B75AC5403100C38D66C3B /* POPVector.h */, + 0F48F73F466EA2E4D336D4D325948237 /* POPVector.mm */, + 6F2688B0B576882E5158A274F04B37FE /* TransformationMatrix.cpp */, + BFD83041FB402794FC9231126F387FD9 /* TransformationMatrix.h */, + E0FCFA28C4B75AF19872AE93334DDDE1 /* UnitBezier.h */, + 329E60FA189B382E0028C2D448A2FBCD /* Support Files */, + ); + path = pop; + sourceTree = ""; + }; + A2D93D25452000A6F8AC960A0AF839F1 /* IDMPhotoBrowser */ = { + isa = PBXGroup; + children = ( + 7F5721A1166050B3C7C69DCFBBD689A3 /* IDMCaptionView.h */, + 65D2733D9D9131F55E63EFF184F003A7 /* IDMCaptionView.m */, + 21F2E03569D7983250053CAD25F7AE07 /* IDMPBConstants.h */, + 54DDC2556259EC51F45B90FBDB46F0A0 /* IDMPhoto.h */, + 75283415DB209D6F08BFEFACA2B5BA22 /* IDMPhoto.m */, + DAC9174A627C8471D375AB741B908F6D /* IDMPhotoBrowser.h */, + 60E85060D0061807461444528FE8341D /* IDMPhotoBrowser.m */, + 6848DD727C78658F5608AA1DDE3DFD25 /* IDMPhotoProtocol.h */, + FF3AECE33276716D6D71F3D0A981C068 /* IDMTapDetectingImageView.h */, + 7EEC0AE439BD692CD48793F3B17972D1 /* IDMTapDetectingImageView.m */, + 2C019930E3CCA9F1C687D167A708E679 /* IDMTapDetectingView.h */, + C8CC4434B2C9D2B63C3AE0507A87BB5E /* IDMTapDetectingView.m */, + CB3E30C6FCC1765E2FE0A3B668FD3BD3 /* IDMZoomingScrollView.h */, + 037CD0BF7580FDE101418A3B7C8BDB69 /* IDMZoomingScrollView.m */, + 06CE768CE92F81ABFB027A64B3EC24C9 /* Resources */, + 69887635C29D9F1E0541F55D7A960122 /* Support Files */, + ); + path = IDMPhotoBrowser; + sourceTree = ""; + }; + AE0CFD0BB2CC9199556559701723484F /* UITableView+FDTemplateLayoutCell */ = { + isa = PBXGroup; + children = ( + 6894B45B4BCF387B53AA0960AE6391EC /* UITableView+FDIndexPathHeightCache.h */, + DA5FD9C8C13FEBED15FE648864C1E7B3 /* UITableView+FDIndexPathHeightCache.m */, + 1862D04C22EE693EAE7C412438AF7A0D /* UITableView+FDKeyedHeightCache.h */, + 8DD62082A2D04DA726684E4237945303 /* UITableView+FDKeyedHeightCache.m */, + 1AEFF1DC5157779282B5157C56205C39 /* UITableView+FDTemplateLayoutCell.h */, + 40995FD3ED29E642A3EC1FF74B944187 /* UITableView+FDTemplateLayoutCell.m */, + 0CC2028E7074C32F894993BA5B55DE42 /* UITableView+FDTemplateLayoutCellDebug.h */, + 5C4B4DE1E6664F9A8BBA5E004C8008A5 /* UITableView+FDTemplateLayoutCellDebug.m */, + 86A6768726E50EAD573141C32DB95168 /* Support Files */, + ); + path = "UITableView+FDTemplateLayoutCell"; + sourceTree = ""; + }; B3D1D13E0C6553800746CB8FD61CF946 /* Pods */ = { isa = PBXGroup; children = ( @@ -681,100 +1127,181 @@ path = "Target Support Files/Pods"; sourceTree = ""; }; - B4029F0D17B6D561C9D3BD702D218BBB /* Support Files */ = { + C062355C634EA792A36AAFFFDD6687FA /* Masonry */ = { + isa = PBXGroup; + children = ( + 592378CB29A41D37184589A7B8AB39D8 /* MASCompositeConstraint.h */, + C96143B90D8C319073634830F10A46FC /* MASCompositeConstraint.m */, + F678F737360EB4AA52AFD66AFEE4C9C6 /* MASConstraint.h */, + 4E2BDE5517C60068516D82E67CDA3BA7 /* MASConstraint.m */, + AEE43D429D59094C138679119D0E50F7 /* MASConstraint+Private.h */, + 36534968955CC5F55F5DE074EF60E7B3 /* MASConstraintMaker.h */, + C20F821FBC9C1EBFE2DB5D80F925322B /* MASConstraintMaker.m */, + 08284163F0B638C7B3CC54574AD62517 /* MASLayoutConstraint.h */, + 48175D9CE5772F7196246F2E40077407 /* MASLayoutConstraint.m */, + 66102C394B50EBFC4536C661543FD636 /* Masonry.h */, + CDEC6E8D28B647F236F4F3A33370FFB0 /* MASUtilities.h */, + A27251AD5DAAD610AA3CF3C25A1201B1 /* MASViewAttribute.h */, + BC6870B5C4C02E0FC050B859D555FAD3 /* MASViewAttribute.m */, + 4F72824508F9BD12374524D47878559A /* MASViewConstraint.h */, + 586951E177479097254AA04C2136BE8E /* MASViewConstraint.m */, + 7D7621692F16F3C9F2B63105E7B8DD7B /* NSArray+MASAdditions.h */, + 6284A9DD31DB9BA3AB9B994CCA1B2DBB /* NSArray+MASAdditions.m */, + B5DC2061AE147FC58D652D092476FCF4 /* NSArray+MASShorthandAdditions.h */, + 4A63707853F7D8CA90F09EC7616D3795 /* NSLayoutConstraint+MASDebugAdditions.h */, + DC5E4952CCA56281F423E61DF0079F10 /* NSLayoutConstraint+MASDebugAdditions.m */, + B4F3763B9D5217D0B6FF012FBBD3E625 /* View+MASAdditions.h */, + F71E53F4CD23771C14FB8E46BFD102B9 /* View+MASAdditions.m */, + A98D0355096CC2FF9DFB01816E792F1A /* View+MASShorthandAdditions.h */, + D2E75E3C7B3C6A6156B6D581EA7EAE7E /* ViewController+MASAdditions.h */, + 27EBA5D5E7EA1B086645C4FCD714A439 /* ViewController+MASAdditions.m */, + CD0FC9161986E7094308904C6C9D24B5 /* Support Files */, + ); + path = Masonry; + sourceTree = ""; + }; + C5BF940FCA922DCAC97CA918BC1E04C8 /* Products */ = { isa = PBXGroup; children = ( - B2B4D7C452A9D8A194A199D55CD2C8EE /* YSMChineseSort.xcconfig */, - B5BC41839D61806FE296FBD69D89695C /* YSMChineseSort-dummy.m */, - C480B857793319BC86DB94F031449B91 /* YSMChineseSort-prefix.pch */, + D872C7A1A204904DEB7950EFDE8BCEAB /* libDACircularProgress.a */, + 8CEE65C1CEFEE748BC555C724F0070CD /* libIDMPhotoBrowser.a */, + 185964FD2D3D8C87FC4E80A62F7D6C53 /* libJSONModel.a */, + 2301BD18CAC61ACB3251AC6447C1C62C /* libMasonry.a */, + EAFC9B94826257F1390122BE9CA855C9 /* libMJRefresh.a */, + 3F6DF0B2ECC28D92105C28D72E3D8BAC /* libPinYin4Objc.a */, + 7B4BBF925B05595F49F75954868545D0 /* libPods.a */, + A5C82050A45E0E68F0D1ED78D1029CE2 /* libpop.a */, + BCDE9C6E508352839D591D51C3808F2E /* libSDWebImage.a */, + ABFA7ACA7668DA807ECB90A21571F293 /* libTTTAttributedLabel.a */, + 3E1E45502509280E1C54EFD799C1221F /* libUITableView+FDTemplateLayoutCell.a */, + 556C5F473947176F771ECBBEF568E1F5 /* libYSMChineseSort.a */, + C41D618E8BB1E1A816EF4EC4DCBCA18B /* YSMChineseSort.bundle */, + ); + name = Products; + sourceTree = ""; + }; + CD0FC9161986E7094308904C6C9D24B5 /* Support Files */ = { + isa = PBXGroup; + children = ( + D58E6FB186078F4B0AE9D6D98ABF43A0 /* Masonry.xcconfig */, + 4091EF435FBD00570D30D199B977E8F2 /* Masonry-dummy.m */, + F9D5D84539BABF5B9C4AF37445184757 /* Masonry-prefix.pch */, ); name = "Support Files"; - path = "../Target Support Files/YSMChineseSort"; + path = "../Target Support Files/Masonry"; sourceTree = ""; }; - BBBB469F016E0777922422F1E89EF061 /* Support Files */ = { + CDFB13DD698C29F0D47619715566FBC8 /* Support Files */ = { isa = PBXGroup; children = ( - 47DA9E3BFA04A090AD4B6FC59B2127D4 /* MJRefresh.xcconfig */, - 166CB277E41065AC669F904C6CAAEEF3 /* MJRefresh-dummy.m */, - 3D6D3488E6B1CAC493FF602F0BA02435 /* MJRefresh-prefix.pch */, + 83C97131AF441D78E8EB4A4838190206 /* PinYin4Objc.xcconfig */, + 39DBA297EB2F45FBBCA9935614EA68D8 /* PinYin4Objc-dummy.m */, + 919CA54B608FED655C2BE65A114EFBDD /* PinYin4Objc-prefix.pch */, ); name = "Support Files"; - path = "../Target Support Files/MJRefresh"; + path = "../Target Support Files/PinYin4Objc"; sourceTree = ""; }; - C4485D090C98CAC47C4D3F23F7732F90 /* PinYin4Objc */ = { + DDDBBCC79CAF03BDF2C66F2E8904E361 /* iOS */ = { isa = PBXGroup; children = ( - 5599B1B854360AEC686956D662D6D612 /* ChineseToPinyinResource.h */, - FE53CA993CE97B4634EBBBB4FBF5A8E6 /* ChineseToPinyinResource.m */, - F2B3CE471AEDA3AF65ADDEEADA047781 /* HanyuPinyinOutputFormat.h */, - 8D00595A2FAA330D4A37CA66A9782DDB /* HanyuPinyinOutputFormat.m */, - 244DD47EA93F5170C98BB89128FB9C82 /* NSString+PinYin4Cocoa.h */, - F51FACFA1DA40F2BFF7DE4AF066C37EB /* NSString+PinYin4Cocoa.m */, - 4FB0FD21BBE6B0A8E3E015F3E6E3A653 /* PinYin4Objc.h */, - A179169E4A590DB543D30FE85102C4B3 /* PinyinFormatter.h */, - DA55306A70D8FBBBC000B2B4C0638739 /* PinyinFormatter.m */, - E637111271B65E7F38533AAC71FD9DBC /* PinyinHelper.h */, - D87BCAF24DBA703F0E0914A3F65A6B39 /* PinyinHelper.m */, - 03D03CB5C77905F8CACB41A042C6505A /* Resources */, - 2A71397E211E544906B4632C27CF46E9 /* Support Files */, + 7DDC7354722EA418030BBB4DF3CE2A98 /* CoreGraphics.framework */, + FE943BA8D183AE3E4EF2B0EC76532FA4 /* CoreText.framework */, + 67E44771ABA063E83251203096C6616B /* Foundation.framework */, + 4EF5C3BC029095FC59D4F9EB3CE86DF8 /* ImageIO.framework */, + 1B543D9E97BAA47A650153F8F77420E6 /* MessageUI.framework */, + 6B2DD8DF9B488F67B0EBBDDDF6C6749C /* MobileCoreServices.framework */, + F411472A5D1F24C6C3E0D98B8DBC8FC0 /* QuartzCore.framework */, + 20B102320451631CFB91D7C63149A385 /* Security.framework */, + 3E0D3F4252F6746D8945F43C5B4575DE /* SystemConfiguration.framework */, + EF70E0C2156F49ECDDDD19B971901C7D /* UIKit.framework */, ); - path = PinYin4Objc; + name = iOS; sourceTree = ""; }; - C49EA627FA7D3F1673B64CA5A4753675 /* Support Files */ = { + E0D4701EAC50216B310DDA27091033BF /* Support Files */ = { isa = PBXGroup; children = ( - CCC18D58CD18A065EC4FD8984818BE8A /* UITableView+FDTemplateLayoutCell.xcconfig */, - B35EFB1E624A7D9772655C2C8469941D /* UITableView+FDTemplateLayoutCell-dummy.m */, - B9529DC31D52C66C519E0ABB964626F3 /* UITableView+FDTemplateLayoutCell-prefix.pch */, + 2CF69A8012E2FB4E99AEAA41CF605274 /* DACircularProgress.xcconfig */, + 8667A5506376A4E1EB5A699699796578 /* DACircularProgress-dummy.m */, + 88D0EFFAF595EDD6D2E40C4D4EA49B7B /* DACircularProgress-prefix.pch */, ); name = "Support Files"; - path = "../Target Support Files/UITableView+FDTemplateLayoutCell"; + path = "../Target Support Files/DACircularProgress"; sourceTree = ""; }; - D071B5127064736CBDDC84957CBC9FFD /* Support Files */ = { + EEBE931D3691EE857F4759A2D994DEB4 /* Resources */ = { isa = PBXGroup; children = ( - 11146955450C791609794828F4F4F7B5 /* TTTAttributedLabel.xcconfig */, - 9F97EAF06A7C1FA3925B5E0C607B4D72 /* TTTAttributedLabel-dummy.m */, - BE5C4AC77DAEFAC9A2BDA12930B9E1B6 /* TTTAttributedLabel-prefix.pch */, + B0446BDC5761491A9612B2065651DCDD /* MJRefresh.bundle */, ); - name = "Support Files"; - path = "../Target Support Files/TTTAttributedLabel"; + name = Resources; sourceTree = ""; }; - D37714A969D15B542A25B58A39E56F6E /* Products */ = { + F07DDA1BCB62A210068AF1FF8D5E9BE7 /* MJRefresh */ = { isa = PBXGroup; children = ( - D801B3073D4C672D2DDA7BED383EF3DD /* libJSONModel.a */, - 33897DD00E1FE3795DB41FD5B3E38F95 /* libMasonry.a */, - 8C0B8FC26FF9649762D0078C1B3F6574 /* libMJRefresh.a */, - 4B3758B342B78C5099F62059028C7C05 /* libPinYin4Objc.a */, - EFF1806A8459281F945DE066204E81C8 /* libPods.a */, - D76C8D04012461FE1A24C2F219DDBCE4 /* libTTTAttributedLabel.a */, - ACCACFB0809EA5ADABC2881344AA8F18 /* libUITableView+FDTemplateLayoutCell.a */, - 385AB0ECD603E7EEDE152305DA48A659 /* libYSMChineseSort.a */, - F693C8E0B30EEA3CBB97082DC8ED4E52 /* YSMChineseSort.bundle */, + 2F3522455BDB502C297294134197D458 /* MJRefresh.h */, + 01A66C72A4D572C130BA6A83A2C637D9 /* MJRefreshAutoFooter.h */, + E9BD213588F034DF026A3B6040CB66D0 /* MJRefreshAutoFooter.m */, + 1AAC8071162219DD8F251B1D969C9960 /* MJRefreshAutoGifFooter.h */, + CE6BF7A4C0B755807A807565272A90CE /* MJRefreshAutoGifFooter.m */, + 8AC939FD34B9461208B26D03A8B833B8 /* MJRefreshAutoNormalFooter.h */, + 771B828CF9F3BAE0C2D68F6596CE6824 /* MJRefreshAutoNormalFooter.m */, + 3B673C4695FC112D64B5AA029CE16B65 /* MJRefreshAutoStateFooter.h */, + BB0B7CC9E5B9AE724BBDF376C6DC486C /* MJRefreshAutoStateFooter.m */, + 21A3310068C2C5A202BDC80518F1C83B /* MJRefreshBackFooter.h */, + 300B834BFA95EC19BC702AB6B7422575 /* MJRefreshBackFooter.m */, + 5DACE80931C1C0E445B755ED645CD7BC /* MJRefreshBackGifFooter.h */, + 79D930AE04A4648BF1E9D8B0C598B72B /* MJRefreshBackGifFooter.m */, + 0B4A46DF8B020025909E2A2E639F94F8 /* MJRefreshBackNormalFooter.h */, + 847A4E827146FA911E09E7C5398DE048 /* MJRefreshBackNormalFooter.m */, + 1FC4DB15964D13A3222F1850AAB97565 /* MJRefreshBackStateFooter.h */, + A7409198F3D4A6C26117DD1103D9420C /* MJRefreshBackStateFooter.m */, + 8B2819E5CF36BB0216B2243E0848E24B /* MJRefreshComponent.h */, + 50DAAC04D4368B09C441F9CB95607968 /* MJRefreshComponent.m */, + F9C7BA89850F8191460702C1A05A9979 /* MJRefreshConst.h */, + 3F8ED4DABB3504C18EF5CFC626527946 /* MJRefreshConst.m */, + 601583FDDC451DC7AA23F4764EAEDF3C /* MJRefreshFooter.h */, + 20957418CA2DD99D9511119D2BCE5A52 /* MJRefreshFooter.m */, + D1429DB2D2ECDFFA567619A053DDB9FF /* MJRefreshGifHeader.h */, + 17C3BE9908EEDFEC021D8D7A8FB9BF54 /* MJRefreshGifHeader.m */, + 916C2E1E4AC9E40A229DF8976E43533C /* MJRefreshHeader.h */, + 56610F595C7B7F9D420B17EC54E1FFC0 /* MJRefreshHeader.m */, + BE9B32674E38906642E5A51895D31DB7 /* MJRefreshNormalHeader.h */, + D3EB355A4D5E22836968762C8DE666AA /* MJRefreshNormalHeader.m */, + C9F1F22B83B223B57306C77328649B6F /* MJRefreshStateHeader.h */, + E0BEDD757BE9D6EDCC84C4D23AF9C490 /* MJRefreshStateHeader.m */, + C19234EC52C68A3C9BCB13FDA153EE8D /* UIScrollView+MJExtension.h */, + 9D6938BBDB982CBEE797AB8B0D2CBD5E /* UIScrollView+MJExtension.m */, + 8175ADD73519FD5B22145B5FB59E0187 /* UIScrollView+MJRefresh.h */, + C6851E168BAAD9B15E560D5E8CE0C39E /* UIScrollView+MJRefresh.m */, + 2E1565A1A6C4375D3C9609E49ED4BF4E /* UIView+MJExtension.h */, + 0C582380906B1834EB86BAF0EE10739D /* UIView+MJExtension.m */, + EEBE931D3691EE857F4759A2D994DEB4 /* Resources */, + F5C220A0A4358239A3F2758310555E25 /* Support Files */, ); - name = Products; + path = MJRefresh; sourceTree = ""; }; - DD0E1160B059B688BDB8DBD55EC2A20C /* UITableView+FDTemplateLayoutCell */ = { + F52BAB9B442121B5E81D73415F189117 /* SDWebImage */ = { isa = PBXGroup; children = ( - 413E5E519C4C0E07E21867B9961258C1 /* UITableView+FDIndexPathHeightCache.h */, - 992631B9ADA11D0AF4B931C9B9BF6981 /* UITableView+FDIndexPathHeightCache.m */, - 5F45340F46AE53C910A67D143542D131 /* UITableView+FDKeyedHeightCache.h */, - 1CAB11BCB567EED038C6C815924E163B /* UITableView+FDKeyedHeightCache.m */, - 402994F0BB29BB59972868F339F890F1 /* UITableView+FDTemplateLayoutCell.h */, - C04E285D0D99BB08B81242F1D1984C36 /* UITableView+FDTemplateLayoutCell.m */, - C6755CC8949292F50CA94D98739DB156 /* UITableView+FDTemplateLayoutCellDebug.h */, - F8EB05C453E1F4DB9CAAE5DA3FC226EF /* UITableView+FDTemplateLayoutCellDebug.m */, - C49EA627FA7D3F1673B64CA5A4753675 /* Support Files */, + 37916DB411288704E848C9FF0BDD3372 /* Core */, + 2E16F4B4246F2DA1AC5CC5A5DB8AE8D9 /* Support Files */, ); - path = "UITableView+FDTemplateLayoutCell"; + path = SDWebImage; + sourceTree = ""; + }; + F5C220A0A4358239A3F2758310555E25 /* Support Files */ = { + isa = PBXGroup; + children = ( + 5043054F1CD651B62A0F199A751ABC02 /* MJRefresh.xcconfig */, + F96DCA7D3291CD434ECDB2C1B5E14FFC /* MJRefresh-dummy.m */, + 44454EEE03C91B178CCFC237EDEC12EE /* MJRefresh-prefix.pch */, + ); + name = "Support Files"; + path = "../Target Support Files/MJRefresh"; sourceTree = ""; }; /* End PBXGroup section */ @@ -806,11 +1333,60 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 4D3D4C0316A4A057AE9BBCF396008366 /* Headers */ = { + 1246A1C00980422020A6884856143651 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C1A29BFF65C6F2801B1BE0058718A19 /* DACircularProgressView.h in Headers */, + 0F43FEACB0C18DD4C724B1655AF47728 /* DALabeledCircularProgressView.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2821EE420A7146D99293D5D2DD0E25DB /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C10C8F3964FCCDA719D80697DEF7C7F4 /* TTTAttributedLabel.h in Headers */, + C07310EEBE9C647B2FC4BC0576E2F81F /* NSData+ImageContentType.h in Headers */, + C0082061058B312E7C6AECF7F5C194FA /* SDImageCache.h in Headers */, + A50A7F0C44DCCA59479A5124DE5FF985 /* SDWebImageCompat.h in Headers */, + 977C7D7421562D2C69CCF5F185868775 /* SDWebImageDecoder.h in Headers */, + 18C613BD7419721FF0F98D981E7AB62B /* SDWebImageDownloader.h in Headers */, + A905CA5C84614C500E16CE76FD11FFA6 /* SDWebImageDownloaderOperation.h in Headers */, + DA1E499F4BDCA9724837D9460D8AD4A4 /* SDWebImageManager.h in Headers */, + 904D31627D12676A515EEAA157351AE7 /* SDWebImageOperation.h in Headers */, + A73CF2B77F87A836C254D53CA9ACE3CF /* SDWebImagePrefetcher.h in Headers */, + 64AB78A6666CB51D352394983C95EAA3 /* UIButton+WebCache.h in Headers */, + 5ABA11E4EB7ADDDD21D6A84E4F09B989 /* UIImage+GIF.h in Headers */, + 17B4FA9F91107B63A2D6313D6F9E3776 /* UIImage+MultiFormat.h in Headers */, + B3351FD684BAE516C41F11487E98FA5A /* UIImageView+HighlightedWebCache.h in Headers */, + BFAFA8E760A294C06035B829E0CD262B /* UIImageView+WebCache.h in Headers */, + A2DDC48EA90671521DFCA0E247425850 /* UIView+WebCacheOperation.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2AF8E7854F66689B2044456B9E1814CC /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ED50D786E9D0349A9CEA668CF52A5DB8 /* UITableView+FDIndexPathHeightCache.h in Headers */, + 48A70BB45594C1DEA179A3419BFAA01A /* UITableView+FDKeyedHeightCache.h in Headers */, + A3B20901424BCE213D027B91679A2CED /* UITableView+FDTemplateLayoutCell.h in Headers */, + 787B3CDCAA678EBD24B90EFE26AA5410 /* UITableView+FDTemplateLayoutCellDebug.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4A66480EF7629034D1C3F1568D19EEC6 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A8CBF7EF69D3F749C4B1AC5638A3F4F9 /* IDMCaptionView.h in Headers */, + AB470E9C1D12660F993BF55A1DD6B83C /* IDMPBConstants.h in Headers */, + 045E0036DF09AA43B0BA38F3EFF49CC0 /* IDMPhoto.h in Headers */, + C50105D260716DE5B38B1B2E49783884 /* IDMPhotoBrowser.h in Headers */, + 553B757D178B7E2019558C5685BD76C0 /* IDMPhotoProtocol.h in Headers */, + 6CA6B230663A0FDC8E5F176F25BB1CA5 /* IDMTapDetectingImageView.h in Headers */, + 4C7AE371AD65277F456320898A1C78D3 /* IDMTapDetectingView.h in Headers */, + E8BD31817E410ABB1FF22F46A03958CC /* IDMZoomingScrollView.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -867,22 +1443,59 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9E29D9DC42E2AC762F1E89ABF84094FA /* Headers */ = { + A27B8A8D96A144CCB749E9D8793603B7 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C636DF1A72420C0572374C7CE398666E /* UITableView+FDIndexPathHeightCache.h in Headers */, - E3DDD796CBF6578BBF8BE00D28461690 /* UITableView+FDKeyedHeightCache.h in Headers */, - 33BDAC7BB12C334CA28A108B8C1883C8 /* UITableView+FDTemplateLayoutCell.h in Headers */, - D1D5F0D1B38D0BEE62C63E57A3157B05 /* UITableView+FDTemplateLayoutCellDebug.h in Headers */, + F2C8A8C2D970D8DF50859AAE79268C6C /* TTTAttributedLabel.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - C4972F2017ED66786DF26CCA03E1B06A /* Headers */ = { + ACAE64D15451125F068429D52B5BC4E7 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - B949BBE407B72B2AC88B4EE342544518 /* NSArray+SortContact.h in Headers */, + C89735ED483951490851B25D579D88F5 /* NSArray+SortContact.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F7A28ECF8815F932F287F295B26017E6 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + EB897F24AB040A5460EA0775DB902147 /* FloatConversion.h in Headers */, + 56FB20883F37B756F8FB8BB2E90EB778 /* POP.h in Headers */, + B0229C84B85ED43582EDF2C788BA599E /* POPAction.h in Headers */, + BBA3610C7B7820702EC562B855F0AE86 /* POPAnimatableProperty.h in Headers */, + 6A43F5DD40556CEF6465AAEF94776BA6 /* POPAnimation.h in Headers */, + 81FD3C1AC273F59DB97467FF03C44976 /* POPAnimationEvent.h in Headers */, + 3F87F7677EC9F847EABDDEE59EF3049D /* POPAnimationEventInternal.h in Headers */, + 083ACE49CA43CD2AB6419B6CC89F33BE /* POPAnimationExtras.h in Headers */, + 5185323C93A3673038B57C4567CCF13F /* POPAnimationInternal.h in Headers */, + D10F2CF4A58F98292F3C62BD9AEF35E4 /* POPAnimationPrivate.h in Headers */, + 3796D6487EE817473AEE3D6C27B5EC0C /* POPAnimationRuntime.h in Headers */, + FD0F9E2143ACABB4C5A0A51A6CB8C0F7 /* POPAnimationTracer.h in Headers */, + 02F0747781ED4D186756BE6A1AD2E1DC /* POPAnimationTracerInternal.h in Headers */, + 64E5EE139751929C9EBB1D5621B7B0C1 /* POPAnimator.h in Headers */, + ACA6823BEF7BBFACAC820A0CAB7B3D22 /* POPAnimatorPrivate.h in Headers */, + 567B36099CD2B3F5B23C5D615DAAF4C2 /* POPBasicAnimation.h in Headers */, + 6E7E7B6047FF01F5EB45DFED193554E7 /* POPBasicAnimationInternal.h in Headers */, + 56CC1FC460015587FF770657ECFC4421 /* POPCGUtils.h in Headers */, + 5EFFA28204033EDB0F51889F9BCC4C83 /* POPCustomAnimation.h in Headers */, + 0F06F4FB536165C9BE73639A3AEA5FCD /* POPDecayAnimation.h in Headers */, + C4688B5B4B4FE89A8ECFC4ADC61B82EA /* POPDecayAnimationInternal.h in Headers */, + 5AD900DBD7B45F3849235C49339FBECD /* POPDefines.h in Headers */, + 208E56AB6FC95590965759F76A03D7A2 /* POPGeometry.h in Headers */, + C375976CF27245440D56DEC6675AE700 /* POPLayerExtras.h in Headers */, + BA67CB61C29B6F5A73B2B0C5342B3FCE /* POPMath.h in Headers */, + 6CA2EA325854FC3E80DA4595C91D19E9 /* POPPropertyAnimation.h in Headers */, + 57FE6CB625FFF2DB856E775FD04621A0 /* POPPropertyAnimationInternal.h in Headers */, + 707CC58E2B410DF44334F820384C2675 /* POPSpringAnimation.h in Headers */, + 40EAED65327A78804BDA983E892028ED /* POPSpringAnimationInternal.h in Headers */, + 15236BB62E7C3D3824B0A23878156C76 /* POPSpringSolver.h in Headers */, + D9D08CE1089A8AF139D3722A51A5C1AC /* POPVector.h in Headers */, + 7F6931A1F5EE6ABECD6AFA6E1B138FAE /* TransformationMatrix.h in Headers */, + CCB00EA146DB9E6649C4B64336FE5E2F /* UnitBezier.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -903,7 +1516,7 @@ ); name = JSONModel; productName = JSONModel; - productReference = D801B3073D4C672D2DDA7BED383EF3DD /* libJSONModel.a */; + productReference = 185964FD2D3D8C87FC4E80A62F7D6C53 /* libJSONModel.a */; productType = "com.apple.product-type.library.static"; }; 0CCBBF4BAA3FA48F98623D8875DC1DA7 /* PinYin4Objc */ = { @@ -920,47 +1533,60 @@ ); name = PinYin4Objc; productName = PinYin4Objc; - productReference = 4B3758B342B78C5099F62059028C7C05 /* libPinYin4Objc.a */; + productReference = 3F6DF0B2ECC28D92105C28D72E3D8BAC /* libPinYin4Objc.a */; productType = "com.apple.product-type.library.static"; }; - 225D3AF2360A78DBB2CC4B04810264A2 /* TTTAttributedLabel */ = { + 2EA31293B21417A860AF4C7A2AF6D37F /* YSMChineseSort */ = { isa = PBXNativeTarget; - buildConfigurationList = FEF76DED65C97657D34400D02F006350 /* Build configuration list for PBXNativeTarget "TTTAttributedLabel" */; + buildConfigurationList = ED7B3E7CC5477A0A2965DDFB985B91C4 /* Build configuration list for PBXNativeTarget "YSMChineseSort" */; buildPhases = ( - 21906D7117610C22AF1A6F1304C5D2FA /* Sources */, - 7FD38D643615E559DD74281DAC6E2E3B /* Frameworks */, - 4D3D4C0316A4A057AE9BBCF396008366 /* Headers */, + 2EF0B75605ADED901A8D3461968E8AD4 /* Sources */, + 22E74FDC14AC2799FED69091D9A35B21 /* Frameworks */, + ACAE64D15451125F068429D52B5BC4E7 /* Headers */, ); buildRules = ( ); dependencies = ( + D59BA4248DFC524EC24F1B74ACDFFD89 /* PBXTargetDependency */, + 8E0675AB2619912A098B24ECE4C1ECF2 /* PBXTargetDependency */, ); - name = TTTAttributedLabel; - productName = TTTAttributedLabel; - productReference = D76C8D04012461FE1A24C2F219DDBCE4 /* libTTTAttributedLabel.a */; + name = YSMChineseSort; + productName = YSMChineseSort; + productReference = 556C5F473947176F771ECBBEF568E1F5 /* libYSMChineseSort.a */; productType = "com.apple.product-type.library.static"; }; - 2FAF84446DE99B0BC6A3A55140E079C8 /* Pods */ = { + 3299CAC9360F1CB3904663183E4377FA /* SDWebImage */ = { isa = PBXNativeTarget; - buildConfigurationList = B5E0B8EFC14587E999BE7DAE1716A411 /* Build configuration list for PBXNativeTarget "Pods" */; + buildConfigurationList = 1EB696EDC5DD31641AD1A5A39828274E /* Build configuration list for PBXNativeTarget "SDWebImage" */; buildPhases = ( - 8FC8DE5AF6DF66F194BEB65EB12B0E34 /* Sources */, - F13B9B65D55969F9FCC7E70C3112F3E2 /* Frameworks */, + 188B9E04200247B09A3D38FF7FEC3B80 /* Sources */, + 98CDFE18ACA3E7B8AEF608A3C9E3AF88 /* Frameworks */, + 2821EE420A7146D99293D5D2DD0E25DB /* Headers */, ); buildRules = ( ); dependencies = ( - 010ED4A88686FAA5DFE5FEEABF61ED3A /* PBXTargetDependency */, - E907869BC69111A0EBD82CD0AEE874ED /* PBXTargetDependency */, - 01AF1F5FBFE73F2ACE2357BB6A28AB2A /* PBXTargetDependency */, - BBA878D4F4344A5AA3CAF075521579E9 /* PBXTargetDependency */, - A61B0D8A7C6CE386F2338AF6C64FC7DE /* PBXTargetDependency */, - FA9FDE067F4418548BB35D49CD6DBFF8 /* PBXTargetDependency */, - 5F2DF9F0DF0BC2BA95F82AD00EC88B5D /* PBXTargetDependency */, ); - name = Pods; - productName = Pods; - productReference = EFF1806A8459281F945DE066204E81C8 /* libPods.a */; + name = SDWebImage; + productName = SDWebImage; + productReference = BCDE9C6E508352839D591D51C3808F2E /* libSDWebImage.a */; + productType = "com.apple.product-type.library.static"; + }; + 430EAC388BE8F7F7139A997947AB1B89 /* pop */ = { + isa = PBXNativeTarget; + buildConfigurationList = 874B670706EB07D58B8BD52EDBE652AD /* Build configuration list for PBXNativeTarget "pop" */; + buildPhases = ( + 7B8D14EDBDE31FE159830FBFDF4AAB3F /* Sources */, + 7590ECF8FBEB328626CD5B57D9E849EE /* Frameworks */, + F7A28ECF8815F932F287F295B26017E6 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = pop; + productName = pop; + productReference = A5C82050A45E0E68F0D1ED78D1029CE2 /* libpop.a */; productType = "com.apple.product-type.library.static"; }; 53480ED0BE09FF49E34B1702D485CAAB /* Masonry */ = { @@ -977,16 +1603,16 @@ ); name = Masonry; productName = Masonry; - productReference = 33897DD00E1FE3795DB41FD5B3E38F95 /* libMasonry.a */; + productReference = 2301BD18CAC61ACB3251AC6447C1C62C /* libMasonry.a */; productType = "com.apple.product-type.library.static"; }; - 7A485A0ACE8DF44FD12B12F55BC78D56 /* YSMChineseSort-YSMChineseSort */ = { + 752E10FA460B850F47C5FF0DB4FE4316 /* YSMChineseSort-YSMChineseSort */ = { isa = PBXNativeTarget; - buildConfigurationList = D3E84E85D3B8E321444FD28FAE5E300B /* Build configuration list for PBXNativeTarget "YSMChineseSort-YSMChineseSort" */; + buildConfigurationList = 5B4994480F8EF13B4504E5159708C78B /* Build configuration list for PBXNativeTarget "YSMChineseSort-YSMChineseSort" */; buildPhases = ( - 5155C852B4AB790C8DB584B12AB07862 /* Sources */, - FC4E1A8B86B052440711824A41CBCAC4 /* Frameworks */, - 0B16C649A9A709A0925E80A3B014C66D /* Resources */, + 9BDAD6C4D98D7FA6238DF6877A4FE9F8 /* Sources */, + 1D60A9876386472E1363ACC08FFEEF06 /* Frameworks */, + 3416EDBF0846C18CBCCFC86AF7484839 /* Resources */, ); buildRules = ( ); @@ -994,60 +1620,122 @@ ); name = "YSMChineseSort-YSMChineseSort"; productName = "YSMChineseSort-YSMChineseSort"; - productReference = F693C8E0B30EEA3CBB97082DC8ED4E52 /* YSMChineseSort.bundle */; + productReference = C41D618E8BB1E1A816EF4EC4DCBCA18B /* YSMChineseSort.bundle */; productType = "com.apple.product-type.bundle"; }; - 8EC7E635416C96DB820A12731344BB70 /* UITableView+FDTemplateLayoutCell */ = { + 8F74D9EA91F4C43190670066BAC37D44 /* MJRefresh */ = { isa = PBXNativeTarget; - buildConfigurationList = 29D64E93105C7C6109268EC9D66322E3 /* Build configuration list for PBXNativeTarget "UITableView+FDTemplateLayoutCell" */; + buildConfigurationList = 3D32356147D239362A3FF7DCAB918205 /* Build configuration list for PBXNativeTarget "MJRefresh" */; buildPhases = ( - DC165F24CE250F81470BC02F187A10F9 /* Sources */, - C55161FA848F2C418926FA82A164D204 /* Frameworks */, - 9E29D9DC42E2AC762F1E89ABF84094FA /* Headers */, + 346003011339A97DDE1A394DF0A3BB91 /* Sources */, + F6AAF5593D0C5E24B3377E5C3999D0AA /* Frameworks */, + 0B678E4E7D716E2C6EC64BDB96418C7E /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = "UITableView+FDTemplateLayoutCell"; - productName = "UITableView+FDTemplateLayoutCell"; - productReference = ACCACFB0809EA5ADABC2881344AA8F18 /* libUITableView+FDTemplateLayoutCell.a */; + name = MJRefresh; + productName = MJRefresh; + productReference = EAFC9B94826257F1390122BE9CA855C9 /* libMJRefresh.a */; productType = "com.apple.product-type.library.static"; }; - 8F74D9EA91F4C43190670066BAC37D44 /* MJRefresh */ = { + 91869A386018FE20DEC9E78C6B0CEA82 /* TTTAttributedLabel */ = { isa = PBXNativeTarget; - buildConfigurationList = 3D32356147D239362A3FF7DCAB918205 /* Build configuration list for PBXNativeTarget "MJRefresh" */; + buildConfigurationList = BC427D358B484354DFF0C519F985C076 /* Build configuration list for PBXNativeTarget "TTTAttributedLabel" */; buildPhases = ( - 346003011339A97DDE1A394DF0A3BB91 /* Sources */, - F6AAF5593D0C5E24B3377E5C3999D0AA /* Frameworks */, - 0B678E4E7D716E2C6EC64BDB96418C7E /* Headers */, + DCF74F6ACCA150E781FC49C89099663D /* Sources */, + 409B5ADB0926D34D3A1115F1AF49DCE9 /* Frameworks */, + A27B8A8D96A144CCB749E9D8793603B7 /* Headers */, ); buildRules = ( ); dependencies = ( ); - name = MJRefresh; - productName = MJRefresh; - productReference = 8C0B8FC26FF9649762D0078C1B3F6574 /* libMJRefresh.a */; + name = TTTAttributedLabel; + productName = TTTAttributedLabel; + productReference = ABFA7ACA7668DA807ECB90A21571F293 /* libTTTAttributedLabel.a */; productType = "com.apple.product-type.library.static"; }; - CCE5DB49633E923856CEEF33620F9F3A /* YSMChineseSort */ = { + 9775596B3CA16905FC8F66DA8E2A3C67 /* DACircularProgress */ = { isa = PBXNativeTarget; - buildConfigurationList = 619FE036065DA8FC7E45458FCD1EAA5E /* Build configuration list for PBXNativeTarget "YSMChineseSort" */; + buildConfigurationList = 619B0B2F7ACD42F8EF700EAE6D1C95DA /* Build configuration list for PBXNativeTarget "DACircularProgress" */; buildPhases = ( - 2250F4F39F52C91F9E69FB1DAF521C87 /* Sources */, - FC32E90E02D5D1E69639C31FB0BD75F1 /* Frameworks */, - C4972F2017ED66786DF26CCA03E1B06A /* Headers */, + A6993E0B001E6EB572176DFCF9B87C6A /* Sources */, + F2A9AAC03867BB4990470BAC5912E030 /* Frameworks */, + 1246A1C00980422020A6884856143651 /* Headers */, ); buildRules = ( ); dependencies = ( - 9B30975FC91AC93C133CBC0E79B8CC62 /* PBXTargetDependency */, - 46A4AFA9261C685459520877F54DF4BA /* PBXTargetDependency */, ); - name = YSMChineseSort; - productName = YSMChineseSort; - productReference = 385AB0ECD603E7EEDE152305DA48A659 /* libYSMChineseSort.a */; + name = DACircularProgress; + productName = DACircularProgress; + productReference = D872C7A1A204904DEB7950EFDE8BCEAB /* libDACircularProgress.a */; + productType = "com.apple.product-type.library.static"; + }; + ACAE27A34969E14A7DA9829402D7B9A0 /* IDMPhotoBrowser */ = { + isa = PBXNativeTarget; + buildConfigurationList = 341EB5E987498BDD4BFADC3773653EB1 /* Build configuration list for PBXNativeTarget "IDMPhotoBrowser" */; + buildPhases = ( + 8B2E583DED5D18779FEC75D488D425B0 /* Sources */, + 63942D6707F82794EE4810A4A54A662C /* Frameworks */, + 4A66480EF7629034D1C3F1568D19EEC6 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 411936BABB5E1A8708BF17E32FAF0ADD /* PBXTargetDependency */, + 13CC54AE481C0B4FE97ABE75000AD899 /* PBXTargetDependency */, + E02B725DCE0C7AE05FA61BF510AB586B /* PBXTargetDependency */, + ); + name = IDMPhotoBrowser; + productName = IDMPhotoBrowser; + productReference = 8CEE65C1CEFEE748BC555C724F0070CD /* libIDMPhotoBrowser.a */; + productType = "com.apple.product-type.library.static"; + }; + D83BD52D05C83FB0FA57065604C5BB28 /* UITableView+FDTemplateLayoutCell */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0490EDB39DB94BE137F47A9D829951A7 /* Build configuration list for PBXNativeTarget "UITableView+FDTemplateLayoutCell" */; + buildPhases = ( + 08710F016FC6240A19D91AB654F5F903 /* Sources */, + B1B6BCA7856FFF34CADF7E594C16BB14 /* Frameworks */, + 2AF8E7854F66689B2044456B9E1814CC /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "UITableView+FDTemplateLayoutCell"; + productName = "UITableView+FDTemplateLayoutCell"; + productReference = 3E1E45502509280E1C54EFD799C1221F /* libUITableView+FDTemplateLayoutCell.a */; + productType = "com.apple.product-type.library.static"; + }; + E0287D5B3E462AE7F3FDB0E3D44460E0 /* Pods */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2945A0D6568E10AAC5EA6087FF692D44 /* Build configuration list for PBXNativeTarget "Pods" */; + buildPhases = ( + A64516144BE164186530031C4C091848 /* Sources */, + 5F3D2195FAF510E94F9A49BE3236D874 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 58EFA9D81B61925AFFAD5D3069F9832E /* PBXTargetDependency */, + EA0C70051DC964B69ABC5869D6663ED0 /* PBXTargetDependency */, + 9E496D65244B03D7E92B69773CF76E4B /* PBXTargetDependency */, + 554D6AC0C2C1F778B14251B8ABCA599B /* PBXTargetDependency */, + E061FC6270E407ECF891A69D5EA766A8 /* PBXTargetDependency */, + A4B005221957FDC05B97E5FBFDAB0075 /* PBXTargetDependency */, + AABA667B0598681D9580A3105C1B1C21 /* PBXTargetDependency */, + C438F33FA5874163367472E4336AF88C /* PBXTargetDependency */, + FDCF35DFA47243DD310C131D58AA720F /* PBXTargetDependency */, + AA3A86475941558FFDA122EA4D9DFB18 /* PBXTargetDependency */, + 04E74A1413D9BD9CD459D1C65D7A7978 /* PBXTargetDependency */, + ); + name = Pods; + productName = Pods; + productReference = 7B4BBF925B05595F49F75954868545D0 /* libPods.a */; productType = "com.apple.product-type.library.static"; }; /* End PBXNativeTarget section */ @@ -1067,25 +1755,29 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = D37714A969D15B542A25B58A39E56F6E /* Products */; + productRefGroup = C5BF940FCA922DCAC97CA918BC1E04C8 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( + 9775596B3CA16905FC8F66DA8E2A3C67 /* DACircularProgress */, + ACAE27A34969E14A7DA9829402D7B9A0 /* IDMPhotoBrowser */, 09FA060F1A0492FB25232F489AC4E573 /* JSONModel */, 53480ED0BE09FF49E34B1702D485CAAB /* Masonry */, 8F74D9EA91F4C43190670066BAC37D44 /* MJRefresh */, 0CCBBF4BAA3FA48F98623D8875DC1DA7 /* PinYin4Objc */, - 2FAF84446DE99B0BC6A3A55140E079C8 /* Pods */, - 225D3AF2360A78DBB2CC4B04810264A2 /* TTTAttributedLabel */, - 8EC7E635416C96DB820A12731344BB70 /* UITableView+FDTemplateLayoutCell */, - CCE5DB49633E923856CEEF33620F9F3A /* YSMChineseSort */, - 7A485A0ACE8DF44FD12B12F55BC78D56 /* YSMChineseSort-YSMChineseSort */, + E0287D5B3E462AE7F3FDB0E3D44460E0 /* Pods */, + 430EAC388BE8F7F7139A997947AB1B89 /* pop */, + 3299CAC9360F1CB3904663183E4377FA /* SDWebImage */, + 91869A386018FE20DEC9E78C6B0CEA82 /* TTTAttributedLabel */, + D83BD52D05C83FB0FA57065604C5BB28 /* UITableView+FDTemplateLayoutCell */, + 2EA31293B21417A860AF4C7A2AF6D37F /* YSMChineseSort */, + 752E10FA460B850F47C5FF0DB4FE4316 /* YSMChineseSort-YSMChineseSort */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 0B16C649A9A709A0925E80A3B014C66D /* Resources */ = { + 3416EDBF0846C18CBCCFC86AF7484839 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -1095,21 +1787,46 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 21906D7117610C22AF1A6F1304C5D2FA /* Sources */ = { + 08710F016FC6240A19D91AB654F5F903 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F6005DF8FE626123F25ECE09F986C0C1 /* UITableView+FDIndexPathHeightCache.m in Sources */, + 26BAEC49451A13CAC1BD897294760E79 /* UITableView+FDKeyedHeightCache.m in Sources */, + 4BFA4E938B621F76F1E75B49609570E3 /* UITableView+FDTemplateLayoutCell-dummy.m in Sources */, + 97C7ECB0851BE769C65420C0F32FF513 /* UITableView+FDTemplateLayoutCell.m in Sources */, + 3B6BD22B9257021C354CA4186980D38B /* UITableView+FDTemplateLayoutCellDebug.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 188B9E04200247B09A3D38FF7FEC3B80 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 751AF0AB3C1F0FDB5EB43C81463351F6 /* TTTAttributedLabel-dummy.m in Sources */, - EC049854BB7B8CCA06FE85533453368A /* TTTAttributedLabel.m in Sources */, + 9F64D573C718557F2A49094459682477 /* NSData+ImageContentType.m in Sources */, + ED6201D1815B2765304A36C423299634 /* SDImageCache.m in Sources */, + D07762B98FE3ED7C3678A99D2C954A63 /* SDWebImage-dummy.m in Sources */, + A957A8891AE5DC8AF50754EC29FECF1C /* SDWebImageCompat.m in Sources */, + ADC446415ADB182351E6CC61ED0C0A2D /* SDWebImageDecoder.m in Sources */, + C22679D6A290E0A2917D1E1D432BF662 /* SDWebImageDownloader.m in Sources */, + 31B8933B81E77A3B66691FCA29466969 /* SDWebImageDownloaderOperation.m in Sources */, + 45D003B8436E189FE3663B0DC577D2D1 /* SDWebImageManager.m in Sources */, + 9CE2597902AC07AAB2ADFAFC2FA52500 /* SDWebImagePrefetcher.m in Sources */, + 26B6A5D57096A7177250C574B02068CF /* UIButton+WebCache.m in Sources */, + 2DEFE54FB9DB324493324D3A6A775B75 /* UIImage+GIF.m in Sources */, + 63DA088BB9E415102AEA772F7ED1F114 /* UIImage+MultiFormat.m in Sources */, + 135D54442A8B27BAC49596D30213429E /* UIImageView+HighlightedWebCache.m in Sources */, + 436DED593090861F297BF1889F1E4818 /* UIImageView+WebCache.m in Sources */, + E5B5FAF69B83503CE7F3D97156C30A81 /* UIView+WebCacheOperation.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2250F4F39F52C91F9E69FB1DAF521C87 /* Sources */ = { + 2EF0B75605ADED901A8D3461968E8AD4 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5B0C9EFDC6F467762EC5D68DA0E7F3F8 /* NSArray+SortContact.m in Sources */, - B513F6964590E520E6EB546D67348FEE /* YSMChineseSort-dummy.m in Sources */, + 0362F70E638B4C2BED58C2B7B94DAC6D /* NSArray+SortContact.m in Sources */, + 91B496BA3035D46083B94313F8A9ED5D /* YSMChineseSort-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1139,10 +1856,29 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5155C852B4AB790C8DB584B12AB07862 /* Sources */ = { + 7B8D14EDBDE31FE159830FBFDF4AAB3F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 881D01430733003411599A6BC79515BA /* pop-dummy.m in Sources */, + 9FA7AF908C1CE8ECEFB47E1E1AB1BDAF /* POPAnimatableProperty.mm in Sources */, + 04706744CB1F16A63AA4AAB7DF68DFD1 /* POPAnimation.mm in Sources */, + 44C1C7E5E3D822E53C8F0221E61F7D31 /* POPAnimationEvent.mm in Sources */, + CFF9EA79C21AD1BCD88C05FF495F6B57 /* POPAnimationExtras.mm in Sources */, + 5AECCB414FABED7B3BBCF152EA817262 /* POPAnimationRuntime.mm in Sources */, + 155CAE1127CB6A618657E08D61C34E88 /* POPAnimationTracer.mm in Sources */, + BC1624F3A96664B2293B821344E95B8A /* POPAnimator.mm in Sources */, + 6BDB4834B84460AB19CF11CB426BB826 /* POPBasicAnimation.mm in Sources */, + FAC77817F58BC43A560204EA0127958D /* POPCGUtils.mm in Sources */, + F8F35C58A179A9C65F272693F981496B /* POPCustomAnimation.mm in Sources */, + FC02D1C899CF0E4C6ED55B1621681742 /* POPDecayAnimation.mm in Sources */, + 0189AC8B3E7DD90D04BE837373DDD3A2 /* POPGeometry.mm in Sources */, + 21324EC368B2B268691DD4C85176573F /* POPLayerExtras.mm in Sources */, + 3B11886CB4F3882CC19C3F6C0B6AC7DC /* POPMath.mm in Sources */, + A2F2A5F211AB2D75C48577037B36D57D /* POPPropertyAnimation.mm in Sources */, + 53C576313D9C0CC458A354A998FC5460 /* POPSpringAnimation.mm in Sources */, + 2F2EC6983D905333D7E339A8C7EC3F6D /* POPVector.mm in Sources */, + 7DCD2BED90B909DB0217663529B4C6C7 /* TransformationMatrix.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1159,23 +1895,42 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 8FC8DE5AF6DF66F194BEB65EB12B0E34 /* Sources */ = { + 8B2E583DED5D18779FEC75D488D425B0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D2EDE69078D55E3188DE57E2FE3C6A67 /* IDMCaptionView.m in Sources */, + 0B4FF7BF198272E062EC014FF3812142 /* IDMPhoto.m in Sources */, + F1195BAAB1529A464B453A76DA65A81D /* IDMPhotoBrowser-dummy.m in Sources */, + C0E89B692E9AAEFA924568388E90B75C /* IDMPhotoBrowser.m in Sources */, + 656B0ED5390EF09903CDCD64B2E8E543 /* IDMTapDetectingImageView.m in Sources */, + B365E1570CDC6F4B59B5E5BF43EFD0FD /* IDMTapDetectingView.m in Sources */, + 2F30218BBC15CED7DC5E04B17E991F2B /* IDMZoomingScrollView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9BDAD6C4D98D7FA6238DF6877A4FE9F8 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A64516144BE164186530031C4C091848 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 93C240930CC0010E1BB946E61BCA6833 /* Pods-dummy.m in Sources */, + F6EE0D2B6BC3A66968B16013DF4E360A /* Pods-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - DC165F24CE250F81470BC02F187A10F9 /* Sources */ = { + A6993E0B001E6EB572176DFCF9B87C6A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 06AB294DA4E217789369C15285EDFDD8 /* UITableView+FDIndexPathHeightCache.m in Sources */, - C771EC503400FDE9FF3A97EFDA33CB10 /* UITableView+FDKeyedHeightCache.m in Sources */, - F8CD872E3654E4B4DD4AEED9D4920B30 /* UITableView+FDTemplateLayoutCell-dummy.m in Sources */, - 56EB6A682E7DD4235B12CB93A6DA1AD8 /* UITableView+FDTemplateLayoutCell.m in Sources */, - 28694EB59EDECCCC8AFCAE2C78FA3226 /* UITableView+FDTemplateLayoutCellDebug.m in Sources */, + 5F4AECEF356E35995112F9167B219AD6 /* DACircularProgress-dummy.m in Sources */, + 82AC9861A9FE0BEFEC04D31C3B05ABB2 /* DACircularProgressView.m in Sources */, + EF9006327AFFDBED3FD589DA04E2D36A /* DALabeledCircularProgressView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1215,72 +1970,123 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DCF74F6ACCA150E781FC49C89099663D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + CB10954DC1E4326FF0EBD48A7C5DDC6A /* TTTAttributedLabel-dummy.m in Sources */, + 0FC431030D42C784D41429B720C4E102 /* TTTAttributedLabel.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 010ED4A88686FAA5DFE5FEEABF61ED3A /* PBXTargetDependency */ = { + 04E74A1413D9BD9CD459D1C65D7A7978 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = JSONModel; - target = 09FA060F1A0492FB25232F489AC4E573 /* JSONModel */; - targetProxy = E9CF60177721D624D1DDB4C8EE3C72D7 /* PBXContainerItemProxy */; + name = pop; + target = 430EAC388BE8F7F7139A997947AB1B89 /* pop */; + targetProxy = F1333F08A2A7DE70A48C17A097902A9E /* PBXContainerItemProxy */; }; - 01AF1F5FBFE73F2ACE2357BB6A28AB2A /* PBXTargetDependency */ = { + 13CC54AE481C0B4FE97ABE75000AD899 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Masonry; - target = 53480ED0BE09FF49E34B1702D485CAAB /* Masonry */; - targetProxy = 03900599A476EE253332A6D2B02B63D4 /* PBXContainerItemProxy */; + name = SDWebImage; + target = 3299CAC9360F1CB3904663183E4377FA /* SDWebImage */; + targetProxy = 1D6D4DD2DE5F29EA828DEF88FABBE281 /* PBXContainerItemProxy */; + }; + 411936BABB5E1A8708BF17E32FAF0ADD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = DACircularProgress; + target = 9775596B3CA16905FC8F66DA8E2A3C67 /* DACircularProgress */; + targetProxy = E22503AABEEB35137FA488927FA55485 /* PBXContainerItemProxy */; }; - 46A4AFA9261C685459520877F54DF4BA /* PBXTargetDependency */ = { + 554D6AC0C2C1F778B14251B8ABCA599B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = MJRefresh; + target = 8F74D9EA91F4C43190670066BAC37D44 /* MJRefresh */; + targetProxy = 1C71BA08246B2BB1FE60A81236969832 /* PBXContainerItemProxy */; + }; + 58EFA9D81B61925AFFAD5D3069F9832E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = DACircularProgress; + target = 9775596B3CA16905FC8F66DA8E2A3C67 /* DACircularProgress */; + targetProxy = 810D3AB59C4C2CD6A9F75FB4ED5363E7 /* PBXContainerItemProxy */; + }; + 8E0675AB2619912A098B24ECE4C1ECF2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "YSMChineseSort-YSMChineseSort"; - target = 7A485A0ACE8DF44FD12B12F55BC78D56 /* YSMChineseSort-YSMChineseSort */; - targetProxy = DA9DD33A3B5EF24B96E648FAC2E2D04F /* PBXContainerItemProxy */; + target = 752E10FA460B850F47C5FF0DB4FE4316 /* YSMChineseSort-YSMChineseSort */; + targetProxy = 25B728094F4BB07F5EC939D283A54637 /* PBXContainerItemProxy */; }; - 5F2DF9F0DF0BC2BA95F82AD00EC88B5D /* PBXTargetDependency */ = { + 9E496D65244B03D7E92B69773CF76E4B /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = YSMChineseSort; - target = CCE5DB49633E923856CEEF33620F9F3A /* YSMChineseSort */; - targetProxy = 157D7A7E6F559B17949BD8F1F5591095 /* PBXContainerItemProxy */; + name = JSONModel; + target = 09FA060F1A0492FB25232F489AC4E573 /* JSONModel */; + targetProxy = 7F1AB7742A5FB7658C2AB86D1467F618 /* PBXContainerItemProxy */; }; - 9B30975FC91AC93C133CBC0E79B8CC62 /* PBXTargetDependency */ = { + A4B005221957FDC05B97E5FBFDAB0075 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = PinYin4Objc; target = 0CCBBF4BAA3FA48F98623D8875DC1DA7 /* PinYin4Objc */; - targetProxy = D9893ED9BD4445A010B610A61431850E /* PBXContainerItemProxy */; + targetProxy = 3AF8E9C8CDCA7B86F519BCA6389EEBE1 /* PBXContainerItemProxy */; + }; + AA3A86475941558FFDA122EA4D9DFB18 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = YSMChineseSort; + target = 2EA31293B21417A860AF4C7A2AF6D37F /* YSMChineseSort */; + targetProxy = 1B24051A34A9BB21D76DB48910FC7BA7 /* PBXContainerItemProxy */; }; - A61B0D8A7C6CE386F2338AF6C64FC7DE /* PBXTargetDependency */ = { + AABA667B0598681D9580A3105C1B1C21 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SDWebImage; + target = 3299CAC9360F1CB3904663183E4377FA /* SDWebImage */; + targetProxy = 04FDC7E56ED668D6567395012D23669E /* PBXContainerItemProxy */; + }; + C438F33FA5874163367472E4336AF88C /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = TTTAttributedLabel; - target = 225D3AF2360A78DBB2CC4B04810264A2 /* TTTAttributedLabel */; - targetProxy = 6DF4B977293D354C80F595986D970234 /* PBXContainerItemProxy */; + target = 91869A386018FE20DEC9E78C6B0CEA82 /* TTTAttributedLabel */; + targetProxy = 82674F1811E55B0858E288110233D317 /* PBXContainerItemProxy */; }; - BBA878D4F4344A5AA3CAF075521579E9 /* PBXTargetDependency */ = { + D59BA4248DFC524EC24F1B74ACDFFD89 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = PinYin4Objc; target = 0CCBBF4BAA3FA48F98623D8875DC1DA7 /* PinYin4Objc */; - targetProxy = 2A35DE0560418EADAFD501CD000B2415 /* PBXContainerItemProxy */; + targetProxy = AE74C139A3A41DA061149101739A4AA9 /* PBXContainerItemProxy */; }; - E907869BC69111A0EBD82CD0AEE874ED /* PBXTargetDependency */ = { + E02B725DCE0C7AE05FA61BF510AB586B /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = MJRefresh; - target = 8F74D9EA91F4C43190670066BAC37D44 /* MJRefresh */; - targetProxy = F9A7C0849A86A2386783CD46DE32AB47 /* PBXContainerItemProxy */; + name = pop; + target = 430EAC388BE8F7F7139A997947AB1B89 /* pop */; + targetProxy = 276EE06A22F928895FC7225E5D6F8F07 /* PBXContainerItemProxy */; }; - FA9FDE067F4418548BB35D49CD6DBFF8 /* PBXTargetDependency */ = { + E061FC6270E407ECF891A69D5EA766A8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Masonry; + target = 53480ED0BE09FF49E34B1702D485CAAB /* Masonry */; + targetProxy = 4C35E476FC7E643FF1EA6B351424CA1D /* PBXContainerItemProxy */; + }; + EA0C70051DC964B69ABC5869D6663ED0 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = IDMPhotoBrowser; + target = ACAE27A34969E14A7DA9829402D7B9A0 /* IDMPhotoBrowser */; + targetProxy = 1563CA6D7F1A2A34DA0D19B04606E928 /* PBXContainerItemProxy */; + }; + FDCF35DFA47243DD310C131D58AA720F /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "UITableView+FDTemplateLayoutCell"; - target = 8EC7E635416C96DB820A12731344BB70 /* UITableView+FDTemplateLayoutCell */; - targetProxy = CF28976655116E551283C116F5A72D24 /* PBXContainerItemProxy */; + target = D83BD52D05C83FB0FA57065604C5BB28 /* UITableView+FDTemplateLayoutCell */; + targetProxy = 62020C6060F814403049E657CEBF2F7A /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0AE329616F0F987CF99433BA609F9EBC /* Release */ = { + 0B32AC7676659B449E9521DD7188FC5E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 11146955450C791609794828F4F4F7B5 /* TTTAttributedLabel.xcconfig */; + baseConfigurationReference = 1943C527E01F767B4777786BE2E5F6A9 /* IDMPhotoBrowser.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/TTTAttributedLabel/TTTAttributedLabel-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; @@ -1293,9 +2099,21 @@ }; name = Release; }; + 1044568F7322A1A557DA3F314C6A7D07 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 515C5FDE440908C994DB168AD707A32D /* YSMChineseSort.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + PRODUCT_NAME = YSMChineseSort; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; 27EAC25242A69C58BBF8A63D030D30CB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 47DA9E3BFA04A090AD4B6FC59B2127D4 /* MJRefresh.xcconfig */; + baseConfigurationReference = 5043054F1CD651B62A0F199A751ABC02 /* MJRefresh.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/MJRefresh/MJRefresh-prefix.pch"; @@ -1311,24 +2129,48 @@ }; name = Release; }; - 3517CAE6079573E1FACE35BD52F69663 /* Release */ = { + 281F89EB17A8A8B3B31AF56CB8CA9140 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B2B4D7C452A9D8A194A199D55CD2C8EE /* YSMChineseSort.xcconfig */; + baseConfigurationReference = 2FEA08431B9AABCA9D59F5D2C63FF5F2 /* TTTAttributedLabel.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - PRODUCT_NAME = YSMChineseSort; + GCC_PREFIX_HEADER = "Target Support Files/TTTAttributedLabel/TTTAttributedLabel-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; - WRAPPER_EXTENSION = bundle; }; name = Release; }; - 3B87FE5019DDFE0FB43E3EA8B252A07A /* Debug */ = { + 299E01B50FF60137B3793B4056165220 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CCC18D58CD18A065EC4FD8984818BE8A /* UITableView+FDTemplateLayoutCell.xcconfig */; + baseConfigurationReference = E082C0EE53FD574070E00A683AC02FBA /* SDWebImage.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/SDWebImage/SDWebImage-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 2A5C63826DA5085C70D9229B9BBA8CDE /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2FEA08431B9AABCA9D59F5D2C63FF5F2 /* TTTAttributedLabel.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/TTTAttributedLabel/TTTAttributedLabel-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; @@ -1341,21 +2183,27 @@ }; name = Debug; }; - 3DF47CA775CAEE1EA3038DA280C2F705 /* Debug */ = { + 3F1515BF6DA77AC533AE2CEC764CC4D9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B2B4D7C452A9D8A194A199D55CD2C8EE /* YSMChineseSort.xcconfig */; + baseConfigurationReference = 280DD7D0E4F9B1FE05F7CB9533E8FE71 /* UITableView+FDTemplateLayoutCell.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - PRODUCT_NAME = YSMChineseSort; + GCC_PREFIX_HEADER = "Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; - WRAPPER_EXTENSION = bundle; }; - name = Debug; + name = Release; }; 4458CF1C54052E59B671D9C824152A8D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A6D7E9684728BD794691AC96247B49FD /* PinYin4Objc.xcconfig */; + baseConfigurationReference = 83C97131AF441D78E8EB4A4838190206 /* PinYin4Objc.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/PinYin4Objc/PinYin4Objc-prefix.pch"; @@ -1371,12 +2219,24 @@ }; name = Release; }; - 4933E769C75038E33232890201CCA01E /* Debug */ = { + 46F259DF86D94B879A5A5DC6777C6DF4 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 11146955450C791609794828F4F4F7B5 /* TTTAttributedLabel.xcconfig */; + baseConfigurationReference = 515C5FDE440908C994DB168AD707A32D /* YSMChineseSort.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/TTTAttributedLabel/TTTAttributedLabel-prefix.pch"; + PRODUCT_NAME = YSMChineseSort; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 5BFED557CBEBBC8F5A164CFAFA568395 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 83C97131AF441D78E8EB4A4838190206 /* PinYin4Objc.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/PinYin4Objc/PinYin4Objc-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; @@ -1389,12 +2249,12 @@ }; name = Debug; }; - 5BFED557CBEBBC8F5A164CFAFA568395 /* Debug */ = { + 6F6AE629C6EE9F98DAB30ABFCB2B981D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A6D7E9684728BD794691AC96247B49FD /* PinYin4Objc.xcconfig */; + baseConfigurationReference = E082C0EE53FD574070E00A683AC02FBA /* SDWebImage.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/PinYin4Objc/PinYin4Objc-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/SDWebImage/SDWebImage-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; @@ -1407,14 +2267,14 @@ }; name = Debug; }; - 6C3019C88D11F2BD9BBFF11FAD9C9BA5 /* Debug */ = { + 7655FB2F70852F585340878AF7C1E6FE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */; + baseConfigurationReference = 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACH_O_TYPE = staticlib; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -1422,14 +2282,14 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; }; - name = Debug; + name = Release; }; - 7AF3A3421F247C62F1F5C2EF253EB9C4 /* Debug */ = { + 7E9A67AE8C4941B71EBA1854861BC552 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B2B4D7C452A9D8A194A199D55CD2C8EE /* YSMChineseSort.xcconfig */; + baseConfigurationReference = 5043054F1CD651B62A0F199A751ABC02 /* MJRefresh.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/YSMChineseSort/YSMChineseSort-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/MJRefresh/MJRefresh-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; @@ -1442,12 +2302,12 @@ }; name = Debug; }; - 7E9A67AE8C4941B71EBA1854861BC552 /* Debug */ = { + 84F092B66A4B445675F8F2979DFDD3E0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 47DA9E3BFA04A090AD4B6FC59B2127D4 /* MJRefresh.xcconfig */; + baseConfigurationReference = 280DD7D0E4F9B1FE05F7CB9533E8FE71 /* UITableView+FDTemplateLayoutCell.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/MJRefresh/MJRefresh-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; @@ -1460,14 +2320,14 @@ }; name = Debug; }; - 8A2258846EB84924ED1DD10709004676 /* Release */ = { + 8B2BE81F8C4BF174BC42D605AEED966C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CCC18D58CD18A065EC4FD8984818BE8A /* UITableView+FDTemplateLayoutCell.xcconfig */; + baseConfigurationReference = 1943C527E01F767B4777786BE2E5F6A9 /* IDMPhotoBrowser.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PRIVATE_HEADERS_FOLDER_PATH = ""; @@ -1476,11 +2336,11 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; }; - name = Release; + name = Debug; }; 95AE3FB211FA06239C7330FF540873D7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 75F49A3D99189DE7C38FBF5DACA66777 /* Masonry.xcconfig */; + baseConfigurationReference = D58E6FB186078F4B0AE9D6D98ABF43A0 /* Masonry.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; @@ -1496,6 +2356,59 @@ }; name = Debug; }; + 97D28D7DAEA4FF06E6775108AB348CD9 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 515C5FDE440908C994DB168AD707A32D /* YSMChineseSort.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/YSMChineseSort/YSMChineseSort-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + A046F25181C72E0AC69FC1AE5530628A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4E762F23EC34ED4A6FF3312D84E33A40 /* Pods.debug.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MACH_O_TYPE = staticlib; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + A20A8D5F5488C64E37B6B88FD84647BD /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2CF69A8012E2FB4E99AEAA41CF605274 /* DACircularProgress.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/DACircularProgress/DACircularProgress-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; A70CDAD61F90AC503C7D04CC22DA2923 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1537,7 +2450,7 @@ }; B4331FCCFAF2D870D13E227585F9C260 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AFE722FF2CB2B0C7FFDC74681CCF0050 /* JSONModel.xcconfig */; + baseConfigurationReference = D6B1D7C68CAD15BADF86AFC8098C1BC9 /* JSONModel.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/JSONModel/JSONModel-prefix.pch"; @@ -1555,7 +2468,7 @@ }; C9C7912905927EA25CAF2086B7B5BB2F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AFE722FF2CB2B0C7FFDC74681CCF0050 /* JSONModel.xcconfig */; + baseConfigurationReference = D6B1D7C68CAD15BADF86AFC8098C1BC9 /* JSONModel.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/JSONModel/JSONModel-prefix.pch"; @@ -1571,12 +2484,12 @@ }; name = Release; }; - D2BF5CDEBC6E4DD7FCF3DF0F0EF03B6A /* Release */ = { + D4EBADFA6A60CCED11FDD6595C3770B0 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B2B4D7C452A9D8A194A199D55CD2C8EE /* YSMChineseSort.xcconfig */; + baseConfigurationReference = 2CF69A8012E2FB4E99AEAA41CF605274 /* DACircularProgress.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_PREFIX_HEADER = "Target Support Files/YSMChineseSort/YSMChineseSort-prefix.pch"; + GCC_PREFIX_HEADER = "Target Support Files/DACircularProgress/DACircularProgress-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; @@ -1589,23 +2502,42 @@ }; name = Release; }; - EBA44E9FEC56954516F5E9F0615B57DB /* Release */ = { + E1CD482E176A9AE8738BA05870C27EA5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 98C98CDFB3F20F2925F6CD1F141BB14F /* Pods.release.xcconfig */; + baseConfigurationReference = 9F3C3390D56C3905C41D2A9C241F307D /* pop.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/pop/pop-prefix.pch"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MACH_O_TYPE = staticlib; MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; + PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; }; + E90E14905A0202FB40BE1FC0C3570157 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9F3C3390D56C3905C41D2A9C241F307D /* pop.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/pop/pop-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; FB45FFD90572718D82AB9092B750F0CA /* Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1640,9 +2572,27 @@ }; name = Release; }; + FC5A9CF60C5DF8842CF36E7FAC5704E5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 515C5FDE440908C994DB168AD707A32D /* YSMChineseSort.xcconfig */; + buildSettings = { + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_PREFIX_HEADER = "Target Support Files/YSMChineseSort/YSMChineseSort-prefix.pch"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Release; + }; FCB543E03B40FD44221FE9A409AE51EA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 75F49A3D99189DE7C38FBF5DACA66777 /* Masonry.xcconfig */; + baseConfigurationReference = D58E6FB186078F4B0AE9D6D98ABF43A0 /* Masonry.xcconfig */; buildSettings = { ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_PREFIX_HEADER = "Target Support Files/Masonry/Masonry-prefix.pch"; @@ -1661,11 +2611,29 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 29D64E93105C7C6109268EC9D66322E3 /* Build configuration list for PBXNativeTarget "UITableView+FDTemplateLayoutCell" */ = { + 0490EDB39DB94BE137F47A9D829951A7 /* Build configuration list for PBXNativeTarget "UITableView+FDTemplateLayoutCell" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84F092B66A4B445675F8F2979DFDD3E0 /* Debug */, + 3F1515BF6DA77AC533AE2CEC764CC4D9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1EB696EDC5DD31641AD1A5A39828274E /* Build configuration list for PBXNativeTarget "SDWebImage" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6F6AE629C6EE9F98DAB30ABFCB2B981D /* Debug */, + 299E01B50FF60137B3793B4056165220 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2945A0D6568E10AAC5EA6087FF692D44 /* Build configuration list for PBXNativeTarget "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3B87FE5019DDFE0FB43E3EA8B252A07A /* Debug */, - 8A2258846EB84924ED1DD10709004676 /* Release */, + A046F25181C72E0AC69FC1AE5530628A /* Debug */, + 7655FB2F70852F585340878AF7C1E6FE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1679,6 +2647,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 341EB5E987498BDD4BFADC3773653EB1 /* Build configuration list for PBXNativeTarget "IDMPhotoBrowser" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8B2BE81F8C4BF174BC42D605AEED966C /* Debug */, + 0B32AC7676659B449E9521DD7188FC5E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 3D32356147D239362A3FF7DCAB918205 /* Build configuration list for PBXNativeTarget "MJRefresh" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -1688,20 +2665,29 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 619FE036065DA8FC7E45458FCD1EAA5E /* Build configuration list for PBXNativeTarget "YSMChineseSort" */ = { + 5B4994480F8EF13B4504E5159708C78B /* Build configuration list for PBXNativeTarget "YSMChineseSort-YSMChineseSort" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1044568F7322A1A557DA3F314C6A7D07 /* Debug */, + 46F259DF86D94B879A5A5DC6777C6DF4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 619B0B2F7ACD42F8EF700EAE6D1C95DA /* Build configuration list for PBXNativeTarget "DACircularProgress" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7AF3A3421F247C62F1F5C2EF253EB9C4 /* Debug */, - D2BF5CDEBC6E4DD7FCF3DF0F0EF03B6A /* Release */, + A20A8D5F5488C64E37B6B88FD84647BD /* Debug */, + D4EBADFA6A60CCED11FDD6595C3770B0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B5E0B8EFC14587E999BE7DAE1716A411 /* Build configuration list for PBXNativeTarget "Pods" */ = { + 874B670706EB07D58B8BD52EDBE652AD /* Build configuration list for PBXNativeTarget "pop" */ = { isa = XCConfigurationList; buildConfigurations = ( - 6C3019C88D11F2BD9BBFF11FAD9C9BA5 /* Debug */, - EBA44E9FEC56954516F5E9F0615B57DB /* Release */, + E90E14905A0202FB40BE1FC0C3570157 /* Debug */, + E1CD482E176A9AE8738BA05870C27EA5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1715,38 +2701,38 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C6AF5E073E12BB724B34252D7E1E5E2E /* Build configuration list for PBXNativeTarget "JSONModel" */ = { + BC427D358B484354DFF0C519F985C076 /* Build configuration list for PBXNativeTarget "TTTAttributedLabel" */ = { isa = XCConfigurationList; buildConfigurations = ( - B4331FCCFAF2D870D13E227585F9C260 /* Debug */, - C9C7912905927EA25CAF2086B7B5BB2F /* Release */, + 2A5C63826DA5085C70D9229B9BBA8CDE /* Debug */, + 281F89EB17A8A8B3B31AF56CB8CA9140 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D3E84E85D3B8E321444FD28FAE5E300B /* Build configuration list for PBXNativeTarget "YSMChineseSort-YSMChineseSort" */ = { + C6AF5E073E12BB724B34252D7E1E5E2E /* Build configuration list for PBXNativeTarget "JSONModel" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3DF47CA775CAEE1EA3038DA280C2F705 /* Debug */, - 3517CAE6079573E1FACE35BD52F69663 /* Release */, + B4331FCCFAF2D870D13E227585F9C260 /* Debug */, + C9C7912905927EA25CAF2086B7B5BB2F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FA4207FFCD94E5098AE817E8A62A9336 /* Build configuration list for PBXNativeTarget "PinYin4Objc" */ = { + ED7B3E7CC5477A0A2965DDFB985B91C4 /* Build configuration list for PBXNativeTarget "YSMChineseSort" */ = { isa = XCConfigurationList; buildConfigurations = ( - 5BFED557CBEBBC8F5A164CFAFA568395 /* Debug */, - 4458CF1C54052E59B671D9C824152A8D /* Release */, + 97D28D7DAEA4FF06E6775108AB348CD9 /* Debug */, + FC5A9CF60C5DF8842CF36E7FAC5704E5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FEF76DED65C97657D34400D02F006350 /* Build configuration list for PBXNativeTarget "TTTAttributedLabel" */ = { + FA4207FFCD94E5098AE817E8A62A9336 /* Build configuration list for PBXNativeTarget "PinYin4Objc" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4933E769C75038E33232890201CCA01E /* Debug */, - 0AE329616F0F987CF99433BA609F9EBC /* Release */, + 5BFED557CBEBBC8F5A164CFAFA568395 /* Debug */, + 4458CF1C54052E59B671D9C824152A8D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/DACircularProgress.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/DACircularProgress.xcscheme new file mode 100644 index 0000000..7c81e76 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/DACircularProgress.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/IDMPhotoBrowser.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/IDMPhotoBrowser.xcscheme new file mode 100644 index 0000000..bd85bf9 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/IDMPhotoBrowser.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/JSONModel.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/JSONModel.xcscheme index be4edf9..f1576b1 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/JSONModel.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/JSONModel.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/MJRefresh.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/MJRefresh.xcscheme index dfd0bee..c964990 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/MJRefresh.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/MJRefresh.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Masonry.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Masonry.xcscheme index 9b0aeb9..2079a57 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Masonry.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Masonry.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/PinYin4Objc.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/PinYin4Objc.xcscheme index f7927a2..e20b4ff 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/PinYin4Objc.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/PinYin4Objc.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Pods.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Pods.xcscheme index 3bf09d8..ad00ef5 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Pods.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/Pods.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/SDWebImage.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/SDWebImage.xcscheme new file mode 100644 index 0000000..c760028 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/SDWebImage.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/TTTAttributedLabel.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/TTTAttributedLabel.xcscheme index fd30710..df48e56 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/TTTAttributedLabel.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/TTTAttributedLabel.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/UITableView+FDTemplateLayoutCell.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/UITableView+FDTemplateLayoutCell.xcscheme index 2ac518e..333026f 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/UITableView+FDTemplateLayoutCell.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/UITableView+FDTemplateLayoutCell.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort-YSMChineseSort.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort-YSMChineseSort.xcscheme index ffbcbfd..5f11bf4 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort-YSMChineseSort.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort-YSMChineseSort.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort.xcscheme index 8c4559a..ed9d65b 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort.xcscheme +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/YSMChineseSort.xcscheme @@ -14,7 +14,7 @@ buildForArchiving = "YES"> diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/pop.xcscheme b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/pop.xcscheme new file mode 100644 index 0000000..8718899 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/pop.xcscheme @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/xcschememanagement.plist index 54458bc..ce27273 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Pods/Pods.xcodeproj/xcuserdata/Euphoria.xcuserdatad/xcschemes/xcschememanagement.plist @@ -4,6 +4,16 @@ SchemeUserState + DACircularProgress.xcscheme + + isShown + + + IDMPhotoBrowser.xcscheme + + isShown + + JSONModel.xcscheme isShown @@ -29,6 +39,11 @@ isShown + SDWebImage.xcscheme + + isShown + + TTTAttributedLabel.xcscheme isShown @@ -49,6 +64,11 @@ isShown + pop.xcscheme + + isShown + + SuppressBuildableAutocreation @@ -62,27 +82,27 @@ primary - 225D3AF2360A78DBB2CC4B04810264A2 + 2EA31293B21417A860AF4C7A2AF6D37F primary - 2FAF84446DE99B0BC6A3A55140E079C8 + 3299CAC9360F1CB3904663183E4377FA primary - 53480ED0BE09FF49E34B1702D485CAAB + 430EAC388BE8F7F7139A997947AB1B89 primary - 7A485A0ACE8DF44FD12B12F55BC78D56 + 53480ED0BE09FF49E34B1702D485CAAB primary - 8EC7E635416C96DB820A12731344BB70 + 752E10FA460B850F47C5FF0DB4FE4316 primary @@ -92,7 +112,27 @@ primary - CCE5DB49633E923856CEEF33620F9F3A + 91869A386018FE20DEC9E78C6B0CEA82 + + primary + + + 9775596B3CA16905FC8F66DA8E2A3C67 + + primary + + + ACAE27A34969E14A7DA9829402D7B9A0 + + primary + + + D83BD52D05C83FB0FA57065604C5BB28 + + primary + + + E0287D5B3E462AE7F3FDB0E3D44460E0 primary diff --git a/Pods/SDWebImage/LICENSE b/Pods/SDWebImage/LICENSE new file mode 100644 index 0000000..ae783e1 --- /dev/null +++ b/Pods/SDWebImage/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2009 Olivier Poitrey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/Pods/SDWebImage/README.md b/Pods/SDWebImage/README.md new file mode 100644 index 0000000..62628f9 --- /dev/null +++ b/Pods/SDWebImage/README.md @@ -0,0 +1,334 @@ +Web Image +========= +[![Build Status](http://img.shields.io/travis/rs/SDWebImage/master.svg?style=flat)](https://travis-ci.org/rs/SDWebImage) +[![Pod Version](http://img.shields.io/cocoapods/v/SDWebImage.svg?style=flat)](http://cocoadocs.org/docsets/SDWebImage/) +[![Pod Platform](http://img.shields.io/cocoapods/p/SDWebImage.svg?style=flat)](http://cocoadocs.org/docsets/SDWebImage/) +[![Pod License](http://img.shields.io/cocoapods/l/SDWebImage.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0.html) +[![Dependency Status](https://www.versioneye.com/objective-c/sdwebimage/3.3/badge.svg?style=flat)](https://www.versioneye.com/objective-c/sdwebimage/3.3) +[![Reference Status](https://www.versioneye.com/objective-c/sdwebimage/reference_badge.svg?style=flat)](https://www.versioneye.com/objective-c/sdwebimage/references) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/rs/SDWebImage) + +This library provides a category for UIImageView with support for remote images coming from the web. + +It provides: + +- An `UIImageView` category adding web image and cache management to the Cocoa Touch framework +- An asynchronous image downloader +- An asynchronous memory + disk image caching with automatic cache expiration handling +- Animated GIF support +- WebP format support +- A background image decompression +- A guarantee that the same URL won't be downloaded several times +- A guarantee that bogus URLs won't be retried again and again +- A guarantee that main thread will never be blocked +- Performances! +- Use GCD and ARC +- Arm64 support + +NOTE: The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.1.1 +minimum deployment version. If you need iOS < 5.0 support, please use the last [2.0 version](https://github.com/rs/SDWebImage/tree/2.0-compat). + +[How is SDWebImage better than X?](https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F) + +Who Use It +---------- + +Find out [who uses SDWebImage](https://github.com/rs/SDWebImage/wiki/Who-Uses-SDWebImage) and add your app to the list. + +How To Use +---------- + +API documentation is available at [CocoaDocs - SDWebImage](http://cocoadocs.org/docsets/SDWebImage/) + +### Using UIImageView+WebCache category with UITableView + +Just #import the UIImageView+WebCache.h header, and call the sd_setImageWithURL:placeholderImage: +method from the tableView:cellForRowAtIndexPath: UITableViewDataSource method. Everything will be +handled for you, from async downloads to caching management. + +```objective-c +#import + +... + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + static NSString *MyIdentifier = @"MyIdentifier"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault + reuseIdentifier:MyIdentifier] autorelease]; + } + + // Here we use the new provided sd_setImageWithURL: method to load the web image + [cell.imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"] + placeholderImage:[UIImage imageNamed:@"placeholder.png"]]; + + cell.textLabel.text = @"My Text"; + return cell; +} +``` + +### Using blocks + +With blocks, you can be notified about the image download progress and whenever the image retrieval +has completed with success or not: + +```objective-c +// Here we use the new provided sd_setImageWithURL: method to load the web image +[cell.imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"] + placeholderImage:[UIImage imageNamed:@"placeholder.png"] + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + ... completion code here ... + }]; +``` + +Note: neither your success nor failure block will be call if your image request is canceled before completion. + +### Using SDWebImageManager + +The SDWebImageManager is the class behind the UIImageView+WebCache category. It ties the +asynchronous downloader with the image cache store. You can use this class directly to benefit +from web image downloading with caching in another context than a UIView (ie: with Cocoa). + +Here is a simple example of how to use SDWebImageManager: + +```objective-c +SDWebImageManager *manager = [SDWebImageManager sharedManager]; +[manager downloadImageWithURL:imageURL + options:0 + progress:^(NSInteger receivedSize, NSInteger expectedSize) { + // progression tracking code + } + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (image) { + // do something with image + } + }]; +``` + +### Using Asynchronous Image Downloader Independently + +It's also possible to use the async image downloader independently: + +```objective-c +SDWebImageDownloader *downloader = [SDWebImageDownloader sharedDownloader]; +[downloader downloadImageWithURL:imageURL + options:0 + progress:^(NSInteger receivedSize, NSInteger expectedSize) { + // progression tracking code + } + completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) { + if (image && finished) { + // do something with image + } + }]; +``` + +### Using Asynchronous Image Caching Independently + +It is also possible to use the async based image cache store independently. SDImageCache +maintains a memory cache and an optional disk cache. Disk cache write operations are performed +asynchronous so it doesn't add unnecessary latency to the UI. + +The SDImageCache class provides a singleton instance for convenience but you can create your own +instance if you want to create separated cache namespace. + +To lookup the cache, you use the `queryDiskCacheForKey:done:` method. If the method returns nil, it means the cache +doesn't currently own the image. You are thus responsible for generating and caching it. The cache +key is an application unique identifier for the image to cache. It is generally the absolute URL of +the image. + +```objective-c +SDImageCache *imageCache = [[SDImageCache alloc] initWithNamespace:@"myNamespace"]; +[imageCache queryDiskCacheForKey:myCacheKey done:^(UIImage *image) { + // image is not nil if image was found +}]; +``` + +By default SDImageCache will lookup the disk cache if an image can't be found in the memory cache. +You can prevent this from happening by calling the alternative method `imageFromMemoryCacheForKey:`. + +To store an image into the cache, you use the storeImage:forKey: method: + +```objective-c +[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey]; +``` + +By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If +you want only the memory cache, use the alternative method storeImage:forKey:toDisk: with a negative +third argument. + +### Using cache key filter + +Sometime, you may not want to use the image URL as cache key because part of the URL is dynamic +(i.e.: for access control purpose). SDWebImageManager provides a way to set a cache key filter that +takes the NSURL as input, and output a cache key NSString. + +The following example sets a filter in the application delegate that will remove any query-string from +the URL before to use it as a cache key: + +```objective-c +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + SDWebImageManager.sharedManager.cacheKeyFilter = ^(NSURL *url) { + url = [[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path]; + return [url absoluteString]; + }; + + // Your app init code... + return YES; +} +``` + + +Common Problems +--------------- + +### Using dynamic image size with UITableViewCell + +UITableView determines the size of the image by the first image set for a cell. If your remote images +don't have the same size as your placeholder image, you may experience strange anamorphic scaling issue. +The following article gives a way to workaround this issue: + +[http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/](http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/) + + +### Handle image refresh + +SDWebImage does very aggressive caching by default. It ignores all kind of caching control header returned by the HTTP server and cache the returned images with no time restriction. It implies your images URLs are static URLs pointing to images that never change. If the pointed image happen to change, some parts of the URL should change accordingly. + +If you don't control the image server you're using, you may not be able to change the URL when its content is updated. This is the case for Facebook avatar URLs for instance. In such case, you may use the `SDWebImageRefreshCached` flag. This will slightly degrade the performance but will respect the HTTP caching control headers: + +``` objective-c +[imageView sd_setImageWithURL:[NSURL URLWithString:@"https://graph.facebook.com/olivier.poitrey/picture"] + placeholderImage:[UIImage imageNamed:@"avatar-placeholder.png"] + options:SDWebImageRefreshCached]; +``` + +### Add a progress indicator + +See this category: https://github.com/JJSaccolo/UIActivityIndicator-for-SDWebImage + +Installation +------------ + +There are three ways to use SDWebImage in your project: +- using Cocoapods +- copying all the files into your project +- importing the project as a static library + +### Installation with CocoaPods + +[CocoaPods](http://cocoapods.org/) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the [Get Started](http://cocoapods.org/#get_started) section for more details. + +#### Podfile +``` +platform :ios, '6.1' +pod 'SDWebImage', '~>3.7' +``` + +If you are using Swift, be sure to add `use_frameworks!` and set your target to iOS 8+: +``` +platform :ios, '8.0' +use_frameworks! +``` + +#### Subspecs + +There are 3 subspecs available now: `Core`, `MapKit` and `WebP` (this means you can install only some of the SDWebImage modules. By default, you get just `Core`, so if you need `WebP`, you need to specify it). + +Podfile example: +``` +pod 'SDWebImage/WebP' +``` + +### Installation with Carthage (iOS 8+) + +[Carthage](https://github.com/Carthage/Carthage) is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods. + +To install with carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage) + +#### Cartfile +``` +github "rs/SDWebImage" +``` + +#### Usage +Swift + +If you installed using CocoaPods: +``` +import SDWebImage +``` + +If you installed manually: +``` +import WebImage +``` + +Objective-C + +``` +@import WebImage; +``` + +### Installation by cloning the repository + +In order to gain access to all the files from the repository, you should clone it. +``` +git clone --recursive https://github.com/rs/SDWebImage.git +``` + +### Add the SDWebImage project to your project + +- Download and unzip the last version of the framework from the [download page](https://github.com/rs/SDWebImage/releases) +- Right-click on the project navigator and select "Add Files to "Your Project": +- In the dialog, select SDWebImage.framework: +- Check the "Copy items into destination group's folder (if needed)" checkbox + +### Add dependencies + +- In you application project app’s target settings, find the "Build Phases" section and open the "Link Binary With Libraries" block: +- Click the "+" button again and select the "ImageIO.framework", this is needed by the progressive download feature: + +### Add Linker Flag + +Open the "Build Settings" tab, in the "Linking" section, locate the "Other Linker Flags" setting and add the "-ObjC" flag: + +![Other Linker Flags](http://dl.dropbox.com/u/123346/SDWebImage/10_other_linker_flags.jpg) + +Alternatively, if this causes compilation problems with frameworks that extend optional libraries, such as Parse, RestKit or opencv2, instead of the -ObjC flag use: +``` +-force_load SDWebImage.framework/Versions/Current/SDWebImage +``` + +If you're using Cocoa Pods and have any frameworks that extend optional libraries, such as Parsen RestKit or opencv2, instead of the -ObjC flag use: +``` +-force_load $(TARGET_BUILD_DIR)/libPods.a +``` +and this: +``` +$(inherited) +``` + +### Import headers in your source files + +In the source files where you need to use the library, import the header file: + +```objective-c +#import +``` + +### Build Project + +At this point your workspace should build without error. If you are having problem, post to the Issue and the +community can help you solve it. + +Future Enhancements +------------------- + +- LRU memory cache cleanup instead of reset on memory warning + +## Licenses + +All source code is licensed under the [MIT License](https://raw.github.com/rs/SDWebImage/master/LICENSE). diff --git a/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h new file mode 100644 index 0000000..69c76dc --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h @@ -0,0 +1,26 @@ +// +// Created by Fabrice Aneche on 06/01/14. +// Copyright (c) 2014 Dailymotion. All rights reserved. +// + +#import + +@interface NSData (ImageContentType) + +/** + * Compute the content type for an image data + * + * @param data the input data + * + * @return the content type as string (i.e. image/jpeg, image/gif) + */ ++ (NSString *)sd_contentTypeForImageData:(NSData *)data; + +@end + + +@interface NSData (ImageContentTypeDeprecated) + ++ (NSString *)contentTypeForImageData:(NSData *)data __deprecated_msg("Use `sd_contentTypeForImageData:`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m new file mode 100644 index 0000000..0941cfa --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m @@ -0,0 +1,49 @@ +// +// Created by Fabrice Aneche on 06/01/14. +// Copyright (c) 2014 Dailymotion. All rights reserved. +// + +#import "NSData+ImageContentType.h" + + +@implementation NSData (ImageContentType) + ++ (NSString *)sd_contentTypeForImageData:(NSData *)data { + uint8_t c; + [data getBytes:&c length:1]; + switch (c) { + case 0xFF: + return @"image/jpeg"; + case 0x89: + return @"image/png"; + case 0x47: + return @"image/gif"; + case 0x49: + case 0x4D: + return @"image/tiff"; + case 0x52: + // R as RIFF for WEBP + if ([data length] < 12) { + return nil; + } + + NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding]; + if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"]) { + return @"image/webp"; + } + + return nil; + } + return nil; +} + +@end + + +@implementation NSData (ImageContentTypeDeprecated) + ++ (NSString *)contentTypeForImageData:(NSData *)data { + return [self sd_contentTypeForImageData:data]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDImageCache.h b/Pods/SDWebImage/SDWebImage/SDImageCache.h new file mode 100644 index 0000000..9577726 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDImageCache.h @@ -0,0 +1,272 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" + +typedef NS_ENUM(NSInteger, SDImageCacheType) { + /** + * The image wasn't available the SDWebImage caches, but was downloaded from the web. + */ + SDImageCacheTypeNone, + /** + * The image was obtained from the disk cache. + */ + SDImageCacheTypeDisk, + /** + * The image was obtained from the memory cache. + */ + SDImageCacheTypeMemory +}; + +typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType cacheType); + +typedef void(^SDWebImageCheckCacheCompletionBlock)(BOOL isInCache); + +typedef void(^SDWebImageCalculateSizeBlock)(NSUInteger fileCount, NSUInteger totalSize); + +/** + * SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed + * asynchronous so it doesn’t add unnecessary latency to the UI. + */ +@interface SDImageCache : NSObject + +/** + * Decompressing images that are downloaded and cached can improve performance but can consume lot of memory. + * Defaults to YES. Set this to NO if you are experiencing a crash due to excessive memory consumption. + */ +@property (assign, nonatomic) BOOL shouldDecompressImages; + +/** + * disable iCloud backup [defaults to YES] + */ +@property (assign, nonatomic) BOOL shouldDisableiCloud; + +/** + * use memory cache [defaults to YES] + */ +@property (assign, nonatomic) BOOL shouldCacheImagesInMemory; + +/** + * The maximum "total cost" of the in-memory image cache. The cost function is the number of pixels held in memory. + */ +@property (assign, nonatomic) NSUInteger maxMemoryCost; + +/** + * The maximum number of objects the cache should hold. + */ +@property (assign, nonatomic) NSUInteger maxMemoryCountLimit; + +/** + * The maximum length of time to keep an image in the cache, in seconds + */ +@property (assign, nonatomic) NSInteger maxCacheAge; + +/** + * The maximum size of the cache, in bytes. + */ +@property (assign, nonatomic) NSUInteger maxCacheSize; + +/** + * Returns global shared cache instance + * + * @return SDImageCache global instance + */ ++ (SDImageCache *)sharedImageCache; + +/** + * Init a new cache store with a specific namespace + * + * @param ns The namespace to use for this cache store + */ +- (id)initWithNamespace:(NSString *)ns; + +/** + * Init a new cache store with a specific namespace and directory + * + * @param ns The namespace to use for this cache store + * @param directory Directory to cache disk images in + */ +- (id)initWithNamespace:(NSString *)ns diskCacheDirectory:(NSString *)directory; + +-(NSString *)makeDiskCachePath:(NSString*)fullNamespace; + +/** + * Add a read-only cache path to search for images pre-cached by SDImageCache + * Useful if you want to bundle pre-loaded images with your app + * + * @param path The path to use for this read-only cache path + */ +- (void)addReadOnlyCachePath:(NSString *)path; + +/** + * Store an image into memory and disk cache at the given key. + * + * @param image The image to store + * @param key The unique image cache key, usually it's image absolute URL + */ +- (void)storeImage:(UIImage *)image forKey:(NSString *)key; + +/** + * Store an image into memory and optionally disk cache at the given key. + * + * @param image The image to store + * @param key The unique image cache key, usually it's image absolute URL + * @param toDisk Store the image to disk cache if YES + */ +- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk; + +/** + * Store an image into memory and optionally disk cache at the given key. + * + * @param image The image to store + * @param recalculate BOOL indicates if imageData can be used or a new data should be constructed from the UIImage + * @param imageData The image data as returned by the server, this representation will be used for disk storage + * instead of converting the given image object into a storable/compressed image format in order + * to save quality and CPU + * @param key The unique image cache key, usually it's image absolute URL + * @param toDisk Store the image to disk cache if YES + */ +- (void)storeImage:(UIImage *)image recalculateFromImage:(BOOL)recalculate imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk; + +/** + * Query the disk cache asynchronously. + * + * @param key The unique key used to store the wanted image + */ +- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock; + +/** + * Query the memory cache synchronously. + * + * @param key The unique key used to store the wanted image + */ +- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key; + +/** + * Query the disk cache synchronously after checking the memory cache. + * + * @param key The unique key used to store the wanted image + */ +- (UIImage *)imageFromDiskCacheForKey:(NSString *)key; + +/** + * Remove the image from memory and disk cache synchronously + * + * @param key The unique image cache key + */ +- (void)removeImageForKey:(NSString *)key; + + +/** + * Remove the image from memory and disk cache asynchronously + * + * @param key The unique image cache key + * @param completion An block that should be executed after the image has been removed (optional) + */ +- (void)removeImageForKey:(NSString *)key withCompletion:(SDWebImageNoParamsBlock)completion; + +/** + * Remove the image from memory and optionally disk cache asynchronously + * + * @param key The unique image cache key + * @param fromDisk Also remove cache entry from disk if YES + */ +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk; + +/** + * Remove the image from memory and optionally disk cache asynchronously + * + * @param key The unique image cache key + * @param fromDisk Also remove cache entry from disk if YES + * @param completion An block that should be executed after the image has been removed (optional) + */ +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk withCompletion:(SDWebImageNoParamsBlock)completion; + +/** + * Clear all memory cached images + */ +- (void)clearMemory; + +/** + * Clear all disk cached images. Non-blocking method - returns immediately. + * @param completion An block that should be executed after cache expiration completes (optional) + */ +- (void)clearDiskOnCompletion:(SDWebImageNoParamsBlock)completion; + +/** + * Clear all disk cached images + * @see clearDiskOnCompletion: + */ +- (void)clearDisk; + +/** + * Remove all expired cached image from disk. Non-blocking method - returns immediately. + * @param completionBlock An block that should be executed after cache expiration completes (optional) + */ +- (void)cleanDiskWithCompletionBlock:(SDWebImageNoParamsBlock)completionBlock; + +/** + * Remove all expired cached image from disk + * @see cleanDiskWithCompletionBlock: + */ +- (void)cleanDisk; + +/** + * Get the size used by the disk cache + */ +- (NSUInteger)getSize; + +/** + * Get the number of images in the disk cache + */ +- (NSUInteger)getDiskCount; + +/** + * Asynchronously calculate the disk cache's size. + */ +- (void)calculateSizeWithCompletionBlock:(SDWebImageCalculateSizeBlock)completionBlock; + +/** + * Async check if image exists in disk cache already (does not load the image) + * + * @param key the key describing the url + * @param completionBlock the block to be executed when the check is done. + * @note the completion block will be always executed on the main queue + */ +- (void)diskImageExistsWithKey:(NSString *)key completion:(SDWebImageCheckCacheCompletionBlock)completionBlock; + +/** + * Check if image exists in disk cache already (does not load the image) + * + * @param key the key describing the url + * + * @return YES if an image exists for the given key + */ +- (BOOL)diskImageExistsWithKey:(NSString *)key; + +/** + * Get the cache path for a certain key (needs the cache path root folder) + * + * @param key the key (can be obtained from url using cacheKeyForURL) + * @param path the cache path root folder + * + * @return the cache path + */ +- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path; + +/** + * Get the default cache path for a certain key + * + * @param key the key (can be obtained from url using cacheKeyForURL) + * + * @return the default cache path + */ +- (NSString *)defaultCachePathForKey:(NSString *)key; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDImageCache.m b/Pods/SDWebImage/SDWebImage/SDImageCache.m new file mode 100644 index 0000000..aa0ff6c --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDImageCache.m @@ -0,0 +1,650 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDImageCache.h" +#import "SDWebImageDecoder.h" +#import "UIImage+MultiFormat.h" +#import + +// See https://github.com/rs/SDWebImage/pull/1141 for discussion +@interface AutoPurgeCache : NSCache +@end + +@implementation AutoPurgeCache + +- (id)init +{ + self = [super init]; + if (self) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(removeAllObjects) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; + } + return self; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; + +} + +@end + +static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week +// PNG signature bytes and data (below) +static unsigned char kPNGSignatureBytes[8] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A}; +static NSData *kPNGSignatureData = nil; + +BOOL ImageDataHasPNGPreffix(NSData *data); + +BOOL ImageDataHasPNGPreffix(NSData *data) { + NSUInteger pngSignatureLength = [kPNGSignatureData length]; + if ([data length] >= pngSignatureLength) { + if ([[data subdataWithRange:NSMakeRange(0, pngSignatureLength)] isEqualToData:kPNGSignatureData]) { + return YES; + } + } + + return NO; +} + +FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { + return image.size.height * image.size.width * image.scale * image.scale; +} + +@interface SDImageCache () + +@property (strong, nonatomic) NSCache *memCache; +@property (strong, nonatomic) NSString *diskCachePath; +@property (strong, nonatomic) NSMutableArray *customPaths; +@property (SDDispatchQueueSetterSementics, nonatomic) dispatch_queue_t ioQueue; + +@end + + +@implementation SDImageCache { + NSFileManager *_fileManager; +} + ++ (SDImageCache *)sharedImageCache { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + return [self initWithNamespace:@"default"]; +} + +- (id)initWithNamespace:(NSString *)ns { + NSString *path = [self makeDiskCachePath:ns]; + return [self initWithNamespace:ns diskCacheDirectory:path]; +} + +- (id)initWithNamespace:(NSString *)ns diskCacheDirectory:(NSString *)directory { + if ((self = [super init])) { + NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns]; + + // initialise PNG signature data + kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8]; + + // Create IO serial queue + _ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL); + + // Init default values + _maxCacheAge = kDefaultCacheMaxCacheAge; + + // Init the memory cache + _memCache = [[AutoPurgeCache alloc] init]; + _memCache.name = fullNamespace; + + // Init the disk cache + if (directory != nil) { + _diskCachePath = [directory stringByAppendingPathComponent:fullNamespace]; + } else { + NSString *path = [self makeDiskCachePath:ns]; + _diskCachePath = path; + } + + // Set decompression to YES + _shouldDecompressImages = YES; + + // memory cache enabled + _shouldCacheImagesInMemory = YES; + + // Disable iCloud + _shouldDisableiCloud = YES; + + dispatch_sync(_ioQueue, ^{ + _fileManager = [NSFileManager new]; + }); + +#if TARGET_OS_IPHONE + // Subscribe to app events + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(clearMemory) + name:UIApplicationDidReceiveMemoryWarningNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(cleanDisk) + name:UIApplicationWillTerminateNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(backgroundCleanDisk) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; +#endif + } + + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + SDDispatchQueueRelease(_ioQueue); +} + +- (void)addReadOnlyCachePath:(NSString *)path { + if (!self.customPaths) { + self.customPaths = [NSMutableArray new]; + } + + if (![self.customPaths containsObject:path]) { + [self.customPaths addObject:path]; + } +} + +- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path { + NSString *filename = [self cachedFileNameForKey:key]; + return [path stringByAppendingPathComponent:filename]; +} + +- (NSString *)defaultCachePathForKey:(NSString *)key { + return [self cachePathForKey:key inPath:self.diskCachePath]; +} + +#pragma mark SDImageCache (private) + +- (NSString *)cachedFileNameForKey:(NSString *)key { + const char *str = [key UTF8String]; + if (str == NULL) { + str = ""; + } + unsigned char r[CC_MD5_DIGEST_LENGTH]; + CC_MD5(str, (CC_LONG)strlen(str), r); + NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%@", + r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], + r[11], r[12], r[13], r[14], r[15], [[key pathExtension] isEqualToString:@""] ? @"" : [NSString stringWithFormat:@".%@", [key pathExtension]]]; + + return filename; +} + +#pragma mark ImageCache + +// Init the disk cache +-(NSString *)makeDiskCachePath:(NSString*)fullNamespace{ + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); + return [paths[0] stringByAppendingPathComponent:fullNamespace]; +} + +- (void)storeImage:(UIImage *)image recalculateFromImage:(BOOL)recalculate imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk { + if (!image || !key) { + return; + } + // if memory cache is enabled + if (self.shouldCacheImagesInMemory) { + NSUInteger cost = SDCacheCostForImage(image); + [self.memCache setObject:image forKey:key cost:cost]; + } + + if (toDisk) { + dispatch_async(self.ioQueue, ^{ + NSData *data = imageData; + + if (image && (recalculate || !data)) { +#if TARGET_OS_IPHONE + // We need to determine if the image is a PNG or a JPEG + // PNGs are easier to detect because they have a unique signature (http://www.w3.org/TR/PNG-Structure.html) + // The first eight bytes of a PNG file always contain the following (decimal) values: + // 137 80 78 71 13 10 26 10 + + // If the imageData is nil (i.e. if trying to save a UIImage directly or the image was transformed on download) + // and the image has an alpha channel, we will consider it PNG to avoid losing the transparency + int alphaInfo = CGImageGetAlphaInfo(image.CGImage); + BOOL hasAlpha = !(alphaInfo == kCGImageAlphaNone || + alphaInfo == kCGImageAlphaNoneSkipFirst || + alphaInfo == kCGImageAlphaNoneSkipLast); + BOOL imageIsPng = hasAlpha; + + // But if we have an image data, we will look at the preffix + if ([imageData length] >= [kPNGSignatureData length]) { + imageIsPng = ImageDataHasPNGPreffix(imageData); + } + + if (imageIsPng) { + data = UIImagePNGRepresentation(image); + } + else { + data = UIImageJPEGRepresentation(image, (CGFloat)1.0); + } +#else + data = [NSBitmapImageRep representationOfImageRepsInArray:image.representations usingType: NSJPEGFileType properties:nil]; +#endif + } + + if (data) { + if (![_fileManager fileExistsAtPath:_diskCachePath]) { + [_fileManager createDirectoryAtPath:_diskCachePath withIntermediateDirectories:YES attributes:nil error:NULL]; + } + + // get cache Path for image key + NSString *cachePathForKey = [self defaultCachePathForKey:key]; + // transform to NSUrl + NSURL *fileURL = [NSURL fileURLWithPath:cachePathForKey]; + + [_fileManager createFileAtPath:cachePathForKey contents:data attributes:nil]; + + // disable iCloud backup + if (self.shouldDisableiCloud) { + [fileURL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:nil]; + } + } + }); + } +} + +- (void)storeImage:(UIImage *)image forKey:(NSString *)key { + [self storeImage:image recalculateFromImage:YES imageData:nil forKey:key toDisk:YES]; +} + +- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk { + [self storeImage:image recalculateFromImage:YES imageData:nil forKey:key toDisk:toDisk]; +} + +- (BOOL)diskImageExistsWithKey:(NSString *)key { + BOOL exists = NO; + + // this is an exception to access the filemanager on another queue than ioQueue, but we are using the shared instance + // from apple docs on NSFileManager: The methods of the shared NSFileManager object can be called from multiple threads safely. + exists = [[NSFileManager defaultManager] fileExistsAtPath:[self defaultCachePathForKey:key]]; + + // fallback because of https://github.com/rs/SDWebImage/pull/976 that added the extension to the disk file name + // checking the key with and without the extension + if (!exists) { + exists = [[NSFileManager defaultManager] fileExistsAtPath:[[self defaultCachePathForKey:key] stringByDeletingPathExtension]]; + } + + return exists; +} + +- (void)diskImageExistsWithKey:(NSString *)key completion:(SDWebImageCheckCacheCompletionBlock)completionBlock { + dispatch_async(_ioQueue, ^{ + BOOL exists = [_fileManager fileExistsAtPath:[self defaultCachePathForKey:key]]; + + // fallback because of https://github.com/rs/SDWebImage/pull/976 that added the extension to the disk file name + // checking the key with and without the extension + if (!exists) { + exists = [_fileManager fileExistsAtPath:[[self defaultCachePathForKey:key] stringByDeletingPathExtension]]; + } + + if (completionBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(exists); + }); + } + }); +} + +- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key { + return [self.memCache objectForKey:key]; +} + +- (UIImage *)imageFromDiskCacheForKey:(NSString *)key { + + // First check the in-memory cache... + UIImage *image = [self imageFromMemoryCacheForKey:key]; + if (image) { + return image; + } + + // Second check the disk cache... + UIImage *diskImage = [self diskImageForKey:key]; + if (diskImage && self.shouldCacheImagesInMemory) { + NSUInteger cost = SDCacheCostForImage(diskImage); + [self.memCache setObject:diskImage forKey:key cost:cost]; + } + + return diskImage; +} + +- (NSData *)diskImageDataBySearchingAllPathsForKey:(NSString *)key { + NSString *defaultPath = [self defaultCachePathForKey:key]; + NSData *data = [NSData dataWithContentsOfFile:defaultPath]; + if (data) { + return data; + } + + // fallback because of https://github.com/rs/SDWebImage/pull/976 that added the extension to the disk file name + // checking the key with and without the extension + data = [NSData dataWithContentsOfFile:[defaultPath stringByDeletingPathExtension]]; + if (data) { + return data; + } + + NSArray *customPaths = [self.customPaths copy]; + for (NSString *path in customPaths) { + NSString *filePath = [self cachePathForKey:key inPath:path]; + NSData *imageData = [NSData dataWithContentsOfFile:filePath]; + if (imageData) { + return imageData; + } + + // fallback because of https://github.com/rs/SDWebImage/pull/976 that added the extension to the disk file name + // checking the key with and without the extension + imageData = [NSData dataWithContentsOfFile:[filePath stringByDeletingPathExtension]]; + if (imageData) { + return imageData; + } + } + + return nil; +} + +- (UIImage *)diskImageForKey:(NSString *)key { + NSData *data = [self diskImageDataBySearchingAllPathsForKey:key]; + if (data) { + UIImage *image = [UIImage sd_imageWithData:data]; + image = [self scaledImageForKey:key image:image]; + if (self.shouldDecompressImages) { + image = [UIImage decodedImageWithImage:image]; + } + return image; + } + else { + return nil; + } +} + +- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image { + return SDScaledImageForKey(key, image); +} + +- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock { + if (!doneBlock) { + return nil; + } + + if (!key) { + doneBlock(nil, SDImageCacheTypeNone); + return nil; + } + + // First check the in-memory cache... + UIImage *image = [self imageFromMemoryCacheForKey:key]; + if (image) { + doneBlock(image, SDImageCacheTypeMemory); + return nil; + } + + NSOperation *operation = [NSOperation new]; + dispatch_async(self.ioQueue, ^{ + if (operation.isCancelled) { + return; + } + + @autoreleasepool { + UIImage *diskImage = [self diskImageForKey:key]; + if (diskImage && self.shouldCacheImagesInMemory) { + NSUInteger cost = SDCacheCostForImage(diskImage); + [self.memCache setObject:diskImage forKey:key cost:cost]; + } + + dispatch_async(dispatch_get_main_queue(), ^{ + doneBlock(diskImage, SDImageCacheTypeDisk); + }); + } + }); + + return operation; +} + +- (void)removeImageForKey:(NSString *)key { + [self removeImageForKey:key withCompletion:nil]; +} + +- (void)removeImageForKey:(NSString *)key withCompletion:(SDWebImageNoParamsBlock)completion { + [self removeImageForKey:key fromDisk:YES withCompletion:completion]; +} + +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk { + [self removeImageForKey:key fromDisk:fromDisk withCompletion:nil]; +} + +- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk withCompletion:(SDWebImageNoParamsBlock)completion { + + if (key == nil) { + return; + } + + if (self.shouldCacheImagesInMemory) { + [self.memCache removeObjectForKey:key]; + } + + if (fromDisk) { + dispatch_async(self.ioQueue, ^{ + [_fileManager removeItemAtPath:[self defaultCachePathForKey:key] error:nil]; + + if (completion) { + dispatch_async(dispatch_get_main_queue(), ^{ + completion(); + }); + } + }); + } else if (completion){ + completion(); + } + +} + +- (void)setMaxMemoryCost:(NSUInteger)maxMemoryCost { + self.memCache.totalCostLimit = maxMemoryCost; +} + +- (NSUInteger)maxMemoryCost { + return self.memCache.totalCostLimit; +} + +- (NSUInteger)maxMemoryCountLimit { + return self.memCache.countLimit; +} + +- (void)setMaxMemoryCountLimit:(NSUInteger)maxCountLimit { + self.memCache.countLimit = maxCountLimit; +} + +- (void)clearMemory { + [self.memCache removeAllObjects]; +} + +- (void)clearDisk { + [self clearDiskOnCompletion:nil]; +} + +- (void)clearDiskOnCompletion:(SDWebImageNoParamsBlock)completion +{ + dispatch_async(self.ioQueue, ^{ + [_fileManager removeItemAtPath:self.diskCachePath error:nil]; + [_fileManager createDirectoryAtPath:self.diskCachePath + withIntermediateDirectories:YES + attributes:nil + error:NULL]; + + if (completion) { + dispatch_async(dispatch_get_main_queue(), ^{ + completion(); + }); + } + }); +} + +- (void)cleanDisk { + [self cleanDiskWithCompletionBlock:nil]; +} + +- (void)cleanDiskWithCompletionBlock:(SDWebImageNoParamsBlock)completionBlock { + dispatch_async(self.ioQueue, ^{ + NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES]; + NSArray *resourceKeys = @[NSURLIsDirectoryKey, NSURLContentModificationDateKey, NSURLTotalFileAllocatedSizeKey]; + + // This enumerator prefetches useful properties for our cache files. + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtURL:diskCacheURL + includingPropertiesForKeys:resourceKeys + options:NSDirectoryEnumerationSkipsHiddenFiles + errorHandler:NULL]; + + NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.maxCacheAge]; + NSMutableDictionary *cacheFiles = [NSMutableDictionary dictionary]; + NSUInteger currentCacheSize = 0; + + // Enumerate all of the files in the cache directory. This loop has two purposes: + // + // 1. Removing files that are older than the expiration date. + // 2. Storing file attributes for the size-based cleanup pass. + NSMutableArray *urlsToDelete = [[NSMutableArray alloc] init]; + for (NSURL *fileURL in fileEnumerator) { + NSDictionary *resourceValues = [fileURL resourceValuesForKeys:resourceKeys error:NULL]; + + // Skip directories. + if ([resourceValues[NSURLIsDirectoryKey] boolValue]) { + continue; + } + + // Remove files that are older than the expiration date; + NSDate *modificationDate = resourceValues[NSURLContentModificationDateKey]; + if ([[modificationDate laterDate:expirationDate] isEqualToDate:expirationDate]) { + [urlsToDelete addObject:fileURL]; + continue; + } + + // Store a reference to this file and account for its total size. + NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey]; + currentCacheSize += [totalAllocatedSize unsignedIntegerValue]; + [cacheFiles setObject:resourceValues forKey:fileURL]; + } + + for (NSURL *fileURL in urlsToDelete) { + [_fileManager removeItemAtURL:fileURL error:nil]; + } + + // If our remaining disk cache exceeds a configured maximum size, perform a second + // size-based cleanup pass. We delete the oldest files first. + if (self.maxCacheSize > 0 && currentCacheSize > self.maxCacheSize) { + // Target half of our maximum cache size for this cleanup pass. + const NSUInteger desiredCacheSize = self.maxCacheSize / 2; + + // Sort the remaining cache files by their last modification time (oldest first). + NSArray *sortedFiles = [cacheFiles keysSortedByValueWithOptions:NSSortConcurrent + usingComparator:^NSComparisonResult(id obj1, id obj2) { + return [obj1[NSURLContentModificationDateKey] compare:obj2[NSURLContentModificationDateKey]]; + }]; + + // Delete files until we fall below our desired cache size. + for (NSURL *fileURL in sortedFiles) { + if ([_fileManager removeItemAtURL:fileURL error:nil]) { + NSDictionary *resourceValues = cacheFiles[fileURL]; + NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey]; + currentCacheSize -= [totalAllocatedSize unsignedIntegerValue]; + + if (currentCacheSize < desiredCacheSize) { + break; + } + } + } + } + if (completionBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(); + }); + } + }); +} + +- (void)backgroundCleanDisk { + Class UIApplicationClass = NSClassFromString(@"UIApplication"); + if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) { + return; + } + UIApplication *application = [UIApplication performSelector:@selector(sharedApplication)]; + __block UIBackgroundTaskIdentifier bgTask = [application beginBackgroundTaskWithExpirationHandler:^{ + // Clean up any unfinished task business by marking where you + // stopped or ending the task outright. + [application endBackgroundTask:bgTask]; + bgTask = UIBackgroundTaskInvalid; + }]; + + // Start the long-running task and return immediately. + [self cleanDiskWithCompletionBlock:^{ + [application endBackgroundTask:bgTask]; + bgTask = UIBackgroundTaskInvalid; + }]; +} + +- (NSUInteger)getSize { + __block NSUInteger size = 0; + dispatch_sync(self.ioQueue, ^{ + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtPath:self.diskCachePath]; + for (NSString *fileName in fileEnumerator) { + NSString *filePath = [self.diskCachePath stringByAppendingPathComponent:fileName]; + NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil]; + size += [attrs fileSize]; + } + }); + return size; +} + +- (NSUInteger)getDiskCount { + __block NSUInteger count = 0; + dispatch_sync(self.ioQueue, ^{ + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtPath:self.diskCachePath]; + count = [[fileEnumerator allObjects] count]; + }); + return count; +} + +- (void)calculateSizeWithCompletionBlock:(SDWebImageCalculateSizeBlock)completionBlock { + NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES]; + + dispatch_async(self.ioQueue, ^{ + NSUInteger fileCount = 0; + NSUInteger totalSize = 0; + + NSDirectoryEnumerator *fileEnumerator = [_fileManager enumeratorAtURL:diskCacheURL + includingPropertiesForKeys:@[NSFileSize] + options:NSDirectoryEnumerationSkipsHiddenFiles + errorHandler:NULL]; + + for (NSURL *fileURL in fileEnumerator) { + NSNumber *fileSize; + [fileURL getResourceValue:&fileSize forKey:NSURLFileSizeKey error:NULL]; + totalSize += [fileSize unsignedIntegerValue]; + fileCount += 1; + } + + if (completionBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + completionBlock(fileCount, totalSize); + }); + } + }); +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h new file mode 100644 index 0000000..3c21b41 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h @@ -0,0 +1,72 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * (c) Jamie Pinkham + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import + +#ifdef __OBJC_GC__ +#error SDWebImage does not support Objective-C Garbage Collection +#endif + +#if __IPHONE_OS_VERSION_MIN_REQUIRED != 20000 && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0 +#error SDWebImage doesn't support Deployment Target version < 5.0 +#endif + +#if !TARGET_OS_IPHONE +#import +#ifndef UIImage +#define UIImage NSImage +#endif +#ifndef UIImageView +#define UIImageView NSImageView +#endif +#else + +#import + +#endif + +#ifndef NS_ENUM +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +#endif + +#ifndef NS_OPTIONS +#define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type +#endif + +#if OS_OBJECT_USE_OBJC + #undef SDDispatchQueueRelease + #undef SDDispatchQueueSetterSementics + #define SDDispatchQueueRelease(q) + #define SDDispatchQueueSetterSementics strong +#else +#undef SDDispatchQueueRelease +#undef SDDispatchQueueSetterSementics +#define SDDispatchQueueRelease(q) (dispatch_release(q)) +#define SDDispatchQueueSetterSementics assign +#endif + +extern UIImage *SDScaledImageForKey(NSString *key, UIImage *image); + +typedef void(^SDWebImageNoParamsBlock)(); + +extern NSString *const SDWebImageErrorDomain; + +#define dispatch_main_sync_safe(block)\ + if ([NSThread isMainThread]) {\ + block();\ + } else {\ + dispatch_sync(dispatch_get_main_queue(), block);\ + } + +#define dispatch_main_async_safe(block)\ + if ([NSThread isMainThread]) {\ + block();\ + } else {\ + dispatch_async(dispatch_get_main_queue(), block);\ + } diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m new file mode 100644 index 0000000..9a011bc --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m @@ -0,0 +1,51 @@ +// +// SDWebImageCompat.m +// SDWebImage +// +// Created by Olivier Poitrey on 11/12/12. +// Copyright (c) 2012 Dailymotion. All rights reserved. +// + +#import "SDWebImageCompat.h" + +#if !__has_feature(objc_arc) +#error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag +#endif + +inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) { + if (!image) { + return nil; + } + + if ([image.images count] > 0) { + NSMutableArray *scaledImages = [NSMutableArray array]; + + for (UIImage *tempImage in image.images) { + [scaledImages addObject:SDScaledImageForKey(key, tempImage)]; + } + + return [UIImage animatedImageWithImages:scaledImages duration:image.duration]; + } + else { + if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { + CGFloat scale = [UIScreen mainScreen].scale; + if (key.length >= 8) { + NSRange range = [key rangeOfString:@"@2x."]; + if (range.location != NSNotFound) { + scale = 2.0; + } + + range = [key rangeOfString:@"@3x."]; + if (range.location != NSNotFound) { + scale = 3.0; + } + } + + UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation]; + image = scaledImage; + } + return image; + } +} + +NSString *const SDWebImageErrorDomain = @"SDWebImageErrorDomain"; diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h new file mode 100644 index 0000000..0176a7b --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h @@ -0,0 +1,18 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * Created by james on 9/28/11. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" + +@interface UIImage (ForceDecode) + ++ (UIImage *)decodedImageWithImage:(UIImage *)image; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m new file mode 100644 index 0000000..a7c0246 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m @@ -0,0 +1,69 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * Created by james on 9/28/11. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageDecoder.h" + +@implementation UIImage (ForceDecode) + ++ (UIImage *)decodedImageWithImage:(UIImage *)image { + // while downloading huge amount of images + // autorelease the bitmap context + // and all vars to help system to free memory + // when there are memory warning. + // on iOS7, do not forget to call + // [[SDImageCache sharedImageCache] clearMemory]; + @autoreleasepool{ + // do not decode animated images + if (image.images) { return image; } + + CGImageRef imageRef = image.CGImage; + + CGImageAlphaInfo alpha = CGImageGetAlphaInfo(imageRef); + BOOL anyAlpha = (alpha == kCGImageAlphaFirst || + alpha == kCGImageAlphaLast || + alpha == kCGImageAlphaPremultipliedFirst || + alpha == kCGImageAlphaPremultipliedLast); + + if (anyAlpha) { return image; } + + size_t width = CGImageGetWidth(imageRef); + size_t height = CGImageGetHeight(imageRef); + + // current + CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(CGImageGetColorSpace(imageRef)); + CGColorSpaceRef colorspaceRef = CGImageGetColorSpace(imageRef); + + bool unsupportedColorSpace = (imageColorSpaceModel == 0 || imageColorSpaceModel == -1 || imageColorSpaceModel == kCGColorSpaceModelCMYK || imageColorSpaceModel == kCGColorSpaceModelIndexed); + if (unsupportedColorSpace) + colorspaceRef = CGColorSpaceCreateDeviceRGB(); + + CGContextRef context = CGBitmapContextCreate(NULL, width, + height, + CGImageGetBitsPerComponent(imageRef), + 0, + colorspaceRef, + kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst); + + // Draw the image into the context and retrieve the new image, which will now have an alpha layer + CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef); + CGImageRef imageRefWithAlpha = CGBitmapContextCreateImage(context); + UIImage *imageWithAlpha = [UIImage imageWithCGImage:imageRefWithAlpha scale:image.scale orientation:image.imageOrientation]; + + if (unsupportedColorSpace) + CGColorSpaceRelease(colorspaceRef); + + CGContextRelease(context); + CGImageRelease(imageRefWithAlpha); + + return imageWithAlpha; + } +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h new file mode 100644 index 0000000..b64fb13 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.h @@ -0,0 +1,191 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" +#import "SDWebImageOperation.h" + +typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) { + SDWebImageDownloaderLowPriority = 1 << 0, + SDWebImageDownloaderProgressiveDownload = 1 << 1, + + /** + * By default, request prevent the of NSURLCache. With this flag, NSURLCache + * is used with default policies. + */ + SDWebImageDownloaderUseNSURLCache = 1 << 2, + + /** + * Call completion block with nil image/imageData if the image was read from NSURLCache + * (to be combined with `SDWebImageDownloaderUseNSURLCache`). + */ + + SDWebImageDownloaderIgnoreCachedResponse = 1 << 3, + /** + * In iOS 4+, continue the download of the image if the app goes to background. This is achieved by asking the system for + * extra time in background to let the request finish. If the background task expires the operation will be cancelled. + */ + + SDWebImageDownloaderContinueInBackground = 1 << 4, + + /** + * Handles cookies stored in NSHTTPCookieStore by setting + * NSMutableURLRequest.HTTPShouldHandleCookies = YES; + */ + SDWebImageDownloaderHandleCookies = 1 << 5, + + /** + * Enable to allow untrusted SSL certificates. + * Useful for testing purposes. Use with caution in production. + */ + SDWebImageDownloaderAllowInvalidSSLCertificates = 1 << 6, + + /** + * Put the image in the high priority queue. + */ + SDWebImageDownloaderHighPriority = 1 << 7, +}; + +typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) { + /** + * Default value. All download operations will execute in queue style (first-in-first-out). + */ + SDWebImageDownloaderFIFOExecutionOrder, + + /** + * All download operations will execute in stack style (last-in-first-out). + */ + SDWebImageDownloaderLIFOExecutionOrder +}; + +extern NSString *const SDWebImageDownloadStartNotification; +extern NSString *const SDWebImageDownloadStopNotification; + +typedef void(^SDWebImageDownloaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize); + +typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data, NSError *error, BOOL finished); + +typedef NSDictionary *(^SDWebImageDownloaderHeadersFilterBlock)(NSURL *url, NSDictionary *headers); + +/** + * Asynchronous downloader dedicated and optimized for image loading. + */ +@interface SDWebImageDownloader : NSObject + +/** + * Decompressing images that are downloaded and cached can improve performance but can consume lot of memory. + * Defaults to YES. Set this to NO if you are experiencing a crash due to excessive memory consumption. + */ +@property (assign, nonatomic) BOOL shouldDecompressImages; + +@property (assign, nonatomic) NSInteger maxConcurrentDownloads; + +/** + * Shows the current amount of downloads that still need to be downloaded + */ +@property (readonly, nonatomic) NSUInteger currentDownloadCount; + + +/** + * The timeout value (in seconds) for the download operation. Default: 15.0. + */ +@property (assign, nonatomic) NSTimeInterval downloadTimeout; + + +/** + * Changes download operations execution order. Default value is `SDWebImageDownloaderFIFOExecutionOrder`. + */ +@property (assign, nonatomic) SDWebImageDownloaderExecutionOrder executionOrder; + +/** + * Singleton method, returns the shared instance + * + * @return global shared instance of downloader class + */ ++ (SDWebImageDownloader *)sharedDownloader; + +/** + * Set the default URL credential to be set for request operations. + */ +@property (strong, nonatomic) NSURLCredential *urlCredential; + +/** + * Set username + */ +@property (strong, nonatomic) NSString *username; + +/** + * Set password + */ +@property (strong, nonatomic) NSString *password; + +/** + * Set filter to pick headers for downloading image HTTP request. + * + * This block will be invoked for each downloading image request, returned + * NSDictionary will be used as headers in corresponding HTTP request. + */ +@property (nonatomic, copy) SDWebImageDownloaderHeadersFilterBlock headersFilter; + +/** + * Set a value for a HTTP header to be appended to each download HTTP request. + * + * @param value The value for the header field. Use `nil` value to remove the header. + * @param field The name of the header field to set. + */ +- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field; + +/** + * Returns the value of the specified HTTP header field. + * + * @return The value associated with the header field field, or `nil` if there is no corresponding header field. + */ +- (NSString *)valueForHTTPHeaderField:(NSString *)field; + +/** + * Sets a subclass of `SDWebImageDownloaderOperation` as the default + * `NSOperation` to be used each time SDWebImage constructs a request + * operation to download an image. + * + * @param operationClass The subclass of `SDWebImageDownloaderOperation` to set + * as default. Passing `nil` will revert to `SDWebImageDownloaderOperation`. + */ +- (void)setOperationClass:(Class)operationClass; + +/** + * Creates a SDWebImageDownloader async downloader instance with a given URL + * + * The delegate will be informed when the image is finish downloaded or an error has happen. + * + * @see SDWebImageDownloaderDelegate + * + * @param url The URL to the image to download + * @param options The options to be used for this download + * @param progressBlock A block called repeatedly while the image is downloading + * @param completedBlock A block called once the download is completed. + * If the download succeeded, the image parameter is set, in case of error, + * error parameter is set with the error. The last parameter is always YES + * if SDWebImageDownloaderProgressiveDownload isn't use. With the + * SDWebImageDownloaderProgressiveDownload option, this block is called + * repeatedly with the partial image object and the finished argument set to NO + * before to be called a last time with the full image and finished argument + * set to YES. In case of error, the finished argument is always YES. + * + * @return A cancellable SDWebImageOperation + */ +- (id )downloadImageWithURL:(NSURL *)url + options:(SDWebImageDownloaderOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageDownloaderCompletedBlock)completedBlock; + +/** + * Sets the download queue suspension state + */ +- (void)setSuspended:(BOOL)suspended; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m new file mode 100644 index 0000000..1fdcfc9 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloader.m @@ -0,0 +1,232 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageDownloader.h" +#import "SDWebImageDownloaderOperation.h" +#import + +static NSString *const kProgressCallbackKey = @"progress"; +static NSString *const kCompletedCallbackKey = @"completed"; + +@interface SDWebImageDownloader () + +@property (strong, nonatomic) NSOperationQueue *downloadQueue; +@property (weak, nonatomic) NSOperation *lastAddedOperation; +@property (assign, nonatomic) Class operationClass; +@property (strong, nonatomic) NSMutableDictionary *URLCallbacks; +@property (strong, nonatomic) NSMutableDictionary *HTTPHeaders; +// This queue is used to serialize the handling of the network responses of all the download operation in a single queue +@property (SDDispatchQueueSetterSementics, nonatomic) dispatch_queue_t barrierQueue; + +@end + +@implementation SDWebImageDownloader + ++ (void)initialize { + // Bind SDNetworkActivityIndicator if available (download it here: http://github.com/rs/SDNetworkActivityIndicator ) + // To use it, just add #import "SDNetworkActivityIndicator.h" in addition to the SDWebImage import + if (NSClassFromString(@"SDNetworkActivityIndicator")) { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-performSelector-leaks" + id activityIndicator = [NSClassFromString(@"SDNetworkActivityIndicator") performSelector:NSSelectorFromString(@"sharedActivityIndicator")]; +#pragma clang diagnostic pop + + // Remove observer in case it was previously added. + [[NSNotificationCenter defaultCenter] removeObserver:activityIndicator name:SDWebImageDownloadStartNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:activityIndicator name:SDWebImageDownloadStopNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:activityIndicator + selector:NSSelectorFromString(@"startActivity") + name:SDWebImageDownloadStartNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:activityIndicator + selector:NSSelectorFromString(@"stopActivity") + name:SDWebImageDownloadStopNotification object:nil]; + } +} + ++ (SDWebImageDownloader *)sharedDownloader { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + if ((self = [super init])) { + _operationClass = [SDWebImageDownloaderOperation class]; + _shouldDecompressImages = YES; + _executionOrder = SDWebImageDownloaderFIFOExecutionOrder; + _downloadQueue = [NSOperationQueue new]; + _downloadQueue.maxConcurrentOperationCount = 6; + _URLCallbacks = [NSMutableDictionary new]; +#ifdef SD_WEBP + _HTTPHeaders = [@{@"Accept": @"image/webp,image/*;q=0.8"} mutableCopy]; +#else + _HTTPHeaders = [@{@"Accept": @"image/*;q=0.8"} mutableCopy]; +#endif + _barrierQueue = dispatch_queue_create("com.hackemist.SDWebImageDownloaderBarrierQueue", DISPATCH_QUEUE_CONCURRENT); + _downloadTimeout = 15.0; + } + return self; +} + +- (void)dealloc { + [self.downloadQueue cancelAllOperations]; + SDDispatchQueueRelease(_barrierQueue); +} + +- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field { + if (value) { + self.HTTPHeaders[field] = value; + } + else { + [self.HTTPHeaders removeObjectForKey:field]; + } +} + +- (NSString *)valueForHTTPHeaderField:(NSString *)field { + return self.HTTPHeaders[field]; +} + +- (void)setMaxConcurrentDownloads:(NSInteger)maxConcurrentDownloads { + _downloadQueue.maxConcurrentOperationCount = maxConcurrentDownloads; +} + +- (NSUInteger)currentDownloadCount { + return _downloadQueue.operationCount; +} + +- (NSInteger)maxConcurrentDownloads { + return _downloadQueue.maxConcurrentOperationCount; +} + +- (void)setOperationClass:(Class)operationClass { + _operationClass = operationClass ?: [SDWebImageDownloaderOperation class]; +} + +- (id )downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageDownloaderCompletedBlock)completedBlock { + __block SDWebImageDownloaderOperation *operation; + __weak __typeof(self)wself = self; + + [self addProgressCallback:progressBlock completedBlock:completedBlock forURL:url createCallback:^{ + NSTimeInterval timeoutInterval = wself.downloadTimeout; + if (timeoutInterval == 0.0) { + timeoutInterval = 15.0; + } + + // In order to prevent from potential duplicate caching (NSURLCache + SDImageCache) we disable the cache for image requests if told otherwise + NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url cachePolicy:(options & SDWebImageDownloaderUseNSURLCache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData) timeoutInterval:timeoutInterval]; + request.HTTPShouldHandleCookies = (options & SDWebImageDownloaderHandleCookies); + request.HTTPShouldUsePipelining = YES; + if (wself.headersFilter) { + request.allHTTPHeaderFields = wself.headersFilter(url, [wself.HTTPHeaders copy]); + } + else { + request.allHTTPHeaderFields = wself.HTTPHeaders; + } + operation = [[wself.operationClass alloc] initWithRequest:request + options:options + progress:^(NSInteger receivedSize, NSInteger expectedSize) { + SDWebImageDownloader *sself = wself; + if (!sself) return; + __block NSArray *callbacksForURL; + dispatch_sync(sself.barrierQueue, ^{ + callbacksForURL = [sself.URLCallbacks[url] copy]; + }); + for (NSDictionary *callbacks in callbacksForURL) { + dispatch_async(dispatch_get_main_queue(), ^{ + SDWebImageDownloaderProgressBlock callback = callbacks[kProgressCallbackKey]; + if (callback) callback(receivedSize, expectedSize); + }); + } + } + completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) { + SDWebImageDownloader *sself = wself; + if (!sself) return; + __block NSArray *callbacksForURL; + dispatch_barrier_sync(sself.barrierQueue, ^{ + callbacksForURL = [sself.URLCallbacks[url] copy]; + if (finished) { + [sself.URLCallbacks removeObjectForKey:url]; + } + }); + for (NSDictionary *callbacks in callbacksForURL) { + SDWebImageDownloaderCompletedBlock callback = callbacks[kCompletedCallbackKey]; + if (callback) callback(image, data, error, finished); + } + } + cancelled:^{ + SDWebImageDownloader *sself = wself; + if (!sself) return; + dispatch_barrier_async(sself.barrierQueue, ^{ + [sself.URLCallbacks removeObjectForKey:url]; + }); + }]; + operation.shouldDecompressImages = wself.shouldDecompressImages; + + if (wself.urlCredential) { + operation.credential = wself.urlCredential; + } else if (wself.username && wself.password) { + operation.credential = [NSURLCredential credentialWithUser:wself.username password:wself.password persistence:NSURLCredentialPersistenceForSession]; + } + + if (options & SDWebImageDownloaderHighPriority) { + operation.queuePriority = NSOperationQueuePriorityHigh; + } else if (options & SDWebImageDownloaderLowPriority) { + operation.queuePriority = NSOperationQueuePriorityLow; + } + + [wself.downloadQueue addOperation:operation]; + if (wself.executionOrder == SDWebImageDownloaderLIFOExecutionOrder) { + // Emulate LIFO execution order by systematically adding new operations as last operation's dependency + [wself.lastAddedOperation addDependency:operation]; + wself.lastAddedOperation = operation; + } + }]; + + return operation; +} + +- (void)addProgressCallback:(SDWebImageDownloaderProgressBlock)progressBlock completedBlock:(SDWebImageDownloaderCompletedBlock)completedBlock forURL:(NSURL *)url createCallback:(SDWebImageNoParamsBlock)createCallback { + // The URL will be used as the key to the callbacks dictionary so it cannot be nil. If it is nil immediately call the completed block with no image or data. + if (url == nil) { + if (completedBlock != nil) { + completedBlock(nil, nil, nil, NO); + } + return; + } + + dispatch_barrier_sync(self.barrierQueue, ^{ + BOOL first = NO; + if (!self.URLCallbacks[url]) { + self.URLCallbacks[url] = [NSMutableArray new]; + first = YES; + } + + // Handle single download of simultaneous download request for the same URL + NSMutableArray *callbacksForURL = self.URLCallbacks[url]; + NSMutableDictionary *callbacks = [NSMutableDictionary new]; + if (progressBlock) callbacks[kProgressCallbackKey] = [progressBlock copy]; + if (completedBlock) callbacks[kCompletedCallbackKey] = [completedBlock copy]; + [callbacksForURL addObject:callbacks]; + self.URLCallbacks[url] = callbacksForURL; + + if (first) { + createCallback(); + } + }); +} + +- (void)setSuspended:(BOOL)suspended { + [self.downloadQueue setSuspended:suspended]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h new file mode 100644 index 0000000..dd48b22 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h @@ -0,0 +1,78 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageDownloader.h" +#import "SDWebImageOperation.h" + +extern NSString *const SDWebImageDownloadStartNotification; +extern NSString *const SDWebImageDownloadReceiveResponseNotification; +extern NSString *const SDWebImageDownloadStopNotification; +extern NSString *const SDWebImageDownloadFinishNotification; + +@interface SDWebImageDownloaderOperation : NSOperation + +/** + * The request used by the operation's connection. + */ +@property (strong, nonatomic, readonly) NSURLRequest *request; + + +@property (assign, nonatomic) BOOL shouldDecompressImages; + +/** + * Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default. + * + * This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`. + */ +@property (nonatomic, assign) BOOL shouldUseCredentialStorage; + +/** + * The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`. + * + * This will be overridden by any shared credentials that exist for the username or password of the request URL, if present. + */ +@property (nonatomic, strong) NSURLCredential *credential; + +/** + * The SDWebImageDownloaderOptions for the receiver. + */ +@property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options; + +/** + * The expected size of data. + */ +@property (assign, nonatomic) NSInteger expectedSize; + +/** + * The response returned by the operation's connection. + */ +@property (strong, nonatomic) NSURLResponse *response; + +/** + * Initializes a `SDWebImageDownloaderOperation` object + * + * @see SDWebImageDownloaderOperation + * + * @param request the URL request + * @param options downloader options + * @param progressBlock the block executed when a new chunk of data arrives. + * @note the progress block is executed on a background queue + * @param completedBlock the block executed when the download is done. + * @note the completed block is executed on the main queue for success. If errors are found, there is a chance the block will be executed on a background queue + * @param cancelBlock the block executed if the download (operation) is cancelled + * + * @return the initialized instance + */ +- (id)initWithRequest:(NSURLRequest *)request + options:(SDWebImageDownloaderOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageDownloaderCompletedBlock)completedBlock + cancelled:(SDWebImageNoParamsBlock)cancelBlock; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m new file mode 100644 index 0000000..5a8bd11 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.m @@ -0,0 +1,466 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageDownloaderOperation.h" +#import "SDWebImageDecoder.h" +#import "UIImage+MultiFormat.h" +#import +#import "SDWebImageManager.h" + +NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification"; +NSString *const SDWebImageDownloadReceiveResponseNotification = @"SDWebImageDownloadReceiveResponseNotification"; +NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification"; +NSString *const SDWebImageDownloadFinishNotification = @"SDWebImageDownloadFinishNotification"; + +@interface SDWebImageDownloaderOperation () + +@property (copy, nonatomic) SDWebImageDownloaderProgressBlock progressBlock; +@property (copy, nonatomic) SDWebImageDownloaderCompletedBlock completedBlock; +@property (copy, nonatomic) SDWebImageNoParamsBlock cancelBlock; + +@property (assign, nonatomic, getter = isExecuting) BOOL executing; +@property (assign, nonatomic, getter = isFinished) BOOL finished; +@property (strong, nonatomic) NSMutableData *imageData; +@property (strong, nonatomic) NSURLConnection *connection; +@property (strong, atomic) NSThread *thread; + +#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 +@property (assign, nonatomic) UIBackgroundTaskIdentifier backgroundTaskId; +#endif + +@end + +@implementation SDWebImageDownloaderOperation { + size_t width, height; + UIImageOrientation orientation; + BOOL responseFromCached; +} + +@synthesize executing = _executing; +@synthesize finished = _finished; + +- (id)initWithRequest:(NSURLRequest *)request + options:(SDWebImageDownloaderOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageDownloaderCompletedBlock)completedBlock + cancelled:(SDWebImageNoParamsBlock)cancelBlock { + if ((self = [super init])) { + _request = request; + _shouldDecompressImages = YES; + _shouldUseCredentialStorage = YES; + _options = options; + _progressBlock = [progressBlock copy]; + _completedBlock = [completedBlock copy]; + _cancelBlock = [cancelBlock copy]; + _executing = NO; + _finished = NO; + _expectedSize = 0; + responseFromCached = YES; // Initially wrong until `connection:willCacheResponse:` is called or not called + } + return self; +} + +- (void)start { + @synchronized (self) { + if (self.isCancelled) { + self.finished = YES; + [self reset]; + return; + } + +#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 + Class UIApplicationClass = NSClassFromString(@"UIApplication"); + BOOL hasApplication = UIApplicationClass && [UIApplicationClass respondsToSelector:@selector(sharedApplication)]; + if (hasApplication && [self shouldContinueWhenAppEntersBackground]) { + __weak __typeof__ (self) wself = self; + UIApplication * app = [UIApplicationClass performSelector:@selector(sharedApplication)]; + self.backgroundTaskId = [app beginBackgroundTaskWithExpirationHandler:^{ + __strong __typeof (wself) sself = wself; + + if (sself) { + [sself cancel]; + + [app endBackgroundTask:sself.backgroundTaskId]; + sself.backgroundTaskId = UIBackgroundTaskInvalid; + } + }]; + } +#endif + + self.executing = YES; + self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; + self.thread = [NSThread currentThread]; + } + + [self.connection start]; + + if (self.connection) { + if (self.progressBlock) { + self.progressBlock(0, NSURLResponseUnknownLength); + } + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self]; + }); + + if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_5_1) { + // Make sure to run the runloop in our background thread so it can process downloaded data + // Note: we use a timeout to work around an issue with NSURLConnection cancel under iOS 5 + // not waking up the runloop, leading to dead threads (see https://github.com/rs/SDWebImage/issues/466) + CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10, false); + } + else { + CFRunLoopRun(); + } + + if (!self.isFinished) { + [self.connection cancel]; + [self connection:self.connection didFailWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorTimedOut userInfo:@{NSURLErrorFailingURLErrorKey : self.request.URL}]]; + } + } + else { + if (self.completedBlock) { + self.completedBlock(nil, nil, [NSError errorWithDomain:NSURLErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"Connection can't be initialized"}], YES); + } + } + +#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0 + Class UIApplicationClass = NSClassFromString(@"UIApplication"); + if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) { + return; + } + if (self.backgroundTaskId != UIBackgroundTaskInvalid) { + UIApplication * app = [UIApplication performSelector:@selector(sharedApplication)]; + [app endBackgroundTask:self.backgroundTaskId]; + self.backgroundTaskId = UIBackgroundTaskInvalid; + } +#endif +} + +- (void)cancel { + @synchronized (self) { + if (self.thread) { + [self performSelector:@selector(cancelInternalAndStop) onThread:self.thread withObject:nil waitUntilDone:NO]; + } + else { + [self cancelInternal]; + } + } +} + +- (void)cancelInternalAndStop { + if (self.isFinished) return; + [self cancelInternal]; + CFRunLoopStop(CFRunLoopGetCurrent()); +} + +- (void)cancelInternal { + if (self.isFinished) return; + [super cancel]; + if (self.cancelBlock) self.cancelBlock(); + + if (self.connection) { + [self.connection cancel]; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + }); + + // As we cancelled the connection, its callback won't be called and thus won't + // maintain the isFinished and isExecuting flags. + if (self.isExecuting) self.executing = NO; + if (!self.isFinished) self.finished = YES; + } + + [self reset]; +} + +- (void)done { + self.finished = YES; + self.executing = NO; + [self reset]; +} + +- (void)reset { + self.cancelBlock = nil; + self.completedBlock = nil; + self.progressBlock = nil; + self.connection = nil; + self.imageData = nil; + self.thread = nil; +} + +- (void)setFinished:(BOOL)finished { + [self willChangeValueForKey:@"isFinished"]; + _finished = finished; + [self didChangeValueForKey:@"isFinished"]; +} + +- (void)setExecuting:(BOOL)executing { + [self willChangeValueForKey:@"isExecuting"]; + _executing = executing; + [self didChangeValueForKey:@"isExecuting"]; +} + +- (BOOL)isConcurrent { + return YES; +} + +#pragma mark NSURLConnection (delegate) + +- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { + + //'304 Not Modified' is an exceptional one + if (![response respondsToSelector:@selector(statusCode)] || ([((NSHTTPURLResponse *)response) statusCode] < 400 && [((NSHTTPURLResponse *)response) statusCode] != 304)) { + NSInteger expected = response.expectedContentLength > 0 ? (NSInteger)response.expectedContentLength : 0; + self.expectedSize = expected; + if (self.progressBlock) { + self.progressBlock(0, expected); + } + + self.imageData = [[NSMutableData alloc] initWithCapacity:expected]; + self.response = response; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:self]; + }); + } + else { + NSUInteger code = [((NSHTTPURLResponse *)response) statusCode]; + + //This is the case when server returns '304 Not Modified'. It means that remote image is not changed. + //In case of 304 we need just cancel the operation and return cached image from the cache. + if (code == 304) { + [self cancelInternal]; + } else { + [self.connection cancel]; + } + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + }); + + if (self.completedBlock) { + self.completedBlock(nil, nil, [NSError errorWithDomain:NSURLErrorDomain code:[((NSHTTPURLResponse *)response) statusCode] userInfo:nil], YES); + } + CFRunLoopStop(CFRunLoopGetCurrent()); + [self done]; + } +} + +- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { + [self.imageData appendData:data]; + + if ((self.options & SDWebImageDownloaderProgressiveDownload) && self.expectedSize > 0 && self.completedBlock) { + // The following code is from http://www.cocoaintheshell.com/2011/05/progressive-images-download-imageio/ + // Thanks to the author @Nyx0uf + + // Get the total bytes downloaded + const NSInteger totalSize = self.imageData.length; + + // Update the data source, we must pass ALL the data, not just the new bytes + CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)self.imageData, NULL); + + if (width + height == 0) { + CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL); + if (properties) { + NSInteger orientationValue = -1; + CFTypeRef val = CFDictionaryGetValue(properties, kCGImagePropertyPixelHeight); + if (val) CFNumberGetValue(val, kCFNumberLongType, &height); + val = CFDictionaryGetValue(properties, kCGImagePropertyPixelWidth); + if (val) CFNumberGetValue(val, kCFNumberLongType, &width); + val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation); + if (val) CFNumberGetValue(val, kCFNumberNSIntegerType, &orientationValue); + CFRelease(properties); + + // When we draw to Core Graphics, we lose orientation information, + // which means the image below born of initWithCGIImage will be + // oriented incorrectly sometimes. (Unlike the image born of initWithData + // in connectionDidFinishLoading.) So save it here and pass it on later. + orientation = [[self class] orientationFromPropertyValue:(orientationValue == -1 ? 1 : orientationValue)]; + } + + } + + if (width + height > 0 && totalSize < self.expectedSize) { + // Create the image + CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(imageSource, 0, NULL); + +#ifdef TARGET_OS_IPHONE + // Workaround for iOS anamorphic image + if (partialImageRef) { + const size_t partialHeight = CGImageGetHeight(partialImageRef); + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGContextRef bmContext = CGBitmapContextCreate(NULL, width, height, 8, width * 4, colorSpace, kCGBitmapByteOrderDefault | kCGImageAlphaPremultipliedFirst); + CGColorSpaceRelease(colorSpace); + if (bmContext) { + CGContextDrawImage(bmContext, (CGRect){.origin.x = 0.0f, .origin.y = 0.0f, .size.width = width, .size.height = partialHeight}, partialImageRef); + CGImageRelease(partialImageRef); + partialImageRef = CGBitmapContextCreateImage(bmContext); + CGContextRelease(bmContext); + } + else { + CGImageRelease(partialImageRef); + partialImageRef = nil; + } + } +#endif + + if (partialImageRef) { + UIImage *image = [UIImage imageWithCGImage:partialImageRef scale:1 orientation:orientation]; + NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL]; + UIImage *scaledImage = [self scaledImageForKey:key image:image]; + if (self.shouldDecompressImages) { + image = [UIImage decodedImageWithImage:scaledImage]; + } + else { + image = scaledImage; + } + CGImageRelease(partialImageRef); + dispatch_main_sync_safe(^{ + if (self.completedBlock) { + self.completedBlock(image, nil, nil, NO); + } + }); + } + } + + CFRelease(imageSource); + } + + if (self.progressBlock) { + self.progressBlock(self.imageData.length, self.expectedSize); + } +} + ++ (UIImageOrientation)orientationFromPropertyValue:(NSInteger)value { + switch (value) { + case 1: + return UIImageOrientationUp; + case 3: + return UIImageOrientationDown; + case 8: + return UIImageOrientationLeft; + case 6: + return UIImageOrientationRight; + case 2: + return UIImageOrientationUpMirrored; + case 4: + return UIImageOrientationDownMirrored; + case 5: + return UIImageOrientationLeftMirrored; + case 7: + return UIImageOrientationRightMirrored; + default: + return UIImageOrientationUp; + } +} + +- (UIImage *)scaledImageForKey:(NSString *)key image:(UIImage *)image { + return SDScaledImageForKey(key, image); +} + +- (void)connectionDidFinishLoading:(NSURLConnection *)aConnection { + SDWebImageDownloaderCompletedBlock completionBlock = self.completedBlock; + @synchronized(self) { + CFRunLoopStop(CFRunLoopGetCurrent()); + self.thread = nil; + self.connection = nil; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadFinishNotification object:self]; + }); + } + + if (![[NSURLCache sharedURLCache] cachedResponseForRequest:_request]) { + responseFromCached = NO; + } + + if (completionBlock) { + if (self.options & SDWebImageDownloaderIgnoreCachedResponse && responseFromCached) { + completionBlock(nil, nil, nil, YES); + } else if (self.imageData) { + UIImage *image = [UIImage sd_imageWithData:self.imageData]; + NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL]; + image = [self scaledImageForKey:key image:image]; + + // Do not force decoding animated GIFs + if (!image.images) { + if (self.shouldDecompressImages) { + image = [UIImage decodedImageWithImage:image]; + } + } + if (CGSizeEqualToSize(image.size, CGSizeZero)) { + completionBlock(nil, nil, [NSError errorWithDomain:SDWebImageErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"Downloaded image has 0 pixels"}], YES); + } + else { + completionBlock(image, self.imageData, nil, YES); + } + } else { + completionBlock(nil, nil, [NSError errorWithDomain:SDWebImageErrorDomain code:0 userInfo:@{NSLocalizedDescriptionKey : @"Image data is nil"}], YES); + } + } + self.completionBlock = nil; + [self done]; +} + +- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { + @synchronized(self) { + CFRunLoopStop(CFRunLoopGetCurrent()); + self.thread = nil; + self.connection = nil; + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:self]; + }); + } + + if (self.completedBlock) { + self.completedBlock(nil, nil, error, YES); + } + self.completionBlock = nil; + [self done]; +} + +- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse { + responseFromCached = NO; // If this method is called, it means the response wasn't read from cache + if (self.request.cachePolicy == NSURLRequestReloadIgnoringLocalCacheData) { + // Prevents caching of responses + return nil; + } + else { + return cachedResponse; + } +} + +- (BOOL)shouldContinueWhenAppEntersBackground { + return self.options & SDWebImageDownloaderContinueInBackground; +} + +- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection { + return self.shouldUseCredentialStorage; +} + +- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge{ + if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { + if (!(self.options & SDWebImageDownloaderAllowInvalidSSLCertificates) && + [challenge.sender respondsToSelector:@selector(performDefaultHandlingForAuthenticationChallenge:)]) { + [challenge.sender performDefaultHandlingForAuthenticationChallenge:challenge]; + } else { + NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; + } + } else { + if ([challenge previousFailureCount] == 0) { + if (self.credential) { + [[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge]; + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } else { + [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; + } + } +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageManager.h b/Pods/SDWebImage/SDWebImage/SDWebImageManager.h new file mode 100644 index 0000000..18e578a --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageManager.h @@ -0,0 +1,299 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageCompat.h" +#import "SDWebImageOperation.h" +#import "SDWebImageDownloader.h" +#import "SDImageCache.h" + +typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) { + /** + * By default, when a URL fail to be downloaded, the URL is blacklisted so the library won't keep trying. + * This flag disable this blacklisting. + */ + SDWebImageRetryFailed = 1 << 0, + + /** + * By default, image downloads are started during UI interactions, this flags disable this feature, + * leading to delayed download on UIScrollView deceleration for instance. + */ + SDWebImageLowPriority = 1 << 1, + + /** + * This flag disables on-disk caching + */ + SDWebImageCacheMemoryOnly = 1 << 2, + + /** + * This flag enables progressive download, the image is displayed progressively during download as a browser would do. + * By default, the image is only displayed once completely downloaded. + */ + SDWebImageProgressiveDownload = 1 << 3, + + /** + * Even if the image is cached, respect the HTTP response cache control, and refresh the image from remote location if needed. + * The disk caching will be handled by NSURLCache instead of SDWebImage leading to slight performance degradation. + * This option helps deal with images changing behind the same request URL, e.g. Facebook graph api profile pics. + * If a cached image is refreshed, the completion block is called once with the cached image and again with the final image. + * + * Use this flag only if you can't make your URLs static with embedded cache busting parameter. + */ + SDWebImageRefreshCached = 1 << 4, + + /** + * In iOS 4+, continue the download of the image if the app goes to background. This is achieved by asking the system for + * extra time in background to let the request finish. If the background task expires the operation will be cancelled. + */ + SDWebImageContinueInBackground = 1 << 5, + + /** + * Handles cookies stored in NSHTTPCookieStore by setting + * NSMutableURLRequest.HTTPShouldHandleCookies = YES; + */ + SDWebImageHandleCookies = 1 << 6, + + /** + * Enable to allow untrusted SSL certificates. + * Useful for testing purposes. Use with caution in production. + */ + SDWebImageAllowInvalidSSLCertificates = 1 << 7, + + /** + * By default, image are loaded in the order they were queued. This flag move them to + * the front of the queue and is loaded immediately instead of waiting for the current queue to be loaded (which + * could take a while). + */ + SDWebImageHighPriority = 1 << 8, + + /** + * By default, placeholder images are loaded while the image is loading. This flag will delay the loading + * of the placeholder image until after the image has finished loading. + */ + SDWebImageDelayPlaceholder = 1 << 9, + + /** + * We usually don't call transformDownloadedImage delegate method on animated images, + * as most transformation code would mangle it. + * Use this flag to transform them anyway. + */ + SDWebImageTransformAnimatedImage = 1 << 10, + + /** + * By default, image is added to the imageView after download. But in some cases, we want to + * have the hand before setting the image (apply a filter or add it with cross-fade animation for instance) + * Use this flag if you want to manually set the image in the completion when success + */ + SDWebImageAvoidAutoSetImage = 1 << 11 +}; + +typedef void(^SDWebImageCompletionBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL); + +typedef void(^SDWebImageCompletionWithFinishedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL); + +typedef NSString *(^SDWebImageCacheKeyFilterBlock)(NSURL *url); + + +@class SDWebImageManager; + +@protocol SDWebImageManagerDelegate + +@optional + +/** + * Controls which image should be downloaded when the image is not found in the cache. + * + * @param imageManager The current `SDWebImageManager` + * @param imageURL The url of the image to be downloaded + * + * @return Return NO to prevent the downloading of the image on cache misses. If not implemented, YES is implied. + */ +- (BOOL)imageManager:(SDWebImageManager *)imageManager shouldDownloadImageForURL:(NSURL *)imageURL; + +/** + * Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory. + * NOTE: This method is called from a global queue in order to not to block the main thread. + * + * @param imageManager The current `SDWebImageManager` + * @param image The image to transform + * @param imageURL The url of the image to transform + * + * @return The transformed image object. + */ +- (UIImage *)imageManager:(SDWebImageManager *)imageManager transformDownloadedImage:(UIImage *)image withURL:(NSURL *)imageURL; + +@end + +/** + * The SDWebImageManager is the class behind the UIImageView+WebCache category and likes. + * It ties the asynchronous downloader (SDWebImageDownloader) with the image cache store (SDImageCache). + * You can use this class directly to benefit from web image downloading with caching in another context than + * a UIView. + * + * Here is a simple example of how to use SDWebImageManager: + * + * @code + +SDWebImageManager *manager = [SDWebImageManager sharedManager]; +[manager downloadImageWithURL:imageURL + options:0 + progress:nil + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (image) { + // do something with image + } + }]; + + * @endcode + */ +@interface SDWebImageManager : NSObject + +@property (weak, nonatomic) id delegate; + +@property (strong, nonatomic, readonly) SDImageCache *imageCache; +@property (strong, nonatomic, readonly) SDWebImageDownloader *imageDownloader; + +/** + * The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can + * be used to remove dynamic part of an image URL. + * + * The following example sets a filter in the application delegate that will remove any query-string from the + * URL before to use it as a cache key: + * + * @code + +[[SDWebImageManager sharedManager] setCacheKeyFilter:^(NSURL *url) { + url = [[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path]; + return [url absoluteString]; +}]; + + * @endcode + */ +@property (nonatomic, copy) SDWebImageCacheKeyFilterBlock cacheKeyFilter; + +/** + * Returns global SDWebImageManager instance. + * + * @return SDWebImageManager shared instance + */ ++ (SDWebImageManager *)sharedManager; + +/** + * Downloads the image at the given URL if not present in cache or return the cached version otherwise. + * + * @param url The URL to the image + * @param options A mask to specify options to use for this request + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. + * + * This parameter is required. + * + * This block has no return value and takes the requested UIImage as first parameter. + * In case of error the image parameter is nil and the second parameter may contain an NSError. + * + * The third parameter is an `SDImageCacheType` enum indicating if the image was retrieved from the local cache + * or from the memory cache or from the network. + * + * The last parameter is set to NO when the SDWebImageProgressiveDownload option is used and the image is + * downloading. This block is thus called repeatedly with a partial image. When image is fully downloaded, the + * block is called a last time with the full image and the last parameter set to YES. + * + * @return Returns an NSObject conforming to SDWebImageOperation. Should be an instance of SDWebImageDownloaderOperation + */ +- (id )downloadImageWithURL:(NSURL *)url + options:(SDWebImageOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageCompletionWithFinishedBlock)completedBlock; + +/** + * Saves image to cache for given URL + * + * @param image The image to cache + * @param url The URL to the image + * + */ + +- (void)saveImageToCache:(UIImage *)image forURL:(NSURL *)url; + +/** + * Cancel all current operations + */ +- (void)cancelAll; + +/** + * Check one or more operations running + */ +- (BOOL)isRunning; + +/** + * Check if image has already been cached + * + * @param url image url + * + * @return if the image was already cached + */ +- (BOOL)cachedImageExistsForURL:(NSURL *)url; + +/** + * Check if image has already been cached on disk only + * + * @param url image url + * + * @return if the image was already cached (disk only) + */ +- (BOOL)diskImageExistsForURL:(NSURL *)url; + +/** + * Async check if image has already been cached + * + * @param url image url + * @param completionBlock the block to be executed when the check is finished + * + * @note the completion block is always executed on the main queue + */ +- (void)cachedImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock; + +/** + * Async check if image has already been cached on disk only + * + * @param url image url + * @param completionBlock the block to be executed when the check is finished + * + * @note the completion block is always executed on the main queue + */ +- (void)diskImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock; + + +/** + *Return the cache key for a given URL + */ +- (NSString *)cacheKeyForURL:(NSURL *)url; + +@end + + +#pragma mark - Deprecated + +typedef void(^SDWebImageCompletedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType) __deprecated_msg("Block type deprecated. Use `SDWebImageCompletionBlock`"); +typedef void(^SDWebImageCompletedWithFinishedBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished) __deprecated_msg("Block type deprecated. Use `SDWebImageCompletionWithFinishedBlock`"); + + +@interface SDWebImageManager (Deprecated) + +/** + * Downloads the image at the given URL if not present in cache or return the cached version otherwise. + * + * @deprecated This method has been deprecated. Use `downloadImageWithURL:options:progress:completed:` + */ +- (id )downloadWithURL:(NSURL *)url + options:(SDWebImageOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageCompletedWithFinishedBlock)completedBlock __deprecated_msg("Method deprecated. Use `downloadImageWithURL:options:progress:completed:`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageManager.m b/Pods/SDWebImage/SDWebImage/SDWebImageManager.m new file mode 100644 index 0000000..c804ee9 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageManager.m @@ -0,0 +1,370 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageManager.h" +#import + +@interface SDWebImageCombinedOperation : NSObject + +@property (assign, nonatomic, getter = isCancelled) BOOL cancelled; +@property (copy, nonatomic) SDWebImageNoParamsBlock cancelBlock; +@property (strong, nonatomic) NSOperation *cacheOperation; + +@end + +@interface SDWebImageManager () + +@property (strong, nonatomic, readwrite) SDImageCache *imageCache; +@property (strong, nonatomic, readwrite) SDWebImageDownloader *imageDownloader; +@property (strong, nonatomic) NSMutableSet *failedURLs; +@property (strong, nonatomic) NSMutableArray *runningOperations; + +@end + +@implementation SDWebImageManager + ++ (id)sharedManager { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + if ((self = [super init])) { + _imageCache = [self createCache]; + _imageDownloader = [SDWebImageDownloader sharedDownloader]; + _failedURLs = [NSMutableSet new]; + _runningOperations = [NSMutableArray new]; + } + return self; +} + +- (SDImageCache *)createCache { + return [SDImageCache sharedImageCache]; +} + +- (NSString *)cacheKeyForURL:(NSURL *)url { + if (self.cacheKeyFilter) { + return self.cacheKeyFilter(url); + } + else { + return [url absoluteString]; + } +} + +- (BOOL)cachedImageExistsForURL:(NSURL *)url { + NSString *key = [self cacheKeyForURL:url]; + if ([self.imageCache imageFromMemoryCacheForKey:key] != nil) return YES; + return [self.imageCache diskImageExistsWithKey:key]; +} + +- (BOOL)diskImageExistsForURL:(NSURL *)url { + NSString *key = [self cacheKeyForURL:url]; + return [self.imageCache diskImageExistsWithKey:key]; +} + +- (void)cachedImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock { + NSString *key = [self cacheKeyForURL:url]; + + BOOL isInMemoryCache = ([self.imageCache imageFromMemoryCacheForKey:key] != nil); + + if (isInMemoryCache) { + // making sure we call the completion block on the main queue + dispatch_async(dispatch_get_main_queue(), ^{ + if (completionBlock) { + completionBlock(YES); + } + }); + return; + } + + [self.imageCache diskImageExistsWithKey:key completion:^(BOOL isInDiskCache) { + // the completion block of checkDiskCacheForImageWithKey:completion: is always called on the main queue, no need to further dispatch + if (completionBlock) { + completionBlock(isInDiskCache); + } + }]; +} + +- (void)diskImageExistsForURL:(NSURL *)url + completion:(SDWebImageCheckCacheCompletionBlock)completionBlock { + NSString *key = [self cacheKeyForURL:url]; + + [self.imageCache diskImageExistsWithKey:key completion:^(BOOL isInDiskCache) { + // the completion block of checkDiskCacheForImageWithKey:completion: is always called on the main queue, no need to further dispatch + if (completionBlock) { + completionBlock(isInDiskCache); + } + }]; +} + +- (id )downloadImageWithURL:(NSURL *)url + options:(SDWebImageOptions)options + progress:(SDWebImageDownloaderProgressBlock)progressBlock + completed:(SDWebImageCompletionWithFinishedBlock)completedBlock { + // Invoking this method without a completedBlock is pointless + NSAssert(completedBlock != nil, @"If you mean to prefetch the image, use -[SDWebImagePrefetcher prefetchURLs] instead"); + + // Very common mistake is to send the URL using NSString object instead of NSURL. For some strange reason, XCode won't + // throw any warning for this type mismatch. Here we failsafe this error by allowing URLs to be passed as NSString. + if ([url isKindOfClass:NSString.class]) { + url = [NSURL URLWithString:(NSString *)url]; + } + + // Prevents app crashing on argument type error like sending NSNull instead of NSURL + if (![url isKindOfClass:NSURL.class]) { + url = nil; + } + + __block SDWebImageCombinedOperation *operation = [SDWebImageCombinedOperation new]; + __weak SDWebImageCombinedOperation *weakOperation = operation; + + BOOL isFailedUrl = NO; + @synchronized (self.failedURLs) { + isFailedUrl = [self.failedURLs containsObject:url]; + } + + if (url.absoluteString.length == 0 || (!(options & SDWebImageRetryFailed) && isFailedUrl)) { + dispatch_main_sync_safe(^{ + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist userInfo:nil]; + completedBlock(nil, error, SDImageCacheTypeNone, YES, url); + }); + return operation; + } + + @synchronized (self.runningOperations) { + [self.runningOperations addObject:operation]; + } + NSString *key = [self cacheKeyForURL:url]; + + operation.cacheOperation = [self.imageCache queryDiskCacheForKey:key done:^(UIImage *image, SDImageCacheType cacheType) { + if (operation.isCancelled) { + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:operation]; + } + + return; + } + + if ((!image || options & SDWebImageRefreshCached) && (![self.delegate respondsToSelector:@selector(imageManager:shouldDownloadImageForURL:)] || [self.delegate imageManager:self shouldDownloadImageForURL:url])) { + if (image && options & SDWebImageRefreshCached) { + dispatch_main_sync_safe(^{ + // If image was found in the cache but SDWebImageRefreshCached is provided, notify about the cached image + // AND try to re-download it in order to let a chance to NSURLCache to refresh it from server. + completedBlock(image, nil, cacheType, YES, url); + }); + } + + // download if no image or requested to refresh anyway, and download allowed by delegate + SDWebImageDownloaderOptions downloaderOptions = 0; + if (options & SDWebImageLowPriority) downloaderOptions |= SDWebImageDownloaderLowPriority; + if (options & SDWebImageProgressiveDownload) downloaderOptions |= SDWebImageDownloaderProgressiveDownload; + if (options & SDWebImageRefreshCached) downloaderOptions |= SDWebImageDownloaderUseNSURLCache; + if (options & SDWebImageContinueInBackground) downloaderOptions |= SDWebImageDownloaderContinueInBackground; + if (options & SDWebImageHandleCookies) downloaderOptions |= SDWebImageDownloaderHandleCookies; + if (options & SDWebImageAllowInvalidSSLCertificates) downloaderOptions |= SDWebImageDownloaderAllowInvalidSSLCertificates; + if (options & SDWebImageHighPriority) downloaderOptions |= SDWebImageDownloaderHighPriority; + if (image && options & SDWebImageRefreshCached) { + // force progressive off if image already cached but forced refreshing + downloaderOptions &= ~SDWebImageDownloaderProgressiveDownload; + // ignore image read from NSURLCache if image if cached but force refreshing + downloaderOptions |= SDWebImageDownloaderIgnoreCachedResponse; + } + id subOperation = [self.imageDownloader downloadImageWithURL:url options:downloaderOptions progress:progressBlock completed:^(UIImage *downloadedImage, NSData *data, NSError *error, BOOL finished) { + __strong __typeof(weakOperation) strongOperation = weakOperation; + if (!strongOperation || strongOperation.isCancelled) { + // Do nothing if the operation was cancelled + // See #699 for more details + // if we would call the completedBlock, there could be a race condition between this block and another completedBlock for the same object, so if this one is called second, we will overwrite the new data + } + else if (error) { + dispatch_main_sync_safe(^{ + if (strongOperation && !strongOperation.isCancelled) { + completedBlock(nil, error, SDImageCacheTypeNone, finished, url); + } + }); + + if ( error.code != NSURLErrorNotConnectedToInternet + && error.code != NSURLErrorCancelled + && error.code != NSURLErrorTimedOut + && error.code != NSURLErrorInternationalRoamingOff + && error.code != NSURLErrorDataNotAllowed + && error.code != NSURLErrorCannotFindHost + && error.code != NSURLErrorCannotConnectToHost) { + @synchronized (self.failedURLs) { + [self.failedURLs addObject:url]; + } + } + } + else { + if ((options & SDWebImageRetryFailed)) { + @synchronized (self.failedURLs) { + [self.failedURLs removeObject:url]; + } + } + + BOOL cacheOnDisk = !(options & SDWebImageCacheMemoryOnly); + + if (options & SDWebImageRefreshCached && image && !downloadedImage) { + // Image refresh hit the NSURLCache cache, do not call the completion block + } + else if (downloadedImage && (!downloadedImage.images || (options & SDWebImageTransformAnimatedImage)) && [self.delegate respondsToSelector:@selector(imageManager:transformDownloadedImage:withURL:)]) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ + UIImage *transformedImage = [self.delegate imageManager:self transformDownloadedImage:downloadedImage withURL:url]; + + if (transformedImage && finished) { + BOOL imageWasTransformed = ![transformedImage isEqual:downloadedImage]; + [self.imageCache storeImage:transformedImage recalculateFromImage:imageWasTransformed imageData:(imageWasTransformed ? nil : data) forKey:key toDisk:cacheOnDisk]; + } + + dispatch_main_sync_safe(^{ + if (strongOperation && !strongOperation.isCancelled) { + completedBlock(transformedImage, nil, SDImageCacheTypeNone, finished, url); + } + }); + }); + } + else { + if (downloadedImage && finished) { + [self.imageCache storeImage:downloadedImage recalculateFromImage:NO imageData:data forKey:key toDisk:cacheOnDisk]; + } + + dispatch_main_sync_safe(^{ + if (strongOperation && !strongOperation.isCancelled) { + completedBlock(downloadedImage, nil, SDImageCacheTypeNone, finished, url); + } + }); + } + } + + if (finished) { + @synchronized (self.runningOperations) { + if (strongOperation) { + [self.runningOperations removeObject:strongOperation]; + } + } + } + }]; + operation.cancelBlock = ^{ + [subOperation cancel]; + + @synchronized (self.runningOperations) { + __strong __typeof(weakOperation) strongOperation = weakOperation; + if (strongOperation) { + [self.runningOperations removeObject:strongOperation]; + } + } + }; + } + else if (image) { + dispatch_main_sync_safe(^{ + __strong __typeof(weakOperation) strongOperation = weakOperation; + if (strongOperation && !strongOperation.isCancelled) { + completedBlock(image, nil, cacheType, YES, url); + } + }); + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:operation]; + } + } + else { + // Image not in cache and download disallowed by delegate + dispatch_main_sync_safe(^{ + __strong __typeof(weakOperation) strongOperation = weakOperation; + if (strongOperation && !weakOperation.isCancelled) { + completedBlock(nil, nil, SDImageCacheTypeNone, YES, url); + } + }); + @synchronized (self.runningOperations) { + [self.runningOperations removeObject:operation]; + } + } + }]; + + return operation; +} + +- (void)saveImageToCache:(UIImage *)image forURL:(NSURL *)url { + if (image && url) { + NSString *key = [self cacheKeyForURL:url]; + [self.imageCache storeImage:image forKey:key toDisk:YES]; + } +} + +- (void)cancelAll { + @synchronized (self.runningOperations) { + NSArray *copiedOperations = [self.runningOperations copy]; + [copiedOperations makeObjectsPerformSelector:@selector(cancel)]; + [self.runningOperations removeObjectsInArray:copiedOperations]; + } +} + +- (BOOL)isRunning { + BOOL isRunning = NO; + @synchronized(self.runningOperations) { + isRunning = (self.runningOperations.count > 0); + } + return isRunning; +} + +@end + + +@implementation SDWebImageCombinedOperation + +- (void)setCancelBlock:(SDWebImageNoParamsBlock)cancelBlock { + // check if the operation is already cancelled, then we just call the cancelBlock + if (self.isCancelled) { + if (cancelBlock) { + cancelBlock(); + } + _cancelBlock = nil; // don't forget to nil the cancelBlock, otherwise we will get crashes + } else { + _cancelBlock = [cancelBlock copy]; + } +} + +- (void)cancel { + self.cancelled = YES; + if (self.cacheOperation) { + [self.cacheOperation cancel]; + self.cacheOperation = nil; + } + if (self.cancelBlock) { + self.cancelBlock(); + + // TODO: this is a temporary fix to #809. + // Until we can figure the exact cause of the crash, going with the ivar instead of the setter +// self.cancelBlock = nil; + _cancelBlock = nil; + } +} + +@end + + +@implementation SDWebImageManager (Deprecated) + +// deprecated method, uses the non deprecated method +// adapter for the completion block +- (id )downloadWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedWithFinishedBlock)completedBlock { + return [self downloadImageWithURL:url + options:options + progress:progressBlock + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType, finished); + } + }]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h b/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h new file mode 100644 index 0000000..71094ee --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h @@ -0,0 +1,15 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import + +@protocol SDWebImageOperation + +- (void)cancel; + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h new file mode 100644 index 0000000..6c31b15 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h @@ -0,0 +1,108 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageManager.h" + +@class SDWebImagePrefetcher; + +@protocol SDWebImagePrefetcherDelegate + +@optional + +/** + * Called when an image was prefetched. + * + * @param imagePrefetcher The current image prefetcher + * @param imageURL The image url that was prefetched + * @param finishedCount The total number of images that were prefetched (successful or not) + * @param totalCount The total number of images that were to be prefetched + */ +- (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didPrefetchURL:(NSURL *)imageURL finishedCount:(NSUInteger)finishedCount totalCount:(NSUInteger)totalCount; + +/** + * Called when all images are prefetched. + * @param imagePrefetcher The current image prefetcher + * @param totalCount The total number of images that were prefetched (whether successful or not) + * @param skippedCount The total number of images that were skipped + */ +- (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didFinishWithTotalCount:(NSUInteger)totalCount skippedCount:(NSUInteger)skippedCount; + +@end + +typedef void(^SDWebImagePrefetcherProgressBlock)(NSUInteger noOfFinishedUrls, NSUInteger noOfTotalUrls); +typedef void(^SDWebImagePrefetcherCompletionBlock)(NSUInteger noOfFinishedUrls, NSUInteger noOfSkippedUrls); + +/** + * Prefetch some URLs in the cache for future use. Images are downloaded in low priority. + */ +@interface SDWebImagePrefetcher : NSObject + +/** + * The web image manager + */ +@property (strong, nonatomic, readonly) SDWebImageManager *manager; + +/** + * Maximum number of URLs to prefetch at the same time. Defaults to 3. + */ +@property (nonatomic, assign) NSUInteger maxConcurrentDownloads; + +/** + * SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority. + */ +@property (nonatomic, assign) SDWebImageOptions options; + +/** + * Queue options for Prefetcher. Defaults to Main Queue. + */ +@property (nonatomic, assign) dispatch_queue_t prefetcherQueue; + +@property (weak, nonatomic) id delegate; + +/** + * Return the global image prefetcher instance. + */ ++ (SDWebImagePrefetcher *)sharedImagePrefetcher; + +/** + * Allows you to instantiate a prefetcher with any arbitrary image manager. + */ +- (id)initWithImageManager:(SDWebImageManager *)manager; + +/** + * Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, + * currently one image is downloaded at a time, + * and skips images for failed downloads and proceed to the next image in the list + * + * @param urls list of URLs to prefetch + */ +- (void)prefetchURLs:(NSArray *)urls; + +/** + * Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, + * currently one image is downloaded at a time, + * and skips images for failed downloads and proceed to the next image in the list + * + * @param urls list of URLs to prefetch + * @param progressBlock block to be called when progress updates; + * first parameter is the number of completed (successful or not) requests, + * second parameter is the total number of images originally requested to be prefetched + * @param completionBlock block to be called when prefetching is completed + * first param is the number of completed (successful or not) requests, + * second parameter is the number of skipped requests + */ +- (void)prefetchURLs:(NSArray *)urls progress:(SDWebImagePrefetcherProgressBlock)progressBlock completed:(SDWebImagePrefetcherCompletionBlock)completionBlock; + +/** + * Remove and cancel queued list + */ +- (void)cancelPrefetching; + + +@end diff --git a/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m new file mode 100644 index 0000000..f518d44 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.m @@ -0,0 +1,140 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImagePrefetcher.h" + +@interface SDWebImagePrefetcher () + +@property (strong, nonatomic) SDWebImageManager *manager; +@property (strong, nonatomic) NSArray *prefetchURLs; +@property (assign, nonatomic) NSUInteger requestedCount; +@property (assign, nonatomic) NSUInteger skippedCount; +@property (assign, nonatomic) NSUInteger finishedCount; +@property (assign, nonatomic) NSTimeInterval startedTime; +@property (copy, nonatomic) SDWebImagePrefetcherCompletionBlock completionBlock; +@property (copy, nonatomic) SDWebImagePrefetcherProgressBlock progressBlock; + +@end + +@implementation SDWebImagePrefetcher + ++ (SDWebImagePrefetcher *)sharedImagePrefetcher { + static dispatch_once_t once; + static id instance; + dispatch_once(&once, ^{ + instance = [self new]; + }); + return instance; +} + +- (id)init { + return [self initWithImageManager:[SDWebImageManager new]]; +} + +- (id)initWithImageManager:(SDWebImageManager *)manager { + if ((self = [super init])) { + _manager = manager; + _options = SDWebImageLowPriority; + _prefetcherQueue = dispatch_get_main_queue(); + self.maxConcurrentDownloads = 3; + } + return self; +} + +- (void)setMaxConcurrentDownloads:(NSUInteger)maxConcurrentDownloads { + self.manager.imageDownloader.maxConcurrentDownloads = maxConcurrentDownloads; +} + +- (NSUInteger)maxConcurrentDownloads { + return self.manager.imageDownloader.maxConcurrentDownloads; +} + +- (void)startPrefetchingAtIndex:(NSUInteger)index { + if (index >= self.prefetchURLs.count) return; + self.requestedCount++; + [self.manager downloadImageWithURL:self.prefetchURLs[index] options:self.options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!finished) return; + self.finishedCount++; + + if (image) { + if (self.progressBlock) { + self.progressBlock(self.finishedCount,[self.prefetchURLs count]); + } + } + else { + if (self.progressBlock) { + self.progressBlock(self.finishedCount,[self.prefetchURLs count]); + } + // Add last failed + self.skippedCount++; + } + if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didPrefetchURL:finishedCount:totalCount:)]) { + [self.delegate imagePrefetcher:self + didPrefetchURL:self.prefetchURLs[index] + finishedCount:self.finishedCount + totalCount:self.prefetchURLs.count + ]; + } + if (self.prefetchURLs.count > self.requestedCount) { + dispatch_async(self.prefetcherQueue, ^{ + [self startPrefetchingAtIndex:self.requestedCount]; + }); + } else if (self.finishedCount == self.requestedCount) { + [self reportStatus]; + if (self.completionBlock) { + self.completionBlock(self.finishedCount, self.skippedCount); + self.completionBlock = nil; + } + self.progressBlock = nil; + } + }]; +} + +- (void)reportStatus { + NSUInteger total = [self.prefetchURLs count]; + if ([self.delegate respondsToSelector:@selector(imagePrefetcher:didFinishWithTotalCount:skippedCount:)]) { + [self.delegate imagePrefetcher:self + didFinishWithTotalCount:(total - self.skippedCount) + skippedCount:self.skippedCount + ]; + } +} + +- (void)prefetchURLs:(NSArray *)urls { + [self prefetchURLs:urls progress:nil completed:nil]; +} + +- (void)prefetchURLs:(NSArray *)urls progress:(SDWebImagePrefetcherProgressBlock)progressBlock completed:(SDWebImagePrefetcherCompletionBlock)completionBlock { + [self cancelPrefetching]; // Prevent duplicate prefetch request + self.startedTime = CFAbsoluteTimeGetCurrent(); + self.prefetchURLs = urls; + self.completionBlock = completionBlock; + self.progressBlock = progressBlock; + + if (urls.count == 0) { + if (completionBlock) { + completionBlock(0,0); + } + } else { + // Starts prefetching from the very first image on the list with the max allowed concurrency + NSUInteger listCount = self.prefetchURLs.count; + for (NSUInteger i = 0; i < self.maxConcurrentDownloads && self.requestedCount < listCount; i++) { + [self startPrefetchingAtIndex:i]; + } + } +} + +- (void)cancelPrefetching { + self.prefetchURLs = nil; + self.skippedCount = 0; + self.requestedCount = 0; + self.finishedCount = 0; + [self.manager cancelAll]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIButton+WebCache.h b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.h new file mode 100644 index 0000000..ecf5ced --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.h @@ -0,0 +1,229 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageCompat.h" +#import "SDWebImageManager.h" + +/** + * Integrates SDWebImage async downloading and caching of remote images with UIButtonView. + */ +@interface UIButton (WebCache) + +/** + * Get the current image URL. + */ +- (NSURL *)sd_currentImageURL; + +/** + * Get the image URL for a control state. + * + * @param state Which state you want to know the URL for. The values are described in UIControlState. + */ +- (NSURL *)sd_imageURLForState:(UIControlState)state; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state; + +/** + * Set the imageView `image` with an `url` and a placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @see sd_setImageWithURL:placeholderImage:options: + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the backgroundImageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state; + +/** + * Set the backgroundImageView `image` with an `url` and a placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @see sd_setImageWithURL:placeholderImage:options: + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder; + +/** + * Set the backgroundImageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options; + +/** + * Set the backgroundImageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the backgroundImageView `image` with an `url`, placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param state The state that uses the specified title. The values are described in UIControlState. + * @param placeholder The image to be set initially, until the image request finishes. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the backgroundImageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Cancel the current image download + */ +- (void)sd_cancelImageLoadForState:(UIControlState)state; + +/** + * Cancel the current backgroundImage download + */ +- (void)sd_cancelBackgroundImageLoadForState:(UIControlState)state; + +@end + + +@interface UIButton (WebCacheDeprecated) + +- (NSURL *)currentImageURL __deprecated_msg("Use `sd_currentImageURL`"); +- (NSURL *)imageURLForState:(UIControlState)state __deprecated_msg("Use `sd_imageURLForState:`"); + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:options:`"); + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:completed:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:completed:`"); +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:forState:placeholderImage:options:completed:`"); + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:options:`"); + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:completed:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:completed:`"); +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setBackgroundImageWithURL:forState:placeholderImage:options:completed:`"); + +- (void)cancelCurrentImageLoad __deprecated_msg("Use `sd_cancelImageLoadForState:`"); +- (void)cancelBackgroundImageLoadForState:(UIControlState)state __deprecated_msg("Use `sd_cancelBackgroundImageLoadForState:`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIButton+WebCache.m b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.m new file mode 100644 index 0000000..ce2175d --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIButton+WebCache.m @@ -0,0 +1,270 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIButton+WebCache.h" +#import "objc/runtime.h" +#import "UIView+WebCacheOperation.h" + +static char imageURLStorageKey; + +@implementation UIButton (WebCache) + +- (NSURL *)sd_currentImageURL { + NSURL *url = self.imageURLStorage[@(self.state)]; + + if (!url) { + url = self.imageURLStorage[@(UIControlStateNormal)]; + } + + return url; +} + +- (NSURL *)sd_imageURLForState:(UIControlState)state { + return self.imageURLStorage[@(state)]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + + [self setImage:placeholder forState:state]; + [self sd_cancelImageLoadForState:state]; + + if (!url) { + [self.imageURLStorage removeObjectForKey:@(state)]; + + dispatch_main_async_safe(^{ + if (completedBlock) { + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + + return; + } + + self.imageURLStorage[@(state)] = url; + + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe(^{ + __strong UIButton *sself = wself; + if (!sself) return; + if (image && (options & SDWebImageAvoidAutoSetImage) && completedBlock) + { + completedBlock(image, error, cacheType, url); + return; + } + else if (image) { + [sself setImage:image forState:state]; + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setImageLoadOperation:operation forState:state]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock]; +} + +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_cancelBackgroundImageLoadForState:state]; + + [self setBackgroundImage:placeholder forState:state]; + + if (url) { + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe(^{ + __strong UIButton *sself = wself; + if (!sself) return; + if (image && (options & SDWebImageAvoidAutoSetImage) && completedBlock) + { + completedBlock(image, error, cacheType, url); + return; + } + else if (image) { + [sself setBackgroundImage:image forState:state]; + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setBackgroundImageLoadOperation:operation forState:state]; + } else { + dispatch_main_async_safe(^{ + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + if (completedBlock) { + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + } +} + +- (void)sd_setImageLoadOperation:(id)operation forState:(UIControlState)state { + [self sd_setImageLoadOperation:operation forKey:[NSString stringWithFormat:@"UIButtonImageOperation%@", @(state)]]; +} + +- (void)sd_cancelImageLoadForState:(UIControlState)state { + [self sd_cancelImageLoadOperationWithKey:[NSString stringWithFormat:@"UIButtonImageOperation%@", @(state)]]; +} + +- (void)sd_setBackgroundImageLoadOperation:(id)operation forState:(UIControlState)state { + [self sd_setImageLoadOperation:operation forKey:[NSString stringWithFormat:@"UIButtonBackgroundImageOperation%@", @(state)]]; +} + +- (void)sd_cancelBackgroundImageLoadForState:(UIControlState)state { + [self sd_cancelImageLoadOperationWithKey:[NSString stringWithFormat:@"UIButtonBackgroundImageOperation%@", @(state)]]; +} + +- (NSMutableDictionary *)imageURLStorage { + NSMutableDictionary *storage = objc_getAssociatedObject(self, &imageURLStorageKey); + if (!storage) + { + storage = [NSMutableDictionary dictionary]; + objc_setAssociatedObject(self, &imageURLStorageKey, storage, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + + return storage; +} + +@end + + +@implementation UIButton (WebCacheDeprecated) + +- (NSURL *)currentImageURL { + return [self sd_currentImageURL]; +} + +- (NSURL *)imageURLForState:(UIControlState)state { + return [self sd_imageURLForState:state]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:nil]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:nil]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)cancelCurrentImageLoad { + // in a backwards compatible manner, cancel for current state + [self sd_cancelImageLoadForState:self.state]; +} + +- (void)cancelBackgroundImageLoadForState:(UIControlState)state { + [self sd_cancelBackgroundImageLoadForState:state]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+GIF.h b/Pods/SDWebImage/SDWebImage/UIImage+GIF.h new file mode 100755 index 0000000..084f424 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+GIF.h @@ -0,0 +1,19 @@ +// +// UIImage+GIF.h +// LBGIFImage +// +// Created by Laurin Brandner on 06.01.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface UIImage (GIF) + ++ (UIImage *)sd_animatedGIFNamed:(NSString *)name; + ++ (UIImage *)sd_animatedGIFWithData:(NSData *)data; + +- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size; + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+GIF.m b/Pods/SDWebImage/SDWebImage/UIImage+GIF.m new file mode 100755 index 0000000..e1ded2a --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+GIF.m @@ -0,0 +1,158 @@ +// +// UIImage+GIF.m +// LBGIFImage +// +// Created by Laurin Brandner on 06.01.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "UIImage+GIF.h" +#import + +@implementation UIImage (GIF) + ++ (UIImage *)sd_animatedGIFWithData:(NSData *)data { + if (!data) { + return nil; + } + + CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); + + size_t count = CGImageSourceGetCount(source); + + UIImage *animatedImage; + + if (count <= 1) { + animatedImage = [[UIImage alloc] initWithData:data]; + } + else { + NSMutableArray *images = [NSMutableArray array]; + + NSTimeInterval duration = 0.0f; + + for (size_t i = 0; i < count; i++) { + CGImageRef image = CGImageSourceCreateImageAtIndex(source, i, NULL); + + duration += [self sd_frameDurationAtIndex:i source:source]; + + [images addObject:[UIImage imageWithCGImage:image scale:[UIScreen mainScreen].scale orientation:UIImageOrientationUp]]; + + CGImageRelease(image); + } + + if (!duration) { + duration = (1.0f / 10.0f) * count; + } + + animatedImage = [UIImage animatedImageWithImages:images duration:duration]; + } + + CFRelease(source); + + return animatedImage; +} + ++ (float)sd_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source { + float frameDuration = 0.1f; + CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil); + NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties; + NSDictionary *gifProperties = frameProperties[(NSString *)kCGImagePropertyGIFDictionary]; + + NSNumber *delayTimeUnclampedProp = gifProperties[(NSString *)kCGImagePropertyGIFUnclampedDelayTime]; + if (delayTimeUnclampedProp) { + frameDuration = [delayTimeUnclampedProp floatValue]; + } + else { + + NSNumber *delayTimeProp = gifProperties[(NSString *)kCGImagePropertyGIFDelayTime]; + if (delayTimeProp) { + frameDuration = [delayTimeProp floatValue]; + } + } + + // Many annoying ads specify a 0 duration to make an image flash as quickly as possible. + // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify + // a duration of <= 10 ms. See and + // for more information. + + if (frameDuration < 0.011f) { + frameDuration = 0.100f; + } + + CFRelease(cfFrameProperties); + return frameDuration; +} + ++ (UIImage *)sd_animatedGIFNamed:(NSString *)name { + CGFloat scale = [UIScreen mainScreen].scale; + + if (scale > 1.0f) { + NSString *retinaPath = [[NSBundle mainBundle] pathForResource:[name stringByAppendingString:@"@2x"] ofType:@"gif"]; + + NSData *data = [NSData dataWithContentsOfFile:retinaPath]; + + if (data) { + return [UIImage sd_animatedGIFWithData:data]; + } + + NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"]; + + data = [NSData dataWithContentsOfFile:path]; + + if (data) { + return [UIImage sd_animatedGIFWithData:data]; + } + + return [UIImage imageNamed:name]; + } + else { + NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@"gif"]; + + NSData *data = [NSData dataWithContentsOfFile:path]; + + if (data) { + return [UIImage sd_animatedGIFWithData:data]; + } + + return [UIImage imageNamed:name]; + } +} + +- (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size { + if (CGSizeEqualToSize(self.size, size) || CGSizeEqualToSize(size, CGSizeZero)) { + return self; + } + + CGSize scaledSize = size; + CGPoint thumbnailPoint = CGPointZero; + + CGFloat widthFactor = size.width / self.size.width; + CGFloat heightFactor = size.height / self.size.height; + CGFloat scaleFactor = (widthFactor > heightFactor) ? widthFactor : heightFactor; + scaledSize.width = self.size.width * scaleFactor; + scaledSize.height = self.size.height * scaleFactor; + + if (widthFactor > heightFactor) { + thumbnailPoint.y = (size.height - scaledSize.height) * 0.5; + } + else if (widthFactor < heightFactor) { + thumbnailPoint.x = (size.width - scaledSize.width) * 0.5; + } + + NSMutableArray *scaledImages = [NSMutableArray array]; + + for (UIImage *image in self.images) { + UIGraphicsBeginImageContextWithOptions(size, NO, 0.0); + + [image drawInRect:CGRectMake(thumbnailPoint.x, thumbnailPoint.y, scaledSize.width, scaledSize.height)]; + UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); + + [scaledImages addObject:newImage]; + + UIGraphicsEndImageContext(); + } + + return [UIImage animatedImageWithImages:scaledImages duration:self.duration]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h new file mode 100644 index 0000000..186ebc0 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h @@ -0,0 +1,15 @@ +// +// UIImage+MultiFormat.h +// SDWebImage +// +// Created by Olivier Poitrey on 07/06/13. +// Copyright (c) 2013 Dailymotion. All rights reserved. +// + +#import + +@interface UIImage (MultiFormat) + ++ (UIImage *)sd_imageWithData:(NSData *)data; + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m new file mode 100644 index 0000000..a830754 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m @@ -0,0 +1,118 @@ +// +// UIImage+MultiFormat.m +// SDWebImage +// +// Created by Olivier Poitrey on 07/06/13. +// Copyright (c) 2013 Dailymotion. All rights reserved. +// + +#import "UIImage+MultiFormat.h" +#import "UIImage+GIF.h" +#import "NSData+ImageContentType.h" +#import + +#ifdef SD_WEBP +#import "UIImage+WebP.h" +#endif + +@implementation UIImage (MultiFormat) + ++ (UIImage *)sd_imageWithData:(NSData *)data { + if (!data) { + return nil; + } + + UIImage *image; + NSString *imageContentType = [NSData sd_contentTypeForImageData:data]; + if ([imageContentType isEqualToString:@"image/gif"]) { + image = [UIImage sd_animatedGIFWithData:data]; + } +#ifdef SD_WEBP + else if ([imageContentType isEqualToString:@"image/webp"]) + { + image = [UIImage sd_imageWithWebPData:data]; + } +#endif + else { + image = [[UIImage alloc] initWithData:data]; + UIImageOrientation orientation = [self sd_imageOrientationFromImageData:data]; + if (orientation != UIImageOrientationUp) { + image = [UIImage imageWithCGImage:image.CGImage + scale:image.scale + orientation:orientation]; + } + } + + + return image; +} + + ++(UIImageOrientation)sd_imageOrientationFromImageData:(NSData *)imageData { + UIImageOrientation result = UIImageOrientationUp; + CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL); + if (imageSource) { + CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL); + if (properties) { + CFTypeRef val; + int exifOrientation; + val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation); + if (val) { + CFNumberGetValue(val, kCFNumberIntType, &exifOrientation); + result = [self sd_exifOrientationToiOSOrientation:exifOrientation]; + } // else - if it's not set it remains at up + CFRelease((CFTypeRef) properties); + } else { + //NSLog(@"NO PROPERTIES, FAIL"); + } + CFRelease(imageSource); + } + return result; +} + +#pragma mark EXIF orientation tag converter +// Convert an EXIF image orientation to an iOS one. +// reference see here: http://sylvana.net/jpegcrop/exif_orientation.html ++ (UIImageOrientation) sd_exifOrientationToiOSOrientation:(int)exifOrientation { + UIImageOrientation orientation = UIImageOrientationUp; + switch (exifOrientation) { + case 1: + orientation = UIImageOrientationUp; + break; + + case 3: + orientation = UIImageOrientationDown; + break; + + case 8: + orientation = UIImageOrientationLeft; + break; + + case 6: + orientation = UIImageOrientationRight; + break; + + case 2: + orientation = UIImageOrientationUpMirrored; + break; + + case 4: + orientation = UIImageOrientationDownMirrored; + break; + + case 5: + orientation = UIImageOrientationLeftMirrored; + break; + + case 7: + orientation = UIImageOrientationRightMirrored; + break; + default: + break; + } + return orientation; +} + + + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h new file mode 100644 index 0000000..c1d8fea --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h @@ -0,0 +1,100 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageCompat.h" +#import "SDWebImageManager.h" + +/** + * Integrates SDWebImage async downloading and caching of remote images with UIImageView for highlighted state. + */ +@interface UIImageView (HighlightedWebCache) + +/** + * Set the imageView `highlightedImage` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url; + +/** + * Set the imageView `highlightedImage` with an `url` and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options; + +/** + * Set the imageView `highlightedImage` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `highlightedImage` with an `url` and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `highlightedImage` with an `url` and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Cancel the current download + */ +- (void)sd_cancelCurrentHighlightedImageLoad; + +@end + + +@interface UIImageView (HighlightedWebCacheDeprecated) + +- (void)setHighlightedImageWithURL:(NSURL *)url __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:options:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:completed:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:options:completed:`"); +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setHighlightedImageWithURL:options:progress:completed:`"); + +- (void)cancelCurrentHighlightedImageLoad __deprecated_msg("Use `sd_cancelCurrentHighlightedImageLoad`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m new file mode 100644 index 0000000..921134e --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m @@ -0,0 +1,112 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIImageView+HighlightedWebCache.h" +#import "UIView+WebCacheOperation.h" + +#define UIImageViewHighlightedWebCacheOperationKey @"highlightedImage" + +@implementation UIImageView (HighlightedWebCache) + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock]; +} + +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_cancelCurrentHighlightedImageLoad]; + + if (url) { + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe (^ + { + if (!wself) return; + if (image && (options & SDWebImageAvoidAutoSetImage) && completedBlock) + { + completedBlock(image, error, cacheType, url); + return; + } + else if (image) { + wself.highlightedImage = image; + [wself setNeedsLayout]; + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setImageLoadOperation:operation forKey:UIImageViewHighlightedWebCacheOperationKey]; + } else { + dispatch_main_async_safe(^{ + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + if (completedBlock) { + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + } +} + +- (void)sd_cancelCurrentHighlightedImageLoad { + [self sd_cancelImageLoadOperationWithKey:UIImageViewHighlightedWebCacheOperationKey]; +} + +@end + + +@implementation UIImageView (HighlightedWebCacheDeprecated) + +- (void)setHighlightedImageWithURL:(NSURL *)url { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setHighlightedImageWithURL:url options:0 progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)cancelCurrentHighlightedImageLoad { + [self sd_cancelCurrentHighlightedImageLoad]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h new file mode 100644 index 0000000..eeb7460 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.h @@ -0,0 +1,213 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "SDWebImageCompat.h" +#import "SDWebImageManager.h" + +/** + * Integrates SDWebImage async downloading and caching of remote images with UIImageView. + * + * Usage with a UITableViewCell sub-class: + * + * @code + +#import + +... + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *MyIdentifier = @"MyIdentifier"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; + + if (cell == nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier] + autorelease]; + } + + // Here we use the provided sd_setImageWithURL: method to load the web image + // Ensure you use a placeholder image otherwise cells will be initialized with no image + [cell.imageView sd_setImageWithURL:[NSURL URLWithString:@"http://example.com/image.jpg"] + placeholderImage:[UIImage imageNamed:@"placeholder"]]; + + cell.textLabel.text = @"My Text"; + return cell; +} + + * @endcode + */ +@interface UIImageView (WebCache) + +/** + * Get the current image URL. + * + * Note that because of the limitations of categories this property can get out of sync + * if you use sd_setImage: directly. + */ +- (NSURL *)sd_imageURL; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + */ +- (void)sd_setImageWithURL:(NSURL *)url; + +/** + * Set the imageView `image` with an `url` and a placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @see sd_setImageWithURL:placeholderImage:options: + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options; + +/** + * Set the imageView `image` with an `url`. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url`, placeholder and custom options. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Set the imageView `image` with an `url` and optionally a placeholder image. + * + * The download is asynchronous and cached. + * + * @param url The url for the image. + * @param placeholder The image to be set initially, until the image request finishes. + * @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values. + * @param progressBlock A block called while image is downloading + * @param completedBlock A block called when operation has been completed. This block has no return value + * and takes the requested UIImage as first parameter. In case of error the image parameter + * is nil and the second parameter may contain an NSError. The third parameter is a Boolean + * indicating if the image was retrieved from the local cache or from the network. + * The fourth parameter is the original image url. + */ +- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; + +/** + * Download an array of images and starts them in an animation loop + * + * @param arrayOfURLs An array of NSURL + */ +- (void)sd_setAnimationImagesWithURLs:(NSArray *)arrayOfURLs; + +/** + * Cancel the current download + */ +- (void)sd_cancelCurrentImageLoad; + +- (void)sd_cancelCurrentAnimationImagesLoad; + +/** + * Show activity UIActivityIndicatorView + */ +- (void)setShowActivityIndicatorView:(BOOL)show; + +/** + * set desired UIActivityIndicatorViewStyle + * + * @param style The style of the UIActivityIndicatorView + */ +- (void)setIndicatorStyle:(UIActivityIndicatorViewStyle)style; + +@end + + +@interface UIImageView (WebCacheDeprecated) + +- (NSURL *)imageURL __deprecated_msg("Use `sd_imageURL`"); + +- (void)setImageWithURL:(NSURL *)url __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options`"); + +- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:completed:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:completed:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options:completed:`"); +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock __deprecated_msg("Method deprecated. Use `sd_setImageWithURL:placeholderImage:options:progress:completed:`"); + +- (void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs __deprecated_msg("Use `sd_setAnimationImagesWithURLs:`"); + +- (void)cancelCurrentArrayLoad __deprecated_msg("Use `sd_cancelCurrentAnimationImagesLoad`"); + +- (void)cancelCurrentImageLoad __deprecated_msg("Use `sd_cancelCurrentImageLoad`"); + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m new file mode 100644 index 0000000..14f425c --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIImageView+WebCache.m @@ -0,0 +1,277 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIImageView+WebCache.h" +#import "objc/runtime.h" +#import "UIView+WebCacheOperation.h" + +static char imageURLKey; +static char TAG_ACTIVITY_INDICATOR; +static char TAG_ACTIVITY_STYLE; +static char TAG_ACTIVITY_SHOW; + +@implementation UIImageView (WebCache) + +- (void)sd_setImageWithURL:(NSURL *)url { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil]; +} + +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; +} + +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { + [self sd_cancelCurrentImageLoad]; + objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + + if (!(options & SDWebImageDelayPlaceholder)) { + dispatch_main_async_safe(^{ + self.image = placeholder; + }); + } + + if (url) { + + // check if activityView is enabled or not + if ([self showActivityIndicatorView]) { + [self addActivityIndicator]; + } + + __weak __typeof(self)wself = self; + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + [wself removeActivityIndicator]; + if (!wself) return; + dispatch_main_sync_safe(^{ + if (!wself) return; + if (image && (options & SDWebImageAvoidAutoSetImage) && completedBlock) + { + completedBlock(image, error, cacheType, url); + return; + } + else if (image) { + wself.image = image; + [wself setNeedsLayout]; + } else { + if ((options & SDWebImageDelayPlaceholder)) { + wself.image = placeholder; + [wself setNeedsLayout]; + } + } + if (completedBlock && finished) { + completedBlock(image, error, cacheType, url); + } + }); + }]; + [self sd_setImageLoadOperation:operation forKey:@"UIImageViewImageLoad"]; + } else { + dispatch_main_async_safe(^{ + [self removeActivityIndicator]; + if (completedBlock) { + NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; + completedBlock(nil, error, SDImageCacheTypeNone, url); + } + }); + } +} + +- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { + NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:url]; + UIImage *lastPreviousCachedImage = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:key]; + + [self sd_setImageWithURL:url placeholderImage:lastPreviousCachedImage ?: placeholder options:options progress:progressBlock completed:completedBlock]; +} + +- (NSURL *)sd_imageURL { + return objc_getAssociatedObject(self, &imageURLKey); +} + +- (void)sd_setAnimationImagesWithURLs:(NSArray *)arrayOfURLs { + [self sd_cancelCurrentAnimationImagesLoad]; + __weak __typeof(self)wself = self; + + NSMutableArray *operationsArray = [[NSMutableArray alloc] init]; + + for (NSURL *logoImageURL in arrayOfURLs) { + id operation = [SDWebImageManager.sharedManager downloadImageWithURL:logoImageURL options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + if (!wself) return; + dispatch_main_sync_safe(^{ + __strong UIImageView *sself = wself; + [sself stopAnimating]; + if (sself && image) { + NSMutableArray *currentImages = [[sself animationImages] mutableCopy]; + if (!currentImages) { + currentImages = [[NSMutableArray alloc] init]; + } + [currentImages addObject:image]; + + sself.animationImages = currentImages; + [sself setNeedsLayout]; + } + [sself startAnimating]; + }); + }]; + [operationsArray addObject:operation]; + } + + [self sd_setImageLoadOperation:[NSArray arrayWithArray:operationsArray] forKey:@"UIImageViewAnimationImages"]; +} + +- (void)sd_cancelCurrentImageLoad { + [self sd_cancelImageLoadOperationWithKey:@"UIImageViewImageLoad"]; +} + +- (void)sd_cancelCurrentAnimationImagesLoad { + [self sd_cancelImageLoadOperationWithKey:@"UIImageViewAnimationImages"]; +} + + +#pragma mark - +- (UIActivityIndicatorView *)activityIndicator { + return (UIActivityIndicatorView *)objc_getAssociatedObject(self, &TAG_ACTIVITY_INDICATOR); +} + +- (void)setActivityIndicator:(UIActivityIndicatorView *)activityIndicator { + objc_setAssociatedObject(self, &TAG_ACTIVITY_INDICATOR, activityIndicator, OBJC_ASSOCIATION_RETAIN); +} + +- (void)setShowActivityIndicatorView:(BOOL)show{ + objc_setAssociatedObject(self, &TAG_ACTIVITY_SHOW, [NSNumber numberWithBool:show], OBJC_ASSOCIATION_RETAIN); +} + +- (BOOL)showActivityIndicatorView{ + return [objc_getAssociatedObject(self, &TAG_ACTIVITY_SHOW) boolValue]; +} + +- (void)setIndicatorStyle:(UIActivityIndicatorViewStyle)style{ + objc_setAssociatedObject(self, &TAG_ACTIVITY_STYLE, [NSNumber numberWithInt:style], OBJC_ASSOCIATION_RETAIN); +} + +- (int)getIndicatorStyle{ + return [objc_getAssociatedObject(self, &TAG_ACTIVITY_STYLE) intValue]; +} + +- (void)addActivityIndicator { + if (!self.activityIndicator) { + self.activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:[self getIndicatorStyle]]; + self.activityIndicator.translatesAutoresizingMaskIntoConstraints = NO; + + dispatch_main_async_safe(^{ + [self addSubview:self.activityIndicator]; + + [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicator + attribute:NSLayoutAttributeCenterX + relatedBy:NSLayoutRelationEqual + toItem:self + attribute:NSLayoutAttributeCenterX + multiplier:1.0 + constant:0.0]]; + [self addConstraint:[NSLayoutConstraint constraintWithItem:self.activityIndicator + attribute:NSLayoutAttributeCenterY + relatedBy:NSLayoutRelationEqual + toItem:self + attribute:NSLayoutAttributeCenterY + multiplier:1.0 + constant:0.0]]; + }); + } + + dispatch_main_async_safe(^{ + [self.activityIndicator startAnimating]; + }); + +} + +- (void)removeActivityIndicator { + if (self.activityIndicator) { + [self.activityIndicator removeFromSuperview]; + self.activityIndicator = nil; + } +} + +@end + + +@implementation UIImageView (WebCacheDeprecated) + +- (NSURL *)imageURL { + return [self sd_imageURL]; +} + +- (void)setImageWithURL:(NSURL *)url { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil]; +} + +- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock { + [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + if (completedBlock) { + completedBlock(image, error, cacheType); + } + }]; +} + +- (void)cancelCurrentArrayLoad { + [self sd_cancelCurrentAnimationImagesLoad]; +} + +- (void)cancelCurrentImageLoad { + [self sd_cancelCurrentImageLoad]; +} + +- (void)setAnimationImagesWithURLs:(NSArray *)arrayOfURLs { + [self sd_setAnimationImagesWithURLs:arrayOfURLs]; +} + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h new file mode 100644 index 0000000..6719036 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h @@ -0,0 +1,36 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import +#import "SDWebImageManager.h" + +@interface UIView (WebCacheOperation) + +/** + * Set the image load operation (storage in a UIView based dictionary) + * + * @param operation the operation + * @param key key for storing the operation + */ +- (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key; + +/** + * Cancel all operations for the current UIView and key + * + * @param key key for identifying the operations + */ +- (void)sd_cancelImageLoadOperationWithKey:(NSString *)key; + +/** + * Just remove the operations corresponding to the current UIView and key without cancelling them + * + * @param key key for identifying the operations + */ +- (void)sd_removeImageLoadOperationWithKey:(NSString *)key; + +@end diff --git a/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m new file mode 100644 index 0000000..9219478 --- /dev/null +++ b/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m @@ -0,0 +1,55 @@ +/* + * This file is part of the SDWebImage package. + * (c) Olivier Poitrey + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +#import "UIView+WebCacheOperation.h" +#import "objc/runtime.h" + +static char loadOperationKey; + +@implementation UIView (WebCacheOperation) + +- (NSMutableDictionary *)operationDictionary { + NSMutableDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey); + if (operations) { + return operations; + } + operations = [NSMutableDictionary dictionary]; + objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + return operations; +} + +- (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key { + [self sd_cancelImageLoadOperationWithKey:key]; + NSMutableDictionary *operationDictionary = [self operationDictionary]; + [operationDictionary setObject:operation forKey:key]; +} + +- (void)sd_cancelImageLoadOperationWithKey:(NSString *)key { + // Cancel in progress downloader from queue + NSMutableDictionary *operationDictionary = [self operationDictionary]; + id operations = [operationDictionary objectForKey:key]; + if (operations) { + if ([operations isKindOfClass:[NSArray class]]) { + for (id operation in operations) { + if (operation) { + [operation cancel]; + } + } + } else if ([operations conformsToProtocol:@protocol(SDWebImageOperation)]){ + [(id) operations cancel]; + } + [operationDictionary removeObjectForKey:key]; + } +} + +- (void)sd_removeImageLoadOperationWithKey:(NSString *)key { + NSMutableDictionary *operationDictionary = [self operationDictionary]; + [operationDictionary removeObjectForKey:key]; +} + +@end diff --git a/Pods/Target Support Files/DACircularProgress/DACircularProgress-dummy.m b/Pods/Target Support Files/DACircularProgress/DACircularProgress-dummy.m new file mode 100644 index 0000000..76cdc76 --- /dev/null +++ b/Pods/Target Support Files/DACircularProgress/DACircularProgress-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_DACircularProgress : NSObject +@end +@implementation PodsDummy_DACircularProgress +@end diff --git a/Pods/Target Support Files/DACircularProgress/DACircularProgress-prefix.pch b/Pods/Target Support Files/DACircularProgress/DACircularProgress-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/DACircularProgress/DACircularProgress-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/DACircularProgress/DACircularProgress.xcconfig b/Pods/Target Support Files/DACircularProgress/DACircularProgress.xcconfig new file mode 100644 index 0000000..b16577e --- /dev/null +++ b/Pods/Target Support Files/DACircularProgress/DACircularProgress.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/DACircularProgress" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" +OTHER_LDFLAGS = -framework "QuartzCore" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-dummy.m b/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-dummy.m new file mode 100644 index 0000000..c37d9d1 --- /dev/null +++ b/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_IDMPhotoBrowser : NSObject +@end +@implementation PodsDummy_IDMPhotoBrowser +@end diff --git a/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-prefix.pch b/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser.xcconfig b/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser.xcconfig new file mode 100644 index 0000000..c9a2d19 --- /dev/null +++ b/Pods/Target Support Files/IDMPhotoBrowser/IDMPhotoBrowser.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" +OTHER_LDFLAGS = -framework "MessageUI" -framework "MobileCoreServices" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/JSONModel/JSONModel.xcconfig b/Pods/Target Support Files/JSONModel/JSONModel.xcconfig index dd60503..7886cad 100644 --- a/Pods/Target Support Files/JSONModel/JSONModel.xcconfig +++ b/Pods/Target Support Files/JSONModel/JSONModel.xcconfig @@ -1,4 +1,4 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JSONModel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/JSONModel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" PODS_ROOT = ${SRCROOT} SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig b/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig index 7d198dd..fe77d96 100644 --- a/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig +++ b/Pods/Target Support Files/MJRefresh/MJRefresh.xcconfig @@ -1,4 +1,4 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJRefresh" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MJRefresh" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" PODS_ROOT = ${SRCROOT} SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/Masonry/Masonry.xcconfig b/Pods/Target Support Files/Masonry/Masonry.xcconfig index 1d95912..5ae8324 100644 --- a/Pods/Target Support Files/Masonry/Masonry.xcconfig +++ b/Pods/Target Support Files/Masonry/Masonry.xcconfig @@ -1,5 +1,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Masonry" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" PODS_ROOT = ${SRCROOT} SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/PinYin4Objc/PinYin4Objc.xcconfig b/Pods/Target Support Files/PinYin4Objc/PinYin4Objc.xcconfig index ed1a5be..159d9b9 100644 --- a/Pods/Target Support Files/PinYin4Objc/PinYin4Objc.xcconfig +++ b/Pods/Target Support Files/PinYin4Objc/PinYin4Objc.xcconfig @@ -1,4 +1,4 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PinYin4Objc" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PinYin4Objc" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" PODS_ROOT = ${SRCROOT} SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown index b0ff45e..2166e70 100644 --- a/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown @@ -1,6 +1,56 @@ # Acknowledgements This application makes use of the following third party libraries: +## DACircularProgress + +# License + +## MIT License + +Copyright (c) 2013 Daniel Amitay (http://danielamitay.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +## IDMPhotoBrowser + +The MIT License (MIT) + +Copyright (c) 2015 Ideais Mobile + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + ## JSONModel JSONModel @@ -268,6 +318,30 @@ third-party archives. limitations under the License. +## SDWebImage + +Copyright (c) 2009 Olivier Poitrey + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + ## TTTAttributedLabel Copyright (c) 2011 Mattt Thompson (http://mattt.me/) @@ -339,4 +413,38 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +## pop + +BSD License + +For Pop software + +Copyright (c) 2014, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Target Support Files/Pods/Pods-acknowledgements.plist b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist index ee4c0cc..82aa60c 100644 --- a/Pods/Target Support Files/Pods/Pods-acknowledgements.plist +++ b/Pods/Target Support Files/Pods/Pods-acknowledgements.plist @@ -12,6 +12,64 @@ Type PSGroupSpecifier + + FooterText + # License + +## MIT License + +Copyright (c) 2013 Daniel Amitay (http://danielamitay.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + Title + DACircularProgress + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2015 Ideais Mobile + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + Title + IDMPhotoBrowser + Type + PSGroupSpecifier + FooterText JSONModel @@ -295,6 +353,34 @@ third-party archives. Type PSGroupSpecifier + + FooterText + Copyright (c) 2009 Olivier Poitrey <rs@dailymotion.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + + Title + SDWebImage + Type + PSGroupSpecifier + FooterText Copyright (c) 2011 Mattt Thompson (http://mattt.me/) @@ -379,6 +465,44 @@ THE SOFTWARE. Type PSGroupSpecifier + + FooterText + BSD License + +For Pop software + +Copyright (c) 2014, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Title + pop + Type + PSGroupSpecifier + FooterText Generated by CocoaPods - http://cocoapods.org diff --git a/Pods/Target Support Files/Pods/Pods-resources.sh b/Pods/Target Support Files/Pods/Pods-resources.sh index d3b66aa..232f7a4 100755 --- a/Pods/Target Support Files/Pods/Pods-resources.sh +++ b/Pods/Target Support Files/Pods/Pods-resources.sh @@ -58,11 +58,15 @@ install_resource() esac } if [[ "$CONFIGURATION" == "Debug" ]]; then + install_resource "IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle" + install_resource "IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle" install_resource "MJRefresh/MJRefresh/MJRefresh.bundle" install_resource "PinYin4Objc/PinYin4Objc/Resources/unicode_to_hanyu_pinyin.txt" install_resource "${BUILT_PRODUCTS_DIR}/YSMChineseSort.bundle" fi if [[ "$CONFIGURATION" == "Release" ]]; then + install_resource "IDMPhotoBrowser/Classes/IDMPhotoBrowser.bundle" + install_resource "IDMPhotoBrowser/Classes/IDMPBLocalizations.bundle" install_resource "MJRefresh/MJRefresh/MJRefresh.bundle" install_resource "PinYin4Objc/PinYin4Objc/Resources/unicode_to_hanyu_pinyin.txt" install_resource "${BUILT_PRODUCTS_DIR}/YSMChineseSort.bundle" diff --git a/Pods/Target Support Files/Pods/Pods.debug.xcconfig b/Pods/Target Support Files/Pods/Pods.debug.xcconfig index 8c0471b..13c3ba1 100644 --- a/Pods/Target Support Files/Pods/Pods.debug.xcconfig +++ b/Pods/Target Support Files/Pods/Pods.debug.xcconfig @@ -1,5 +1,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" -OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/PinYin4Objc" -isystem "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" -isystem "${PODS_ROOT}/Headers/Public/YSMChineseSort" -OTHER_LDFLAGS = $(inherited) -ObjC -l"JSONModel" -l"MJRefresh" -l"Masonry" -l"PinYin4Objc" -l"TTTAttributedLabel" -l"UITableView+FDTemplateLayoutCell" -l"YSMChineseSort" -framework "CoreGraphics" -framework "CoreText" -framework "Foundation" -framework "QuartzCore" -framework "UIKit" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/DACircularProgress" -isystem "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/PinYin4Objc" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" -isystem "${PODS_ROOT}/Headers/Public/YSMChineseSort" -isystem "${PODS_ROOT}/Headers/Public/pop" +OTHER_LDFLAGS = $(inherited) -ObjC -l"DACircularProgress" -l"IDMPhotoBrowser" -l"JSONModel" -l"MJRefresh" -l"Masonry" -l"PinYin4Objc" -l"SDWebImage" -l"TTTAttributedLabel" -l"UITableView+FDTemplateLayoutCell" -l"YSMChineseSort" -l"c++" -l"pop" -framework "CoreGraphics" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "MessageUI" -framework "MobileCoreServices" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Target Support Files/Pods/Pods.release.xcconfig b/Pods/Target Support Files/Pods/Pods.release.xcconfig index 8c0471b..13c3ba1 100644 --- a/Pods/Target Support Files/Pods/Pods.release.xcconfig +++ b/Pods/Target Support Files/Pods/Pods.release.xcconfig @@ -1,5 +1,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" -OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/PinYin4Objc" -isystem "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" -isystem "${PODS_ROOT}/Headers/Public/YSMChineseSort" -OTHER_LDFLAGS = $(inherited) -ObjC -l"JSONModel" -l"MJRefresh" -l"Masonry" -l"PinYin4Objc" -l"TTTAttributedLabel" -l"UITableView+FDTemplateLayoutCell" -l"YSMChineseSort" -framework "CoreGraphics" -framework "CoreText" -framework "Foundation" -framework "QuartzCore" -framework "UIKit" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" +OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/DACircularProgress" -isystem "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" -isystem "${PODS_ROOT}/Headers/Public/JSONModel" -isystem "${PODS_ROOT}/Headers/Public/MJRefresh" -isystem "${PODS_ROOT}/Headers/Public/Masonry" -isystem "${PODS_ROOT}/Headers/Public/PinYin4Objc" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" -isystem "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" -isystem "${PODS_ROOT}/Headers/Public/YSMChineseSort" -isystem "${PODS_ROOT}/Headers/Public/pop" +OTHER_LDFLAGS = $(inherited) -ObjC -l"DACircularProgress" -l"IDMPhotoBrowser" -l"JSONModel" -l"MJRefresh" -l"Masonry" -l"PinYin4Objc" -l"SDWebImage" -l"TTTAttributedLabel" -l"UITableView+FDTemplateLayoutCell" -l"YSMChineseSort" -l"c++" -l"pop" -framework "CoreGraphics" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "MessageUI" -framework "MobileCoreServices" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m b/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m new file mode 100644 index 0000000..86d2b5f --- /dev/null +++ b/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SDWebImage : NSObject +@end +@implementation PodsDummy_SDWebImage +@end diff --git a/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch b/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig b/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig new file mode 100644 index 0000000..df4f388 --- /dev/null +++ b/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" +OTHER_LDFLAGS = -framework "ImageIO" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/TTTAttributedLabel/TTTAttributedLabel.xcconfig b/Pods/Target Support Files/TTTAttributedLabel/TTTAttributedLabel.xcconfig index 9899c0d..841a540 100644 --- a/Pods/Target Support Files/TTTAttributedLabel/TTTAttributedLabel.xcconfig +++ b/Pods/Target Support Files/TTTAttributedLabel/TTTAttributedLabel.xcconfig @@ -1,5 +1,5 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" OTHER_LDFLAGS = -framework "CoreGraphics" -framework "CoreText" -framework "QuartzCore" -framework "UIKit" PODS_ROOT = ${SRCROOT} SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.xcconfig b/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.xcconfig index 6b1da14..549840f 100644 --- a/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.xcconfig +++ b/Pods/Target Support Files/UITableView+FDTemplateLayoutCell/UITableView+FDTemplateLayoutCell.xcconfig @@ -1,4 +1,4 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" PODS_ROOT = ${SRCROOT} SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/YSMChineseSort/YSMChineseSort.xcconfig b/Pods/Target Support Files/YSMChineseSort/YSMChineseSort.xcconfig index 4052dc9..65ef98f 100644 --- a/Pods/Target Support Files/YSMChineseSort/YSMChineseSort.xcconfig +++ b/Pods/Target Support Files/YSMChineseSort/YSMChineseSort.xcconfig @@ -1,4 +1,4 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/YSMChineseSort" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/YSMChineseSort" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" PODS_ROOT = ${SRCROOT} SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/Target Support Files/pop/pop-dummy.m b/Pods/Target Support Files/pop/pop-dummy.m new file mode 100644 index 0000000..19ed261 --- /dev/null +++ b/Pods/Target Support Files/pop/pop-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_pop : NSObject +@end +@implementation PodsDummy_pop +@end diff --git a/Pods/Target Support Files/pop/pop-prefix.pch b/Pods/Target Support Files/pop/pop-prefix.pch new file mode 100644 index 0000000..aa992a4 --- /dev/null +++ b/Pods/Target Support Files/pop/pop-prefix.pch @@ -0,0 +1,4 @@ +#ifdef __OBJC__ +#import +#endif + diff --git a/Pods/Target Support Files/pop/pop.xcconfig b/Pods/Target Support Files/pop/pop.xcconfig new file mode 100644 index 0000000..6fb6ad5 --- /dev/null +++ b/Pods/Target Support Files/pop/pop.xcconfig @@ -0,0 +1,7 @@ +CLANG_CXX_LANGUAGE_STANDARD = c++11 +CLANG_CXX_LIBRARY = libc++ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/pop" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DACircularProgress" "${PODS_ROOT}/Headers/Public/IDMPhotoBrowser" "${PODS_ROOT}/Headers/Public/JSONModel" "${PODS_ROOT}/Headers/Public/MJRefresh" "${PODS_ROOT}/Headers/Public/Masonry" "${PODS_ROOT}/Headers/Public/PinYin4Objc" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/TTTAttributedLabel" "${PODS_ROOT}/Headers/Public/UITableView+FDTemplateLayoutCell" "${PODS_ROOT}/Headers/Public/YSMChineseSort" "${PODS_ROOT}/Headers/Public/pop" +OTHER_LDFLAGS = -l"c++" +PODS_ROOT = ${SRCROOT} +SKIP_INSTALL = YES \ No newline at end of file diff --git a/Pods/pop/LICENSE b/Pods/pop/LICENSE new file mode 100644 index 0000000..642126f --- /dev/null +++ b/Pods/pop/LICENSE @@ -0,0 +1,30 @@ +BSD License + +For Pop software + +Copyright (c) 2014, Facebook, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Pods/pop/README.md b/Pods/pop/README.md new file mode 100644 index 0000000..705a0fd --- /dev/null +++ b/Pods/pop/README.md @@ -0,0 +1,203 @@ +![pop](https://github.com/facebook/pop/blob/master/Images/pop.gif?raw=true) + +Pop is an extensible animation engine for iOS, tvOS, and OS X. In addition to basic static animations, it supports spring and decay dynamic animations, making it useful for building realistic, physics-based interactions. The API allows quick integration with existing Objective-C codebases and enables the animation of any property on any object. It's a mature and well-tested framework that drives all the animations and transitions in [Paper](http://www.facebook.com/paper). + +[![Build Status](https://travis-ci.org/facebook/pop.svg)](https://travis-ci.org/facebook/pop) + +## Installation + +Pop is available on [CocoaPods](http://cocoapods.org). Just add the following to your project Podfile: + +```ruby +pod 'pop', '~> 1.0' +``` + +Bugs are first fixed in master and then made available via a designated release. If you tend to live on the bleeding edge, you can use Pop from master with the following Podfile entry: + +```ruby +pod 'pop', :git => 'https://github.com/facebook/pop.git' +``` + +## Non-CocoaPods Installation + +### iOS 8 Embedded Framework +By adding the project to your project and adding pop.embedded framework to the Embedded Binaries section on the General tab of your app's target, you can set up pop in seconds! This also enables `@import pop` syntax with header modules. + +**Note**: because of some awkward limitations with Xcode, embedded binaries must share the same name as the module and must have `.framework` as an extension. This means that you'll see three pop.frameworks when adding embedded binaries (one for OS X, one for tvOS, and one for iOS). You'll need to be sure to add the iOS one, and since this list is populated in order of targets, it's safe to assume it's the second one. You can verify the correct one was chosen by checking the path next to the framework listed: `Debug-iphoneos`. The same principle applies on tvOS but instead of `Debug-iphoneos` look for `Debug-appletvos`. + +![Embedded Binaries](Images/EmbeddedBinaries.png?raw=true) + +**Note 2**: this method does not currently play nicely with workspaces. For some unknown reason, Xcode simply rejects adding pop.framework as an embedded binary when pop.xcodeproj is placed in the workspace. This only works when pop.xcodeproj is added as a subproject to the current target's project. + +### Advanced +Alternatively, you can add the project to your workspace and adopt the provided configuration files or manually copy the files under the pop subdirectory into your project. If installing manually, ensure the C++ standard library is also linked by including `-lc++` to your project linker flags. + +## Usage + +Pop adopts the Core Animation explicit animation programming model. Use by including the following import: + +```objective-c +#import +``` + +or if you're using the embedded framework: + +```objective-c +@import pop; +``` + +### Start, Stop & Update + +To start an animation, add it to the object you wish to animate: + +```objective-c +POPSpringAnimation *anim = [POPSpringAnimation animation]; +... +[layer pop_addAnimation:anim forKey:@"myKey"]; +``` + +To stop an animation, remove it from the object referencing the key specified on start: + +```objective-c +[layer pop_removeAnimationForKey:@"myKey"]; +``` + +The key can also be used to query for the existence of an animation. Updating the toValue of a running animation can provide the most seamless way to change course: + +```objective-c +anim = [layer pop_animationForKey:@"myKey"]; +if (anim) { + /* update to value to new destination */ + anim.toValue = @(42.0); +} else { + /* create and start a new animation */ + .... +} +``` + +While a layer was used in the above examples, the Pop interface is implemented as a category addition on NSObject. Any NSObject or subclass can be animated. + +### Types + +There are four concrete animation types: spring, decay, basic and custom. + +Spring animations can be used to give objects a delightful bounce. In this example, we use a spring animation to animate a layer's bounds from its current value to (0, 0, 400, 400): + +```objective-c +POPSpringAnimation *anim = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerBounds]; +anim.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 400, 400)]; +[layer pop_addAnimation:anim forKey:@"size"]; +``` +Decay animations can be used to gradually slow an object to a halt. In this example, we decay a layer's positionX from it's current value and velocity 1000pts per second: + +```objective-c +POPDecayAnimation *anim = [POPDecayAnimation animationWithPropertyNamed:kPOPLayerPositionX]; +anim.velocity = @(1000.); +[layer pop_addAnimation:anim forKey:@"slide"]; +``` + +Basic animations can be used to interpolate values over a specified time period. To use an ease-in ease-out animation to animate a view's alpha from 0.0 to 1.0 over the default duration: +```objective-c +POPBasicAnimation *anim = [POPBasicAnimation animationWithPropertyNamed:kPOPViewAlpha]; +anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; +anim.fromValue = @(0.0); +anim.toValue = @(1.0); +[view pop_addAnimation:anim forKey:@"fade"]; +``` +`POPCustomAnimation` makes creating custom animations and transitions easier by handling CADisplayLink and associated time-step management. See header for more details. + + +### Properties + +The property animated is specified by the `POPAnimatableProperty` class. In this example we create a spring animation and explicitly set the animatable property corresponding to `-[CALayer bounds]`: + +```objective-c +POPSpringAnimation *anim = [POPSpringAnimation animation]; +anim.property = [POPAnimatableProperty propertyWithName:kPOPLayerBounds]; +``` + +The framework provides many common layer and view animatable properties out of box. You can animate a custom property by creating a new instance of the class. In this example, we declare a custom volume property: + +```objective-c +prop = [POPAnimatableProperty propertyWithName:@"com.foo.radio.volume" initializer:^(POPMutableAnimatableProperty *prop) { + // read value + prop.readBlock = ^(id obj, CGFloat values[]) { + values[0] = [obj volume]; + }; + // write value + prop.writeBlock = ^(id obj, const CGFloat values[]) { + [obj setVolume:values[0]]; + }; + // dynamics threshold + prop.threshold = 0.01; +}]; + +anim.property = prop; +``` + +For a complete listing of provided animatable properties, as well more information on declaring custom properties see `POPAnimatableProperty.h`. + + +### Debugging + +Here are a few tips when debugging. Pop obeys the Simulator's Toggle Slow Animations setting. Try enabling it to slow down animations and more easily observe interactions. + +Consider naming your animations. This will allow you to more easily identify them when referencing them, either via logging or in the debugger: + +```objective-c +anim.name = @"springOpen"; +``` + +Each animation comes with an associated tracer. The tracer allows you to record all animation-related events, in a fast and efficient manner, allowing you to query and analyze them after animation completion. The below example starts the tracer and configures it to log all events on animation completion: + +```objective-c +POPAnimationTracer *tracer = anim.tracer; +tracer.shouldLogAndResetOnCompletion = YES; +[tracer start]; +``` + +See `POPAnimationTracer.h` for more details. + +## Testing + +Pop has extensive unit test coverage. To install test dependencies, navigate to the root pop directory and type: + +```sh +pod install +``` + +Assuming CocoaPods is installed, this will include the necessary OCMock dependency to the unit test targets. + +## SceneKit + +Due to SceneKit requiring iOS 8 and OS X 10.9, POP's SceneKit extensions aren't provided out of box. Unfortunately, [weakly linked frameworks](https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html) cannot be used due to issues mentioned in the [Xcode 6.1 Release Notes](https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc6_release_notes.html). + +To remedy this, you can easily opt-in to use SceneKit! Simply add this to the Preprocessor Macros section of your Xcode Project: + +``` +POP_USE_SCENEKIT=1 +``` + +## Resources + +A collection of links to external resources that may prove valuable: + +* [AGGeometryKit+POP - Animating Quadrilaterals with Pop](https://github.com/hfossli/aggeometrykit-pop) +* [Apple – Core Animation Programming Guide](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html) +* [iOS Development Tips – UIScrollView-like deceleration with Pop](http://iosdevtips.co/post/84571595353/replicating-uiscrollviews-deceleration-with-facebook) +* [Pop Playground – Repository of Pop animation examples](https://github.com/callmeed/pop-playground) +* [Pop Playground 2 – Playing with Facebook's framework](http://victorbaro.com/2014/05/pop-playground-playing-with-facebooks-framework/) +* [POP-MCAnimate – Concise syntax for the Pop animation framework](https://github.com/matthewcheok/POP-MCAnimate) +* [Popping - Great examples in one project](https://github.com/schneiderandre/popping) +* [Rebound – Spring Animations for Android](http://facebook.github.io/rebound/) +* [Tapity Tutorial – Getting Started with Pop](http://tapity.com/tutorial-getting-started-with-pop/) +* [Tweaks – Easily adjust parameters for iOS apps in development](https://github.com/facebook/tweaks) +* [POP Tutorial in 5 steps](https://github.com/maxmyers/FacebookPop) +* [VBFPopFlatButton – Flat animatable button, using Pop to transition between states](https://github.com/victorBaro/VBFPopFlatButton) + +## Contributing +See the CONTRIBUTING file for how to help out. + +## License + +Pop is released under a BSD License. See LICENSE file for details. diff --git a/Pods/pop/pop/POP.h b/Pods/pop/pop/POP.h new file mode 100644 index 0000000..72adba7 --- /dev/null +++ b/Pods/pop/pop/POP.h @@ -0,0 +1,29 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#ifndef POP_POP_H +#define POP_POP_H + +#import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +#endif /* POP_POP_H */ diff --git a/Pods/pop/pop/POPAction.h b/Pods/pop/pop/POPAction.h new file mode 100644 index 0000000..85cca19 --- /dev/null +++ b/Pods/pop/pop/POPAction.h @@ -0,0 +1,67 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#ifndef POPACTION_H +#define POPACTION_H + +#import + +#import + +#ifdef __cplusplus + +namespace POP { + + /** + @abstract Disables Core Animation actions using RAII. + @discussion The disablement of actions is scoped to the current transaction. + */ + class ActionDisabler + { + BOOL state; + + public: + ActionDisabler() POP_NOTHROW + { + state = [CATransaction disableActions]; + [CATransaction setDisableActions:YES]; + } + + ~ActionDisabler() + { + [CATransaction setDisableActions:state]; + } + }; + + /** + @abstract Enables Core Animation actions using RAII. + @discussion The enablement of actions is scoped to the current transaction. + */ + class ActionEnabler + { + BOOL state; + + public: + ActionEnabler() POP_NOTHROW + { + state = [CATransaction disableActions]; + [CATransaction setDisableActions:NO]; + } + + ~ActionEnabler() + { + [CATransaction setDisableActions:state]; + } + }; + +} + +#endif /* __cplusplus */ + +#endif /* POPACTION_H */ diff --git a/Pods/pop/pop/POPAnimatableProperty.h b/Pods/pop/pop/POPAnimatableProperty.h new file mode 100644 index 0000000..4b5cec9 --- /dev/null +++ b/Pods/pop/pop/POPAnimatableProperty.h @@ -0,0 +1,251 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +#import + +@class POPMutableAnimatableProperty; + +/** + @abstract Describes an animatable property. + */ +@interface POPAnimatableProperty : NSObject + +/** + @abstract Property accessor. + @param name The name of the property. + @return The animatable property with that name or nil if it does not exist. + @discussion Common animatable properties are included by default. Use the provided constants to reference. + */ ++ (id)propertyWithName:(NSString *)name; + +/** + @abstract The designated initializer. + @param name The name of the property. + @param block The block used to configure the property on creation. + @return The animatable property with name if it exists, otherwise a newly created instance configured by block. + @discussion Custom properties should use reverse-DNS naming. A newly created instance is only mutable in the scope of block. Once constructed, a property becomes immutable. + */ ++ (id)propertyWithName:(NSString *)name initializer:(void (^)(POPMutableAnimatableProperty *prop))block; + +/** + @abstract The name of the property. + @discussion Used to uniquely identify an animatable property. + */ +@property (readonly, nonatomic, copy) NSString *name; + +/** + @abstract Block used to read values from a property into an array of floats. + */ +@property (readonly, nonatomic, copy) void (^readBlock)(id obj, CGFloat values[]); + +/** + @abstract Block used to write values from an array of floats into a property. + */ +@property (readonly, nonatomic, copy) void (^writeBlock)(id obj, const CGFloat values[]); + +/** + @abstract The threshold value used when determining completion of dynamics simulations. + */ +@property (readonly, nonatomic, assign) CGFloat threshold; + +@end + +/** + @abstract A mutable animatable property intended for configuration. + */ +@interface POPMutableAnimatableProperty : POPAnimatableProperty + +/** + @abstract A read-write version of POPAnimatableProperty name property. + */ +@property (readwrite, nonatomic, copy) NSString *name; + +/** + @abstract A read-write version of POPAnimatableProperty readBlock property. + */ +@property (readwrite, nonatomic, copy) void (^readBlock)(id obj, CGFloat values[]); + +/** + @abstract A read-write version of POPAnimatableProperty writeBlock property. + */ +@property (readwrite, nonatomic, copy) void (^writeBlock)(id obj, const CGFloat values[]); + +/** + @abstract A read-write version of POPAnimatableProperty threshold property. + */ +@property (readwrite, nonatomic, assign) CGFloat threshold; + +@end + +/** + Common CALayer property names. + */ +extern NSString * const kPOPLayerBackgroundColor; +extern NSString * const kPOPLayerBounds; +extern NSString * const kPOPLayerCornerRadius; +extern NSString * const kPOPLayerBorderWidth; +extern NSString * const kPOPLayerBorderColor; +extern NSString * const kPOPLayerOpacity; +extern NSString * const kPOPLayerPosition; +extern NSString * const kPOPLayerPositionX; +extern NSString * const kPOPLayerPositionY; +extern NSString * const kPOPLayerRotation; +extern NSString * const kPOPLayerRotationX; +extern NSString * const kPOPLayerRotationY; +extern NSString * const kPOPLayerScaleX; +extern NSString * const kPOPLayerScaleXY; +extern NSString * const kPOPLayerScaleY; +extern NSString * const kPOPLayerSize; +extern NSString * const kPOPLayerSubscaleXY; +extern NSString * const kPOPLayerSubtranslationX; +extern NSString * const kPOPLayerSubtranslationXY; +extern NSString * const kPOPLayerSubtranslationY; +extern NSString * const kPOPLayerSubtranslationZ; +extern NSString * const kPOPLayerTranslationX; +extern NSString * const kPOPLayerTranslationXY; +extern NSString * const kPOPLayerTranslationY; +extern NSString * const kPOPLayerTranslationZ; +extern NSString * const kPOPLayerZPosition; +extern NSString * const kPOPLayerShadowColor; +extern NSString * const kPOPLayerShadowOffset; +extern NSString * const kPOPLayerShadowOpacity; +extern NSString * const kPOPLayerShadowRadius; + +/** + Common CAShapeLayer property names. + */ +extern NSString * const kPOPShapeLayerStrokeStart; +extern NSString * const kPOPShapeLayerStrokeEnd; +extern NSString * const kPOPShapeLayerStrokeColor; +extern NSString * const kPOPShapeLayerFillColor; +extern NSString * const kPOPShapeLayerLineWidth; +extern NSString * const kPOPShapeLayerLineDashPhase; + +/** + Common NSLayoutConstraint property names. + */ +extern NSString * const kPOPLayoutConstraintConstant; + + +#if TARGET_OS_IPHONE + +/** + Common UIView property names. + */ +extern NSString * const kPOPViewAlpha; +extern NSString * const kPOPViewBackgroundColor; +extern NSString * const kPOPViewBounds; +extern NSString * const kPOPViewCenter; +extern NSString * const kPOPViewFrame; +extern NSString * const kPOPViewScaleX; +extern NSString * const kPOPViewScaleXY; +extern NSString * const kPOPViewScaleY; +extern NSString * const kPOPViewSize; +extern NSString * const kPOPViewTintColor; + +/** + Common UIScrollView property names. + */ +extern NSString * const kPOPScrollViewContentOffset; +extern NSString * const kPOPScrollViewContentSize; +extern NSString * const kPOPScrollViewZoomScale; +extern NSString * const kPOPScrollViewContentInset; +extern NSString * const kPOPScrollViewScrollIndicatorInsets; + +/** + Common UITableView property names. + */ +extern NSString * const kPOPTableViewContentOffset; +extern NSString * const kPOPTableViewContentSize; + +/** + Common UICollectionView property names. + */ +extern NSString * const kPOPCollectionViewContentOffset; +extern NSString * const kPOPCollectionViewContentSize; + +/** + Common UINavigationBar property names. + */ +extern NSString * const kPOPNavigationBarBarTintColor; + +/** + Common UIToolbar property names. + */ +extern NSString * const kPOPToolbarBarTintColor; + +/** + Common UITabBar property names. + */ +extern NSString * const kPOPTabBarBarTintColor; + +/** + Common UILabel property names. + */ +extern NSString * const kPOPLabelTextColor; + +#else + +/** + Common NSView property names. + */ +extern NSString * const kPOPViewFrame; +extern NSString * const kPOPViewBounds; +extern NSString * const kPOPViewAlphaValue; +extern NSString * const kPOPViewFrameRotation; +extern NSString * const kPOPViewFrameCenterRotation; +extern NSString * const kPOPViewBoundsRotation; + +/** + Common NSWindow property names. + */ +extern NSString * const kPOPWindowFrame; +extern NSString * const kPOPWindowAlphaValue; +extern NSString * const kPOPWindowBackgroundColor; + +#endif + +#if SCENEKIT_SDK_AVAILABLE + +/** + Common SceneKit property names. + */ +extern NSString * const kPOPSCNNodePosition; +extern NSString * const kPOPSCNNodePositionX; +extern NSString * const kPOPSCNNodePositionY; +extern NSString * const kPOPSCNNodePositionZ; +extern NSString * const kPOPSCNNodeTranslation; +extern NSString * const kPOPSCNNodeTranslationX; +extern NSString * const kPOPSCNNodeTranslationY; +extern NSString * const kPOPSCNNodeTranslationZ; +extern NSString * const kPOPSCNNodeRotation; +extern NSString * const kPOPSCNNodeRotationX; +extern NSString * const kPOPSCNNodeRotationY; +extern NSString * const kPOPSCNNodeRotationZ; +extern NSString * const kPOPSCNNodeRotationW; +extern NSString * const kPOPSCNNodeEulerAngles; +extern NSString * const kPOPSCNNodeEulerAnglesX; +extern NSString * const kPOPSCNNodeEulerAnglesY; +extern NSString * const kPOPSCNNodeEulerAnglesZ; +extern NSString * const kPOPSCNNodeOrientation; +extern NSString * const kPOPSCNNodeOrientationX; +extern NSString * const kPOPSCNNodeOrientationY; +extern NSString * const kPOPSCNNodeOrientationZ; +extern NSString * const kPOPSCNNodeOrientationW; +extern NSString * const kPOPSCNNodeScale; +extern NSString * const kPOPSCNNodeScaleX; +extern NSString * const kPOPSCNNodeScaleY; +extern NSString * const kPOPSCNNodeScaleZ; +extern NSString * const kPOPSCNNodeScaleXY; + +#endif diff --git a/Pods/pop/pop/POPAnimatableProperty.mm b/Pods/pop/pop/POPAnimatableProperty.mm new file mode 100644 index 0000000..91fd90a --- /dev/null +++ b/Pods/pop/pop/POPAnimatableProperty.mm @@ -0,0 +1,1307 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimatableProperty.h" + +#import + +#import "POPAnimationRuntime.h" +#import "POPCGUtils.h" +#import "POPDefines.h" +#import "POPLayerExtras.h" + +// common threshold definitions +static CGFloat const kPOPThresholdColor = 0.01; +static CGFloat const kPOPThresholdPoint = 1.0; +static CGFloat const kPOPThresholdOpacity = 0.01; +static CGFloat const kPOPThresholdScale = 0.005; +static CGFloat const kPOPThresholdRotation = 0.01; +static CGFloat const kPOPThresholdRadius = 0.01; + +#pragma mark - Static + +// CALayer +NSString * const kPOPLayerBackgroundColor = @"backgroundColor"; +NSString * const kPOPLayerBounds = @"bounds"; +NSString * const kPOPLayerCornerRadius = @"cornerRadius"; +NSString * const kPOPLayerBorderWidth = @"borderWidth"; +NSString * const kPOPLayerBorderColor = @"borderColor"; +NSString * const kPOPLayerOpacity = @"opacity"; +NSString * const kPOPLayerPosition = @"position"; +NSString * const kPOPLayerPositionX = @"positionX"; +NSString * const kPOPLayerPositionY = @"positionY"; +NSString * const kPOPLayerRotation = @"rotation"; +NSString * const kPOPLayerRotationX = @"rotationX"; +NSString * const kPOPLayerRotationY = @"rotationY"; +NSString * const kPOPLayerScaleX = @"scaleX"; +NSString * const kPOPLayerScaleXY = @"scaleXY"; +NSString * const kPOPLayerScaleY = @"scaleY"; +NSString * const kPOPLayerSize = @"size"; +NSString * const kPOPLayerSubscaleXY = @"subscaleXY"; +NSString * const kPOPLayerSubtranslationX = @"subtranslationX"; +NSString * const kPOPLayerSubtranslationXY = @"subtranslationXY"; +NSString * const kPOPLayerSubtranslationY = @"subtranslationY"; +NSString * const kPOPLayerSubtranslationZ = @"subtranslationZ"; +NSString * const kPOPLayerTranslationX = @"translationX"; +NSString * const kPOPLayerTranslationXY = @"translationXY"; +NSString * const kPOPLayerTranslationY = @"translationY"; +NSString * const kPOPLayerTranslationZ = @"translationZ"; +NSString * const kPOPLayerZPosition = @"zPosition"; +NSString * const kPOPLayerShadowColor = @"shadowColor"; +NSString * const kPOPLayerShadowOffset = @"shadowOffset"; +NSString * const kPOPLayerShadowOpacity = @"shadowOpacity"; +NSString * const kPOPLayerShadowRadius = @"shadowRadius"; + +// CAShapeLayer +NSString * const kPOPShapeLayerStrokeStart = @"shapeLayer.strokeStart"; +NSString * const kPOPShapeLayerStrokeEnd = @"shapeLayer.strokeEnd"; +NSString * const kPOPShapeLayerStrokeColor = @"shapeLayer.strokeColor"; +NSString * const kPOPShapeLayerFillColor = @"shapeLayer.fillColor"; +NSString * const kPOPShapeLayerLineWidth = @"shapeLayer.lineWidth"; +NSString * const kPOPShapeLayerLineDashPhase = @"shapeLayer.lineDashPhase"; + +// NSLayoutConstraint +NSString * const kPOPLayoutConstraintConstant = @"layoutConstraint.constant"; + +#if TARGET_OS_IPHONE + +// UIView +NSString * const kPOPViewAlpha = @"view.alpha"; +NSString * const kPOPViewBackgroundColor = @"view.backgroundColor"; +NSString * const kPOPViewBounds = kPOPLayerBounds; +NSString * const kPOPViewCenter = @"view.center"; +NSString * const kPOPViewFrame = @"view.frame"; +NSString * const kPOPViewScaleX = @"view.scaleX"; +NSString * const kPOPViewScaleXY = @"view.scaleXY"; +NSString * const kPOPViewScaleY = @"view.scaleY"; +NSString * const kPOPViewSize = kPOPLayerSize; +NSString * const kPOPViewTintColor = @"view.tintColor"; + +// UIScrollView +NSString * const kPOPScrollViewContentOffset = @"scrollView.contentOffset"; +NSString * const kPOPScrollViewContentSize = @"scrollView.contentSize"; +NSString * const kPOPScrollViewZoomScale = @"scrollView.zoomScale"; +NSString * const kPOPScrollViewContentInset = @"scrollView.contentInset"; +NSString * const kPOPScrollViewScrollIndicatorInsets = @"scrollView.scrollIndicatorInsets"; + +// UITableView +NSString * const kPOPTableViewContentOffset = kPOPScrollViewContentOffset; +NSString * const kPOPTableViewContentSize = kPOPScrollViewContentSize; + +// UICollectionView +NSString * const kPOPCollectionViewContentOffset = kPOPScrollViewContentOffset; +NSString * const kPOPCollectionViewContentSize = kPOPScrollViewContentSize; + +// UINavigationBar +NSString * const kPOPNavigationBarBarTintColor = @"navigationBar.barTintColor"; + +// UIToolbar +NSString * const kPOPToolbarBarTintColor = kPOPNavigationBarBarTintColor; + +// UITabBar +NSString * const kPOPTabBarBarTintColor = kPOPNavigationBarBarTintColor; + +// UILabel +NSString * const kPOPLabelTextColor = @"label.textColor"; + +#else + +// NSView +NSString * const kPOPViewFrame = @"view.frame"; +NSString * const kPOPViewBounds = @"view.bounds"; +NSString * const kPOPViewAlphaValue = @"view.alphaValue"; +NSString * const kPOPViewFrameRotation = @"view.frameRotation"; +NSString * const kPOPViewFrameCenterRotation = @"view.frameCenterRotation"; +NSString * const kPOPViewBoundsRotation = @"view.boundsRotation"; + +// NSWindow +NSString * const kPOPWindowFrame = @"window.frame"; +NSString * const kPOPWindowAlphaValue = @"window.alphaValue"; +NSString * const kPOPWindowBackgroundColor = @"window.backgroundColor"; + +#endif + +#if SCENEKIT_SDK_AVAILABLE + +// SceneKit +NSString * const kPOPSCNNodePosition = @"scnode.position"; +NSString * const kPOPSCNNodePositionX = @"scnnode.position.x"; +NSString * const kPOPSCNNodePositionY = @"scnnode.position.y"; +NSString * const kPOPSCNNodePositionZ = @"scnnode.position.z"; +NSString * const kPOPSCNNodeTranslation = @"scnnode.translation"; +NSString * const kPOPSCNNodeTranslationX = @"scnnode.translation.x"; +NSString * const kPOPSCNNodeTranslationY = @"scnnode.translation.y"; +NSString * const kPOPSCNNodeTranslationZ = @"scnnode.translation.z"; +NSString * const kPOPSCNNodeRotation = @"scnnode.rotation"; +NSString * const kPOPSCNNodeRotationX = @"scnnode.rotation.x"; +NSString * const kPOPSCNNodeRotationY = @"scnnode.rotation.y"; +NSString * const kPOPSCNNodeRotationZ = @"scnnode.rotation.z"; +NSString * const kPOPSCNNodeRotationW = @"scnnode.rotation.w"; +NSString * const kPOPSCNNodeEulerAngles = @"scnnode.eulerAngles"; +NSString * const kPOPSCNNodeEulerAnglesX = @"scnnode.eulerAngles.x"; +NSString * const kPOPSCNNodeEulerAnglesY = @"scnnode.eulerAngles.y"; +NSString * const kPOPSCNNodeEulerAnglesZ = @"scnnode.eulerAngles.z"; +NSString * const kPOPSCNNodeOrientation = @"scnnode.orientation"; +NSString * const kPOPSCNNodeOrientationX = @"scnnode.orientation.x"; +NSString * const kPOPSCNNodeOrientationY = @"scnnode.orientation.y"; +NSString * const kPOPSCNNodeOrientationZ = @"scnnode.orientation.z"; +NSString * const kPOPSCNNodeOrientationW = @"scnnode.orientation.w"; +NSString * const kPOPSCNNodeScale = @"scnnode.scale"; +NSString * const kPOPSCNNodeScaleX = @"scnnode.scale.x"; +NSString * const kPOPSCNNodeScaleY = @"scnnode.scale.y"; +NSString * const kPOPSCNNodeScaleZ = @"scnnode.scale.z"; +NSString * const kPOPSCNNodeScaleXY = @"scnnode.scale.xy"; + +#endif + +/** + State structure internal to static animatable property. + */ +typedef struct +{ + NSString *name; + pop_animatable_read_block readBlock; + pop_animatable_write_block writeBlock; + CGFloat threshold; +} _POPStaticAnimatablePropertyState; +typedef _POPStaticAnimatablePropertyState POPStaticAnimatablePropertyState; + +static POPStaticAnimatablePropertyState _staticStates[] = +{ + /* CALayer */ + + {kPOPLayerBackgroundColor, + ^(CALayer *obj, CGFloat values[]) { + POPCGColorGetRGBAComponents(obj.backgroundColor, values); + }, + ^(CALayer *obj, const CGFloat values[]) { + CGColorRef color = POPCGColorRGBACreate(values); + [obj setBackgroundColor:color]; + CGColorRelease(color); + }, + kPOPThresholdColor + }, + + {kPOPLayerBounds, + ^(CALayer *obj, CGFloat values[]) { + values_from_rect(values, [obj bounds]); + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setBounds:values_to_rect(values)]; + }, + kPOPThresholdPoint + }, + + {kPOPLayerCornerRadius, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [obj cornerRadius]; + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setCornerRadius:values[0]]; + }, + kPOPThresholdRadius + }, + + {kPOPLayerBorderWidth, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [obj borderWidth]; + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setBorderWidth:values[0]]; + }, + 0.01 + }, + + {kPOPLayerBorderColor, + ^(CALayer *obj, CGFloat values[]) { + POPCGColorGetRGBAComponents(obj.borderColor, values); + }, + ^(CALayer *obj, const CGFloat values[]) { + CGColorRef color = POPCGColorRGBACreate(values); + [obj setBorderColor:color]; + CGColorRelease(color); + }, + kPOPThresholdColor + }, + + {kPOPLayerPosition, + ^(CALayer *obj, CGFloat values[]) { + values_from_point(values, [(CALayer *)obj position]); + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setPosition:values_to_point(values)]; + }, + kPOPThresholdPoint + }, + + {kPOPLayerPositionX, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [(CALayer *)obj position].x; + }, + ^(CALayer *obj, const CGFloat values[]) { + CGPoint p = [(CALayer *)obj position]; + p.x = values[0]; + [obj setPosition:p]; + }, + kPOPThresholdPoint + }, + + {kPOPLayerPositionY, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [(CALayer *)obj position].y; + }, + ^(CALayer *obj, const CGFloat values[]) { + CGPoint p = [(CALayer *)obj position]; + p.y = values[0]; + [obj setPosition:p]; + }, + kPOPThresholdPoint + }, + + {kPOPLayerOpacity, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [obj opacity]; + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setOpacity:((float)values[0])]; + }, + kPOPThresholdOpacity + }, + + {kPOPLayerScaleX, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetScaleX(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetScaleX(obj, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPLayerScaleY, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetScaleY(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetScaleY(obj, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPLayerScaleXY, + ^(CALayer *obj, CGFloat values[]) { + values_from_point(values, POPLayerGetScaleXY(obj)); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetScaleXY(obj, values_to_point(values)); + }, + kPOPThresholdScale + }, + + {kPOPLayerSubscaleXY, + ^(CALayer *obj, CGFloat values[]) { + values_from_point(values, POPLayerGetSubScaleXY(obj)); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetSubScaleXY(obj, values_to_point(values)); + }, + kPOPThresholdScale + }, + + {kPOPLayerTranslationX, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetTranslationX(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetTranslationX(obj, values[0]); + }, + kPOPThresholdPoint + }, + + {kPOPLayerTranslationY, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetTranslationY(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetTranslationY(obj, values[0]); + }, + kPOPThresholdPoint + }, + + {kPOPLayerTranslationZ, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetTranslationZ(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetTranslationZ(obj, values[0]); + }, + kPOPThresholdPoint + }, + + {kPOPLayerTranslationXY, + ^(CALayer *obj, CGFloat values[]) { + values_from_point(values, POPLayerGetTranslationXY(obj)); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetTranslationXY(obj, values_to_point(values)); + }, + kPOPThresholdPoint + }, + + {kPOPLayerSubtranslationX, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetSubTranslationX(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetSubTranslationX(obj, values[0]); + }, + kPOPThresholdPoint + }, + + {kPOPLayerSubtranslationY, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetSubTranslationY(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetSubTranslationY(obj, values[0]); + }, + kPOPThresholdPoint + }, + + {kPOPLayerSubtranslationZ, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetSubTranslationZ(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetSubTranslationZ(obj, values[0]); + }, + kPOPThresholdPoint + }, + + {kPOPLayerSubtranslationXY, + ^(CALayer *obj, CGFloat values[]) { + values_from_point(values, POPLayerGetSubTranslationXY(obj)); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetSubTranslationXY(obj, values_to_point(values)); + }, + kPOPThresholdPoint + }, + + {kPOPLayerZPosition, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [obj zPosition]; + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setZPosition:values[0]]; + }, + kPOPThresholdPoint + }, + + {kPOPLayerSize, + ^(CALayer *obj, CGFloat values[]) { + values_from_size(values, [obj bounds].size); + }, + ^(CALayer *obj, const CGFloat values[]) { + CGSize size = values_to_size(values); + if (size.width < 0. || size.height < 0.) + return; + + CGRect b = [obj bounds]; + b.size = size; + [obj setBounds:b]; + }, + kPOPThresholdPoint + }, + + {kPOPLayerRotation, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetRotation(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetRotation(obj, values[0]); + }, + kPOPThresholdRotation + }, + + {kPOPLayerRotationY, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetRotationY(obj); + }, + ^(id obj, const CGFloat values[]) { + POPLayerSetRotationY(obj, values[0]); + }, + kPOPThresholdRotation + }, + + {kPOPLayerRotationX, + ^(CALayer *obj, CGFloat values[]) { + values[0] = POPLayerGetRotationX(obj); + }, + ^(CALayer *obj, const CGFloat values[]) { + POPLayerSetRotationX(obj, values[0]); + }, + kPOPThresholdRotation + }, + + {kPOPLayerShadowColor, + ^(CALayer *obj, CGFloat values[]) { + POPCGColorGetRGBAComponents(obj.shadowColor, values); + }, + ^(CALayer *obj, const CGFloat values[]) { + CGColorRef color = POPCGColorRGBACreate(values); + [obj setShadowColor:color]; + CGColorRelease(color); + }, + 0.01 + }, + + {kPOPLayerShadowOffset, + ^(CALayer *obj, CGFloat values[]) { + values_from_size(values, [obj shadowOffset]); + }, + ^(CALayer *obj, const CGFloat values[]) { + CGSize size = values_to_size(values); + [obj setShadowOffset:size]; + }, + 0.01 + }, + + {kPOPLayerShadowOpacity, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [obj shadowOpacity]; + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setShadowOpacity:values[0]]; + }, + kPOPThresholdOpacity + }, + + {kPOPLayerShadowRadius, + ^(CALayer *obj, CGFloat values[]) { + values[0] = [obj shadowRadius]; + }, + ^(CALayer *obj, const CGFloat values[]) { + [obj setShadowRadius:values[0]]; + }, + kPOPThresholdRadius + }, + + /* CAShapeLayer */ + + {kPOPShapeLayerStrokeStart, + ^(CAShapeLayer *obj, CGFloat values[]) { + values[0] = obj.strokeStart; + }, + ^(CAShapeLayer *obj, const CGFloat values[]) { + obj.strokeStart = values[0]; + }, + 0.01 + }, + + {kPOPShapeLayerStrokeEnd, + ^(CAShapeLayer *obj, CGFloat values[]) { + values[0] = obj.strokeEnd; + }, + ^(CAShapeLayer *obj, const CGFloat values[]) { + obj.strokeEnd = values[0]; + }, + 0.01 + }, + + {kPOPShapeLayerStrokeColor, + ^(CAShapeLayer *obj, CGFloat values[]) { + POPCGColorGetRGBAComponents(obj.strokeColor, values); + }, + ^(CAShapeLayer *obj, const CGFloat values[]) { + CGColorRef color = POPCGColorRGBACreate(values); + [obj setStrokeColor:color]; + CGColorRelease(color); + }, + kPOPThresholdColor + }, + + {kPOPShapeLayerFillColor, + ^(CAShapeLayer *obj, CGFloat values[]) { + POPCGColorGetRGBAComponents(obj.fillColor, values); + }, + ^(CAShapeLayer *obj, const CGFloat values[]) { + CGColorRef color = POPCGColorRGBACreate(values); + [obj setFillColor:color]; + CGColorRelease(color); + }, + kPOPThresholdColor + }, + + {kPOPShapeLayerLineWidth, + ^(CAShapeLayer *obj, CGFloat values[]) { + values[0] = obj.lineWidth; + }, + ^(CAShapeLayer *obj, const CGFloat values[]) { + obj.lineWidth = values[0]; + }, + 0.01 + }, + + {kPOPShapeLayerLineDashPhase, + ^(CAShapeLayer *obj, CGFloat values[]) { + values[0] = obj.lineDashPhase; + }, + ^(CAShapeLayer *obj, const CGFloat values[]) { + obj.lineDashPhase = values[0]; + }, + 0.01 + }, + + {kPOPLayoutConstraintConstant, + ^(NSLayoutConstraint *obj, CGFloat values[]) { + values[0] = obj.constant; + }, + ^(NSLayoutConstraint *obj, const CGFloat values[]) { + obj.constant = values[0]; + }, + 0.01 + }, + +#if TARGET_OS_IPHONE + + /* UIView */ + + {kPOPViewAlpha, + ^(UIView *obj, CGFloat values[]) { + values[0] = obj.alpha; + }, + ^(UIView *obj, const CGFloat values[]) { + obj.alpha = values[0]; + }, + kPOPThresholdOpacity + }, + + {kPOPViewBackgroundColor, + ^(UIView *obj, CGFloat values[]) { + POPUIColorGetRGBAComponents(obj.backgroundColor, values); + }, + ^(UIView *obj, const CGFloat values[]) { + obj.backgroundColor = POPUIColorRGBACreate(values); + }, + kPOPThresholdColor + }, + + {kPOPViewCenter, + ^(UIView *obj, CGFloat values[]) { + values_from_point(values, obj.center); + }, + ^(UIView *obj, const CGFloat values[]) { + obj.center = values_to_point(values); + }, + kPOPThresholdPoint + }, + + {kPOPViewFrame, + ^(UIView *obj, CGFloat values[]) { + values_from_rect(values, obj.frame); + }, + ^(UIView *obj, const CGFloat values[]) { + obj.frame = values_to_rect(values); + }, + kPOPThresholdPoint + }, + + {kPOPViewScaleX, + ^(UIView *obj, CGFloat values[]) { + values[0] = POPLayerGetScaleX(obj.layer); + }, + ^(UIView *obj, const CGFloat values[]) { + POPLayerSetScaleX(obj.layer, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPViewScaleY, + ^(UIView *obj, CGFloat values[]) { + values[0] = POPLayerGetScaleY(obj.layer); + }, + ^(UIView *obj, const CGFloat values[]) { + POPLayerSetScaleY(obj.layer, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPViewScaleXY, + ^(UIView *obj, CGFloat values[]) { + values_from_point(values, POPLayerGetScaleXY(obj.layer)); + }, + ^(UIView *obj, const CGFloat values[]) { + POPLayerSetScaleXY(obj.layer, values_to_point(values)); + }, + kPOPThresholdScale + }, + + {kPOPViewTintColor, + ^(UIView *obj, CGFloat values[]) { + POPUIColorGetRGBAComponents(obj.tintColor, values); + }, + ^(UIView *obj, const CGFloat values[]) { + obj.tintColor = POPUIColorRGBACreate(values); + }, + kPOPThresholdColor + }, + + /* UIScrollView */ + + {kPOPScrollViewContentOffset, + ^(UIScrollView *obj, CGFloat values[]) { + values_from_point(values, obj.contentOffset); + }, + ^(UIScrollView *obj, const CGFloat values[]) { + [obj setContentOffset:values_to_point(values) animated:NO]; + }, + kPOPThresholdPoint + }, + + {kPOPScrollViewContentSize, + ^(UIScrollView *obj, CGFloat values[]) { + values_from_size(values, obj.contentSize); + }, + ^(UIScrollView *obj, const CGFloat values[]) { + obj.contentSize = values_to_size(values); + }, + kPOPThresholdPoint + }, + + {kPOPScrollViewZoomScale, + ^(UIScrollView *obj, CGFloat values[]) { + values[0]=obj.zoomScale; + }, + ^(UIScrollView *obj, const CGFloat values[]) { + obj.zoomScale=values[0]; + }, + kPOPThresholdScale + }, + + {kPOPScrollViewContentInset, + ^(UIScrollView *obj, CGFloat values[]) { + values[0] = obj.contentInset.top; + values[1] = obj.contentInset.left; + values[2] = obj.contentInset.bottom; + values[3] = obj.contentInset.right; + }, + ^(UIScrollView *obj, const CGFloat values[]) { + obj.contentInset = values_to_edge_insets(values); + }, + kPOPThresholdPoint + }, + + {kPOPScrollViewScrollIndicatorInsets, + ^(UIScrollView *obj, CGFloat values[]) { + values[0] = obj.scrollIndicatorInsets.top; + values[1] = obj.scrollIndicatorInsets.left; + values[2] = obj.scrollIndicatorInsets.bottom; + values[3] = obj.scrollIndicatorInsets.right; + }, + ^(UIScrollView *obj, const CGFloat values[]) { + obj.scrollIndicatorInsets = values_to_edge_insets(values); + }, + kPOPThresholdPoint + }, + + /* UINavigationBar */ + + {kPOPNavigationBarBarTintColor, + ^(UINavigationBar *obj, CGFloat values[]) { + POPUIColorGetRGBAComponents(obj.barTintColor, values); + }, + ^(UINavigationBar *obj, const CGFloat values[]) { + obj.barTintColor = POPUIColorRGBACreate(values); + }, + kPOPThresholdColor + }, + + /* UILabel */ + + {kPOPLabelTextColor, + ^(UILabel *obj, CGFloat values[]) { + POPUIColorGetRGBAComponents(obj.textColor, values); + }, + ^(UILabel *obj, const CGFloat values[]) { + obj.textColor = POPUIColorRGBACreate(values); + }, + kPOPThresholdColor + }, + +#else + + /* NSView */ + + {kPOPViewFrame, + ^(NSView *obj, CGFloat values[]) { + values_from_rect(values, NSRectToCGRect(obj.frame)); + }, + ^(NSView *obj, const CGFloat values[]) { + obj.frame = NSRectFromCGRect(values_to_rect(values)); + }, + kPOPThresholdPoint + }, + + {kPOPViewBounds, + ^(NSView *obj, CGFloat values[]) { + values_from_rect(values, NSRectToCGRect(obj.frame)); + }, + ^(NSView *obj, const CGFloat values[]) { + obj.bounds = NSRectFromCGRect(values_to_rect(values)); + }, + kPOPThresholdPoint + }, + + {kPOPViewAlphaValue, + ^(NSView *obj, CGFloat values[]) { + values[0] = obj.alphaValue; + }, + ^(NSView *obj, const CGFloat values[]) { + obj.alphaValue = values[0]; + }, + kPOPThresholdOpacity + }, + + {kPOPViewFrameRotation, + ^(NSView *obj, CGFloat values[]) { + values[0] = obj.frameRotation; + }, + ^(NSView *obj, const CGFloat values[]) { + obj.frameRotation = values[0]; + }, + kPOPThresholdRotation + }, + + {kPOPViewFrameCenterRotation, + ^(NSView *obj, CGFloat values[]) { + values[0] = obj.frameCenterRotation; + }, + ^(NSView *obj, const CGFloat values[]) { + obj.frameCenterRotation = values[0]; + }, + kPOPThresholdRotation + }, + + {kPOPViewBoundsRotation, + ^(NSView *obj, CGFloat values[]) { + values[0] = obj.boundsRotation; + }, + ^(NSView *obj, const CGFloat values[]) { + obj.boundsRotation = values[0]; + }, + kPOPThresholdRotation + }, + + /* NSWindow */ + + {kPOPWindowFrame, + ^(NSWindow *obj, CGFloat values[]) { + values_from_rect(values, NSRectToCGRect(obj.frame)); + }, + ^(NSWindow *obj, const CGFloat values[]) { + [obj setFrame:NSRectFromCGRect(values_to_rect(values)) display:YES]; + }, + kPOPThresholdPoint + }, + + {kPOPWindowAlphaValue, + ^(NSWindow *obj, CGFloat values[]) { + values[0] = obj.alphaValue; + }, + ^(NSWindow *obj, const CGFloat values[]) { + obj.alphaValue = values[0]; + }, + kPOPThresholdOpacity + }, + + {kPOPWindowBackgroundColor, + ^(NSWindow *obj, CGFloat values[]) { + POPNSColorGetRGBAComponents(obj.backgroundColor, values); + }, + ^(NSWindow *obj, const CGFloat values[]) { + obj.backgroundColor = POPNSColorRGBACreate(values); + }, + kPOPThresholdColor + }, + +#endif + +#if SCENEKIT_SDK_AVAILABLE + + /* SceneKit */ + + {kPOPSCNNodePosition, + ^(SCNNode *obj, CGFloat values[]) { + values_from_vec3(values, obj.position); + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.position = values_to_vec3(values); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodePositionX, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.position.x; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.position = SCNVector3Make(values[0], obj.position.y, obj.position.z); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodePositionY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.position.y; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.position = SCNVector3Make(obj.position.x, values[0], obj.position.z); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodePositionZ, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.position.z; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.position = SCNVector3Make(obj.position.x, obj.position.y, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeTranslation, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.transform.m41; + values[1] = obj.transform.m42; + values[2] = obj.transform.m43; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.transform = SCNMatrix4MakeTranslation(values[0], values[1], values[2]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeTranslationX, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.transform.m41; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.transform = SCNMatrix4MakeTranslation(values[0], obj.transform.m42, obj.transform.m43); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeTranslationY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.transform.m42; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.transform = SCNMatrix4MakeTranslation(obj.transform.m41, values[0], obj.transform.m43); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeTranslationY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.transform.m43; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.transform = SCNMatrix4MakeTranslation(obj.transform.m41, obj.transform.m42, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeRotation, + ^(SCNNode *obj, CGFloat values[]) { + values_from_vec4(values, obj.rotation); + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.rotation = values_to_vec4(values); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeRotationX, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.rotation.x; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.rotation = SCNVector4Make(1.0, obj.rotation.y, obj.rotation.z, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeRotationY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.rotation.y; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.rotation = SCNVector4Make(obj.rotation.x, 1.0, obj.rotation.z, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeRotationZ, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.rotation.z; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.rotation = SCNVector4Make(obj.rotation.x, obj.rotation.y, 1.0, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeRotationW, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.rotation.w; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.rotation = SCNVector4Make(obj.rotation.x, obj.rotation.y, obj.rotation.z, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeEulerAngles, + ^(SCNNode *obj, CGFloat values[]) { + values_from_vec3(values, obj.eulerAngles); + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.eulerAngles = values_to_vec3(values); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeEulerAnglesX, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.eulerAngles.x; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.eulerAngles = SCNVector3Make(values[0], obj.eulerAngles.y, obj.eulerAngles.z); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeEulerAnglesY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.eulerAngles.y; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.eulerAngles = SCNVector3Make(obj.eulerAngles.x, values[0], obj.eulerAngles.z); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeEulerAnglesZ, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.eulerAngles.z; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.eulerAngles = SCNVector3Make(obj.eulerAngles.x, obj.eulerAngles.y, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeOrientation, + ^(SCNNode *obj, CGFloat values[]) { + values_from_vec4(values, obj.orientation); + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.orientation = values_to_vec4(values); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeOrientationX, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.orientation.x; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.orientation = SCNVector4Make(values[0], obj.orientation.y, obj.orientation.z, obj.orientation.w); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeOrientationY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.orientation.y; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.orientation = SCNVector4Make(obj.orientation.x, values[0], obj.orientation.z, obj.orientation.w); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeOrientationZ, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.orientation.z; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.orientation = SCNVector4Make(obj.orientation.x, obj.orientation.y, values[0], obj.orientation.w); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeOrientationW, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.orientation.w; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.orientation = SCNVector4Make(obj.orientation.x, obj.orientation.y, obj.orientation.z, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeScale, + ^(SCNNode *obj, CGFloat values[]) { + values_from_vec3(values, obj.scale); + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.scale = values_to_vec3(values); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeScaleX, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.scale.x; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.scale = SCNVector3Make(values[0], obj.scale.y, obj.scale.z); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeScaleY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.scale.y; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.position = SCNVector3Make(obj.scale.x, values[0], obj.scale.z); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeScaleZ, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.scale.z; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.scale = SCNVector3Make(obj.scale.x, obj.scale.y, values[0]); + }, + kPOPThresholdScale + }, + + {kPOPSCNNodeScaleXY, + ^(SCNNode *obj, CGFloat values[]) { + values[0] = obj.scale.x; + values[1] = obj.scale.y; + }, + ^(SCNNode *obj, const CGFloat values[]) { + obj.scale = SCNVector3Make(values[0], values[1], obj.scale.z); + }, + kPOPThresholdScale + }, + +#endif + +}; + +static NSUInteger staticIndexWithName(NSString *aName) +{ + NSUInteger idx = 0; + + while (idx < POP_ARRAY_COUNT(_staticStates)) { + if ([_staticStates[idx].name isEqualToString:aName]) + return idx; + idx++; + } + + return NSNotFound; +} + +/** + Concrete static property class. + */ +@interface POPStaticAnimatableProperty : POPAnimatableProperty +{ +@public + POPStaticAnimatablePropertyState *_state; +} +@end + +@implementation POPStaticAnimatableProperty + +- (NSString *)name +{ + return _state->name; +} + +- (pop_animatable_read_block)readBlock +{ + return _state->readBlock; +} + +- (pop_animatable_write_block)writeBlock +{ + return _state->writeBlock; +} + +- (CGFloat)threshold +{ + return _state->threshold; +} + +@end + +#pragma mark - Concrete + +/** + Concrete immutable property class. + */ +@interface POPConcreteAnimatableProperty : POPAnimatableProperty +- (instancetype)initWithName:(NSString *)name readBlock:(pop_animatable_read_block)read writeBlock:(pop_animatable_write_block)write threshold:(CGFloat)threshold; +@end + +@implementation POPConcreteAnimatableProperty + +// default synthesis +@synthesize name, readBlock, writeBlock, threshold; + +- (instancetype)initWithName:(NSString *)aName readBlock:(pop_animatable_read_block)aReadBlock writeBlock:(pop_animatable_write_block)aWriteBlock threshold:(CGFloat)aThreshold +{ + self = [super init]; + if (nil != self) { + name = [aName copy]; + readBlock = [aReadBlock copy]; + writeBlock = [aWriteBlock copy]; + threshold = aThreshold; + } + return self; +} +@end + +#pragma mark - Mutable + +@implementation POPMutableAnimatableProperty + +// default synthesis +@synthesize name, readBlock, writeBlock, threshold; + +@end + +#pragma mark - Cluster + +/** + Singleton placeholder property class to support class cluster. + */ +@interface POPPlaceholderAnimatableProperty : POPAnimatableProperty + +@end + +@implementation POPPlaceholderAnimatableProperty + +// default synthesis +@synthesize name, readBlock, writeBlock, threshold; + +@end + +/** + Cluster class. + */ +@implementation POPAnimatableProperty + +// avoid creating backing ivars +@dynamic name, readBlock, writeBlock, threshold; + +static POPAnimatableProperty *placeholder = nil; + ++ (void)initialize +{ + if (self == [POPAnimatableProperty class]) { + placeholder = [POPPlaceholderAnimatableProperty alloc]; + } +} + ++ (id)allocWithZone:(struct _NSZone *)zone +{ + if (self == [POPAnimatableProperty class]) { + if (nil == placeholder) { + placeholder = [super allocWithZone:zone]; + } + return placeholder; + } + return [super allocWithZone:zone]; +} + +- (id)copyWithZone:(NSZone *)zone +{ + if ([self isKindOfClass:[POPMutableAnimatableProperty class]]) { + POPConcreteAnimatableProperty *copyProperty = [[POPConcreteAnimatableProperty alloc] initWithName:self.name readBlock:self.readBlock writeBlock:self.writeBlock threshold:self.threshold]; + return copyProperty; + } else { + return self; + } +} + +- (id)mutableCopyWithZone:(NSZone *)zone +{ + POPMutableAnimatableProperty *copyProperty = [[POPMutableAnimatableProperty alloc] init]; + copyProperty.name = self.name; + copyProperty.readBlock = self.readBlock; + copyProperty.writeBlock = self.writeBlock; + copyProperty.threshold = self.threshold; + return copyProperty; +} + ++ (id)propertyWithName:(NSString *)aName +{ + return [self propertyWithName:aName initializer:NULL]; +} + ++ (id)propertyWithName:(NSString *)aName initializer:(void (^)(POPMutableAnimatableProperty *prop))aBlock +{ + POPAnimatableProperty *prop = nil; + + static NSMutableDictionary *_propertyDict = nil; + if (nil == _propertyDict) { + _propertyDict = [[NSMutableDictionary alloc] initWithCapacity:10]; + } + + prop = _propertyDict[aName]; + if (nil != prop) { + return prop; + } + + NSUInteger staticIdx = staticIndexWithName(aName); + + if (NSNotFound != staticIdx) { + POPStaticAnimatableProperty *staticProp = [[POPStaticAnimatableProperty alloc] init]; + staticProp->_state = &_staticStates[staticIdx]; + _propertyDict[aName] = staticProp; + prop = staticProp; + } else if (NULL != aBlock) { + POPMutableAnimatableProperty *mutableProp = [[POPMutableAnimatableProperty alloc] init]; + mutableProp.name = aName; + mutableProp.threshold = 1.0; + aBlock(mutableProp); + prop = [mutableProp copy]; + } + + return prop; +} + +- (NSString *)description +{ + NSMutableString *s = [NSMutableString stringWithFormat:@"%@ name:%@ threshold:%f", super.description, self.name, self.threshold]; + return s; +} + +@end diff --git a/Pods/pop/pop/POPAnimation.h b/Pods/pop/pop/POPAnimation.h new file mode 100644 index 0000000..3c710f2 --- /dev/null +++ b/Pods/pop/pop/POPAnimation.h @@ -0,0 +1,188 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import +#import + +@class CAMediaTimingFunction; + +/** + @abstract The abstract animation base class. + @discussion Instantiate and use one of the concrete animation subclasses. + */ +@interface POPAnimation : NSObject + +/** + @abstract The name of the animation. + @discussion Optional property to help identify the animation. + */ +@property (copy, nonatomic) NSString *name; + +/** + @abstract The beginTime of the animation in media time. + @discussion Defaults to 0 and starts immediately. + */ +@property (assign, nonatomic) CFTimeInterval beginTime; + +/** + @abstract The animation delegate. + @discussion See {@ref POPAnimationDelegate} for details. + */ +@property (weak, nonatomic) id delegate; + +/** + @abstract The animation tracer. + @discussion Returns the existing tracer, creating one if needed. Call start/stop on the tracer to toggle event collection. + */ +@property (readonly, nonatomic) POPAnimationTracer *tracer; + +/** + @abstract Optional block called on animation start. + */ +@property (copy, nonatomic) void (^animationDidStartBlock)(POPAnimation *anim); + +/** + @abstract Optional block called when value meets or exceeds to value. + */ +@property (copy, nonatomic) void (^animationDidReachToValueBlock)(POPAnimation *anim); + +/** + @abstract Optional block called on animation completion. + */ +@property (copy, nonatomic) void (^completionBlock)(POPAnimation *anim, BOOL finished); + +/** + @abstract Optional block called each frame animation is applied. + */ +@property (copy, nonatomic) void (^animationDidApplyBlock)(POPAnimation *anim); + +/** + @abstract Flag indicating whether animation should be removed on completion. + @discussion Setting to NO can facilitate animation reuse. Defaults to YES. + */ +@property (assign, nonatomic) BOOL removedOnCompletion; + +/** + @abstract Flag indicating whether animation is paused. + @discussion A paused animation is excluded from the list of active animations. On initial creation, defaults to YES. On animation addition, the animation is implicity unpaused. On animation completion, the animation is implicity paused including for animations with removedOnCompletion set to NO. + */ +@property (assign, nonatomic, getter = isPaused) BOOL paused; + +/** + @abstract Flag indicating whether animation autoreverses. + @discussion An animation that autoreverses will have twice the duration before it is considered finished. It will animate to the toValue, stop, then animate back to the original fromValue. The delegate methods are called as follows: + + 1) animationDidStart: is called at the beginning, as usual, and then after each toValue is reached and the autoreverse is going to start. + 2) animationDidReachToValue: is called every time the toValue is reached. The toValue is swapped with the fromValue at the end of each animation segment. This means that with autoreverses set to YES, the animationDidReachToValue: delegate method will be called a minimum of twice. + 3) animationDidStop:finished: is called every time the toValue is reached, the finished argument will be NO if the autoreverse is not yet complete. + */ +@property (assign, nonatomic) BOOL autoreverses; + +/** + @abstract The number of times to repeat the animation. + @discussion A repeatCount of 0 or 1 means that the animation will not repeat, just like Core Animation. A repeatCount of 2 or greater means that the animation will run that many times before stopping. The delegate methods are called as follows: + + 1) animationDidStart: is called at the beginning of each animation repeat. + 2) animationDidReachToValue: is called every time the toValue is reached. + 3) animationDidStop:finished: is called every time the toValue is reached, the finished argument will be NO if the autoreverse is not yet complete. + +When combined with the autoreverses property, a singular animation is effectively twice as long. + */ +@property (assign, nonatomic) NSInteger repeatCount; + +/** + @abstract Repeat the animation forever. + @discussion This property will make the animation repeat forever. The value of the repeatCount property is undefined when this property is set. The finished parameter of the delegate callback animationDidStop:finished: will always be NO. + */ +@property (assign, nonatomic) BOOL repeatForever; + +@end + +/** + @abstract The animation delegate. + */ +@protocol POPAnimationDelegate +@optional + +/** + @abstract Called on animation start. + @param anim The relevant animation. + */ +- (void)pop_animationDidStart:(POPAnimation *)anim; + +/** + @abstract Called when value meets or exceeds to value. + @param anim The relevant animation. + */ +- (void)pop_animationDidReachToValue:(POPAnimation *)anim; + +/** + @abstract Called on animation stop. + @param anim The relevant animation. + @param finished Flag indicating finished state. Flag is true if the animation reached completion before being removed. + */ +- (void)pop_animationDidStop:(POPAnimation *)anim finished:(BOOL)finished; + +/** + @abstract Called each frame animation is applied. + @param anim The relevant animation. + */ +- (void)pop_animationDidApply:(POPAnimation *)anim; + +@end + + +@interface NSObject (POP) + +/** + @abstract Add an animation to the reciver. + @param anim The animation to add. + @param key The key used to identify the animation. + @discussion The 'key' may be any string such that only one animation per unique key is added per object. + */ +- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key; + +/** + @abstract Remove all animations attached to the receiver. + */ +- (void)pop_removeAllAnimations; + +/** + @abstract Remove any animation attached to the receiver for 'key'. + @param key The key used to identify the animation. + */ +- (void)pop_removeAnimationForKey:(NSString *)key; + +/** + @abstract Returns an array containing the keys of all animations currently attached to the receiver. + @param The order of keys reflects the order in which animations will be applied. + */ +- (NSArray *)pop_animationKeys; + +/** + @abstract Returns any animation attached to the receiver. + @param key The key used to identify the animation. + @returns The animation currently attached, or nil if no such animation exists. + */ +- (id)pop_animationForKey:(NSString *)key; + +@end + +/** + * This implementation of NSCopying does not do any copying of animation's state, but only configuration. + * i.e. you cannot copy an animation and expect to apply it to a view and have the copied animation pick up where the original left off. + * Two common uses of copying animations: + * * you need to apply the same animation to multiple different views. + * * you need to absolutely ensure that the the caller of your function cannot mutate the animation once it's been passed in. + */ +@interface POPAnimation (NSCopying) + +@end diff --git a/Pods/pop/pop/POPAnimation.mm b/Pods/pop/pop/POPAnimation.mm new file mode 100644 index 0000000..75bdeb1 --- /dev/null +++ b/Pods/pop/pop/POPAnimation.mm @@ -0,0 +1,303 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimationExtras.h" +#import "POPAnimationInternal.h" + +#import + +#import "POPAction.h" +#import "POPAnimationRuntime.h" +#import "POPAnimationTracerInternal.h" +#import "POPAnimatorPrivate.h" + +using namespace POP; + +#pragma mark - POPAnimation + +@implementation POPAnimation +@synthesize solver = _solver; +@synthesize currentValue = _currentValue; +@synthesize progressMarkers = _progressMarkers; + +#pragma mark - Lifecycle + +- (id)init +{ + [NSException raise:NSStringFromClass([self class]) format:@"Attempting to instantiate an abstract class. Use a concrete subclass instead."]; + return nil; +} + +- (id)_init +{ + self = [super init]; + if (nil != self) { + [self _initState]; + } + return self; +} + +- (void)_initState +{ + _state = new POPAnimationState(self); +} + +- (void)dealloc +{ + if (_state) { + delete _state; + _state = NULL; + }; +} + +#pragma mark - Properties + +- (id)delegate +{ + return _state->delegate; +} + +- (void)setDelegate:(id)delegate +{ + _state->setDelegate(delegate); +} + +- (BOOL)isPaused +{ + return _state->paused; +} + +- (void)setPaused:(BOOL)paused +{ + _state->setPaused(paused ? true : false); +} + +- (NSInteger)repeatCount +{ + if (_state->autoreverses) { + return _state->repeatCount / 2; + } else { + return _state->repeatCount; + } +} + +- (void)setRepeatCount:(NSInteger)repeatCount +{ + if (repeatCount > 0) { + if (repeatCount > NSIntegerMax / 2) { + repeatCount = NSIntegerMax / 2; + } + + if (_state->autoreverses) { + _state->repeatCount = (repeatCount * 2); + } else { + _state->repeatCount = repeatCount; + } + } +} + +- (BOOL)autoreverses +{ + return _state->autoreverses; +} + +- (void)setAutoreverses:(BOOL)autoreverses +{ + _state->autoreverses = autoreverses; + if (autoreverses) { + if (_state->repeatCount == 0) { + [self setRepeatCount:1]; + } + } +} + +FB_PROPERTY_GET(POPAnimationState, type, POPAnimationType); +DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, animationDidStartBlock, setAnimationDidStartBlock:, POPAnimationDidStartBlock); +DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, animationDidReachToValueBlock, setAnimationDidReachToValueBlock:, POPAnimationDidReachToValueBlock); +DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, completionBlock, setCompletionBlock:, POPAnimationCompletionBlock); +DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, animationDidApplyBlock, setAnimationDidApplyBlock:, POPAnimationDidApplyBlock); +DEFINE_RW_PROPERTY_OBJ_COPY(POPAnimationState, name, setName:, NSString*); +DEFINE_RW_PROPERTY(POPAnimationState, beginTime, setBeginTime:, CFTimeInterval); +DEFINE_RW_FLAG(POPAnimationState, removedOnCompletion, removedOnCompletion, setRemovedOnCompletion:); +DEFINE_RW_FLAG(POPAnimationState, repeatForever, repeatForever, setRepeatForever:); + +- (id)valueForUndefinedKey:(NSString *)key +{ + return _state->dict[key]; +} + +- (void)setValue:(id)value forUndefinedKey:(NSString *)key +{ + if (!value) { + [_state->dict removeObjectForKey:key]; + } else { + if (!_state->dict) + _state->dict = [[NSMutableDictionary alloc] init]; + _state->dict[key] = value; + } +} + +- (POPAnimationTracer *)tracer +{ + if (!_state->tracer) { + _state->tracer = [[POPAnimationTracer alloc] initWithAnimation:self]; + } + return _state->tracer; +} + +- (NSString *)description +{ + NSMutableString *s = [NSMutableString stringWithFormat:@"<%@:%p", NSStringFromClass([self class]), self]; + [self _appendDescription:s debug:NO]; + [s appendString:@">"]; + return s; +} + +- (NSString *)debugDescription +{ + NSMutableString *s = [NSMutableString stringWithFormat:@"<%@:%p", NSStringFromClass([self class]), self]; + [self _appendDescription:s debug:YES]; + [s appendString:@">"]; + return s; +} + +#pragma mark - Utility + +POPAnimationState *POPAnimationGetState(POPAnimation *a) +{ + return a->_state; +} + +- (BOOL)_advance:(id)object currentTime:(CFTimeInterval)currentTime elapsedTime:(CFTimeInterval)elapsedTime +{ + return YES; +} + +- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug +{ + if (_state->name) + [s appendFormat:@"; name = %@", _state->name]; + + if (!self.removedOnCompletion) + [s appendFormat:@"; removedOnCompletion = %@", POPStringFromBOOL(self.removedOnCompletion)]; + + if (debug) { + if (_state->active) + [s appendFormat:@"; active = %@", POPStringFromBOOL(_state->active)]; + + if (_state->paused) + [s appendFormat:@"; paused = %@", POPStringFromBOOL(_state->paused)]; + } + + if (_state->beginTime) { + [s appendFormat:@"; beginTime = %f", _state->beginTime]; + } + + for (NSString *key in _state->dict) { + [s appendFormat:@"; %@ = %@", key, _state->dict[key]]; + } +} + +@end + + +#pragma mark - POPPropertyAnimation + +#pragma mark - POPBasicAnimation + +#pragma mark - POPDecayAnimation + +@implementation NSObject (POP) + +- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key +{ + [[POPAnimator sharedAnimator] addAnimation:anim forObject:self key:key]; +} + +- (void)pop_removeAllAnimations +{ + [[POPAnimator sharedAnimator] removeAllAnimationsForObject:self]; +} + +- (void)pop_removeAnimationForKey:(NSString *)key +{ + [[POPAnimator sharedAnimator] removeAnimationForObject:self key:key]; +} + +- (NSArray *)pop_animationKeys +{ + return [[POPAnimator sharedAnimator] animationKeysForObject:self]; +} + +- (id)pop_animationForKey:(NSString *)key +{ + return [[POPAnimator sharedAnimator] animationForObject:self key:key]; +} + +@end + +@implementation NSProxy (POP) + +- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key +{ + [[POPAnimator sharedAnimator] addAnimation:anim forObject:self key:key]; +} + +- (void)pop_removeAllAnimations +{ + [[POPAnimator sharedAnimator] removeAllAnimationsForObject:self]; +} + +- (void)pop_removeAnimationForKey:(NSString *)key +{ + [[POPAnimator sharedAnimator] removeAnimationForObject:self key:key]; +} + +- (NSArray *)pop_animationKeys +{ + return [[POPAnimator sharedAnimator] animationKeysForObject:self]; +} + +- (id)pop_animationForKey:(NSString *)key +{ + return [[POPAnimator sharedAnimator] animationForObject:self key:key]; +} + +@end + +@implementation POPAnimation (NSCopying) + +- (instancetype)copyWithZone:(NSZone *)zone +{ + /* + * Must use [self class] instead of POPAnimation so that subclasses can call this via super. + * Even though POPAnimation and POPPropertyAnimation throw exceptions on init, + * it's safe to call it since you can only copy objects that have been successfully created. + */ + POPAnimation *copy = [[[self class] allocWithZone:zone] init]; + + if (copy) { + copy.name = self.name; + copy.beginTime = self.beginTime; + copy.delegate = self.delegate; + copy.animationDidStartBlock = self.animationDidStartBlock; + copy.animationDidReachToValueBlock = self.animationDidReachToValueBlock; + copy.completionBlock = self.completionBlock; + copy.animationDidApplyBlock = self.animationDidApplyBlock; + copy.removedOnCompletion = self.removedOnCompletion; + + copy.autoreverses = self.autoreverses; + copy.repeatCount = self.repeatCount; + copy.repeatForever = self.repeatForever; + } + + return copy; +} + +@end \ No newline at end of file diff --git a/Pods/pop/pop/POPAnimationEvent.h b/Pods/pop/pop/POPAnimationEvent.h new file mode 100644 index 0000000..e761091 --- /dev/null +++ b/Pods/pop/pop/POPAnimationEvent.h @@ -0,0 +1,69 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +/** + @abstract Enumeraton of animation event types. + */ +typedef NS_ENUM(NSUInteger, POPAnimationEventType) { + kPOPAnimationEventPropertyRead = 0, + kPOPAnimationEventPropertyWrite, + kPOPAnimationEventToValueUpdate, + kPOPAnimationEventFromValueUpdate, + kPOPAnimationEventVelocityUpdate, + kPOPAnimationEventBouncinessUpdate, + kPOPAnimationEventSpeedUpdate, + kPOPAnimationEventFrictionUpdate, + kPOPAnimationEventMassUpdate, + kPOPAnimationEventTensionUpdate, + kPOPAnimationEventDidStart, + kPOPAnimationEventDidStop, + kPOPAnimationEventDidReachToValue, + kPOPAnimationEventAutoreversed +}; + +/** + @abstract The base animation event class. + */ +@interface POPAnimationEvent : NSObject + +/** + @abstract The event type. See {@ref POPAnimationEventType} for possible values. + */ +@property (readonly, nonatomic, assign) POPAnimationEventType type; + +/** + @abstract The time of event. + */ +@property (readonly, nonatomic, assign) CFTimeInterval time; + +/** + @abstract Optional string describing the animation at time of event. + */ +@property (readonly, nonatomic, copy) NSString *animationDescription; + +@end + +/** + @abstract An animation event subclass for recording value and velocity. + */ +@interface POPAnimationValueEvent : POPAnimationEvent + +/** + @abstract The value recorded. + */ +@property (readonly, nonatomic, strong) id value; + +/** + @abstract The velocity recorded, if any. + */ +@property (readonly, nonatomic, strong) id velocity; + +@end diff --git a/Pods/pop/pop/POPAnimationEvent.mm b/Pods/pop/pop/POPAnimationEvent.mm new file mode 100644 index 0000000..d3a13b6 --- /dev/null +++ b/Pods/pop/pop/POPAnimationEvent.mm @@ -0,0 +1,108 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimationEvent.h" +#import "POPAnimationEventInternal.h" + +static NSString *stringFromType(POPAnimationEventType aType) +{ + switch (aType) { + case kPOPAnimationEventPropertyRead: + return @"read"; + case kPOPAnimationEventPropertyWrite: + return @"write"; + case kPOPAnimationEventToValueUpdate: + return @"toValue"; + case kPOPAnimationEventFromValueUpdate: + return @"fromValue"; + case kPOPAnimationEventVelocityUpdate: + return @"velocity"; + case kPOPAnimationEventSpeedUpdate: + return @"speed"; + case kPOPAnimationEventBouncinessUpdate: + return @"bounciness"; + case kPOPAnimationEventFrictionUpdate: + return @"friction"; + case kPOPAnimationEventMassUpdate: + return @"mass"; + case kPOPAnimationEventTensionUpdate: + return @"tension"; + case kPOPAnimationEventDidStart: + return @"didStart"; + case kPOPAnimationEventDidStop: + return @"didStop"; + case kPOPAnimationEventDidReachToValue: + return @"didReachToValue"; + case kPOPAnimationEventAutoreversed: + return @"autoreversed"; + default: + return nil; + } +} + +@implementation POPAnimationEvent +@synthesize type = _type; +@synthesize time = _time; +@synthesize animationDescription = _animationDescription; + +- (instancetype)initWithType:(POPAnimationEventType)aType time:(CFTimeInterval)aTime +{ + self = [super init]; + if (nil != self) { + _type = aType; + _time = aTime; + } + return self; +} + +- (NSString *)description +{ + NSMutableString *s = [NSMutableString stringWithFormat:@""]; + return s; +} + +// subclass override +- (void)_appendDescription:(NSMutableString *)s +{ + if (0 != _animationDescription.length) { + [s appendFormat:@"; animation = %@", _animationDescription]; + } +} + +@end + +@implementation POPAnimationValueEvent +@synthesize value = _value; +@synthesize velocity = _velocity; + +- (instancetype)initWithType:(POPAnimationEventType)aType time:(CFTimeInterval)aTime value:(id)aValue +{ + self = [self initWithType:aType time:aTime]; + if (nil != self) { + _value = aValue; + } + return self; +} + +- (void)_appendDescription:(NSMutableString *)s +{ + [super _appendDescription:s]; + + if (nil != _value) { + [s appendFormat:@"; value = %@", _value]; + } + + if (nil != _velocity) { + [s appendFormat:@"; velocity = %@", _velocity]; + } +} + +@end diff --git a/Pods/pop/pop/POPAnimationEventInternal.h b/Pods/pop/pop/POPAnimationEventInternal.h new file mode 100644 index 0000000..398d59b --- /dev/null +++ b/Pods/pop/pop/POPAnimationEventInternal.h @@ -0,0 +1,41 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import "POPAnimationEvent.h" + +@interface POPAnimationEvent () + +/** + @abstract Default initializer. + */ +- (instancetype)initWithType:(POPAnimationEventType)type time:(CFTimeInterval)time; + +/** + @abstract Readwrite redefinition of public property. + */ +@property (readwrite, nonatomic, copy) NSString *animationDescription; + +@end + +@interface POPAnimationValueEvent () + +/** + @abstract Default initializer. + */ +- (instancetype)initWithType:(POPAnimationEventType)type time:(CFTimeInterval)time value:(id)value; + +/** + @abstract Readwrite redefinition of public property. + */ +@property (readwrite, nonatomic, strong) id velocity; + +@end + diff --git a/Pods/pop/pop/POPAnimationExtras.h b/Pods/pop/pop/POPAnimationExtras.h new file mode 100644 index 0000000..4b3d237 --- /dev/null +++ b/Pods/pop/pop/POPAnimationExtras.h @@ -0,0 +1,43 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import +#import + +/** + @abstract The current drag coefficient. + @discussion A value greater than 1.0 indicates Simulator slow-motion animations are enabled. Defaults to 1.0. + */ +extern CGFloat POPAnimationDragCoefficient(); + +@interface CAAnimation (POPAnimationExtras) + +/** + @abstract Apply the current drag coefficient to animation speed. + @discussion Convenience utility to respect Simulator slow-motion animation settings. + */ +- (void)pop_applyDragCoefficient; + +@end + +@interface POPSpringAnimation (POPAnimationExtras) + +/** + @abstract Converts from spring bounciness and speed to tension, friction and mass dynamics values. + */ ++ (void)convertBounciness:(CGFloat)bounciness speed:(CGFloat)speed toTension:(CGFloat *)outTension friction:(CGFloat *)outFriction mass:(CGFloat *)outMass; + +/** + @abstract Converts from dynamics tension, friction and mass to spring bounciness and speed values. + */ ++ (void)convertTension:(CGFloat)tension friction:(CGFloat)friction toBounciness:(CGFloat *)outBounciness speed:(CGFloat *)outSpeed; + +@end diff --git a/Pods/pop/pop/POPAnimationExtras.mm b/Pods/pop/pop/POPAnimationExtras.mm new file mode 100644 index 0000000..0a6d6c9 --- /dev/null +++ b/Pods/pop/pop/POPAnimationExtras.mm @@ -0,0 +1,117 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimationExtras.h" +#import "POPAnimationPrivate.h" + +#if TARGET_OS_IPHONE +#import +#endif + +#if TARGET_IPHONE_SIMULATOR +UIKIT_EXTERN float UIAnimationDragCoefficient(); // UIKit private drag coeffient, use judiciously +#endif + +#import "POPMath.h" + +CGFloat POPAnimationDragCoefficient() +{ +#if TARGET_IPHONE_SIMULATOR + return UIAnimationDragCoefficient(); +#else + return 1.0; +#endif +} + +@implementation CAAnimation (POPAnimationExtras) + +- (void)pop_applyDragCoefficient +{ + CGFloat k = POPAnimationDragCoefficient(); + if (k != 0 && k != 1) + self.speed = 1 / k; +} + +@end + +@implementation POPSpringAnimation (POPAnimationExtras) + +static const CGFloat POPBouncy3NormalizationRange = 20.0; +static const CGFloat POPBouncy3NormalizationScale = 1.7; +static const CGFloat POPBouncy3BouncinessNormalizedMin = 0.0; +static const CGFloat POPBouncy3BouncinessNormalizedMax = 0.8; +static const CGFloat POPBouncy3SpeedNormalizedMin = 0.5; +static const CGFloat POPBouncy3SpeedNormalizedMax = 200; +static const CGFloat POPBouncy3FrictionInterpolationMax = 0.01; + ++ (void)convertBounciness:(CGFloat)bounciness speed:(CGFloat)speed toTension:(CGFloat *)outTension friction:(CGFloat *)outFriction mass:(CGFloat *)outMass +{ + double b = POPNormalize(bounciness / POPBouncy3NormalizationScale, 0, POPBouncy3NormalizationRange); + b = POPProjectNormal(b, POPBouncy3BouncinessNormalizedMin, POPBouncy3BouncinessNormalizedMax); + + double s = POPNormalize(speed / POPBouncy3NormalizationScale, 0, POPBouncy3NormalizationRange); + + CGFloat tension = POPProjectNormal(s, POPBouncy3SpeedNormalizedMin, POPBouncy3SpeedNormalizedMax); + CGFloat friction = POPQuadraticOutInterpolation(b, POPBouncy3NoBounce(tension), POPBouncy3FrictionInterpolationMax); + + tension = POP_ANIMATION_TENSION_FOR_QC_TENSION(tension); + friction = POP_ANIMATION_FRICTION_FOR_QC_FRICTION(friction); + + if (outTension) { + *outTension = tension; + } + + if (outFriction) { + *outFriction = friction; + } + + if (outMass) { + *outMass = 1.0; + } +} + ++ (void)convertTension:(CGFloat)tension friction:(CGFloat)friction toBounciness:(CGFloat *)outBounciness speed:(CGFloat *)outSpeed +{ + // Convert to QC values, in which our calculations are done. + CGFloat qcFriction = QC_FRICTION_FOR_POP_ANIMATION_FRICTION(friction); + CGFloat qcTension = QC_TENSION_FOR_POP_ANIMATION_TENSION(tension); + + // Friction is a function of bounciness and tension, according to the following: + // friction = POPQuadraticOutInterpolation(b, POPBouncy3NoBounce(tension), POPBouncy3FrictionInterpolationMax); + // Solve for bounciness, given a tension and friction. + + CGFloat nobounceTension = POPBouncy3NoBounce(qcTension); + CGFloat bounciness1, bounciness2; + + POPQuadraticSolve((nobounceTension - POPBouncy3FrictionInterpolationMax), // a + 2 * (POPBouncy3FrictionInterpolationMax - nobounceTension), // b + (nobounceTension - qcFriction), // c + bounciness1, // x1 + bounciness2); // x2 + + + // Choose the quadratic solution within the normalized bounciness range + CGFloat projectedNormalizedBounciness = (bounciness2 < POPBouncy3BouncinessNormalizedMax) ? bounciness2 : bounciness1; + CGFloat projectedNormalizedSpeed = qcTension; + + // Reverse projection + normalization + CGFloat bounciness = ((POPBouncy3NormalizationRange * POPBouncy3NormalizationScale) / (POPBouncy3BouncinessNormalizedMax - POPBouncy3BouncinessNormalizedMin)) * (projectedNormalizedBounciness - POPBouncy3BouncinessNormalizedMin); + CGFloat speed = ((POPBouncy3NormalizationRange * POPBouncy3NormalizationScale) / (POPBouncy3SpeedNormalizedMax - POPBouncy3SpeedNormalizedMin)) * (projectedNormalizedSpeed - POPBouncy3SpeedNormalizedMin); + + // Write back results + if (outBounciness) { + *outBounciness = bounciness; + } + + if (outSpeed) { + *outSpeed = speed; + } +} + +@end diff --git a/Pods/pop/pop/POPAnimationInternal.h b/Pods/pop/pop/POPAnimationInternal.h new file mode 100644 index 0000000..317364f --- /dev/null +++ b/Pods/pop/pop/POPAnimationInternal.h @@ -0,0 +1,505 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimation.h" + +#import + +#import "POPAction.h" +#import "POPAnimationRuntime.h" +#import "POPAnimationTracerInternal.h" +#import "POPSpringSolver.h" + +using namespace POP; + +/** + Enumeration of supported animation types. + */ +enum POPAnimationType +{ + kPOPAnimationSpring, + kPOPAnimationDecay, + kPOPAnimationBasic, + kPOPAnimationCustom, +}; + +typedef struct +{ + CGFloat progress; + bool reached; +} POPProgressMarker; + +typedef void (^POPAnimationDidStartBlock)(POPAnimation *anim); +typedef void (^POPAnimationDidReachToValueBlock)(POPAnimation *anim); +typedef void (^POPAnimationCompletionBlock)(POPAnimation *anim, BOOL finished); +typedef void (^POPAnimationDidApplyBlock)(POPAnimation *anim); + +@interface POPAnimation() +- (instancetype)_init; + +@property (assign, nonatomic) SpringSolver4d *solver; +@property (readonly, nonatomic) POPAnimationType type; + +/** + The current animation value, updated while animation is progressing. + */ +@property (copy, nonatomic, readonly) id currentValue; + +/** + An array of optional progress markers. For each marker specified, the animation delegate will be informed when progress meets or exceeds the value specified. Specifying values outside of the [0, 1] range will give undefined results. + */ +@property (copy, nonatomic) NSArray *progressMarkers; + +/** + Return YES to indicate animation should continue animating. + */ +- (BOOL)_advance:(id)object currentTime:(CFTimeInterval)currentTime elapsedTime:(CFTimeInterval)elapsedTime; + +/** + Subclass override point to append animation description. + */ +- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug; + +@end + +NS_INLINE NSString *describe(VectorConstRef vec) +{ + return NULL == vec ? @"null" : vec->toString(); +} + +NS_INLINE Vector4r vector4(VectorConstRef vec) +{ + return NULL == vec ? Vector4r::Zero() : vec->vector4r(); +} + +NS_INLINE Vector4d vector4d(VectorConstRef vec) +{ + if (NULL == vec) { + return Vector4d::Zero(); + } else { + return vec->vector4r().cast(); + } +} + +NS_INLINE bool vec_equal(VectorConstRef v1, VectorConstRef v2) +{ + if (v1 == v2) { + return true; + } + if (!v1 || !v2) { + return false; + } + return *v1 == *v2; +} + +NS_INLINE CGFloat * vec_data(VectorRef vec) +{ + return NULL == vec ? NULL : vec->data(); +} + +template +struct ComputeProgressFunctor { + CGFloat operator()(const T &value, const T &start, const T &end) const { + return 0; + } +}; + +template<> +struct ComputeProgressFunctor { + CGFloat operator()(const Vector4r &value, const Vector4r &start, const Vector4r &end) const { + CGFloat s = (value - start).squaredNorm(); // distance from start + CGFloat e = (value - end).squaredNorm(); // distance from end + CGFloat d = (end - start).squaredNorm(); // distance from start to end + + if (0 == d) { + return 1; + } else if (s > e) { + // s -------- p ---- e OR s ------- e ---- p + return sqrtr(s/d); + } else { + // s --- p --------- e OR p ---- s ------- e + return 1 - sqrtr(e/d); + } + } +}; + +struct _POPAnimationState; +struct _POPDecayAnimationState; +struct _POPPropertyAnimationState; + +extern _POPAnimationState *POPAnimationGetState(POPAnimation *a); + + +#define FB_FLAG_GET(stype, flag, getter) \ +- (BOOL)getter { \ + return ((stype *)_state)->flag; \ +} + +#define FB_FLAG_SET(stype, flag, mutator) \ +- (void)mutator (BOOL)value { \ + if (value == ((stype *)_state)->flag) \ + return; \ + ((stype *)_state)->flag = value; \ +} + +#define DEFINE_RW_FLAG(stype, flag, getter, mutator) \ + FB_FLAG_GET (stype, flag, getter) \ + FB_FLAG_SET (stype, flag, mutator) + +#define FB_PROPERTY_GET(stype, property, ctype) \ +- (ctype)property { \ + return ((stype *)_state)->property; \ +} + +#define FB_PROPERTY_SET(stype, property, mutator, ctype, ...) \ +- (void)mutator (ctype)value { \ + if (value == ((stype *)_state)->property) \ + return; \ + ((stype *)_state)->property = value; \ + __VA_ARGS__ \ +} + +#define FB_PROPERTY_SET_OBJ_COPY(stype, property, mutator, ctype, ...) \ +- (void)mutator (ctype)value { \ + if (value == ((stype *)_state)->property) \ + return; \ + ((stype *)_state)->property = [value copy]; \ + __VA_ARGS__ \ +} + +#define DEFINE_RW_PROPERTY(stype, flag, mutator, ctype, ...) \ + FB_PROPERTY_GET (stype, flag, ctype) \ + FB_PROPERTY_SET (stype, flag, mutator, ctype, __VA_ARGS__) + +#define DEFINE_RW_PROPERTY_OBJ(stype, flag, mutator, ctype, ...) \ + FB_PROPERTY_GET (stype, flag, ctype) \ + FB_PROPERTY_SET (stype, flag, mutator, ctype, __VA_ARGS__) + +#define DEFINE_RW_PROPERTY_OBJ_COPY(stype, flag, mutator, ctype, ...) \ + FB_PROPERTY_GET (stype, flag, ctype) \ + FB_PROPERTY_SET_OBJ_COPY (stype, flag, mutator, ctype, __VA_ARGS__) + + +/** + Internal delegate definition. + */ +@interface NSObject (POPAnimationDelegateInternal) +- (void)pop_animation:(POPAnimation *)anim didReachProgress:(CGFloat)progress; +@end + +struct _POPAnimationState +{ + id __unsafe_unretained self; + POPAnimationType type; + NSString *name; + NSUInteger ID; + CFTimeInterval beginTime; + CFTimeInterval startTime; + CFTimeInterval lastTime; + id __weak delegate; + POPAnimationDidStartBlock animationDidStartBlock; + POPAnimationDidReachToValueBlock animationDidReachToValueBlock; + POPAnimationCompletionBlock completionBlock; + POPAnimationDidApplyBlock animationDidApplyBlock; + NSMutableDictionary *dict; + POPAnimationTracer *tracer; + CGFloat progress; + NSInteger repeatCount; + + bool active:1; + bool paused:1; + bool removedOnCompletion:1; + + bool delegateDidStart:1; + bool delegateDidStop:1; + bool delegateDidProgress:1; + bool delegateDidApply:1; + bool delegateDidReachToValue:1; + + bool additive:1; + bool didReachToValue:1; + bool tracing:1; // corresponds to tracer started + bool userSpecifiedDynamics:1; + bool autoreverses:1; + bool repeatForever:1; + bool customFinished:1; + + _POPAnimationState(id __unsafe_unretained anim) : + self(anim), + type((POPAnimationType)0), + name(nil), + ID(0), + beginTime(0), + startTime(0), + lastTime(0), + delegate(nil), + animationDidStartBlock(nil), + animationDidReachToValueBlock(nil), + completionBlock(nil), + animationDidApplyBlock(nil), + dict(nil), + tracer(nil), + progress(0), + repeatCount(0), + active(false), + paused(true), + removedOnCompletion(true), + delegateDidStart(false), + delegateDidStop(false), + delegateDidProgress(false), + delegateDidApply(false), + delegateDidReachToValue(false), + additive(false), + didReachToValue(false), + tracing(false), + userSpecifiedDynamics(false), + autoreverses(false), + repeatForever(false), + customFinished(false) {} + + virtual ~_POPAnimationState() + { + name = nil; + dict = nil; + tracer = nil; + animationDidStartBlock = NULL; + animationDidReachToValueBlock = NULL; + completionBlock = NULL; + animationDidApplyBlock = NULL; + } + + bool isCustom() { + return kPOPAnimationCustom == type; + } + + bool isStarted() { + return 0 != startTime; + } + + id getDelegate() { + return delegate; + } + + void setDelegate(id d) { + if (d != delegate) { + delegate = d; + delegateDidStart = [d respondsToSelector:@selector(pop_animationDidStart:)]; + delegateDidStop = [d respondsToSelector:@selector(pop_animationDidStop:finished:)]; + delegateDidProgress = [d respondsToSelector:@selector(pop_animation:didReachProgress:)]; + delegateDidApply = [d respondsToSelector:@selector(pop_animationDidApply:)]; + delegateDidReachToValue = [d respondsToSelector:@selector(pop_animationDidReachToValue:)]; + } + } + + bool getPaused() { + return paused; + } + + void setPaused(bool f) { + if (f != paused) { + paused = f; + if (!paused) { + reset(false); + } + } + } + + CGFloat getProgress() { + return progress; + } + + /* returns true if started */ + bool startIfNeeded(id obj, CFTimeInterval time, CFTimeInterval offset) + { + bool started = false; + + // detect start based on time + if (0 == startTime && time >= beginTime + offset) { + + // activate & unpause + active = true; + setPaused(false); + + // note start time + startTime = lastTime = time; + started = true; + } + + // ensure values for running animation + bool running = active && !paused; + if (running) { + willRun(started, obj); + } + + // handle start + if (started) { + handleDidStart(); + } + + return started; + } + + void stop(bool removing, bool done) { + if (active) + { + // delegate progress one last time + if (done) { + delegateProgress(); + } + + if (removing) { + active = false; + } + + handleDidStop(done); + } else { + + // stopped before even started + // delegate start and stop regardless; matches CA behavior + if (!isStarted()) { + handleDidStart(); + handleDidStop(false); + } + } + + setPaused(true); + } + + virtual void handleDidStart() + { + if (delegateDidStart) { + ActionEnabler enabler; + [delegate pop_animationDidStart:self]; + } + + POPAnimationDidStartBlock block = animationDidStartBlock; + if (block != NULL) { + ActionEnabler enabler; + block(self); + } + + if (tracing) { + [tracer didStart]; + } + } + + void handleDidStop(BOOL done) + { + if (delegateDidStop) { + ActionEnabler enabler; + [delegate pop_animationDidStop:self finished:done]; + } + + // add another strong reference to completion block before callout + POPAnimationCompletionBlock block = completionBlock; + if (block != NULL) { + ActionEnabler enabler; + block(self, done); + } + + if (tracing) { + [tracer didStop:done]; + } + } + + /* virtual functions */ + virtual bool isDone() { + if (isCustom()) { + return customFinished; + } + + return false; + } + + bool advanceTime(CFTimeInterval time, id obj) { + bool advanced = false; + bool computedProgress = false; + CFTimeInterval dt = time - lastTime; + + switch (type) { + case kPOPAnimationSpring: + advanced = advance(time, dt, obj); + break; + case kPOPAnimationDecay: + advanced = advance(time, dt, obj); + break; + case kPOPAnimationBasic: { + advanced = advance(time, dt, obj); + computedProgress = true; + break; + } + case kPOPAnimationCustom: { + customFinished = [self _advance:obj currentTime:time elapsedTime:dt] ? false : true; + advanced = true; + break; + } + default: + break; + } + + if (advanced) { + + // estimate progress + if (!computedProgress) { + computeProgress(); + } + + // delegate progress + delegateProgress(); + + // update time + lastTime = time; + } + + return advanced; + } + + virtual void willRun(bool started, id obj) {} + virtual bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { return false; } + virtual void computeProgress() {} + virtual void delegateProgress() {} + + virtual void delegateApply() { + if (delegateDidApply) { + ActionEnabler enabler; + [delegate pop_animationDidApply:self]; + } + + POPAnimationDidApplyBlock block = animationDidApplyBlock; + if (block != NULL) { + ActionEnabler enabler; + block(self); + } + } + + virtual void reset(bool all) { + startTime = 0; + lastTime = 0; + } +}; + +typedef struct _POPAnimationState POPAnimationState; + + +@interface POPAnimation () +{ +@protected + struct _POPAnimationState *_state; +} + +@end + +// NSProxy extensions, for testing pursposes +@interface NSProxy (POP) +- (void)pop_addAnimation:(POPAnimation *)anim forKey:(NSString *)key; +- (void)pop_removeAllAnimations; +- (void)pop_removeAnimationForKey:(NSString *)key; +- (NSArray *)pop_animationKeys; +- (POPAnimation *)pop_animationForKey:(NSString *)key; +@end diff --git a/Pods/pop/pop/POPAnimationPrivate.h b/Pods/pop/pop/POPAnimationPrivate.h new file mode 100644 index 0000000..c0f06c5 --- /dev/null +++ b/Pods/pop/pop/POPAnimationPrivate.h @@ -0,0 +1,16 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#define POP_ANIMATION_FRICTION_FOR_QC_FRICTION(qcFriction) (25.0 + (((qcFriction - 8.0) / 2.0) * (25.0 - 19.0))) +#define POP_ANIMATION_TENSION_FOR_QC_TENSION(qcTension) (194.0 + (((qcTension - 30.0) / 50.0) * (375.0 - 194.0))) + +#define QC_FRICTION_FOR_POP_ANIMATION_FRICTION(fbFriction) (8.0 + 2.0 * ((fbFriction - 25.0)/(25.0 - 19.0))) +#define QC_TENSION_FOR_POP_ANIMATION_TENSION(fbTension) (30.0 + 50.0 * ((fbTension - 194.0)/(375.0 - 194.0))) diff --git a/Pods/pop/pop/POPAnimationRuntime.h b/Pods/pop/pop/POPAnimationRuntime.h new file mode 100644 index 0000000..902c312 --- /dev/null +++ b/Pods/pop/pop/POPAnimationRuntime.h @@ -0,0 +1,103 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +#import "POPVector.h" + +enum POPValueType +{ + kPOPValueUnknown = 0, + kPOPValueInteger, + kPOPValueFloat, + kPOPValuePoint, + kPOPValueSize, + kPOPValueRect, + kPOPValueEdgeInsets, + kPOPValueAffineTransform, + kPOPValueTransform, + kPOPValueRange, + kPOPValueColor, + kPOPValueSCNVector3, + kPOPValueSCNVector4, +}; + +using namespace POP; + +/** + Returns value type based on objc type description, given list of supported value types and length. + */ +extern POPValueType POPSelectValueType(const char *objctype, const POPValueType *types, size_t length); + +/** + Returns value type based on objc object, given a list of supported value types and length. + */ +extern POPValueType POPSelectValueType(id obj, const POPValueType *types, size_t length); + +/** + Array of all value types. + */ +extern const POPValueType kPOPAnimatableAllTypes[12]; + +/** + Array of all value types supported for animation. + */ +extern const POPValueType kPOPAnimatableSupportTypes[10]; + +/** + Returns a string description of a value type. + */ +extern NSString *POPValueTypeToString(POPValueType t); + +/** + Returns a mutable dictionary of weak pointer keys to weak pointer values. + */ +extern CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToWeakPointer(NSUInteger capacity) CF_RETURNS_RETAINED; + +/** + Returns a mutable dictionary of weak pointer keys to weak pointer values. + */ +extern CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToStrongObject(NSUInteger capacity) CF_RETURNS_RETAINED; + +/** + Box a vector. + */ +extern id POPBox(VectorConstRef vec, POPValueType type, bool force = false); + +/** + Unbox a vector. + */ +extern VectorRef POPUnbox(id value, POPValueType &type, NSUInteger &count, bool validate); + +/** + Read/write block typedefs for convenience. + */ +typedef void(^pop_animatable_read_block)(id obj, CGFloat *value); +typedef void(^pop_animatable_write_block)(id obj, const CGFloat *value); + +/** + Read object value and return a Vector4r. + */ +NS_INLINE Vector4r read_values(pop_animatable_read_block read, id obj, size_t count) +{ + Vector4r vec = Vector4r::Zero(); + if (0 == count) + return vec; + + read(obj, vec.data()); + + return vec; +} + +NS_INLINE NSString *POPStringFromBOOL(BOOL value) +{ + return value ? @"YES" : @"NO"; +} diff --git a/Pods/pop/pop/POPAnimationRuntime.mm b/Pods/pop/pop/POPAnimationRuntime.mm new file mode 100644 index 0000000..371e009 --- /dev/null +++ b/Pods/pop/pop/POPAnimationRuntime.mm @@ -0,0 +1,329 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimationRuntime.h" + +#import + +#import + +#if TARGET_OS_IPHONE +#import +#endif + +#import "POPCGUtils.h" +#import "POPDefines.h" +#import "POPGeometry.h" +#import "POPVector.h" + +static Boolean pointerEqual(const void *ptr1, const void *ptr2) { + return ptr1 == ptr2; +} + +static CFHashCode pointerHash(const void *ptr) { + return (CFHashCode)(ptr); +} + +CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToWeakPointer(NSUInteger capacity) +{ + CFDictionaryKeyCallBacks kcb = kCFTypeDictionaryKeyCallBacks; + + // weak, pointer keys + kcb.retain = NULL; + kcb.release = NULL; + kcb.equal = pointerEqual; + kcb.hash = pointerHash; + + CFDictionaryValueCallBacks vcb = kCFTypeDictionaryValueCallBacks; + + // weak, pointer values + vcb.retain = NULL; + vcb.release = NULL; + vcb.equal = pointerEqual; + + return CFDictionaryCreateMutable(NULL, capacity, &kcb, &vcb); +} + +CFMutableDictionaryRef POPDictionaryCreateMutableWeakPointerToStrongObject(NSUInteger capacity) +{ + CFDictionaryKeyCallBacks kcb = kCFTypeDictionaryKeyCallBacks; + + // weak, pointer keys + kcb.retain = NULL; + kcb.release = NULL; + kcb.equal = pointerEqual; + kcb.hash = pointerHash; + + // strong, object values + CFDictionaryValueCallBacks vcb = kCFTypeDictionaryValueCallBacks; + + return CFDictionaryCreateMutable(NULL, capacity, &kcb, &vcb); +} + +static bool FBCompareTypeEncoding(const char *objctype, POPValueType type) +{ + switch (type) + { + case kPOPValueFloat: + return (strcmp(objctype, @encode(float)) == 0 + || strcmp(objctype, @encode(double)) == 0 + ); + + case kPOPValuePoint: + return (strcmp(objctype, @encode(CGPoint)) == 0 +#if !TARGET_OS_IPHONE + || strcmp(objctype, @encode(NSPoint)) == 0 +#endif + ); + + case kPOPValueSize: + return (strcmp(objctype, @encode(CGSize)) == 0 +#if !TARGET_OS_IPHONE + || strcmp(objctype, @encode(NSSize)) == 0 +#endif + ); + + case kPOPValueRect: + return (strcmp(objctype, @encode(CGRect)) == 0 +#if !TARGET_OS_IPHONE + || strcmp(objctype, @encode(NSRect)) == 0 +#endif + ); + case kPOPValueEdgeInsets: +#if TARGET_OS_IPHONE + return strcmp(objctype, @encode(UIEdgeInsets)) == 0; +#else + return false; +#endif + + case kPOPValueAffineTransform: + return strcmp(objctype, @encode(CGAffineTransform)) == 0; + + case kPOPValueTransform: + return strcmp(objctype, @encode(CATransform3D)) == 0; + + case kPOPValueRange: + return strcmp(objctype, @encode(CFRange)) == 0 + || strcmp(objctype, @encode (NSRange)) == 0; + + case kPOPValueInteger: + return (strcmp(objctype, @encode(int)) == 0 + || strcmp(objctype, @encode(unsigned int)) == 0 + || strcmp(objctype, @encode(short)) == 0 + || strcmp(objctype, @encode(unsigned short)) == 0 + || strcmp(objctype, @encode(long)) == 0 + || strcmp(objctype, @encode(unsigned long)) == 0 + || strcmp(objctype, @encode(long long)) == 0 + || strcmp(objctype, @encode(unsigned long long)) == 0 + ); + + case kPOPValueSCNVector3: +#if SCENEKIT_SDK_AVAILABLE + return strcmp(objctype, @encode(SCNVector3)) == 0; +#else + return false; +#endif + + case kPOPValueSCNVector4: +#if SCENEKIT_SDK_AVAILABLE + return strcmp(objctype, @encode(SCNVector4)) == 0; +#else + return false; +#endif + + default: + return false; + } +} + +POPValueType POPSelectValueType(const char *objctype, const POPValueType *types, size_t length) +{ + if (NULL != objctype) { + for (size_t idx = 0; idx < length; idx++) { + if (FBCompareTypeEncoding(objctype, types[idx])) + return types[idx]; + } + } + return kPOPValueUnknown; +} + +POPValueType POPSelectValueType(id obj, const POPValueType *types, size_t length) +{ + if ([obj isKindOfClass:[NSValue class]]) { + return POPSelectValueType([obj objCType], types, length); + } else if (NULL != POPCGColorWithColor(obj)) { + return kPOPValueColor; + } + return kPOPValueUnknown; +} + +const POPValueType kPOPAnimatableAllTypes[12] = {kPOPValueInteger, kPOPValueFloat, kPOPValuePoint, kPOPValueSize, kPOPValueRect, kPOPValueEdgeInsets, kPOPValueAffineTransform, kPOPValueTransform, kPOPValueRange, kPOPValueColor, kPOPValueSCNVector3, kPOPValueSCNVector4}; + +const POPValueType kPOPAnimatableSupportTypes[10] = {kPOPValueInteger, kPOPValueFloat, kPOPValuePoint, kPOPValueSize, kPOPValueRect, kPOPValueEdgeInsets, kPOPValueColor, kPOPValueSCNVector3, kPOPValueSCNVector4}; + +NSString *POPValueTypeToString(POPValueType t) +{ + switch (t) { + case kPOPValueUnknown: + return @"unknown"; + case kPOPValueInteger: + return @"int"; + case kPOPValueFloat: + return @"CGFloat"; + case kPOPValuePoint: + return @"CGPoint"; + case kPOPValueSize: + return @"CGSize"; + case kPOPValueRect: + return @"CGRect"; + case kPOPValueEdgeInsets: + return @"UIEdgeInsets"; + case kPOPValueAffineTransform: + return @"CGAffineTransform"; + case kPOPValueTransform: + return @"CATransform3D"; + case kPOPValueRange: + return @"CFRange"; + case kPOPValueColor: + return @"CGColorRef"; + case kPOPValueSCNVector3: + return @"SCNVector3"; + case kPOPValueSCNVector4: + return @"SCNVector4"; + default: + return nil; + } +} + +id POPBox(VectorConstRef vec, POPValueType type, bool force) +{ + if (NULL == vec) + return nil; + + switch (type) { + case kPOPValueInteger: + case kPOPValueFloat: + return @(vec->data()[0]); + break; + case kPOPValuePoint: + return [NSValue valueWithCGPoint:vec->cg_point()]; + break; + case kPOPValueSize: + return [NSValue valueWithCGSize:vec->cg_size()]; + break; + case kPOPValueRect: + return [NSValue valueWithCGRect:vec->cg_rect()]; + break; +#if TARGET_OS_IPHONE + case kPOPValueEdgeInsets: + return [NSValue valueWithUIEdgeInsets:vec->ui_edge_insets()]; + break; +#endif + case kPOPValueColor: { + return (__bridge_transfer id)vec->cg_color(); + break; + } +#if SCENEKIT_SDK_AVAILABLE + case kPOPValueSCNVector3: { + return [NSValue valueWithSCNVector3:vec->scn_vector3()]; + break; + } + case kPOPValueSCNVector4: { + return [NSValue valueWithSCNVector4:vec->scn_vector4()]; + break; + } +#endif + default: + return force ? [NSValue valueWithCGPoint:vec->cg_point()] : nil; + break; + } +} + +static VectorRef vectorize(id value, POPValueType type) +{ + Vector *vec = NULL; + + switch (type) { + case kPOPValueInteger: + case kPOPValueFloat: +#if CGFLOAT_IS_DOUBLE + vec = Vector::new_cg_float([value doubleValue]); +#else + vec = Vector::new_cg_float([value floatValue]); +#endif + break; + case kPOPValuePoint: + vec = Vector::new_cg_point([value CGPointValue]); + break; + case kPOPValueSize: + vec = Vector::new_cg_size([value CGSizeValue]); + break; + case kPOPValueRect: + vec = Vector::new_cg_rect([value CGRectValue]); + break; +#if TARGET_OS_IPHONE + case kPOPValueEdgeInsets: + vec = Vector::new_ui_edge_insets([value UIEdgeInsetsValue]); + break; +#endif + case kPOPValueAffineTransform: + vec = Vector::new_cg_affine_transform([value CGAffineTransformValue]); + break; + case kPOPValueColor: + vec = Vector::new_cg_color(POPCGColorWithColor(value)); + break; +#if SCENEKIT_SDK_AVAILABLE + case kPOPValueSCNVector3: + vec = Vector::new_scn_vector3([value SCNVector3Value]); + break; + case kPOPValueSCNVector4: + vec = Vector::new_scn_vector4([value SCNVector4Value]); + break; +#endif + default: + break; + } + + return VectorRef(vec); +} + +VectorRef POPUnbox(id value, POPValueType &animationType, NSUInteger &count, bool validate) +{ + if (nil == value) { + count = 0; + return VectorRef(NULL); + } + + // determine type of value + POPValueType valueType = POPSelectValueType(value, kPOPAnimatableSupportTypes, POP_ARRAY_COUNT(kPOPAnimatableSupportTypes)); + + // handle unknown types + if (kPOPValueUnknown == valueType) { + NSString *valueDesc = [[value class] description]; + [NSException raise:@"Unsuported value" format:@"Animating %@ values is not supported", valueDesc]; + } + + // vectorize + VectorRef vec = vectorize(value, valueType); + + if (kPOPValueUnknown == animationType || 0 == count) { + // update animation type based on value type + animationType = valueType; + if (NULL != vec) { + count = vec->size(); + } + } else if (validate) { + // allow for mismatched types, so long as vector size matches + if (count != vec->size()) { + [NSException raise:@"Invalid value" format:@"%@ should be of type %@", value, POPValueTypeToString(animationType)]; + } + } + + return vec; +} diff --git a/Pods/pop/pop/POPAnimationTracer.h b/Pods/pop/pop/POPAnimationTracer.h new file mode 100644 index 0000000..72b26c3 --- /dev/null +++ b/Pods/pop/pop/POPAnimationTracer.h @@ -0,0 +1,60 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +@class POPAnimation; + +/** + @abstract Tracer of animation events to fasciliate unit testing & debugging. + */ +@interface POPAnimationTracer : NSObject + +/** + @abstract Start recording events. + */ +- (void)start; + +/** + @abstract Stop recording events. + */ +- (void)stop; + +/** + @abstract Resets any recoded events. Continues recording events if already started. + */ +- (void)reset; + +/** + @abstract Property representing all recorded events. + @discussion Events are returned in order of occurence. + */ +@property (nonatomic, assign, readonly) NSArray *allEvents; + +/** + @abstract Property representing all recorded write events for convenience. + @discussion Events are returned in order of occurence. + */ +@property (nonatomic, assign, readonly) NSArray *writeEvents; + +/** + @abstract Queries for events of specified type. + @param type The type of event to return. + @returns An array of events of specified type in order of occurence. + */ +- (NSArray *)eventsWithType:(POPAnimationEventType)type; + +/** + @abstract Property indicating whether tracer should automatically log events and reset collection on animation completion. + */ +@property (nonatomic, assign) BOOL shouldLogAndResetOnCompletion; + +@end diff --git a/Pods/pop/pop/POPAnimationTracer.mm b/Pods/pop/pop/POPAnimationTracer.mm new file mode 100644 index 0000000..243fb9b --- /dev/null +++ b/Pods/pop/pop/POPAnimationTracer.mm @@ -0,0 +1,191 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimationTracer.h" + +#import + +#import "POPAnimationEventInternal.h" +#import "POPAnimationInternal.h" +#import "POPSpringAnimation.h" + +@implementation POPAnimationTracer +{ + __weak POPAnimation *_animation; + POPAnimationState *_animationState; + NSMutableArray *_events; + BOOL _animationHasVelocity; +} +@synthesize shouldLogAndResetOnCompletion = _shouldLogAndResetOnCompletion; + +static POPAnimationEvent *create_event(POPAnimationTracer *self, POPAnimationEventType type, id value = nil, bool recordAnimation = false) +{ + bool useLocalTime = 0 != self->_animationState->startTime; + CFTimeInterval time = useLocalTime + ? self->_animationState->lastTime - self->_animationState->startTime + : self->_animationState->lastTime; + + POPAnimationEvent *event; + + if (!value) { + event = [[POPAnimationEvent alloc] initWithType:type time:time]; + } else { + event = [[POPAnimationValueEvent alloc] initWithType:type time:time value:value]; + if (self->_animationHasVelocity) { + [(POPAnimationValueEvent *)event setVelocity:[(POPSpringAnimation *)self->_animation velocity]]; + } + } + + if (recordAnimation) { + event.animationDescription = [self->_animation description]; + } + + return event; +} + +- (id)initWithAnimation:(POPAnimation *)anAnim +{ + self = [super init]; + if (nil != self) { + _animation = anAnim; + _animationState = POPAnimationGetState(anAnim); + _events = [[NSMutableArray alloc] initWithCapacity:50]; + _animationHasVelocity = [anAnim respondsToSelector:@selector(velocity)]; + } + return self; +} + +- (void)readPropertyValue:(id)aValue +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventPropertyRead, aValue); + [_events addObject:event]; +} + +- (void)writePropertyValue:(id)aValue +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventPropertyWrite, aValue); + [_events addObject:event]; +} + +- (void)updateToValue:(id)aValue +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventToValueUpdate, aValue); + [_events addObject:event]; +} + +- (void)updateFromValue:(id)aValue +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventFromValueUpdate, aValue); + [_events addObject:event]; +} + +- (void)updateVelocity:(id)aValue +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventVelocityUpdate, aValue); + [_events addObject:event]; +} + +- (void)updateSpeed:(float)aFloat +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventSpeedUpdate, @(aFloat)); + [_events addObject:event]; +} + +- (void)updateBounciness:(float)aFloat +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventBouncinessUpdate, @(aFloat)); + [_events addObject:event]; +} + +- (void)updateFriction:(float)aFloat +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventFrictionUpdate, @(aFloat)); + [_events addObject:event]; +} + +- (void)updateMass:(float)aFloat +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventMassUpdate, @(aFloat)); + [_events addObject:event]; +} + +- (void)updateTension:(float)aFloat +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventTensionUpdate, @(aFloat)); + [_events addObject:event]; +} + +- (void)didStart +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventDidStart, nil, true); + [_events addObject:event]; +} + +- (void)didStop:(BOOL)finished +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventDidStop, @(finished), true); + [_events addObject:event]; + + if (_shouldLogAndResetOnCompletion) { + NSLog(@"events:%@", self.allEvents); + [self reset]; + } +} + +- (void)didReachToValue:(id)aValue +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventDidReachToValue, aValue); + [_events addObject:event]; +} + +- (void)autoreversed +{ + POPAnimationEvent *event = create_event(self, kPOPAnimationEventAutoreversed); + [_events addObject:event]; +} + +- (void)start +{ + POPAnimationState *s = POPAnimationGetState(_animation); + s->tracing = true; +} + +- (void)stop +{ + POPAnimationState *s = POPAnimationGetState(_animation); + s->tracing = false; +} + +- (void)reset +{ + [_events removeAllObjects]; +} + +- (NSArray *)allEvents +{ + return [_events copy]; +} + +- (NSArray *)writeEvents +{ + return [self eventsWithType:kPOPAnimationEventPropertyWrite]; +} + +- (NSArray *)eventsWithType:(POPAnimationEventType)aType +{ + NSMutableArray *array = [NSMutableArray array]; + for (POPAnimationEvent *event in _events) { + if (aType == event.type) { + [array addObject:event]; + } + } + return array; +} + +@end diff --git a/Pods/pop/pop/POPAnimationTracerInternal.h b/Pods/pop/pop/POPAnimationTracerInternal.h new file mode 100644 index 0000000..00958e1 --- /dev/null +++ b/Pods/pop/pop/POPAnimationTracerInternal.h @@ -0,0 +1,96 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +@interface POPAnimationTracer (Internal) + +/** + @abstract Designated initalizer. Pass the animation being traced. + */ +- (instancetype)initWithAnimation:(POPAnimation *)anAnim; + +/** + @abstract Records read value. + */ +- (void)readPropertyValue:(id)aValue; + +/** + @abstract Records write value. + */ +- (void)writePropertyValue:(id)aValue; + +/** + Records to value update. + */ +- (void)updateToValue:(id)aValue; + +/** + @abstract Records from value update. + */ +- (void)updateFromValue:(id)aValue; + +/** + @abstract Records from value update. + */ +- (void)updateVelocity:(id)aValue; + +/** + @abstract Records bounciness update. + */ +- (void)updateBounciness:(float)aFloat; + +/** + @abstract Records speed update. + */ +- (void)updateSpeed:(float)aFloat; + +/** + @abstract Records friction update. + */ +- (void)updateFriction:(float)aFloat; + +/** + @abstract Records mass update. + */ +- (void)updateMass:(float)aFloat; + +/** + @abstract Records tension update. + */ +- (void)updateTension:(float)aFloat; + +/** + @abstract Records did add. + */ +- (void)didAdd; + +/** + @abstract Records did start. + */ +- (void)didStart; + +/** + @abstract Records did stop. + */ +- (void)didStop:(BOOL)finished; + +/** + @abstract Records did reach to value. + */ +- (void)didReachToValue:(id)aValue; + +/** + @abstract Records when an autoreverse animation takes place. + */ +- (void)autoreversed; + +@end diff --git a/Pods/pop/pop/POPAnimator.h b/Pods/pop/pop/POPAnimator.h new file mode 100644 index 0000000..5310bed --- /dev/null +++ b/Pods/pop/pop/POPAnimator.h @@ -0,0 +1,47 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@protocol POPAnimatorDelegate; + +/** + @abstract The animator class renders animations. + */ +@interface POPAnimator : NSObject + +/** + @abstract The shared animator instance. + @discussion Consumers should generally use the shared instance in lieu of creating new instances. + */ ++ (instancetype)sharedAnimator; + +/** + @abstract The optional animator delegate. + */ +@property (weak, nonatomic) id delegate; + +@end + +/** + @abstract The animator delegate. + */ +@protocol POPAnimatorDelegate + +/** + @abstract Called on each frame before animation application. + */ +- (void)animatorWillAnimate:(POPAnimator *)animator; + +/** + @abstract Called on each frame after animation application. + */ +- (void)animatorDidAnimate:(POPAnimator *)animator; + +@end diff --git a/Pods/pop/pop/POPAnimator.mm b/Pods/pop/pop/POPAnimator.mm new file mode 100644 index 0000000..6b2a770 --- /dev/null +++ b/Pods/pop/pop/POPAnimator.mm @@ -0,0 +1,806 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimator.h" +#import "POPAnimatorPrivate.h" + +#import +#import + +#if !TARGET_OS_IPHONE +#import +#endif + +#import + +#import + +#import "POPAnimation.h" +#import "POPAnimationExtras.h" +#import "POPBasicAnimationInternal.h" +#import "POPDecayAnimation.h" + +using namespace std; +using namespace POP; + +#define ENABLE_LOGGING_DEBUG 0 +#define ENABLE_LOGGING_INFO 0 + +#if ENABLE_LOGGING_DEBUG +#define FBLogAnimDebug NSLog +#else +#define FBLogAnimDebug(...) +#endif + +#if ENABLE_LOGGING_INFO +#define FBLogAnimInfo NSLog +#else +#define FBLogAnimInfo(...) +#endif + +class POPAnimatorItem +{ +public: + id __weak object; + NSString *key; + POPAnimation *animation; + NSInteger refCount; + id __unsafe_unretained unretainedObject; + + POPAnimatorItem(id o, NSString *k, POPAnimation *a) POP_NOTHROW + { + object = o; + key = [k copy]; + animation = a; + refCount = 1; + unretainedObject = o; + } + + ~POPAnimatorItem() + { + } + + bool operator==(const POPAnimatorItem& o) const { + return unretainedObject == o.unretainedObject && animation == o.animation && [key isEqualToString:o.key]; + } + +}; + +typedef std::shared_ptr POPAnimatorItemRef; +typedef std::shared_ptr POPAnimatorItemConstRef; + +typedef std::list POPAnimatorItemList; +typedef POPAnimatorItemList::iterator POPAnimatorItemListIterator; +typedef POPAnimatorItemList::const_iterator POPAnimatorItemListConstIterator; + +static BOOL _disableBackgroundThread = YES; + +@interface POPAnimator () +{ +#if TARGET_OS_IPHONE + CADisplayLink *_displayLink; +#else + CVDisplayLinkRef _displayLink; + int32_t _enqueuedRender; +#endif + POPAnimatorItemList _list; + CFMutableDictionaryRef _dict; + NSMutableArray *_observers; + POPAnimatorItemList _pendingList; + CFRunLoopObserverRef _pendingListObserver; + CFTimeInterval _slowMotionStartTime; + CFTimeInterval _slowMotionLastTime; + CFTimeInterval _slowMotionAccumulator; + CFTimeInterval _beginTime; + OSSpinLock _lock; + BOOL _disableDisplayLink; +} +@end + +@implementation POPAnimator +@synthesize delegate = _delegate; +@synthesize disableDisplayLink = _disableDisplayLink; +@synthesize beginTime = _beginTime; + +#if !TARGET_OS_IPHONE +static CVReturn displayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *now, const CVTimeStamp *outputTime, CVOptionFlags flagsIn, CVOptionFlags *flagsOut, void *context) +{ + if (_disableBackgroundThread) { + __unsafe_unretained POPAnimator *pa = (__bridge POPAnimator *)context; + int32_t* enqueuedRender = &pa->_enqueuedRender; + if (*enqueuedRender == 0) { + OSAtomicIncrement32(enqueuedRender); + dispatch_async(dispatch_get_main_queue(), ^{ + [(__bridge POPAnimator*)context render]; + OSAtomicDecrement32(enqueuedRender); + }); + } + } else { + [(__bridge POPAnimator*)context render]; + } + return kCVReturnSuccess; +} +#endif + +// call while holding lock +static void updateDisplayLink(POPAnimator *self) +{ + BOOL paused = (0 == self->_observers.count && self->_list.empty()) || self->_disableDisplayLink; + +#if TARGET_OS_IPHONE + if (paused != self->_displayLink.paused) { + FBLogAnimInfo(paused ? @"pausing display link" : @"unpausing display link"); + self->_displayLink.paused = paused; + } +#else + if (paused == CVDisplayLinkIsRunning(self->_displayLink)) { + FBLogAnimInfo(paused ? @"pausing display link" : @"unpausing display link"); + if (paused) { + CVDisplayLinkStop(self->_displayLink); + } else { + CVDisplayLinkStart(self->_displayLink); + } + } +#endif +} + +static void updateAnimatable(id obj, POPPropertyAnimationState *anim, bool shouldAvoidExtraneousWrite = false) +{ + // handle user-initiated stop or pause; hault animation + if (!anim->active || anim->paused) + return; + + if (anim->hasValue()) { + pop_animatable_write_block write = anim->property.writeBlock; + if (NULL == write) + return; + + // current animation value + VectorRef currentVec = anim->currentValue(); + + if (!anim->additive) { + + // if avoiding extraneous writes and we have a read block defined + if (shouldAvoidExtraneousWrite) { + + pop_animatable_read_block read = anim->property.readBlock; + if (read) { + // compare current animation value with object value + Vector4r currentValue = currentVec->vector4r(); + Vector4r objectValue = read_values(read, obj, anim->valueCount); + if (objectValue == currentValue) { + return; + } + } + } + + // update previous values; support animation convergence + anim->previous2Vec = anim->previousVec; + anim->previousVec = currentVec; + + // write value + write(obj, currentVec->data()); + if (anim->tracing) { + [anim->tracer writePropertyValue:POPBox(currentVec, anim->valueType, true)]; + } + } else { + pop_animatable_read_block read = anim->property.readBlock; + NSCAssert(read, @"additive requires an animatable property readBlock"); + if (NULL == read) { + return; + } + + // object value + Vector4r objectValue = read_values(read, obj, anim->valueCount); + + // current value + Vector4r currentValue = currentVec->vector4r(); + + // determine animation change + if (anim->previousVec) { + Vector4r previousValue = anim->previousVec->vector4r(); + currentValue -= previousValue; + } + + // avoid writing no change + if (shouldAvoidExtraneousWrite && currentValue == Vector4r::Zero()) { + return; + } + + // add to object value + currentValue += objectValue; + + // update previous values; support animation convergence + anim->previous2Vec = anim->previousVec; + anim->previousVec = currentVec; + + // write value + write(obj, currentValue.data()); + if (anim->tracing) { + [anim->tracer writePropertyValue:POPBox(currentVec, anim->valueType, true)]; + } + } + } +} + +static void applyAnimationTime(id obj, POPAnimationState *state, CFTimeInterval time) +{ + if (!state->advanceTime(time, obj)) { + return; + } + + POPPropertyAnimationState *ps = dynamic_cast(state); + if (NULL != ps) { + updateAnimatable(obj, ps); + } + + state->delegateApply(); +} + +static void applyAnimationToValue(id obj, POPAnimationState *state) +{ + POPPropertyAnimationState *ps = dynamic_cast(state); + + if (NULL != ps) { + + // finalize progress + ps->finalizeProgress(); + + // write to value, updating only if needed + updateAnimatable(obj, ps, true); + } + + state->delegateApply(); +} + +static POPAnimation *deleteDictEntry(POPAnimator *self, id __unsafe_unretained obj, NSString *key, BOOL cleanup = YES) +{ + POPAnimation *anim = nil; + + // lock + OSSpinLockLock(&self->_lock); + + NSMutableDictionary *keyAnimationsDict = (__bridge id)CFDictionaryGetValue(self->_dict, (__bridge void *)obj); + if (keyAnimationsDict) { + + anim = keyAnimationsDict[key]; + if (anim) { + + // remove key + [keyAnimationsDict removeObjectForKey:key]; + + // cleanup empty dictionaries + if (cleanup && 0 == keyAnimationsDict.count) { + CFDictionaryRemoveValue(self->_dict, (__bridge void *)obj); + } + } + } + + // unlock + OSSpinLockUnlock(&self->_lock); + return anim; +} + +static void stopAndCleanup(POPAnimator *self, POPAnimatorItemRef item, bool shouldRemove, bool finished) +{ + // remove + if (shouldRemove) { + deleteDictEntry(self, item->unretainedObject, item->key); + } + + // stop + POPAnimationState *state = POPAnimationGetState(item->animation); + state->stop(shouldRemove, finished); + + if (shouldRemove) { + // lock + OSSpinLockLock(&self->_lock); + + // find item in list + // may have already been removed on animationDidStop: + POPAnimatorItemListIterator find_iter = find(self->_list.begin(), self->_list.end(), item); + BOOL found = find_iter != self->_list.end(); + + if (found) { + self->_list.erase(find_iter); + } + + // unlock + OSSpinLockUnlock(&self->_lock); + } +} + ++ (id)sharedAnimator +{ + static POPAnimator* _animator = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _animator = [[POPAnimator alloc] init]; + }); + return _animator; +} + ++ (BOOL)disableBackgroundThread +{ + return _disableBackgroundThread; +} + ++ (void)setDisableBackgroundThread:(BOOL)flag +{ + _disableBackgroundThread = flag; +} + +#pragma mark - Lifecycle + +- (id)init +{ + self = [super init]; + if (nil == self) return nil; + +#if TARGET_OS_IPHONE + _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(render)]; + _displayLink.paused = YES; + [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; +#else + CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink); + CVDisplayLinkSetOutputCallback(_displayLink, displayLinkCallback, (__bridge void *)self); +#endif + + _dict = POPDictionaryCreateMutableWeakPointerToStrongObject(5); + _lock = OS_SPINLOCK_INIT; + + return self; +} + +- (void)dealloc +{ +#if TARGET_OS_IPHONE + [_displayLink invalidate]; +#else + CVDisplayLinkStop(_displayLink); + CVDisplayLinkRelease(_displayLink); +#endif + [self _clearPendingListObserver]; +} + +#pragma mark - Utility + +- (void)_processPendingList +{ + // rendering pending animations + CFTimeInterval time = [self _currentRenderTime]; + [self _renderTime:(0 != _beginTime) ? _beginTime : time items:_pendingList]; + + // lock + OSSpinLockLock(&_lock); + + // clear list and observer + _pendingList.clear(); + [self _clearPendingListObserver]; + + // unlock + OSSpinLockUnlock(&_lock); +} + +- (void)_clearPendingListObserver +{ + if (_pendingListObserver) { + CFRunLoopRemoveObserver(CFRunLoopGetMain(), _pendingListObserver, kCFRunLoopCommonModes); + CFRelease(_pendingListObserver); + _pendingListObserver = NULL; + } +} + +- (void)_scheduleProcessPendingList +{ + // see WebKit for magic numbers, eg http://trac.webkit.org/changeset/166540 + static const CFIndex CATransactionCommitRunLoopOrder = 2000000; + static const CFIndex POPAnimationApplyRunLoopOrder = CATransactionCommitRunLoopOrder - 1; + + // lock + OSSpinLockLock(&_lock); + + if (!_pendingListObserver) { + __weak POPAnimator *weakSelf = self; + + _pendingListObserver = CFRunLoopObserverCreateWithHandler(kCFAllocatorDefault, kCFRunLoopBeforeWaiting | kCFRunLoopExit, false, POPAnimationApplyRunLoopOrder, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) { + [weakSelf _processPendingList]; + }); + + if (_pendingListObserver) { + CFRunLoopAddObserver(CFRunLoopGetMain(), _pendingListObserver, kCFRunLoopCommonModes); + } + } + + // unlock + OSSpinLockUnlock(&_lock); +} + +- (void)_renderTime:(CFTimeInterval)time items:(std::list)items +{ + // begin transaction with actions disabled + [CATransaction begin]; + [CATransaction setDisableActions:YES]; + + // notify delegate + __strong __typeof__(_delegate) delegate = _delegate; + [delegate animatorWillAnimate:self]; + + // lock + OSSpinLockLock(&_lock); + + // count active animations + const NSUInteger count = items.size(); + if (0 == count) { + // unlock + OSSpinLockUnlock(&_lock); + } else { + // copy list into vector + std::vector vector{ items.begin(), items.end() }; + + // unlock + OSSpinLockUnlock(&_lock); + + for (auto item : vector) { + [self _renderTime:time item:item]; + } + } + + // notify observers + for (id observer in self.observers) { + [observer animatorDidAnimate:(id)self]; + } + + // lock + OSSpinLockLock(&_lock); + + // update display link + updateDisplayLink(self); + + // unlock + OSSpinLockUnlock(&_lock); + + // notify delegate and commit + [delegate animatorDidAnimate:self]; + [CATransaction commit]; +} + +- (void)_renderTime:(CFTimeInterval)time item:(POPAnimatorItemRef)item +{ + id obj = item->object; + POPAnimation *anim = item->animation; + POPAnimationState *state = POPAnimationGetState(anim); + + if (nil == obj) { + // object exists not; stop animating + NSAssert(item->unretainedObject, @"object should exist"); + stopAndCleanup(self, item, true, false); + } else { + + // start if needed + state->startIfNeeded(obj, time, _slowMotionAccumulator); + + // only run active, not paused animations + if (state->active && !state->paused) { + // object exists; animate + applyAnimationTime(obj, state, time); + + FBLogAnimDebug(@"time:%f running:%@", time, item->animation); + if (state->isDone()) { + // set end value + applyAnimationToValue(obj, state); + + state->repeatCount--; + if (state->repeatForever || state->repeatCount > 0) { + if ([anim isKindOfClass:[POPPropertyAnimation class]]) { + POPPropertyAnimation *propAnim = (POPPropertyAnimation *)anim; + id oldFromValue = propAnim.fromValue; + propAnim.fromValue = propAnim.toValue; + + if (state->autoreverses) { + if (state->tracing) { + [state->tracer autoreversed]; + } + + if (state->type == kPOPAnimationDecay) { + POPDecayAnimation *decayAnimation = (POPDecayAnimation *)propAnim; + decayAnimation.velocity = [decayAnimation reversedVelocity]; + } else { + propAnim.toValue = oldFromValue; + } + } else { + if (state->type == kPOPAnimationDecay) { + POPDecayAnimation *decayAnimation = (POPDecayAnimation *)propAnim; + id originalVelocity = decayAnimation.originalVelocity; + decayAnimation.velocity = originalVelocity; + } else { + propAnim.fromValue = oldFromValue; + } + } + } + + state->stop(NO, NO); + state->reset(true); + + state->startIfNeeded(obj, time, _slowMotionAccumulator); + } else { + stopAndCleanup(self, item, state->removedOnCompletion, YES); + } + } + } + } +} + +#pragma mark - API + +- (NSArray *)observers +{ + // lock + OSSpinLockLock(&_lock); + + // get observers + NSArray *observers = 0 != _observers.count ? [_observers copy] : nil; + + // unlock + OSSpinLockUnlock(&_lock); + return observers; +} + +- (void)addAnimation:(POPAnimation *)anim forObject:(id)obj key:(NSString *)key +{ + if (!anim || !obj) { + return; + } + + // support arbitrarily many nil keys + if (!key) { + key = [[NSUUID UUID] UUIDString]; + } + + // lock + OSSpinLockLock(&_lock); + + // get key, animation dict associated with object + NSMutableDictionary *keyAnimationDict = (__bridge id)CFDictionaryGetValue(_dict, (__bridge void *)obj); + + // update associated animation state + if (nil == keyAnimationDict) { + keyAnimationDict = [NSMutableDictionary dictionary]; + CFDictionarySetValue(_dict, (__bridge void *)obj, (__bridge void *)keyAnimationDict); + } else { + // if the animation instance already exists, avoid cancelling only to restart + POPAnimation *existingAnim = keyAnimationDict[key]; + if (existingAnim) { + // unlock + OSSpinLockUnlock(&_lock); + + if (existingAnim == anim) { + return; + } + [self removeAnimationForObject:obj key:key cleanupDict:NO]; + + // lock + OSSpinLockLock(&_lock); + } + } + keyAnimationDict[key] = anim; + + // create entry after potential removal + POPAnimatorItemRef item(new POPAnimatorItem(obj, key, anim)); + + // add to list and pending list + _list.push_back(item); + _pendingList.push_back(item); + + // support animation re-use, reset all animation state + POPAnimationGetState(anim)->reset(true); + + // update display link + updateDisplayLink(self); + + // unlock + OSSpinLockUnlock(&_lock); + + // schedule runloop processing of pending animations + [self _scheduleProcessPendingList]; +} + +- (void)removeAllAnimationsForObject:(id)obj +{ + // lock + OSSpinLockLock(&_lock); + + NSArray *animations = [(__bridge id)CFDictionaryGetValue(_dict, (__bridge void *)obj) allValues]; + CFDictionaryRemoveValue(_dict, (__bridge void *)obj); + + // unlock + OSSpinLockUnlock(&_lock); + + if (0 == animations.count) { + return; + } + + NSHashTable *animationSet = [[NSHashTable alloc] initWithOptions:NSHashTableObjectPointerPersonality capacity:animations.count]; + for (id animation in animations) { + [animationSet addObject:animation]; + } + + // lock + OSSpinLockLock(&_lock); + + POPAnimatorItemRef item; + for (auto iter = _list.begin(); iter != _list.end();) { + item = *iter; + if(![animationSet containsObject:item->animation]) { + iter++; + } else { + iter = _list.erase(iter); + } + } + + // unlock + OSSpinLockUnlock(&_lock); + + for (POPAnimation *anim in animations) { + POPAnimationState *state = POPAnimationGetState(anim); + state->stop(true, !state->active); + } +} + +- (void)removeAnimationForObject:(id)obj key:(NSString *)key cleanupDict:(BOOL)cleanupDict +{ + POPAnimation *anim = deleteDictEntry(self, obj, key, cleanupDict); + if (nil == anim) { + return; + } + + // lock + OSSpinLockLock(&_lock); + + // remove from list + POPAnimatorItemRef item; + for (auto iter = _list.begin(); iter != _list.end();) { + item = *iter; + if(anim == item->animation) { + _list.erase(iter); + break; + } else { + iter++; + } + } + + // remove from pending list + for (auto iter = _pendingList.begin(); iter != _pendingList.end();) { + item = *iter; + if(anim == item->animation) { + _pendingList.erase(iter); + break; + } else { + iter++; + } + } + + // unlock + OSSpinLockUnlock(&_lock); + + // stop animation and callout + POPAnimationState *state = POPAnimationGetState(anim); + state->stop(true, (!state->active && !state->paused)); +} + +- (void)removeAnimationForObject:(id)obj key:(NSString *)key +{ + [self removeAnimationForObject:obj key:key cleanupDict:YES]; +} + +- (NSArray *)animationKeysForObject:(id)obj +{ + // lock + OSSpinLockLock(&_lock); + + // get keys + NSArray *keys = [(__bridge id)CFDictionaryGetValue(_dict, (__bridge void *)obj) allKeys]; + + // unlock + OSSpinLockUnlock(&_lock); + return keys; +} + +- (id)animationForObject:(id)obj key:(NSString *)key +{ + // lock + OSSpinLockLock(&_lock); + + // lookup animation + NSDictionary *keyAnimationsDict = (__bridge id)CFDictionaryGetValue(_dict, (__bridge void *)obj); + POPAnimation *animation = keyAnimationsDict[key]; + + // unlock + OSSpinLockUnlock(&_lock); + return animation; +} + +- (CFTimeInterval)_currentRenderTime +{ + CFTimeInterval time = CACurrentMediaTime(); + +#if TARGET_IPHONE_SIMULATOR + // support slow-motion animations + time += _slowMotionAccumulator; + float f = POPAnimationDragCoefficient(); + + if (f > 1.0) { + if (!_slowMotionStartTime) { + _slowMotionStartTime = time; + } else { + time = (time - _slowMotionStartTime) / f + _slowMotionStartTime; + _slowMotionLastTime = time; + } + } else if (_slowMotionStartTime) { + CFTimeInterval dt = (_slowMotionLastTime - time); + time += dt; + _slowMotionAccumulator += dt; + _slowMotionStartTime = 0; + } +#endif + + return time; +} + +- (void)render +{ + CFTimeInterval time = [self _currentRenderTime]; + [self renderTime:time]; +} + +- (void)renderTime:(CFTimeInterval)time +{ + [self _renderTime:time items:_list]; +} + +- (void)addObserver:(id)observer +{ + NSAssert(nil != observer, @"attempting to add nil %@ observer", self); + if (nil == observer) { + return; + } + + // lock + OSSpinLockLock(&_lock); + + if (!_observers) { + // use ordered collection for deterministic callout + _observers = [[NSMutableArray alloc] initWithCapacity:1]; + } + + [_observers addObject:observer]; + updateDisplayLink(self); + + // unlock + OSSpinLockUnlock(&_lock); +} + +- (void)removeObserver:(id)observer +{ + NSAssert(nil != observer, @"attempting to remove nil %@ observer", self); + if (nil == observer) { + return; + } + + // lock + OSSpinLockLock(&_lock); + + [_observers removeObject:observer]; + updateDisplayLink(self); + + // unlock + OSSpinLockUnlock(&_lock); +} + +@end diff --git a/Pods/pop/pop/POPAnimatorPrivate.h b/Pods/pop/pop/POPAnimatorPrivate.h new file mode 100644 index 0000000..5fba912 --- /dev/null +++ b/Pods/pop/pop/POPAnimatorPrivate.h @@ -0,0 +1,68 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@class POPAnimation; + +@protocol POPAnimatorObserving +@required + +/** + @abstract Called on each observer after animator has advanced. Core Animation actions are disabled by default. + */ +- (void)animatorDidAnimate:(POPAnimator *)animator; + +@end + +@interface POPAnimator () + +#if !TARGET_OS_IPHONE +/** + Determines whether or not to use a high priority background thread for animation updates. Using a background thread can result in faster, more responsive updates, but may be less compatible. Defaults to YES. + */ ++ (BOOL)disableBackgroundThread; ++ (void)setDisableBackgroundThread:(BOOL)flag; +#endif + +/** + Used for externally driven animator instances. + */ +@property (assign, nonatomic) BOOL disableDisplayLink; + +/** + Time used when starting animations. Defaults to 0 meaning current media time is used. Exposed for unit testing. + */ +@property (assign, nonatomic) CFTimeInterval beginTime; + +/** + Exposed for unit testing. + */ +- (void)renderTime:(CFTimeInterval)time; + +/** + Funnel methods for category additions. + */ +- (void)addAnimation:(POPAnimation *)anim forObject:(id)obj key:(NSString *)key; +- (void)removeAllAnimationsForObject:(id)obj; +- (void)removeAnimationForObject:(id)obj key:(NSString *)key; +- (NSArray *)animationKeysForObject:(id)obj; +- (POPAnimation *)animationForObject:(id)obj key:(NSString *)key; + +/** + @abstract Add an animator observer. Observer will be notified of each subsequent animator advance until removal. + */ +- (void)addObserver:(id)observer; + +/** + @abstract Remove an animator observer. + */ +- (void)removeObserver:(id)observer; + +@end diff --git a/Pods/pop/pop/POPBasicAnimation.h b/Pods/pop/pop/POPBasicAnimation.h new file mode 100644 index 0000000..ce2e23a --- /dev/null +++ b/Pods/pop/pop/POPBasicAnimation.h @@ -0,0 +1,71 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +/** + @abstract A concrete basic animation class. + @discussion Animation is achieved through interpolation. + */ +@interface POPBasicAnimation : POPPropertyAnimation + +/** + @abstract The designated initializer. + @returns An instance of a basic animation. + */ ++ (instancetype)animation; + +/** + @abstract Convenience initializer that returns an animation with animatable property of name. + @param name The name of the animatable property. + @returns An instance of a basic animation configured with specified animatable property. + */ ++ (instancetype)animationWithPropertyNamed:(NSString *)name; + +/** + @abstract Convenience constructor. + @returns Returns a basic animation with kCAMediaTimingFunctionDefault timing function. + */ ++ (instancetype)defaultAnimation; + +/** + @abstract Convenience constructor. + @returns Returns a basic animation with kCAMediaTimingFunctionLinear timing function. + */ ++ (instancetype)linearAnimation; + +/** + @abstract Convenience constructor. + @returns Returns a basic animation with kCAMediaTimingFunctionEaseIn timing function. + */ ++ (instancetype)easeInAnimation; + +/** + @abstract Convenience constructor. + @returns Returns a basic animation with kCAMediaTimingFunctionEaseOut timing function. + */ ++ (instancetype)easeOutAnimation; + +/** + @abstract Convenience constructor. + @returns Returns a basic animation with kCAMediaTimingFunctionEaseInEaseOut timing function. + */ ++ (instancetype)easeInEaseOutAnimation; + +/** + @abstract The duration in seconds. Defaults to 0.4. + */ +@property (assign, nonatomic) CFTimeInterval duration; + +/** + @abstract A timing function defining the pacing of the animation. Defaults to nil indicating pacing according to kCAMediaTimingFunctionDefault. + */ +@property (strong, nonatomic) CAMediaTimingFunction *timingFunction; + +@end diff --git a/Pods/pop/pop/POPBasicAnimation.mm b/Pods/pop/pop/POPBasicAnimation.mm new file mode 100644 index 0000000..2843c99 --- /dev/null +++ b/Pods/pop/pop/POPBasicAnimation.mm @@ -0,0 +1,106 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPBasicAnimationInternal.h" + +@implementation POPBasicAnimation + +#undef __state +#define __state ((POPBasicAnimationState *)_state) + +#pragma mark - Lifecycle + ++ (instancetype)animation +{ + return [[self alloc] init]; +} + ++ (instancetype)animationWithPropertyNamed:(NSString *)aName +{ + POPBasicAnimation *anim = [self animation]; + anim.property = [POPAnimatableProperty propertyWithName:aName]; + return anim; +} + +- (void)_initState +{ + _state = new POPBasicAnimationState(self); +} + ++ (instancetype)linearAnimation +{ + POPBasicAnimation *anim = [self animation]; + anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; + return anim; +} + ++ (instancetype)easeInAnimation +{ + POPBasicAnimation *anim = [self animation]; + anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; + return anim; +} + ++ (instancetype)easeOutAnimation +{ + POPBasicAnimation *anim = [self animation]; + anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; + return anim; +} + ++ (instancetype)easeInEaseOutAnimation +{ + POPBasicAnimation *anim = [self animation]; + anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; + return anim; +} + ++ (instancetype)defaultAnimation +{ + POPBasicAnimation *anim = [self animation]; + anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; + return anim; +} + +- (id)init +{ + return [self _init]; +} + +#pragma mark - Properties + +DEFINE_RW_PROPERTY(POPBasicAnimationState, duration, setDuration:, CFTimeInterval); +DEFINE_RW_PROPERTY_OBJ(POPBasicAnimationState, timingFunction, setTimingFunction:, CAMediaTimingFunction*, __state->updatedTimingFunction();); + +#pragma mark - Utility + +- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug +{ + [super _appendDescription:s debug:debug]; + if (__state->duration) + [s appendFormat:@"; duration = %f", __state->duration]; +} + +@end + +@implementation POPBasicAnimation (NSCopying) + +- (instancetype)copyWithZone:(NSZone *)zone { + + POPBasicAnimation *copy = [super copyWithZone:zone]; + + if (copy) { + copy.duration = self.duration; + copy.timingFunction = self.timingFunction; // not a 'copy', but timing functions are publicly immutable. + } + + return copy; +} + +@end \ No newline at end of file diff --git a/Pods/pop/pop/POPBasicAnimationInternal.h b/Pods/pop/pop/POPBasicAnimationInternal.h new file mode 100644 index 0000000..1027670 --- /dev/null +++ b/Pods/pop/pop/POPBasicAnimationInternal.h @@ -0,0 +1,97 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPBasicAnimation.h" + +#import "POPPropertyAnimationInternal.h" + +// default animation duration +static CGFloat const kPOPAnimationDurationDefault = 0.4; + +// progress threshold for computing done +static CGFloat const kPOPProgressThreshold = 1e-6; + +static void interpolate(POPValueType valueType, NSUInteger count, const CGFloat *fromVec, const CGFloat *toVec, CGFloat *outVec, CGFloat p) +{ + switch (valueType) { + case kPOPValueInteger: + case kPOPValueFloat: + case kPOPValuePoint: + case kPOPValueSize: + case kPOPValueRect: + case kPOPValueEdgeInsets: + case kPOPValueColor: + POPInterpolateVector(count, outVec, fromVec, toVec, p); + break; + default: + NSCAssert(false, @"unhandled type %d", valueType); + break; + } +} + +struct _POPBasicAnimationState : _POPPropertyAnimationState +{ + CAMediaTimingFunction *timingFunction; + double timingControlPoints[4]; + CFTimeInterval duration; + CFTimeInterval timeProgress; + + _POPBasicAnimationState(id __unsafe_unretained anim) : _POPPropertyAnimationState(anim), + timingFunction(nil), + timingControlPoints{0.}, + duration(kPOPAnimationDurationDefault), + timeProgress(0.) + { + type = kPOPAnimationBasic; + } + + bool isDone() { + if (_POPPropertyAnimationState::isDone()) { + return true; + } + return timeProgress + kPOPProgressThreshold >= 1.; + } + + void updatedTimingFunction() + { + float vec[4] = {0.}; + [timingFunction getControlPointAtIndex:1 values:&vec[0]]; + [timingFunction getControlPointAtIndex:2 values:&vec[2]]; + for (NSUInteger idx = 0; idx < POP_ARRAY_COUNT(vec); idx++) { + timingControlPoints[idx] = vec[idx]; + } + } + + bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { + // default timing function + if (!timingFunction) { + ((POPBasicAnimation *)self).timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]; + } + + // solve for normalized time, aka progresss [0, 1] + CGFloat p = 1.0f; + if (duration > 0.0f) { + // cap local time to duration + CFTimeInterval t = MIN(time - startTime, duration) / duration; + p = POPTimingFunctionSolve(timingControlPoints, t, SOLVE_EPS(duration)); + timeProgress = t; + } else { + timeProgress = 1.; + } + + // interpolate and advance + interpolate(valueType, valueCount, fromVec->data(), toVec->data(), currentVec->data(), p); + progress = p; + clampCurrentValue(); + + return true; + } +}; + +typedef struct _POPBasicAnimationState POPBasicAnimationState; diff --git a/Pods/pop/pop/POPCGUtils.h b/Pods/pop/pop/POPCGUtils.h new file mode 100644 index 0000000..c843947 --- /dev/null +++ b/Pods/pop/pop/POPCGUtils.h @@ -0,0 +1,152 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#if TARGET_OS_IPHONE +#import +#else +#import +#endif + +#import "POPDefines.h" + +#if SCENEKIT_SDK_AVAILABLE +#import +#endif + +POP_EXTERN_C_BEGIN + +NS_INLINE CGPoint values_to_point(const CGFloat values[]) +{ + return CGPointMake(values[0], values[1]); +} + +NS_INLINE CGSize values_to_size(const CGFloat values[]) +{ + return CGSizeMake(values[0], values[1]); +} + +NS_INLINE CGRect values_to_rect(const CGFloat values[]) +{ + return CGRectMake(values[0], values[1], values[2], values[3]); +} + +#if SCENEKIT_SDK_AVAILABLE +NS_INLINE SCNVector3 values_to_vec3(const CGFloat values[]) +{ + return SCNVector3Make(values[0], values[1], values[2]); +} + +NS_INLINE SCNVector4 values_to_vec4(const CGFloat values[]) +{ + return SCNVector4Make(values[0], values[1], values[2], values[3]); +} +#endif + +#if TARGET_OS_IPHONE + +NS_INLINE UIEdgeInsets values_to_edge_insets(const CGFloat values[]) +{ + return UIEdgeInsetsMake(values[0], values[1], values[2], values[3]); +} + +#endif + +NS_INLINE void values_from_point(CGFloat values[], CGPoint p) +{ + values[0] = p.x; + values[1] = p.y; +} + +NS_INLINE void values_from_size(CGFloat values[], CGSize s) +{ + values[0] = s.width; + values[1] = s.height; +} + +NS_INLINE void values_from_rect(CGFloat values[], CGRect r) +{ + values[0] = r.origin.x; + values[1] = r.origin.y; + values[2] = r.size.width; + values[3] = r.size.height; +} + +#if SCENEKIT_SDK_AVAILABLE +NS_INLINE void values_from_vec3(CGFloat values[], SCNVector3 v) +{ + values[0] = v.x; + values[1] = v.y; + values[2] = v.z; +} + +NS_INLINE void values_from_vec4(CGFloat values[], SCNVector4 v) +{ + values[0] = v.x; + values[1] = v.y; + values[2] = v.z; + values[3] = v.w; +} +#endif + +#if TARGET_OS_IPHONE + +NS_INLINE void values_from_edge_insets(CGFloat values[], UIEdgeInsets i) +{ + values[0] = i.top; + values[1] = i.left; + values[2] = i.bottom; + values[3] = i.right; +} + +#endif + +/** + Takes a CGColorRef and converts it into RGBA components, if necessary. + */ +extern void POPCGColorGetRGBAComponents(CGColorRef color, CGFloat components[]); + +/** + Takes RGBA components and returns a CGColorRef. + */ +extern CGColorRef POPCGColorRGBACreate(const CGFloat components[]) CF_RETURNS_RETAINED; + +/** + Takes a color reference and returns a CGColor. + */ +extern CGColorRef POPCGColorWithColor(id color) CF_RETURNS_NOT_RETAINED; + +#if TARGET_OS_IPHONE + +/** + Takes a UIColor and converts it into RGBA components, if necessary. + */ +extern void POPUIColorGetRGBAComponents(UIColor *color, CGFloat components[]); + +/** + Takes RGBA components and returns a UIColor. + */ +extern UIColor *POPUIColorRGBACreate(const CGFloat components[]) NS_RETURNS_RETAINED; + +#else + +/** + Takes a NSColor and converts it into RGBA components, if necessary. + */ +extern void POPNSColorGetRGBAComponents(NSColor *color, CGFloat components[]); + +/** + Takes RGBA components and returns a NSColor. + */ +extern NSColor *POPNSColorRGBACreate(const CGFloat components[]) NS_RETURNS_RETAINED; + +#endif + +POP_EXTERN_C_END diff --git a/Pods/pop/pop/POPCGUtils.mm b/Pods/pop/pop/POPCGUtils.mm new file mode 100644 index 0000000..72a2d36 --- /dev/null +++ b/Pods/pop/pop/POPCGUtils.mm @@ -0,0 +1,150 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPCGUtils.h" + +#import + +void POPCGColorGetRGBAComponents(CGColorRef color, CGFloat components[]) +{ + if (color) { + const CGFloat *colors = CGColorGetComponents(color); + size_t count = CGColorGetNumberOfComponents(color); + + if (4 == count) { + // RGB colorspace + components[0] = colors[0]; + components[1] = colors[1]; + components[2] = colors[2]; + components[3] = colors[3]; + } else if (2 == count) { + // Grey colorspace + components[0] = components[1] = components[2] = colors[0]; + components[3] = colors[1]; + } else { + // Use CI to convert + CIColor *ciColor = [CIColor colorWithCGColor:color]; + components[0] = ciColor.red; + components[1] = ciColor.green; + components[2] = ciColor.blue; + components[3] = ciColor.alpha; + } + } else { + memset(components, 0, 4 * sizeof(components[0])); + } +} + +CGColorRef POPCGColorRGBACreate(const CGFloat components[]) +{ +#if TARGET_OS_IPHONE + CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); + CGColorRef color = CGColorCreate(space, components); + CGColorSpaceRelease(space); + return color; +#else + return CGColorCreateGenericRGB(components[0], components[1], components[2], components[3]); +#endif +} + +CGColorRef POPCGColorWithColor(id color) +{ + if (CFGetTypeID((__bridge CFTypeRef)color) == CGColorGetTypeID()) { + return ((__bridge CGColorRef)color); + } +#if TARGET_OS_IPHONE + else if ([color isKindOfClass:[UIColor class]]) { + return [color CGColor]; + } +#else + else if ([color isKindOfClass:[NSColor class]]) { + // -[NSColor CGColor] is only supported since OSX 10.8+ + if ([color respondsToSelector:@selector(CGColor)]) { + return [color CGColor]; + } + + /* + * Otherwise create a CGColorRef manually. + * + * The original accessor is (or would be) declared as: + * @property(readonly) CGColorRef CGColor; + * - (CGColorRef)CGColor NS_RETURNS_INNER_POINTER CF_RETURNS_NOT_RETAINED; + * + * (Please note that OSX' accessor is atomic, while iOS' isn't.) + * + * The access to the NSColor object must thus be synchronized + * and the CGColorRef be stored as an associated object, + * to return a reference which doesn't need to be released manually. + */ + @synchronized(color) { + static const void* key = &key; + + CGColorRef colorRef = (__bridge CGColorRef)objc_getAssociatedObject(color, key); + + if (!colorRef) { + size_t numberOfComponents = [color numberOfComponents]; + CGFloat components[numberOfComponents]; + CGColorSpaceRef colorSpace = [[color colorSpace] CGColorSpace]; + + [color getComponents:components]; + + colorRef = CGColorCreate(colorSpace, components); + + objc_setAssociatedObject(color, key, (__bridge id)colorRef, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + CGColorRelease(colorRef); + } + + return colorRef; + } + } +#endif + return nil; +} + +#if TARGET_OS_IPHONE + +void POPUIColorGetRGBAComponents(UIColor *color, CGFloat components[]) +{ + return POPCGColorGetRGBAComponents(POPCGColorWithColor(color), components); +} + +UIColor *POPUIColorRGBACreate(const CGFloat components[]) +{ + CGColorRef colorRef = POPCGColorRGBACreate(components); + UIColor *color = [[UIColor alloc] initWithCGColor:colorRef]; + CGColorRelease(colorRef); + return color; +} + +#else + +void POPNSColorGetRGBAComponents(NSColor *color, CGFloat components[]) +{ + return POPCGColorGetRGBAComponents(POPCGColorWithColor(color), components); +} + +NSColor *POPNSColorRGBACreate(const CGFloat components[]) +{ + CGColorRef colorRef = POPCGColorRGBACreate(components); + NSColor *color = nil; + + if (colorRef) { + if ([NSColor respondsToSelector:@selector(colorWithCGColor:)]) { + color = [NSColor colorWithCGColor:colorRef]; + } else { + color = [NSColor colorWithCIColor:[CIColor colorWithCGColor:colorRef]]; + } + + CGColorRelease(colorRef); + } + + return color; +} + +#endif + diff --git a/Pods/pop/pop/POPCustomAnimation.h b/Pods/pop/pop/POPCustomAnimation.h new file mode 100644 index 0000000..501a755 --- /dev/null +++ b/Pods/pop/pop/POPCustomAnimation.h @@ -0,0 +1,46 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@class POPCustomAnimation; + +/** + @abstract POPCustomAnimationBlock is the callback block of a custom animation. + @discussion This block will be executed for each animation frame and should update the property or properties being animated based on current timing. + @param target The object being animated. Reference the passed in target to help avoid retain loops. + @param animation The custom animation instance. Use to determine the current and elapsed time since last callback. Reference the passed in animation to help avoid retain loops. + @return Flag indicating whether the animation should continue animating. Return NO to indicate animation is done. + */ +typedef BOOL (^POPCustomAnimationBlock)(id target, POPCustomAnimation *animation); + +/** + @abstract POPCustomAnimation is a concrete animation subclass for custom animations. + */ +@interface POPCustomAnimation : POPAnimation + +/** +@abstract Creates and returns an initialized custom animation instance. +@discussion This is the designated initializer. +@param block The custom animation callback block. See {@ref POPCustomAnimationBlock}. +@return The initialized custom animation instance. +*/ ++ (instancetype)animationWithBlock:(POPCustomAnimationBlock)block; + +/** + @abstract The current animation time at time of callback. + */ +@property (readonly, nonatomic) CFTimeInterval currentTime; + +/** + @abstract The elapsed animation time since last callback. + */ +@property (readonly, nonatomic) CFTimeInterval elapsedTime; + +@end diff --git a/Pods/pop/pop/POPCustomAnimation.mm b/Pods/pop/pop/POPCustomAnimation.mm new file mode 100644 index 0000000..8cb7913 --- /dev/null +++ b/Pods/pop/pop/POPCustomAnimation.mm @@ -0,0 +1,75 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimationInternal.h" + +#import "POPCustomAnimation.h" + +@interface POPCustomAnimation () +@property (nonatomic, copy) POPCustomAnimationBlock animate; +@end + +@implementation POPCustomAnimation +@synthesize currentTime = _currentTime; +@synthesize elapsedTime = _elapsedTime; +@synthesize animate = _animate; + ++ (instancetype)animationWithBlock:(BOOL(^)(id target, POPCustomAnimation *))block +{ + POPCustomAnimation *b = [[self alloc] _init]; + b.animate = block; + return b; +} + +- (id)_init +{ + self = [super _init]; + if (nil != self) { + _state->type = kPOPAnimationCustom; + } + return self; +} + +- (CFTimeInterval)beginTime +{ + POPAnimationState *s = POPAnimationGetState(self); + return s->startTime > 0 ? s->startTime : s->beginTime; +} + +- (BOOL)_advance:(id)object currentTime:(CFTimeInterval)currentTime elapsedTime:(CFTimeInterval)elapsedTime +{ + _currentTime = currentTime; + _elapsedTime = elapsedTime; + return _animate(object, self); +} + +- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug +{ + [s appendFormat:@"; elapsedTime = %f; currentTime = %f;", _elapsedTime, _currentTime]; +} + +@end + +/** + * Note that only the animate block is copied, but not the current/elapsed times + */ +@implementation POPCustomAnimation (NSCopying) + +- (instancetype)copyWithZone:(NSZone *)zone { + + POPCustomAnimation *copy = [super copyWithZone:zone]; + + if (copy) { + copy.animate = self.animate; + } + + return copy; +} + +@end \ No newline at end of file diff --git a/Pods/pop/pop/POPDecayAnimation.h b/Pods/pop/pop/POPDecayAnimation.h new file mode 100644 index 0000000..92c6b60 --- /dev/null +++ b/Pods/pop/pop/POPDecayAnimation.h @@ -0,0 +1,66 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +/** + @abstract A concrete decay animation class. + @discussion Animation is achieved through gradual decay of animation value. + */ +@interface POPDecayAnimation : POPPropertyAnimation + +/** + @abstract The designated initializer. + @returns An instance of a decay animation. + */ ++ (instancetype)animation; + +/** + @abstract Convenience initializer that returns an animation with animatable property of name. + @param name The name of the animatable property. + @returns An instance of a decay animation configured with specified animatable property. + */ ++ (instancetype)animationWithPropertyNamed:(NSString *)name; + +/** + @abstract The current velocity value. + @discussion Set before animation start to account for initial velocity. Expressed in change of value units per second. The only POPValueTypes supported for velocity are: kPOPValuePoint, kPOPValueInteger, kPOPValueFloat, kPOPValueRect, and kPOPValueSize. + */ +@property (copy, nonatomic) id velocity; + +/** + @abstract The original velocity value. + @discussion Since the velocity property is modified as the animation progresses, this property stores the original, passed in velocity to support autoreverse and repeatCount. + */ +@property (copy, nonatomic, readonly) id originalVelocity; + +/** + @abstract The deceleration factor. + @discussion Values specifies should be in the range [0, 1]. Lower values results in faster deceleration. Defaults to 0.998. + */ +@property (assign, nonatomic) CGFloat deceleration; + +/** + @abstract The expected duration. + @discussion Derived based on input velocity and deceleration values. + */ +@property (readonly, assign, nonatomic) CFTimeInterval duration; + +/** + The to value is derived based on input velocity and deceleration. + */ +- (void)setToValue:(id)toValue NS_UNAVAILABLE; + +/** + @abstract The reversed velocity. + @discussion The reversed velocity based on the originalVelocity when the animation was set up. + */ +- (id)reversedVelocity; + +@end diff --git a/Pods/pop/pop/POPDecayAnimation.mm b/Pods/pop/pop/POPDecayAnimation.mm new file mode 100644 index 0000000..4698fd0 --- /dev/null +++ b/Pods/pop/pop/POPDecayAnimation.mm @@ -0,0 +1,203 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPDecayAnimationInternal.h" + +#if TARGET_OS_IPHONE +#import +#endif + +const POPValueType supportedVelocityTypes[6] = { kPOPValuePoint, kPOPValueInteger, kPOPValueFloat, kPOPValueRect, kPOPValueSize, kPOPValueEdgeInsets }; + +@implementation POPDecayAnimation + +#pragma mark - Lifecycle + +#undef __state +#define __state ((POPDecayAnimationState *)_state) + ++ (instancetype)animation +{ + return [[self alloc] init]; +} + ++ (instancetype)animationWithPropertyNamed:(NSString *)aName +{ + POPDecayAnimation *anim = [self animation]; + anim.property = [POPAnimatableProperty propertyWithName:aName]; + return anim; +} + +- (id)init +{ + return [self _init]; +} + +- (void)_initState +{ + _state = new POPDecayAnimationState(self); +} + +#pragma mark - Properties + +DEFINE_RW_PROPERTY(POPDecayAnimationState, deceleration, setDeceleration:, CGFloat, __state->toVec = NULL;); + +@dynamic velocity; + +- (id)toValue +{ + [self _ensureComputedProperties]; + return POPBox(__state->toVec, __state->valueType); +} + +- (CFTimeInterval)duration +{ + [self _ensureComputedProperties]; + return __state->duration; +} + +- (void)setFromValue:(id)fromValue +{ + super.fromValue = fromValue; + [self _invalidateComputedProperties]; +} + +- (void)setToValue:(id)aValue +{ + // no-op + NSLog(@"ignoring to value on decay animation %@", self); +} + +- (id)reversedVelocity +{ + id reversedVelocity = nil; + + POPValueType velocityType = POPSelectValueType(self.originalVelocity, supportedVelocityTypes, POP_ARRAY_COUNT(supportedVelocityTypes)); + if (velocityType == kPOPValueFloat) { +#if CGFLOAT_IS_DOUBLE + CGFloat originalVelocityFloat = [(NSNumber *)self.originalVelocity doubleValue]; +#else + CGFloat originalVelocityFloat = [(NSNumber *)self.originalVelocity floatValue]; +#endif + NSNumber *negativeOriginalVelocityNumber = @(-originalVelocityFloat); + reversedVelocity = negativeOriginalVelocityNumber; + } else if (velocityType == kPOPValueInteger) { + NSInteger originalVelocityInteger = [(NSNumber *)self.originalVelocity integerValue]; + NSNumber *negativeOriginalVelocityNumber = @(-originalVelocityInteger); + reversedVelocity = negativeOriginalVelocityNumber; + } else if (velocityType == kPOPValuePoint) { + CGPoint originalVelocityPoint = [self.originalVelocity CGPointValue]; + CGPoint negativeOriginalVelocityPoint = CGPointMake(-originalVelocityPoint.x, -originalVelocityPoint.y); + reversedVelocity = [NSValue valueWithCGPoint:negativeOriginalVelocityPoint]; + } else if (velocityType == kPOPValueRect) { + CGRect originalVelocityRect = [self.originalVelocity CGRectValue]; + CGRect negativeOriginalVelocityRect = CGRectMake(-originalVelocityRect.origin.x, -originalVelocityRect.origin.y, -originalVelocityRect.size.width, -originalVelocityRect.size.height); + reversedVelocity = [NSValue valueWithCGRect:negativeOriginalVelocityRect]; + } else if (velocityType == kPOPValueSize) { + CGSize originalVelocitySize = [self.originalVelocity CGSizeValue]; + CGSize negativeOriginalVelocitySize = CGSizeMake(-originalVelocitySize.width, -originalVelocitySize.height); + reversedVelocity = [NSValue valueWithCGSize:negativeOriginalVelocitySize]; + } else if (velocityType == kPOPValueEdgeInsets) { +#if TARGET_OS_IPHONE + UIEdgeInsets originalVelocityInsets = [self.originalVelocity UIEdgeInsetsValue]; + UIEdgeInsets negativeOriginalVelocityInsets = UIEdgeInsetsMake(-originalVelocityInsets.top, -originalVelocityInsets.left, -originalVelocityInsets.bottom, -originalVelocityInsets.right); + reversedVelocity = [NSValue valueWithUIEdgeInsets:negativeOriginalVelocityInsets]; +#endif + } + + return reversedVelocity; +} + +- (id)originalVelocity +{ + return POPBox(__state->originalVelocityVec, __state->valueType); +} + +- (id)velocity +{ + return POPBox(__state->velocityVec, __state->valueType); +} + +- (void)setVelocity:(id)aValue +{ + POPValueType valueType = POPSelectValueType(aValue, supportedVelocityTypes, POP_ARRAY_COUNT(supportedVelocityTypes)); + if (valueType != kPOPValueUnknown) { + VectorRef vec = POPUnbox(aValue, __state->valueType, __state->valueCount, YES); + VectorRef origVec = POPUnbox(aValue, __state->valueType, __state->valueCount, YES); + + if (!vec_equal(vec, __state->velocityVec)) { + __state->velocityVec = vec; + __state->originalVelocityVec = origVec; + + if (__state->tracing) { + [__state->tracer updateVelocity:aValue]; + } + + [self _invalidateComputedProperties]; + + // automatically unpause active animations + if (__state->active && __state->paused) { + __state->fromVec = NULL; + __state->setPaused(false); + } + } + } else { + __state->velocityVec = NULL; + NSLog(@"Invalid velocity value for the decayAnimation: %@", aValue); + } +} + +#pragma mark - Utility + +- (void)_ensureComputedProperties +{ + if (NULL == __state->toVec) { + __state->computeDuration(); + __state->computeToValue(); + } +} + +- (void)_invalidateComputedProperties +{ + __state->toVec = NULL; + __state->duration = 0; +} + +- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug +{ + [super _appendDescription:s debug:debug]; + + if (0 != self.duration) { + [s appendFormat:@"; duration = %f", self.duration]; + } + + if (__state->deceleration) { + [s appendFormat:@"; deceleration = %f", __state->deceleration]; + } +} + +@end + +@implementation POPDecayAnimation (NSCopying) + +- (instancetype)copyWithZone:(NSZone *)zone { + + POPDecayAnimation *copy = [super copyWithZone:zone]; + + if (copy) { + // Set the velocity to the animation's original velocity, not its current. + copy.velocity = self.originalVelocity; + copy.deceleration = self.deceleration; + + } + + return copy; +} + +@end \ No newline at end of file diff --git a/Pods/pop/pop/POPDecayAnimationInternal.h b/Pods/pop/pop/POPDecayAnimationInternal.h new file mode 100644 index 0000000..c101761 --- /dev/null +++ b/Pods/pop/pop/POPDecayAnimationInternal.h @@ -0,0 +1,127 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPDecayAnimation.h" + +#import + +#import "POPPropertyAnimationInternal.h" + +// minimal velocity factor before decay animation is considered complete, in units / s +static CGFloat kPOPAnimationDecayMinimalVelocityFactor = 5.; + +// default decay animation deceleration +static CGFloat kPOPAnimationDecayDecelerationDefault = 0.998; + +static void decay_position(CGFloat *x, CGFloat *v, NSUInteger count, CFTimeInterval dt, CGFloat deceleration) +{ + dt *= 1000; + + // v0 = v / 1000 + // v = v0 * powf(deceleration, dt); + // v = v * 1000; + + // x0 = x; + // x = x0 + v0 * deceleration * (1 - powf(deceleration, dt)) / (1 - deceleration) + float v0[count]; + float kv = powf(deceleration, dt); + float kx = deceleration * (1 - kv) / (1 - deceleration); + + for (NSUInteger idx = 0; idx < count; idx++) { + v0[idx] = v[idx] / 1000.; + v[idx] = v0[idx] * kv * 1000.; + x[idx] = x[idx] + v0[idx] * kx; + } +} + +struct _POPDecayAnimationState : _POPPropertyAnimationState +{ + double deceleration; + CFTimeInterval duration; + + _POPDecayAnimationState(id __unsafe_unretained anim) : + _POPPropertyAnimationState(anim), + deceleration(kPOPAnimationDecayDecelerationDefault), + duration(0) + { + type = kPOPAnimationDecay; + } + + bool isDone() { + if (_POPPropertyAnimationState::isDone()) { + return true; + } + + CGFloat f = dynamicsThreshold * kPOPAnimationDecayMinimalVelocityFactor; + const CGFloat *velocityValues = vec_data(velocityVec); + for (NSUInteger idx = 0; idx < valueCount; idx++) { + if (std::abs((velocityValues[idx])) >= f) + return false; + } + return true; + + } + + void computeDuration() { + + // compute duration till threshold velocity + Vector4r scaledVelocity = vector4(velocityVec) / 1000.; + + double k = dynamicsThreshold * kPOPAnimationDecayMinimalVelocityFactor / 1000.; + double vx = k / scaledVelocity.x; + double vy = k / scaledVelocity.y; + double vz = k / scaledVelocity.z; + double vw = k / scaledVelocity.w; + double d = log(deceleration) * 1000.; + duration = MAX(MAX(MAX(log(fabs(vx)) / d, log(fabs(vy)) / d), log(fabs(vz)) / d), log(fabs(vw)) / d); + + // ensure velocity threshold is exceeded + if (std::isnan(duration) || duration < 0) { + duration = 0; + } + } + + void computeToValue() { + // to value assuming final velocity as a factor of dynamics threshold + // derived from v' = v * d^dt used in decay_position + // to compute the to value with maximal dt, p' = p + (v * d) / (1 - d) + VectorRef fromValue = NULL != currentVec ? currentVec : fromVec; + if (!fromValue) { + return; + } + + // ensure duration is computed + if (0 == duration) { + computeDuration(); + } + + // compute to value + VectorRef toValue(Vector::new_vector(fromValue.get())); + Vector4r velocity = velocityVec->vector4r(); + decay_position(toValue->data(), velocity.data(), valueCount, duration, deceleration); + toVec = toValue; + } + + bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { + // advance past not yet initialized animations + if (NULL == currentVec) { + return false; + } + + decay_position(currentVec->data(), velocityVec->data(), valueCount, dt, deceleration); + + // clamp to compute end value; avoid possibility of decaying past + clampCurrentValue(kPOPAnimationClampEnd | clampMode); + + return true; + } + +}; + +typedef struct _POPDecayAnimationState POPDecayAnimationState; diff --git a/Pods/pop/pop/POPDefines.h b/Pods/pop/pop/POPDefines.h new file mode 100644 index 0000000..eb28781 --- /dev/null +++ b/Pods/pop/pop/POPDefines.h @@ -0,0 +1,37 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#ifndef POP_POPDefines_h +#define POP_POPDefines_h + +#import + +#ifdef __cplusplus +# define POP_EXTERN_C_BEGIN extern "C" { +# define POP_EXTERN_C_END } +#else +# define POP_EXTERN_C_BEGIN +# define POP_EXTERN_C_END +#endif + +#define POP_ARRAY_COUNT(x) sizeof(x) / sizeof(x[0]) + +#if defined (__cplusplus) && defined (__GNUC__) +# define POP_NOTHROW __attribute__ ((nothrow)) +#else +# define POP_NOTHROW +#endif + +#if TARGET_OS_MAC + #define SCENEKIT_SDK_AVAILABLE defined(POP_USE_SCENEKIT) +#elif TARGET_OS_IPHONE + #define SCENEKIT_SDK_AVAILABLE defined(POP_USE_SCENEKIT) +#endif + +#endif diff --git a/Pods/pop/pop/POPGeometry.h b/Pods/pop/pop/POPGeometry.h new file mode 100644 index 0000000..8ba07e3 --- /dev/null +++ b/Pods/pop/pop/POPGeometry.h @@ -0,0 +1,73 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#if TARGET_OS_IPHONE +#import +#endif + +#if !TARGET_OS_IPHONE + +/** NSValue extensions to support animatable types. */ +@interface NSValue (POP) + +/** + @abstract Creates an NSValue given a CGPoint. + */ ++ (NSValue *)valueWithCGPoint:(CGPoint)point; + +/** + @abstract Creates an NSValue given a CGSize. + */ ++ (NSValue *)valueWithCGSize:(CGSize)size; + +/** + @abstract Creates an NSValue given a CGRect. + */ ++ (NSValue *)valueWithCGRect:(CGRect)rect; + +/** + @abstract Creates an NSValue given a CFRange. + */ ++ (NSValue *)valueWithCFRange:(CFRange)range; + +/** + @abstract Creates an NSValue given a CGAffineTransform. + */ ++ (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform; + +/** + @abstract Returns the underlying CGPoint value. + */ +- (CGPoint)CGPointValue; + +/** + @abstract Returns the underlying CGSize value. + */ +- (CGSize)CGSizeValue; + +/** + @abstract Returns the underlying CGRect value. + */ +- (CGRect)CGRectValue; + +/** + @abstract Returns the underlying CFRange value. + */ +- (CFRange)CFRangeValue; + +/** + @abstract Returns the underlying CGAffineTransform value. + */ +- (CGAffineTransform)CGAffineTransformValue; + +@end + +#endif diff --git a/Pods/pop/pop/POPGeometry.mm b/Pods/pop/pop/POPGeometry.mm new file mode 100644 index 0000000..41998b1 --- /dev/null +++ b/Pods/pop/pop/POPGeometry.mm @@ -0,0 +1,94 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPGeometry.h" + +#if !TARGET_OS_IPHONE +@implementation NSValue (POP) + ++ (NSValue *)valueWithCGPoint:(CGPoint)point { + return [NSValue valueWithBytes:&point objCType:@encode(CGPoint)]; +} + ++ (NSValue *)valueWithCGSize:(CGSize)size { + return [NSValue valueWithBytes:&size objCType:@encode(CGSize)]; +} + ++ (NSValue *)valueWithCGRect:(CGRect)rect { + return [NSValue valueWithBytes:&rect objCType:@encode(CGRect)]; +} + ++ (NSValue *)valueWithCFRange:(CFRange)range { + return [NSValue valueWithBytes:&range objCType:@encode(CFRange)]; +} + ++ (NSValue *)valueWithCGAffineTransform:(CGAffineTransform)transform +{ + return [NSValue valueWithBytes:&transform objCType:@encode(CGAffineTransform)]; +} + +- (CGPoint)CGPointValue { + CGPoint result; + [self getValue:&result]; + return result; +} + +- (CGSize)CGSizeValue { + CGSize result; + [self getValue:&result]; + return result; +} + +- (CGRect)CGRectValue { + CGRect result; + [self getValue:&result]; + return result; +} + +- (CFRange)CFRangeValue { + CFRange result; + [self getValue:&result]; + return result; +} + +- (CGAffineTransform)CGAffineTransformValue { + CGAffineTransform result; + [self getValue:&result]; + return result; +} +@end + +#endif + +#if TARGET_OS_IPHONE +#import "POPDefines.h" + +#if SCENEKIT_SDK_AVAILABLE +#import + +/** + Dirty hacks because iOS is weird and decided to define both SCNVector3's and SCNVector4's objCType as "t". However @encode(SCNVector3) and @encode(SCNVector4) both return the proper definition ("{SCNVector3=fff}" and "{SCNVector4=ffff}" respectively) + + [[NSValue valueWithSCNVector3:SCNVector3Make(0.0, 0.0, 0.0)] objcType] returns "t", whereas it should return "{SCNVector3=fff}". + + *flips table* + */ +@implementation NSValue (SceneKitFixes) + ++ (NSValue *)valueWithSCNVector3:(SCNVector3)vec3 { + return [NSValue valueWithBytes:&vec3 objCType:@encode(SCNVector3)]; +} + ++ (NSValue *)valueWithSCNVector4:(SCNVector4)vec4 { + return [NSValue valueWithBytes:&vec4 objCType:@encode(SCNVector4)]; +} + +@end +#endif +#endif diff --git a/Pods/pop/pop/POPLayerExtras.h b/Pods/pop/pop/POPLayerExtras.h new file mode 100644 index 0000000..ec4c29a --- /dev/null +++ b/Pods/pop/pop/POPLayerExtras.h @@ -0,0 +1,196 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +POP_EXTERN_C_BEGIN + +#pragma mark - Scale + +/** + @abstract Returns layer scale factor for the x axis. + */ +extern CGFloat POPLayerGetScaleX(CALayer *l); + +/** + @abstract Set layer scale factor for the x axis. + */ +extern void POPLayerSetScaleX(CALayer *l, CGFloat f); + +/** + @abstract Returns layer scale factor for the y axis. + */ +extern CGFloat POPLayerGetScaleY(CALayer *l); + +/** + @abstract Set layer scale factor for the y axis. + */ +extern void POPLayerSetScaleY(CALayer *l, CGFloat f); + +/** + @abstract Returns layer scale factor for the z axis. + */ +extern CGFloat POPLayerGetScaleZ(CALayer *l); + +/** + @abstract Set layer scale factor for the z axis. + */ +extern void POPLayerSetScaleZ(CALayer *l, CGFloat f); + +/** + @abstract Returns layer scale factors for x and y access as point. + */ +extern CGPoint POPLayerGetScaleXY(CALayer *l); + +/** + @abstract Sets layer x and y scale factors given point. + */ +extern void POPLayerSetScaleXY(CALayer *l, CGPoint p); + +#pragma mark - Translation + +/** + @abstract Returns layer translation factor for the x axis. + */ +extern CGFloat POPLayerGetTranslationX(CALayer *l); + +/** + @abstract Set layer translation factor for the x axis. + */ +extern void POPLayerSetTranslationX(CALayer *l, CGFloat f); + +/** + @abstract Returns layer translation factor for the y axis. + */ +extern CGFloat POPLayerGetTranslationY(CALayer *l); + +/** + @abstract Set layer translation factor for the y axis. + */ +extern void POPLayerSetTranslationY(CALayer *l, CGFloat f); + +/** + @abstract Returns layer translation factor for the z axis. + */ +extern CGFloat POPLayerGetTranslationZ(CALayer *l); + +/** + @abstract Set layer translation factor for the z axis. + */ +extern void POPLayerSetTranslationZ(CALayer *l, CGFloat f); + +/** + @abstract Returns layer translation factors for x and y access as point. + */ +extern CGPoint POPLayerGetTranslationXY(CALayer *l); + +/** + @abstract Sets layer x and y translation factors given point. + */ +extern void POPLayerSetTranslationXY(CALayer *l, CGPoint p); + +#pragma mark - Rotation + +/** + @abstract Returns layer rotation, in radians, in the X axis. + */ +extern CGFloat POPLayerGetRotationX(CALayer *l); + +/** + @abstract Sets layer rotation, in radians, in the X axis. + */ +extern void POPLayerSetRotationX(CALayer *l, CGFloat f); + +/** + @abstract Returns layer rotation, in radians, in the Y axis. + */ +extern CGFloat POPLayerGetRotationY(CALayer *l); + +/** + @abstract Sets layer rotation, in radians, in the Y axis. + */ +extern void POPLayerSetRotationY(CALayer *l, CGFloat f); + +/** + @abstract Returns layer rotation, in radians, in the Z axis. + */ +extern CGFloat POPLayerGetRotationZ(CALayer *l); + +/** + @abstract Sets layer rotation, in radians, in the Z axis. + */ +extern void POPLayerSetRotationZ(CALayer *l, CGFloat f); + +/** + @abstract Returns layer rotation, in radians, in the Z axis. + */ +extern CGFloat POPLayerGetRotation(CALayer *l); + +/** + @abstract Sets layer rotation, in radians, in the Z axis. + */ +extern void POPLayerSetRotation(CALayer *l, CGFloat f); + +#pragma mark - Sublayer Scale + +/** + @abstract Returns sublayer scale factors for x and y access as point. + */ +extern CGPoint POPLayerGetSubScaleXY(CALayer *l); + +/** + @abstract Sets sublayer x and y scale factors given point. + */ +extern void POPLayerSetSubScaleXY(CALayer *l, CGPoint p); + +#pragma mark - Sublayer Translation + +/** + @abstract Returns sublayer translation factor for the x axis. + */ +extern CGFloat POPLayerGetSubTranslationX(CALayer *l); + +/** + @abstract Set sublayer translation factor for the x axis. + */ +extern void POPLayerSetSubTranslationX(CALayer *l, CGFloat f); + +/** + @abstract Returns sublayer translation factor for the y axis. + */ +extern CGFloat POPLayerGetSubTranslationY(CALayer *l); + +/** + @abstract Set sublayer translation factor for the y axis. + */ +extern void POPLayerSetSubTranslationY(CALayer *l, CGFloat f); + +/** + @abstract Returns sublayer translation factor for the z axis. + */ +extern CGFloat POPLayerGetSubTranslationZ(CALayer *l); + +/** + @abstract Set sublayer translation factor for the z axis. + */ +extern void POPLayerSetSubTranslationZ(CALayer *l, CGFloat f); + +/** + @abstract Returns sublayer translation factors for x and y access as point. + */ +extern CGPoint POPLayerGetSubTranslationXY(CALayer *l); + +/** + @abstract Sets sublayer x and y translation factors given point. + */ +extern void POPLayerSetSubTranslationXY(CALayer *l, CGPoint p); + +POP_EXTERN_C_END diff --git a/Pods/pop/pop/POPLayerExtras.mm b/Pods/pop/pop/POPLayerExtras.mm new file mode 100644 index 0000000..c8ad7f9 --- /dev/null +++ b/Pods/pop/pop/POPLayerExtras.mm @@ -0,0 +1,288 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPLayerExtras.h" + +#include "TransformationMatrix.h" + +using namespace WebCore; + +#define DECOMPOSE_TRANSFORM(L) \ + TransformationMatrix _m(L.transform); \ + TransformationMatrix::DecomposedType _d; \ + _m.decompose(_d); + +#define RECOMPOSE_TRANSFORM(L) \ + _m.recompose(_d); \ + L.transform = _m.transform3d(); + +#define RECOMPOSE_ROT_TRANSFORM(L) \ + _m.recompose(_d, true); \ + L.transform = _m.transform3d(); + +#define DECOMPOSE_SUBLAYER_TRANSFORM(L) \ + TransformationMatrix _m(L.sublayerTransform); \ + TransformationMatrix::DecomposedType _d; \ + _m.decompose(_d); + +#define RECOMPOSE_SUBLAYER_TRANSFORM(L) \ + _m.recompose(_d); \ + L.sublayerTransform = _m.transform3d(); + +#pragma mark - Scale + +NS_INLINE void ensureNonZeroValue(CGFloat &f) +{ + if (f == 0) { + f = 1e-6; + } +} + +NS_INLINE void ensureNonZeroValue(CGPoint &p) +{ + if (p.x == 0 && p.y == 0) { + p.x = 1e-6; + p.y = 1e-6; + } +} + +CGFloat POPLayerGetScaleX(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.scaleX; +} + +void POPLayerSetScaleX(CALayer *l, CGFloat f) +{ + ensureNonZeroValue(f); + DECOMPOSE_TRANSFORM(l); + _d.scaleX = f; + RECOMPOSE_TRANSFORM(l); +} + +CGFloat POPLayerGetScaleY(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.scaleY; +} + +void POPLayerSetScaleY(CALayer *l, CGFloat f) +{ + ensureNonZeroValue(f); + DECOMPOSE_TRANSFORM(l); + _d.scaleY = f; + RECOMPOSE_TRANSFORM(l); +} + +CGFloat POPLayerGetScaleZ(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.scaleZ; +} + +void POPLayerSetScaleZ(CALayer *l, CGFloat f) +{ + ensureNonZeroValue(f); + DECOMPOSE_TRANSFORM(l); + _d.scaleZ = f; + RECOMPOSE_TRANSFORM(l); +} + +CGPoint POPLayerGetScaleXY(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return CGPointMake(_d.scaleX, _d.scaleY); +} + +void POPLayerSetScaleXY(CALayer *l, CGPoint p) +{ + ensureNonZeroValue(p); + DECOMPOSE_TRANSFORM(l); + _d.scaleX = p.x; + _d.scaleY = p.y; + RECOMPOSE_TRANSFORM(l); +} + +#pragma mark - Translation + +CGFloat POPLayerGetTranslationX(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.translateX; +} + +void POPLayerSetTranslationX(CALayer *l, CGFloat f) +{ + DECOMPOSE_TRANSFORM(l); + _d.translateX = f; + RECOMPOSE_TRANSFORM(l); +} + +CGFloat POPLayerGetTranslationY(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.translateY; +} + +void POPLayerSetTranslationY(CALayer *l, CGFloat f) +{ + DECOMPOSE_TRANSFORM(l); + _d.translateY = f; + RECOMPOSE_TRANSFORM(l); +} + +CGFloat POPLayerGetTranslationZ(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.translateZ; +} + +void POPLayerSetTranslationZ(CALayer *l, CGFloat f) +{ + DECOMPOSE_TRANSFORM(l); + _d.translateZ = f; + RECOMPOSE_TRANSFORM(l); +} + +CGPoint POPLayerGetTranslationXY(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return CGPointMake(_d.translateX, _d.translateY); +} + +void POPLayerSetTranslationXY(CALayer *l, CGPoint p) +{ + DECOMPOSE_TRANSFORM(l); + _d.translateX = p.x; + _d.translateY = p.y; + RECOMPOSE_TRANSFORM(l); +} + +#pragma mark - Rotation + +CGFloat POPLayerGetRotationX(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.rotateX; +} + +void POPLayerSetRotationX(CALayer *l, CGFloat f) +{ + DECOMPOSE_TRANSFORM(l); + _d.rotateX = f; + RECOMPOSE_ROT_TRANSFORM(l); +} + +CGFloat POPLayerGetRotationY(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.rotateY; +} + +void POPLayerSetRotationY(CALayer *l, CGFloat f) +{ + DECOMPOSE_TRANSFORM(l); + _d.rotateY = f; + RECOMPOSE_ROT_TRANSFORM(l); +} + +CGFloat POPLayerGetRotationZ(CALayer *l) +{ + DECOMPOSE_TRANSFORM(l); + return _d.rotateZ; +} + +void POPLayerSetRotationZ(CALayer *l, CGFloat f) +{ + DECOMPOSE_TRANSFORM(l); + _d.rotateZ = f; + RECOMPOSE_ROT_TRANSFORM(l); +} + +CGFloat POPLayerGetRotation(CALayer *l) +{ + return POPLayerGetRotationZ(l); +} + +void POPLayerSetRotation(CALayer *l, CGFloat f) +{ + POPLayerSetRotationZ(l, f); +} + +#pragma mark - Sublayer Scale + +CGPoint POPLayerGetSubScaleXY(CALayer *l) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + return CGPointMake(_d.scaleX, _d.scaleY); +} + +void POPLayerSetSubScaleXY(CALayer *l, CGPoint p) +{ + ensureNonZeroValue(p); + DECOMPOSE_SUBLAYER_TRANSFORM(l); + _d.scaleX = p.x; + _d.scaleY = p.y; + RECOMPOSE_SUBLAYER_TRANSFORM(l); +} + +#pragma mark - Sublayer Translation + +extern CGFloat POPLayerGetSubTranslationX(CALayer *l) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + return _d.translateX; +} + +extern void POPLayerSetSubTranslationX(CALayer *l, CGFloat f) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + _d.translateX = f; + RECOMPOSE_SUBLAYER_TRANSFORM(l); +} + +extern CGFloat POPLayerGetSubTranslationY(CALayer *l) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + return _d.translateY; +} + +extern void POPLayerSetSubTranslationY(CALayer *l, CGFloat f) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + _d.translateY = f; + RECOMPOSE_SUBLAYER_TRANSFORM(l); +} + +extern CGFloat POPLayerGetSubTranslationZ(CALayer *l) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + return _d.translateZ; +} + +extern void POPLayerSetSubTranslationZ(CALayer *l, CGFloat f) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + _d.translateZ = f; + RECOMPOSE_SUBLAYER_TRANSFORM(l); +} + +extern CGPoint POPLayerGetSubTranslationXY(CALayer *l) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + return CGPointMake(_d.translateX, _d.translateY); +} + +extern void POPLayerSetSubTranslationXY(CALayer *l, CGPoint p) +{ + DECOMPOSE_SUBLAYER_TRANSFORM(l); + _d.translateX = p.x; + _d.translateY = p.y; + RECOMPOSE_SUBLAYER_TRANSFORM(l); +} diff --git a/Pods/pop/pop/POPMath.h b/Pods/pop/pop/POPMath.h new file mode 100644 index 0000000..0c6f5e2 --- /dev/null +++ b/Pods/pop/pop/POPMath.h @@ -0,0 +1,56 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import + +#import "POPDefines.h" +#import "POPVector.h" + +NS_INLINE CGFloat sqrtr(CGFloat f) +{ +#if CGFLOAT_IS_DOUBLE + return sqrt(f); +#else + return sqrtf(f); +#endif +} + +// round to nearest sub; pass 2.0 to round to every 0.5 (eg: retina pixels) +NS_INLINE CGFloat POPSubRound(CGFloat f, CGFloat sub) +{ + return round(f * sub) / sub; +} + +#define MIX(a, b, f) ((a) + (f) * ((b) - (a))) + +// the longer the duration, the higher the necessary precision +#define SOLVE_EPS(dur) (1. / (1000. * (dur))) + +#define _EQLF_(x, y, epsilon) (fabsf ((x) - (y)) < epsilon) + +extern void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f); + +extern double POPTimingFunctionSolve(const double vec[4], double t, double eps); + +// quadratic mapping of t [0, 1] to [start, end] +extern double POPQuadraticOutInterpolation(double t, double start, double end); + +// normalize value to [0, 1] based on its range [startValue, endValue] +extern double POPNormalize(double value, double startValue, double endValue); + +// project a normalized value [0, 1] to a given range [start, end] +extern double POPProjectNormal(double n, double start, double end); + +// solve a quadratic equation of the form a * x^2 + b * x + c = 0 +extern void POPQuadraticSolve(CGFloat a, CGFloat b, CGFloat c, CGFloat &x1, CGFloat &x2); + +// for a given tension return the bouncy 3 friction that produces no bounce +extern double POPBouncy3NoBounce(double tension); diff --git a/Pods/pop/pop/POPMath.mm b/Pods/pop/pop/POPMath.mm new file mode 100644 index 0000000..69a506a --- /dev/null +++ b/Pods/pop/pop/POPMath.mm @@ -0,0 +1,83 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPMath.h" + +#import "POPAnimationPrivate.h" +#import "UnitBezier.h" + +void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f) +{ + for (NSUInteger idx = 0; idx < count; idx++) { + dst[idx] = MIX(from[idx], to[idx], f); + } +} + +double POPTimingFunctionSolve(const double vec[4], double t, double eps) +{ + WebCore::UnitBezier bezier(vec[0], vec[1], vec[2], vec[3]); + return bezier.solve(t, eps); +} + +double POPNormalize(double value, double startValue, double endValue) +{ + return (value - startValue) / (endValue - startValue); +} + +double POPProjectNormal(double n, double start, double end) +{ + return start + (n * (end - start)); +} + +static double linear_interpolation(double t, double start, double end) +{ + return t * end + (1.f - t) * start; +} + +double POPQuadraticOutInterpolation(double t, double start, double end) +{ + return linear_interpolation(2*t - t*t, start, end); +} + +static double b3_friction1(double x) +{ + return (0.0007 * pow(x, 3)) - (0.031 * pow(x, 2)) + 0.64 * x + 1.28; +} + +static double b3_friction2(double x) +{ + return (0.000044 * pow(x, 3)) - (0.006 * pow(x, 2)) + 0.36 * x + 2.; +} + +static double b3_friction3(double x) +{ + return (0.00000045 * pow(x, 3)) - (0.000332 * pow(x, 2)) + 0.1078 * x + 5.84; +} + +double POPBouncy3NoBounce(double tension) +{ + double friction = 0; + if (tension <= 18.) { + friction = b3_friction1(tension); + } else if (tension > 18 && tension <= 44) { + friction = b3_friction2(tension); + } else if (tension > 44) { + friction = b3_friction3(tension); + } else { + assert(false); + } + return friction; +} + +void POPQuadraticSolve(CGFloat a, CGFloat b, CGFloat c, CGFloat &x1, CGFloat &x2) +{ + CGFloat discriminant = sqrt(b * b - 4 * a * c); + x1 = (-b + discriminant) / (2 * a); + x2 = (-b - discriminant) / (2 * a); +} diff --git a/Pods/pop/pop/POPPropertyAnimation.h b/Pods/pop/pop/POPPropertyAnimation.h new file mode 100644 index 0000000..2861665 --- /dev/null +++ b/Pods/pop/pop/POPPropertyAnimation.h @@ -0,0 +1,65 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import +#import + +/** + @abstract Flags for clamping animation values. + @discussion Animation values can optionally be clamped to avoid overshoot. kPOPAnimationClampStart ensures values are more than fromValue and kPOPAnimationClampEnd ensures values are less than toValue. + */ +typedef NS_OPTIONS(NSUInteger, POPAnimationClampFlags) +{ + kPOPAnimationClampNone = 0, + kPOPAnimationClampStart = 1UL << 0, + kPOPAnimationClampEnd = 1UL << 1, + kPOPAnimationClampBoth = kPOPAnimationClampStart | kPOPAnimationClampEnd, +}; + +/** + @abstract The semi-concrete property animation subclass. + */ +@interface POPPropertyAnimation : POPAnimation + +/** + @abstract The property to animate. + */ +@property (strong, nonatomic) POPAnimatableProperty *property; + +/** + @abstract The value to animate from. + @discussion The value type should match the property. If unspecified, the value is initialized to the object's current value on animation start. + */ +@property (copy, nonatomic) id fromValue; + +/** + @abstract The value to animate to. + @discussion The value type should match the property. If unspecified, the value is initialized to the object's current value on animation start. + */ +@property (copy, nonatomic) id toValue; + +/** + @abstract The rounding factor applied to the current animated value. + @discussion Specify 1.0 to animate between integral values. Defaults to 0 meaning no rounding. + */ +@property (assign, nonatomic) CGFloat roundingFactor; + +/** + @abstract The clamp mode applied to the current animated value. + @discussion See {@ref POPAnimationClampFlags} for possible values. Defaults to kPOPAnimationClampNone. + */ +@property (assign, nonatomic) NSUInteger clampMode; + +/** + @abstract The flag indicating whether values should be "added" each frame, rather than set. + @discussion Addition may be type dependent. Defaults to NO. + */ +@property (assign, nonatomic, getter = isAdditive) BOOL additive; + +@end diff --git a/Pods/pop/pop/POPPropertyAnimation.mm b/Pods/pop/pop/POPPropertyAnimation.mm new file mode 100644 index 0000000..56a9e5c --- /dev/null +++ b/Pods/pop/pop/POPPropertyAnimation.mm @@ -0,0 +1,125 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPPropertyAnimationInternal.h" + +@implementation POPPropertyAnimation + +#pragma mark - Lifecycle + +#undef __state +#define __state ((POPPropertyAnimationState *)_state) + +- (void)_initState +{ + _state = new POPPropertyAnimationState(self); +} + +#pragma mark - Properties + +DEFINE_RW_FLAG(POPPropertyAnimationState, additive, isAdditive, setAdditive:); +DEFINE_RW_PROPERTY(POPPropertyAnimationState, roundingFactor, setRoundingFactor:, CGFloat); +DEFINE_RW_PROPERTY(POPPropertyAnimationState, clampMode, setClampMode:, NSUInteger); +DEFINE_RW_PROPERTY_OBJ(POPPropertyAnimationState, property, setProperty:, POPAnimatableProperty*, ((POPPropertyAnimationState*)_state)->updatedDynamicsThreshold();); +DEFINE_RW_PROPERTY_OBJ_COPY(POPPropertyAnimationState, progressMarkers, setProgressMarkers:, NSArray*, ((POPPropertyAnimationState*)_state)->updatedProgressMarkers();); + +- (id)fromValue +{ + return POPBox(__state->fromVec, __state->valueType); +} + +- (void)setFromValue:(id)aValue +{ + POPPropertyAnimationState *s = __state; + VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); + if (!vec_equal(vec, s->fromVec)) { + s->fromVec = vec; + + if (s->tracing) { + [s->tracer updateFromValue:aValue]; + } + } +} + +- (id)toValue +{ + return POPBox(__state->toVec, __state->valueType); +} + +- (void)setToValue:(id)aValue +{ + POPPropertyAnimationState *s = __state; + VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); + + if (!vec_equal(vec, s->toVec)) { + s->toVec = vec; + + // invalidate to dependent state + s->didReachToValue = false; + s->distanceVec = NULL; + + if (s->tracing) { + [s->tracer updateToValue:aValue]; + } + + // automatically unpause active animations + if (s->active && s->paused) { + s->setPaused(false); + } + } +} + +- (id)currentValue +{ + return POPBox(__state->currentValue(), __state->valueType); +} + +#pragma mark - Utility + +- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug +{ + [s appendFormat:@"; from = %@; to = %@", describe(__state->fromVec), describe(__state->toVec)]; + + if (_state->active) + [s appendFormat:@"; currentValue = %@", describe(__state->currentValue())]; + + if (__state->velocityVec && 0 != __state->velocityVec->norm()) + [s appendFormat:@"; velocity = %@", describe(__state->velocityVec)]; + + if (!self.removedOnCompletion) + [s appendFormat:@"; removedOnCompletion = %@", POPStringFromBOOL(self.removedOnCompletion)]; + + if (__state->progressMarkers) + [s appendFormat:@"; progressMarkers = [%@]", [__state->progressMarkers componentsJoinedByString:@", "]]; + + if (_state->active) + [s appendFormat:@"; progress = %f", __state->progress]; +} + +@end + +@implementation POPPropertyAnimation (NSCopying) + +- (instancetype)copyWithZone:(NSZone *)zone { + + POPPropertyAnimation *copy = [super copyWithZone:zone]; + + if (copy) { + copy.property = [self.property copyWithZone:zone]; + copy.fromValue = self.fromValue; + copy.toValue = self.toValue; + copy.roundingFactor = self.roundingFactor; + copy.clampMode = self.clampMode; + copy.additive = self.additive; + } + + return copy; +} + +@end \ No newline at end of file diff --git a/Pods/pop/pop/POPPropertyAnimationInternal.h b/Pods/pop/pop/POPPropertyAnimationInternal.h new file mode 100644 index 0000000..9f2aee4 --- /dev/null +++ b/Pods/pop/pop/POPPropertyAnimationInternal.h @@ -0,0 +1,359 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPAnimationInternal.h" +#import "POPPropertyAnimation.h" + +static void clampValue(CGFloat &value, CGFloat fromValue, CGFloat toValue, NSUInteger clamp) +{ + BOOL increasing = (toValue > fromValue); + + // Clamp start of animation. + if ((kPOPAnimationClampStart & clamp) && + ((increasing && (value < fromValue)) || (!increasing && (value > fromValue)))) { + value = fromValue; + } + + // Clamp end of animation. + if ((kPOPAnimationClampEnd & clamp) && + ((increasing && (value > toValue)) || (!increasing && (value < toValue)))) { + value = toValue; + } +} + +struct _POPPropertyAnimationState : _POPAnimationState +{ + POPAnimatableProperty *property; + POPValueType valueType; + NSUInteger valueCount; + VectorRef fromVec; + VectorRef toVec; + VectorRef currentVec; + VectorRef previousVec; + VectorRef previous2Vec; + VectorRef velocityVec; + VectorRef originalVelocityVec; + VectorRef distanceVec; + CGFloat roundingFactor; + NSUInteger clampMode; + NSArray *progressMarkers; + POPProgressMarker *progressMarkerState; + NSUInteger progressMarkerCount; + NSUInteger nextProgressMarkerIdx; + CGFloat dynamicsThreshold; + + _POPPropertyAnimationState(id __unsafe_unretained anim) : _POPAnimationState(anim), + property(nil), + valueType((POPValueType)0), + valueCount(0), + fromVec(nullptr), + toVec(nullptr), + currentVec(nullptr), + previousVec(nullptr), + previous2Vec(nullptr), + velocityVec(nullptr), + originalVelocityVec(nullptr), + distanceVec(nullptr), + roundingFactor(0), + clampMode(0), + progressMarkers(nil), + progressMarkerState(nil), + progressMarkerCount(0), + nextProgressMarkerIdx(0), + dynamicsThreshold(0) + { + type = kPOPAnimationBasic; + } + + ~_POPPropertyAnimationState() + { + if (progressMarkerState) { + free(progressMarkerState); + progressMarkerState = NULL; + } + } + + bool canProgress() { + return hasValue(); + } + + bool shouldRound() { + return 0 != roundingFactor; + } + + bool hasValue() { + return 0 != valueCount; + } + + bool isDone() { + // inherit done + if (_POPAnimationState::isDone()) { + return true; + } + + // consider an animation with no values done + if (!hasValue() && !isCustom()) { + return true; + } + + return false; + } + + // returns a copy of the currentVec, rounding if needed + VectorRef currentValue() { + VectorRef vec = VectorRef(Vector::new_vector(currentVec.get())); + if (shouldRound()) { + vec->subRound(1 / roundingFactor); + } + return vec; + } + + void resetProgressMarkerState() + { + for (NSUInteger idx = 0; idx < progressMarkerCount; idx++) + progressMarkerState[idx].reached = false; + + nextProgressMarkerIdx = 0; + } + + void updatedProgressMarkers() + { + if (progressMarkerState) { + free(progressMarkerState); + progressMarkerState = NULL; + } + + progressMarkerCount = progressMarkers.count; + + if (0 != progressMarkerCount) { + progressMarkerState = (POPProgressMarker *)malloc(progressMarkerCount * sizeof(POPProgressMarker)); + [progressMarkers enumerateObjectsUsingBlock:^(NSNumber *progressMarker, NSUInteger idx, BOOL *stop) { + progressMarkerState[idx].reached = false; + progressMarkerState[idx].progress = [progressMarker floatValue]; + }]; + } + + nextProgressMarkerIdx = 0; + } + + virtual void updatedDynamicsThreshold() + { + dynamicsThreshold = property.threshold; + } + + void finalizeProgress() + { + progress = 1.0; + NSUInteger count = valueCount; + VectorRef outVec(Vector::new_vector(count, NULL)); + + if (outVec && toVec) { + *outVec = *toVec; + } + + currentVec = outVec; + clampCurrentValue(); + delegateProgress(); + } + + void computeProgress() { + if (!canProgress()) { + return; + } + + static ComputeProgressFunctor func; + Vector4r v = vector4(currentVec); + Vector4r f = vector4(fromVec); + Vector4r t = vector4(toVec); + progress = func(v, f, t); + } + + void delegateProgress() { + if (!canProgress()) { + return; + } + + if (delegateDidProgress && progressMarkerState) { + + while (nextProgressMarkerIdx < progressMarkerCount) { + if (progress < progressMarkerState[nextProgressMarkerIdx].progress) + break; + + if (!progressMarkerState[nextProgressMarkerIdx].reached) { + ActionEnabler enabler; + [delegate pop_animation:self didReachProgress:progressMarkerState[nextProgressMarkerIdx].progress]; + progressMarkerState[nextProgressMarkerIdx].reached = true; + } + + nextProgressMarkerIdx++; + } + } + + if (!didReachToValue) { + bool didReachToValue = false; + if (0 == valueCount) { + didReachToValue = true; + } else { + Vector4r distance = toVec->vector4r(); + distance -= currentVec->vector4r(); + + if (0 == distance.squaredNorm()) { + didReachToValue = true; + } else { + // components + if (distanceVec) { + didReachToValue = true; + const CGFloat *distanceValues = distanceVec->data(); + for (NSUInteger idx = 0; idx < valueCount; idx++) { + didReachToValue &= (signbit(distance[idx]) != signbit(distanceValues[idx])); + } + } + } + } + + if (didReachToValue) { + handleDidReachToValue(); + } + } + } + + void handleDidReachToValue() { + didReachToValue = true; + + if (delegateDidReachToValue) { + ActionEnabler enabler; + [delegate pop_animationDidReachToValue:self]; + } + + POPAnimationDidReachToValueBlock block = animationDidReachToValueBlock; + if (block != NULL) { + ActionEnabler enabler; + block(self); + } + + if (tracing) { + [tracer didReachToValue:POPBox(currentValue(), valueType, true)]; + } + } + + void readObjectValue(VectorRef *ptrVec, id obj) + { + // use current object value as from value + pop_animatable_read_block read = property.readBlock; + if (NULL != read) { + + Vector4r vec = read_values(read, obj, valueCount); + *ptrVec = VectorRef(Vector::new_vector(valueCount, vec)); + + if (tracing) { + [tracer readPropertyValue:POPBox(*ptrVec, valueType, true)]; + } + } + } + + virtual void willRun(bool started, id obj) { + // ensure from value initialized + if (NULL == fromVec) { + readObjectValue(&fromVec, obj); + } + + // ensure to value initialized + if (NULL == toVec) { + // compute decay to value + if (kPOPAnimationDecay == type) { + [self toValue]; + } else { + // read to value + readObjectValue(&toVec, obj); + } + } + + // handle one time value initialization on start + if (started) { + + // initialize current vec + if (!currentVec) { + currentVec = VectorRef(Vector::new_vector(valueCount, NULL)); + + // initialize current value with from value + // only do this on initial creation to avoid overwriting current value + // on paused animation continuation + if (currentVec && fromVec) { + *currentVec = *fromVec; + } + } + + // ensure velocity values + if (!velocityVec) { + velocityVec = VectorRef(Vector::new_vector(valueCount, NULL)); + } + if (!originalVelocityVec) { + originalVelocityVec = VectorRef(Vector::new_vector(valueCount, NULL)); + } + } + + // ensure distance value initialized + // depends on current value set on one time start + if (NULL == distanceVec) { + + // not yet started animations may not have current value + VectorRef fromVec2 = NULL != currentVec ? currentVec : fromVec; + + if (fromVec2 && toVec) { + Vector4r distance = toVec->vector4r(); + distance -= fromVec2->vector4r(); + + if (0 != distance.squaredNorm()) { + distanceVec = VectorRef(Vector::new_vector(valueCount, distance)); + } + } + } + } + + virtual void reset(bool all) { + _POPAnimationState::reset(all); + + if (all) { + currentVec = NULL; + previousVec = NULL; + previous2Vec = NULL; + } + progress = 0; + resetProgressMarkerState(); + didReachToValue = false; + distanceVec = NULL; + } + + void clampCurrentValue(NSUInteger clamp) + { + if (kPOPAnimationClampNone == clamp) + return; + + // Clamp all vector values + CGFloat *currentValues = currentVec->data(); + const CGFloat *fromValues = fromVec->data(); + const CGFloat *toValues = toVec->data(); + + for (NSUInteger idx = 0; idx < valueCount; idx++) { + clampValue(currentValues[idx], fromValues[idx], toValues[idx], clamp); + } + } + + void clampCurrentValue() + { + clampCurrentValue(clampMode); + } +}; + +typedef struct _POPPropertyAnimationState POPPropertyAnimationState; + +@interface POPPropertyAnimation () + +@end + diff --git a/Pods/pop/pop/POPSpringAnimation.h b/Pods/pop/pop/POPSpringAnimation.h new file mode 100644 index 0000000..a22cd5b --- /dev/null +++ b/Pods/pop/pop/POPSpringAnimation.h @@ -0,0 +1,67 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +/** + @abstract A concrete spring animation class. + @discussion Animation is achieved through modeling spring dynamics. + */ +@interface POPSpringAnimation : POPPropertyAnimation + +/** + @abstract The designated initializer. + @returns An instance of a spring animation. + */ ++ (instancetype)animation; + +/** + @abstract Convenience initializer that returns an animation with animatable property of name. + @param name The name of the animatable property. + @returns An instance of a spring animation configured with specified animatable property. + */ ++ (instancetype)animationWithPropertyNamed:(NSString *)name; + +/** + @abstract The current velocity value. + @discussion Set before animation start to account for initial velocity. Expressed in change of value units per second. + */ +@property (copy, nonatomic) id velocity; + +/** + @abstract The effective bounciness. + @discussion Use in conjunction with 'springSpeed' to change animation effect. Values are converted into corresponding dynamics constants. Higher values increase spring movement range resulting in more oscillations and springiness. Defined as a value in the range [0, 20]. Defaults to 4. + */ +@property (assign, nonatomic) CGFloat springBounciness; + +/** + @abstract The effective speed. + @discussion Use in conjunction with 'springBounciness' to change animation effect. Values are converted into corresponding dynamics constants. Higher values increase the dampening power of the spring resulting in a faster initial velocity and more rapid bounce slowdown. Defined as a value in the range [0, 20]. Defaults to 12. + */ +@property (assign, nonatomic) CGFloat springSpeed; + +/** + @abstract The tension used in the dynamics simulation. + @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. + */ +@property (assign, nonatomic) CGFloat dynamicsTension; + +/** + @abstract The friction used in the dynamics simulation. + @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. + */ +@property (assign, nonatomic) CGFloat dynamicsFriction; + +/** + @abstract The mass used in the dynamics simulation. + @discussion Can be used over bounciness and speed for finer grain tweaking of animation effect. + */ +@property (assign, nonatomic) CGFloat dynamicsMass; + +@end diff --git a/Pods/pop/pop/POPSpringAnimation.mm b/Pods/pop/pop/POPSpringAnimation.mm new file mode 100644 index 0000000..d299770 --- /dev/null +++ b/Pods/pop/pop/POPSpringAnimation.mm @@ -0,0 +1,192 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPSpringAnimationInternal.h" + +@implementation POPSpringAnimation + +#pragma mark - Lifecycle + +#undef __state +#define __state ((POPSpringAnimationState *)_state) + ++ (instancetype)animation +{ + return [[self alloc] init]; +} + ++ (instancetype)animationWithPropertyNamed:(NSString *)aName +{ + POPSpringAnimation *anim = [self animation]; + anim.property = [POPAnimatableProperty propertyWithName:aName]; + return anim; +} + +- (void)_initState +{ + _state = new POPSpringAnimationState(self); +} + +- (id)init +{ + self = [super _init]; + if (nil != self) { + __state->solver = new SpringSolver4d(1, 1, 1); + __state->updatedDynamicsThreshold(); + __state->updatedBouncinessAndSpeed(); + } + return self; +} + +- (void)dealloc +{ + if (__state) { + delete __state->solver; + __state->solver = NULL; + } +} + +#pragma mark - Properties + +- (id)velocity +{ + return POPBox(__state->velocityVec, __state->valueType); +} + +- (void)setVelocity:(id)aValue +{ + POPPropertyAnimationState *s = __state; + VectorRef vec = POPUnbox(aValue, s->valueType, s->valueCount, YES); + VectorRef origVec = POPUnbox(aValue, s->valueType, s->valueCount, YES); + if (!vec_equal(vec, s->velocityVec)) { + s->velocityVec = vec; + s->originalVelocityVec = origVec; + + if (s->tracing) { + [s->tracer updateVelocity:aValue]; + } + } +} + +DEFINE_RW_PROPERTY(POPSpringAnimationState, dynamicsTension, setDynamicsTension:, CGFloat, [self _updatedDynamicsTension];); +DEFINE_RW_PROPERTY(POPSpringAnimationState, dynamicsFriction, setDynamicsFriction:, CGFloat, [self _updatedDynamicsFriction];); +DEFINE_RW_PROPERTY(POPSpringAnimationState, dynamicsMass, setDynamicsMass:, CGFloat, [self _updatedDynamicsMass];); + +FB_PROPERTY_GET(POPSpringAnimationState, springSpeed, CGFloat); +- (void)setSpringSpeed:(CGFloat)aFloat +{ + POPSpringAnimationState *s = __state; + if (s->userSpecifiedDynamics || aFloat != s->springSpeed) { + s->springSpeed = aFloat; + s->userSpecifiedDynamics = false; + s->updatedBouncinessAndSpeed(); + if (s->tracing) { + [s->tracer updateSpeed:aFloat]; + } + } +} + +FB_PROPERTY_GET(POPSpringAnimationState, springBounciness, CGFloat); +- (void)setSpringBounciness:(CGFloat)aFloat +{ + POPSpringAnimationState *s = __state; + if (s->userSpecifiedDynamics || aFloat != s->springBounciness) { + s->springBounciness = aFloat; + s->userSpecifiedDynamics = false; + s->updatedBouncinessAndSpeed(); + if (s->tracing) { + [s->tracer updateBounciness:aFloat]; + } + } +} + +- (SpringSolver4d *)solver +{ + return __state->solver; +} + +- (void)setSolver:(SpringSolver4d *)aSolver +{ + if (aSolver != __state->solver) { + if (__state->solver) { + delete(__state->solver); + } + __state->solver = aSolver; + } +} + +#pragma mark - Utility + +- (void)_updatedDynamicsTension +{ + __state->userSpecifiedDynamics = true; + if(__state->tracing) { + [__state->tracer updateTension:__state->dynamicsTension]; + } + __state->updatedDynamics(); +} + +- (void)_updatedDynamicsFriction +{ + __state->userSpecifiedDynamics = true; + if(__state->tracing) { + [__state->tracer updateFriction:__state->dynamicsFriction]; + } + __state->updatedDynamics(); +} + +- (void)_updatedDynamicsMass +{ + __state->userSpecifiedDynamics = true; + if(__state->tracing) { + [__state->tracer updateMass:__state->dynamicsMass]; + } + __state->updatedDynamics(); +} + +- (void)_appendDescription:(NSMutableString *)s debug:(BOOL)debug +{ + [super _appendDescription:s debug:debug]; + + if (debug) { + if (_state->userSpecifiedDynamics) { + [s appendFormat:@"; dynamics = (tension:%f, friction:%f, mass:%f)", __state->dynamicsTension, __state->dynamicsFriction, __state->dynamicsMass]; + } else { + [s appendFormat:@"; bounciness = %f; speed = %f", __state->springBounciness, __state->springSpeed]; + } + } +} + +@end + +@implementation POPSpringAnimation (NSCopying) + +- (instancetype)copyWithZone:(NSZone *)zone { + + POPSpringAnimation *copy = [super copyWithZone:zone]; + + if (copy) { + id velocity = POPBox(__state->originalVelocityVec, __state->valueType); + + // If velocity never gets set, then POPBox will return nil, messing up __state->valueCount. + if (velocity) { + copy.velocity = velocity; + } + + copy.springBounciness = self.springBounciness; + copy.springSpeed = self.springSpeed; + copy.dynamicsTension = self.dynamicsTension; + copy.dynamicsFriction = self.dynamicsFriction; + copy.dynamicsMass = self.dynamicsMass; + } + + return copy; +} + +@end \ No newline at end of file diff --git a/Pods/pop/pop/POPSpringAnimationInternal.h b/Pods/pop/pop/POPSpringAnimationInternal.h new file mode 100644 index 0000000..6a72a43 --- /dev/null +++ b/Pods/pop/pop/POPSpringAnimationInternal.h @@ -0,0 +1,132 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import "POPAnimationExtras.h" +#import "POPPropertyAnimationInternal.h" + +struct _POPSpringAnimationState : _POPPropertyAnimationState +{ + SpringSolver4d *solver; + CGFloat springSpeed; + CGFloat springBounciness; // normalized springiness + CGFloat dynamicsTension; // tension + CGFloat dynamicsFriction; // friction + CGFloat dynamicsMass; // mass + + _POPSpringAnimationState(id __unsafe_unretained anim) : _POPPropertyAnimationState(anim), + solver(nullptr), + springSpeed(12.), + springBounciness(4.), + dynamicsTension(0), + dynamicsFriction(0), + dynamicsMass(0) + { + type = kPOPAnimationSpring; + } + + bool hasConverged() + { + NSUInteger count = valueCount; + if (shouldRound()) { + return vec_equal(previous2Vec, previousVec) && vec_equal(previousVec, toVec); + } else { + if (!previousVec || !previous2Vec) + return false; + + CGFloat t = dynamicsThreshold / 5; + + const CGFloat *toValues = toVec->data(); + const CGFloat *previousValues = previousVec->data(); + const CGFloat *previous2Values = previous2Vec->data(); + + for (NSUInteger idx = 0; idx < count; idx++) { + if ((std::abs(toValues[idx] - previousValues[idx]) >= t) || (std::abs(previous2Values[idx] - previousValues[idx]) >= t)) { + return false; + } + } + return true; + } + } + + bool isDone() { + if (_POPPropertyAnimationState::isDone()) { + return true; + } + return solver->started() && (hasConverged() || solver->hasConverged()); + } + + void updatedDynamics() + { + if (NULL != solver) { + solver->setConstants(dynamicsTension, dynamicsFriction, dynamicsMass); + } + } + + void updatedDynamicsThreshold() + { + _POPPropertyAnimationState::updatedDynamicsThreshold(); + if (NULL != solver) { + solver->setThreshold(dynamicsThreshold); + } + } + + void updatedBouncinessAndSpeed() { + [POPSpringAnimation convertBounciness:springBounciness speed:springSpeed toTension:&dynamicsTension friction:&dynamicsFriction mass:&dynamicsMass]; + updatedDynamics(); + } + + bool advance(CFTimeInterval time, CFTimeInterval dt, id obj) { + // advance past not yet initialized animations + if (NULL == currentVec) { + return false; + } + + CFTimeInterval localTime = time - startTime; + + Vector4d value = vector4d(currentVec); + Vector4d toValue = vector4d(toVec); + Vector4d velocity = vector4d(velocityVec); + + SSState4d state; + state.p = toValue - value; + + // the solver assumes a spring of size zero + // flip the velocity from user perspective to solver perspective + state.v = velocity * -1; + + solver->advance(state, localTime, dt); + value = toValue - state.p; + + // flip velocity back to user perspective + velocity = state.v * -1; + + *currentVec = value; + + if (velocityVec) { + *velocityVec = velocity; + } + + clampCurrentValue(); + + return true; + } + + virtual void reset(bool all) { + _POPPropertyAnimationState::reset(all); + + if (solver) { + solver->setConstants(dynamicsTension, dynamicsFriction, dynamicsMass); + solver->reset(); + } + } +}; + +typedef struct _POPSpringAnimationState POPSpringAnimationState; diff --git a/Pods/pop/pop/POPSpringSolver.h b/Pods/pop/pop/POPSpringSolver.h new file mode 100644 index 0000000..df485bf --- /dev/null +++ b/Pods/pop/pop/POPSpringSolver.h @@ -0,0 +1,190 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import "POPVector.h" + +namespace POP { + + template + struct SSState + { + T p; + T v; + }; + + template + struct SSDerivative + { + T dp; + T dv; + }; + + typedef SSState SSState4d; + typedef SSDerivative SSDerivative4d; + + const CFTimeInterval solverDt = 0.001f; + const CFTimeInterval maxSolverDt = 30.0f; + + /** + Templated spring solver class. + */ + template + class SpringSolver + { + double _k; // stiffness + double _b; // dampening + double _m; // mass + + double _tp; // threshold + double _tv; // threshold velocity + double _ta; // threshold acceleration + + CFTimeInterval _accumulatedTime; + SSState _lastState; + T _lastDv; + bool _started; + + public: + SpringSolver(double k, double b, double m = 1) : _k(k), _b(b), _m(m), _started(false) + { + _accumulatedTime = 0; + _lastState.p = T::Zero(); + _lastState.v = T::Zero(); + _lastDv = T::Zero(); + setThreshold(1.); + } + + ~SpringSolver() + { + } + + bool started() + { + return _started; + } + + void setConstants(double k, double b, double m) + { + _k = k; + _b = b; + _m = m; + } + + void setThreshold(double t) + { + _tp = t / 2; // half a unit + _tv = 25.0 * t; // 5 units per second, squared for comparison + _ta = 625.0 * t * t; // 5 units per second squared, squared for comparison + } + + T acceleration(const SSState &state, double t) + { + return state.p*(-_k/_m) - state.v*(_b/_m); + } + + SSDerivative evaluate(const SSState &initial, double t) + { + SSDerivative output; + output.dp = initial.v; + output.dv = acceleration(initial, t); + return output; + } + + SSDerivative evaluate(const SSState &initial, double t, double dt, const SSDerivative &d) + { + SSState state; + state.p = initial.p + d.dp*dt; + state.v = initial.v + d.dv*dt; + SSDerivative output; + output.dp = state.v; + output.dv = acceleration(state, t+dt); + return output; + } + + void integrate(SSState &state, double t, double dt) + { + SSDerivative a = evaluate(state, t); + SSDerivative b = evaluate(state, t, dt*0.5, a); + SSDerivative c = evaluate(state, t, dt*0.5, b); + SSDerivative d = evaluate(state, t, dt, c); + + T dpdt = (a.dp + (b.dp + c.dp)*2.0 + d.dp) * (1.0/6.0); + T dvdt = (a.dv + (b.dv + c.dv)*2.0 + d.dv) * (1.0/6.0); + + state.p = state.p + dpdt*dt; + state.v = state.v + dvdt*dt; + + _lastDv = dvdt; + } + + SSState interpolate(const SSState &previous, const SSState ¤t, double alpha) + { + SSState state; + state.p = current.p*alpha + previous.p*(1-alpha); + state.v = current.v*alpha + previous.v*(1-alpha); + return state; + } + + void advance(SSState &state, double t, double dt) + { + _started = true; + + if (dt > maxSolverDt) { + // excessive time step, force shut down + _lastDv = _lastState.v = _lastState.p = T::Zero(); + } else { + _accumulatedTime += dt; + + SSState previousState = state, currentState = state; + while (_accumulatedTime >= solverDt) { + previousState = currentState; + this->integrate(currentState, t, solverDt); + t += solverDt; + _accumulatedTime -= solverDt; + } + CFTimeInterval alpha = _accumulatedTime / solverDt; + _lastState = state = this->interpolate(previousState, currentState, alpha); + } + } + + bool hasConverged() + { + if (!_started) { + return false; + } + + for (size_t idx = 0; idx < _lastState.p.size(); idx++) { + if (fabs(_lastState.p(idx)) >= _tp) { + return false; + } + } + + return (_lastState.v.squaredNorm() < _tv) && (_lastDv.squaredNorm() < _ta); + } + + void reset() + { + _accumulatedTime = 0; + _lastState.p = T::Zero(); + _lastState.v = T::Zero(); + _lastDv = T::Zero(); + _started = false; + } + }; + + /** + Convenience spring solver type definitions. + */ + typedef SpringSolver SpringSolver2d; + typedef SpringSolver SpringSolver3d; + typedef SpringSolver SpringSolver4d; +} + diff --git a/Pods/pop/pop/POPVector.h b/Pods/pop/pop/POPVector.h new file mode 100644 index 0000000..44d4e9f --- /dev/null +++ b/Pods/pop/pop/POPVector.h @@ -0,0 +1,394 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#ifndef __POP__FBVector__ +#define __POP__FBVector__ + +#include +#include + +#import + +#import + +#import "POPDefines.h" + +#if SCENEKIT_SDK_AVAILABLE +#import +#endif + +#if TARGET_OS_IPHONE +#import +#endif + +#import "POPMath.h" + +namespace POP { + + /** Fixed two-size vector class */ + template + struct Vector2 + { + private: + typedef T Vector2::* const _data[2]; + static const _data _v; + + public: + T x; + T y; + + // Zero vector + static const Vector2 Zero() { return Vector2(0); } + + // Constructors + Vector2() {} + explicit Vector2(T v) { x = v; y = v; }; + explicit Vector2(T x0, T y0) : x(x0), y(y0) {}; + explicit Vector2(const CGPoint &p) : x(p.x), y (p.y) {} + explicit Vector2(const CGSize &s) : x(s.width), y (s.height) {} + + // Copy constructor + template explicit Vector2(const Vector2 &v) : x(v.x), y(v.y) {} + + // Index operators + const T& operator[](size_t i) const { return this->*_v[i]; } + T& operator[](size_t i) { return this->*_v[i]; } + const T& operator()(size_t i) const { return this->*_v[i]; } + T& operator()(size_t i) { return this->*_v[i]; } + + // Backing data + T * data() { return &(this->*_v[0]); } + const T * data() const { return &(this->*_v[0]); } + + // Size + inline size_t size() const { return 2; } + + // Assignment + Vector2 &operator= (T v) { x = v; y = v; return *this;} + template Vector2 &operator= (const Vector2 &v) { x = v.x; y = v.y; return *this;} + + // Negation + Vector2 operator- (void) const { return Vector2(-x, -y); } + + // Equality + bool operator== (T v) const { return (x == v && y == v); } + bool operator== (const Vector2 &v) const { return (x == v.x && y == v.y); } + + // Inequality + bool operator!= (T v) const {return (x != v || y != v); } + bool operator!= (const Vector2 &v) const { return (x != v.x || y != v.y); } + + // Scalar Math + Vector2 operator+ (T v) const { return Vector2(x + v, y + v); } + Vector2 operator- (T v) const { return Vector2(x - v, y - v); } + Vector2 operator* (T v) const { return Vector2(x * v, y * v); } + Vector2 operator/ (T v) const { return Vector2(x / v, y / v); } + Vector2 &operator+= (T v) { x += v; y += v; return *this; }; + Vector2 &operator-= (T v) { x -= v; y -= v; return *this; }; + Vector2 &operator*= (T v) { x *= v; y *= v; return *this; }; + Vector2 &operator/= (T v) { x /= v; y /= v; return *this; }; + + // Vector Math + Vector2 operator+ (const Vector2 &v) const { return Vector2(x + v.x, y + v.y); } + Vector2 operator- (const Vector2 &v) const { return Vector2(x - v.x, y - v.y); } + Vector2 &operator+= (const Vector2 &v) { x += v.x; y += v.y; return *this; }; + Vector2 &operator-= (const Vector2 &v) { x -= v.x; y -= v.y; return *this; }; + + // Norms + CGFloat norm() const { return sqrtr(squaredNorm()); } + CGFloat squaredNorm() const { return x * x + y * y; } + + // Cast + template Vector2 cast() const { return Vector2(x, y); } + CGPoint cg_point() const { return CGPointMake(x, y); }; + }; + + template + const typename Vector2::_data Vector2::_v = { &Vector2::x, &Vector2::y }; + + /** Fixed three-size vector class */ + template + struct Vector3 + { + private: + typedef T Vector3::* const _data[3]; + static const _data _v; + + public: + T x; + T y; + T z; + + // Zero vector + static const Vector3 Zero() { return Vector3(0); }; + + // Constructors + Vector3() {} + explicit Vector3(T v) : x(v), y(v), z(v) {}; + explicit Vector3(T x0, T y0, T z0) : x(x0), y(y0), z(z0) {}; + + // Copy constructor + template explicit Vector3(const Vector3 &v) : x(v.x), y(v.y), z(v.z) {} + + // Index operators + const T& operator[](size_t i) const { return this->*_v[i]; } + T& operator[](size_t i) { return this->*_v[i]; } + const T& operator()(size_t i) const { return this->*_v[i]; } + T& operator()(size_t i) { return this->*_v[i]; } + + // Backing data + T * data() { return &(this->*_v[0]); } + const T * data() const { return &(this->*_v[0]); } + + // Size + inline size_t size() const { return 3; } + + // Assignment + Vector3 &operator= (T v) { x = v; y = v; z = v; return *this;} + template Vector3 &operator= (const Vector3 &v) { x = v.x; y = v.y; z = v.z; return *this;} + + // Negation + Vector3 operator- (void) const { return Vector3(-x, -y, -z); } + + // Equality + bool operator== (T v) const { return (x == v && y == v && z = v); } + bool operator== (const Vector3 &v) const { return (x == v.x && y == v.y && z == v.z); } + + // Inequality + bool operator!= (T v) const {return (x != v || y != v || z != v); } + bool operator!= (const Vector3 &v) const { return (x != v.x || y != v.y || z != v.z); } + + // Scalar Math + Vector3 operator+ (T v) const { return Vector3(x + v, y + v, z + v); } + Vector3 operator- (T v) const { return Vector3(x - v, y - v, z - v); } + Vector3 operator* (T v) const { return Vector3(x * v, y * v, z * v); } + Vector3 operator/ (T v) const { return Vector3(x / v, y / v, z / v); } + Vector3 &operator+= (T v) { x += v; y += v; z += v; return *this; }; + Vector3 &operator-= (T v) { x -= v; y -= v; z -= v; return *this; }; + Vector3 &operator*= (T v) { x *= v; y *= v; z *= v; return *this; }; + Vector3 &operator/= (T v) { x /= v; y /= v; z /= v; return *this; }; + + // Vector Math + Vector3 operator+ (const Vector3 &v) const { return Vector3(x + v.x, y + v.y, z + v.z); } + Vector3 operator- (const Vector3 &v) const { return Vector3(x - v.x, y - v.y, z - v.z); } + Vector3 &operator+= (const Vector3 &v) { x += v.x; y += v.y; z += v.z; return *this; }; + Vector3 &operator-= (const Vector3 &v) { x -= v.x; y -= v.y; z -= v.z; return *this; }; + + // Norms + CGFloat norm() const { return sqrtr(squaredNorm()); } + CGFloat squaredNorm() const { return x * x + y * y + z * z; } + + // Cast + template Vector3 cast() const { return Vector3(x, y, z); } + }; + + template + const typename Vector3::_data Vector3::_v = { &Vector3::x, &Vector3::y, &Vector3::z }; + + /** Fixed four-size vector class */ + template + struct Vector4 + { + private: + typedef T Vector4::* const _data[4]; + static const _data _v; + + public: + T x; + T y; + T z; + T w; + + // Zero vector + static const Vector4 Zero() { return Vector4(0); }; + + // Constructors + Vector4() {} + explicit Vector4(T v) : x(v), y(v), z(v), w(v) {}; + explicit Vector4(T x0, T y0, T z0, T w0) : x(x0), y(y0), z(z0), w(w0) {}; + + // Copy constructor + template explicit Vector4(const Vector4 &v) : x(v.x), y(v.y), z(v.z), w(v.w) {} + + // Index operators + const T& operator[](size_t i) const { return this->*_v[i]; } + T& operator[](size_t i) { return this->*_v[i]; } + const T& operator()(size_t i) const { return this->*_v[i]; } + T& operator()(size_t i) { return this->*_v[i]; } + + // Backing data + T * data() { return &(this->*_v[0]); } + const T * data() const { return &(this->*_v[0]); } + + // Size + inline size_t size() const { return 4; } + + // Assignment + Vector4 &operator= (T v) { x = v; y = v; z = v; w = v; return *this;} + template Vector4 &operator= (const Vector4 &v) { x = v.x; y = v.y; z = v.z; w = v.w; return *this;} + + // Negation + Vector4 operator- (void) const { return Vector4(-x, -y, -z, -w); } + + // Equality + bool operator== (T v) const { return (x == v && y == v && z = v, w = v); } + bool operator== (const Vector4 &v) const { return (x == v.x && y == v.y && z == v.z && w == v.w); } + + // Inequality + bool operator!= (T v) const {return (x != v || y != v || z != v || w != v); } + bool operator!= (const Vector4 &v) const { return (x != v.x || y != v.y || z != v.z || w != v.w); } + + // Scalar Math + Vector4 operator+ (T v) const { return Vector4(x + v, y + v, z + v, w + v); } + Vector4 operator- (T v) const { return Vector4(x - v, y - v, z - v, w - v); } + Vector4 operator* (T v) const { return Vector4(x * v, y * v, z * v, w * v); } + Vector4 operator/ (T v) const { return Vector4(x / v, y / v, z / v, w / v); } + Vector4 &operator+= (T v) { x += v; y += v; z += v; w += v; return *this; }; + Vector4 &operator-= (T v) { x -= v; y -= v; z -= v; w -= v; return *this; }; + Vector4 &operator*= (T v) { x *= v; y *= v; z *= v; w *= v; return *this; }; + Vector4 &operator/= (T v) { x /= v; y /= v; z /= v; w /= v; return *this; }; + + // Vector Math + Vector4 operator+ (const Vector4 &v) const { return Vector4(x + v.x, y + v.y, z + v.z, w + v.w); } + Vector4 operator- (const Vector4 &v) const { return Vector4(x - v.x, y - v.y, z - v.z, w - v.w); } + Vector4 &operator+= (const Vector4 &v) { x += v.x; y += v.y; z += v.z; w += v.w; return *this; }; + Vector4 &operator-= (const Vector4 &v) { x -= v.x; y -= v.y; z -= v.z; w -= v.w; return *this; }; + + // Norms + CGFloat norm() const { return sqrtr(squaredNorm()); } + CGFloat squaredNorm() const { return x * x + y * y + z * z + w * w; } + + // Cast + template Vector4 cast() const { return Vector4(x, y, z, w); } + }; + + template + const typename Vector4::_data Vector4::_v = { &Vector4::x, &Vector4::y, &Vector4::z, &Vector4::w }; + + /** Convenience typedefs */ + typedef Vector2 Vector2f; + typedef Vector2 Vector2d; + typedef Vector2 Vector2r; + typedef Vector3 Vector3f; + typedef Vector3 Vector3d; + typedef Vector3 Vector3r; + typedef Vector4 Vector4f; + typedef Vector4 Vector4d; + typedef Vector4 Vector4r; + + /** Variable-sized vector class */ + class Vector + { + size_t _count; + CGFloat *_values; + + private: + Vector(size_t); + Vector(const Vector& other); + + public: + ~Vector(); + + // Creates a new vector instance of count with values. Initializing a vector of size 0 returns NULL. + static Vector *new_vector(NSUInteger count, const CGFloat *values); + + // Creates a new vector given a pointer to another. Can return NULL. + static Vector *new_vector(const Vector * const other); + + // Creates a variable size vector given a static vector and count. + static Vector *new_vector(NSUInteger count, Vector4r vec); + + // Size of vector + NSUInteger size() const { return _count; } + + // Returns array of values + CGFloat *data () { return _values; } + const CGFloat *data () const { return _values; }; + + // Vector2r support + Vector2r vector2r() const; + + // Vector4r support + Vector4r vector4r() const; + + // CGFloat support + static Vector *new_cg_float(CGFloat f); + + // CGPoint support + CGPoint cg_point() const; + static Vector *new_cg_point(const CGPoint &p); + + // CGSize support + CGSize cg_size() const; + static Vector *new_cg_size(const CGSize &s); + + // CGRect support + CGRect cg_rect() const; + static Vector *new_cg_rect(const CGRect &r); + +#if TARGET_OS_IPHONE + // UIEdgeInsets support + UIEdgeInsets ui_edge_insets() const; + static Vector *new_ui_edge_insets(const UIEdgeInsets &i); +#endif + + // CGAffineTransform support + CGAffineTransform cg_affine_transform() const; + static Vector *new_cg_affine_transform(const CGAffineTransform &t); + + // CGColorRef support + CGColorRef cg_color() const CF_RETURNS_RETAINED; + static Vector *new_cg_color(CGColorRef color); + +#if SCENEKIT_SDK_AVAILABLE + // SCNVector3 support + SCNVector3 scn_vector3() const; + static Vector *new_scn_vector3(const SCNVector3 &vec3); + + // SCNVector4 support + SCNVector4 scn_vector4() const; + static Vector *new_scn_vector4(const SCNVector4 &vec4); +#endif + + // operator overloads + CGFloat &operator[](size_t i) const { + NSCAssert(size() > i, @"unexpected vector size:%lu", (unsigned long)size()); + return _values[i]; + } + + // Returns the mathematical length + CGFloat norm() const; + CGFloat squaredNorm() const; + + // Round to nearest sub + void subRound(CGFloat sub); + + // Returns string description + NSString * toString() const; + + // Operator overloads + template Vector& operator= (const Vector4& other) { + size_t count = MIN(_count, other.size()); + for (size_t i = 0; i < count; i++) { + _values[i] = other[i]; + } + return *this; + } + Vector& operator= (const Vector& other); + void swap(Vector &first, Vector &second); + bool operator==(const Vector &other) const; + bool operator!=(const Vector &other) const; + }; + + /** Convenience typedefs */ + typedef std::shared_ptr VectorRef; + typedef std::shared_ptr VectorConstRef; + +} +#endif /* defined(__POP__FBVector__) */ diff --git a/Pods/pop/pop/POPVector.mm b/Pods/pop/pop/POPVector.mm new file mode 100644 index 0000000..96cee24 --- /dev/null +++ b/Pods/pop/pop/POPVector.mm @@ -0,0 +1,334 @@ +/** + Copyright (c) 2014-present, Facebook, Inc. + All rights reserved. + + This source code is licensed under the BSD-style license found in the + LICENSE file in the root directory of this source tree. An additional grant + of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "POPVector.h" + +#import "POPDefines.h" +#import "POPCGUtils.h" + +namespace POP +{ + + Vector::Vector(const size_t count) + { + _count = count; + _values = 0 != count ? (CGFloat *)calloc(count, sizeof(CGFloat)) : NULL; + } + + Vector::Vector(const Vector& other) + { + _count = other.size(); + _values = 0 != _count ? (CGFloat *)calloc(_count, sizeof(CGFloat)) : NULL; + if (0 != _count) { + memcpy(_values, other.data(), _count * sizeof(CGFloat)); + } + } + + Vector::~Vector() + { + if (NULL != _values) { + free(_values); + _values = NULL; + } + _count = 0; + } + + void Vector::swap(Vector &first, Vector &second) + { + using std::swap; + swap(first._count, second._count); + swap(first._values, second._values); + } + + Vector& Vector::operator=(const Vector& other) + { + Vector temp(other); + swap(*this, temp); + return *this; + } + + bool Vector::operator==(const Vector &other) const { + if (_count != other.size()) { + return false; + } + + const CGFloat * const values = other.data(); + + for (NSUInteger idx = 0; idx < _count; idx++) { + if (_values[idx] != values[idx]) { + return false; + } + } + + return true; + } + + bool Vector::operator!=(const Vector &other) const { + if (_count == other.size()) { + return false; + } + + const CGFloat * const values = other.data(); + + for (NSUInteger idx = 0; idx < _count; idx++) { + if (_values[idx] != values[idx]) { + return false; + } + } + + return true; + } + + Vector *Vector::new_vector(NSUInteger count, const CGFloat *values) + { + if (0 == count) { + return NULL; + } + + Vector *v = new Vector(count); + if (NULL != values) { + memcpy(v->_values, values, count * sizeof(CGFloat)); + } + return v; + } + + Vector *Vector::new_vector(const Vector * const other) + { + if (NULL == other) { + return NULL; + } + + return Vector::new_vector(other->size(), other->data()); + } + + Vector *Vector::new_vector(NSUInteger count, Vector4r vec) + { + if (0 == count) { + return NULL; + } + + Vector *v = new Vector(count); + + NSCAssert(count <= 4, @"unexpected count %lu", (unsigned long)count); + for (NSUInteger i = 0; i < MIN(count, (NSUInteger)4); i++) { + v->_values[i] = vec[i]; + } + + return v; + } + + Vector4r Vector::vector4r() const + { + Vector4r v = Vector4r::Zero(); + for (size_t i = 0; i < _count; i++) { + v(i) = _values[i]; + } + return v; + } + + Vector2r Vector::vector2r() const + { + Vector2r v = Vector2r::Zero(); + if (_count > 0) v(0) = _values[0]; + if (_count > 1) v(1) = _values[1]; + return v; + } + + Vector *Vector::new_cg_float(CGFloat f) + { + Vector *v = new Vector(1); + v->_values[0] = f; + return v; + } + + CGPoint Vector::cg_point () const + { + Vector2r v = vector2r(); + return CGPointMake(v(0), v(1)); + } + + Vector *Vector::new_cg_point(const CGPoint &p) + { + Vector *v = new Vector(2); + v->_values[0] = p.x; + v->_values[1] = p.y; + return v; + } + + CGSize Vector::cg_size () const + { + Vector2r v = vector2r(); + return CGSizeMake(v(0), v(1)); + } + + Vector *Vector::new_cg_size(const CGSize &s) + { + Vector *v = new Vector(2); + v->_values[0] = s.width; + v->_values[1] = s.height; + return v; + } + + CGRect Vector::cg_rect() const + { + return _count < 4 ? CGRectZero : CGRectMake(_values[0], _values[1], _values[2], _values[3]); + } + + Vector *Vector::new_cg_rect(const CGRect &r) + { + Vector *v = new Vector(4); + v->_values[0] = r.origin.x; + v->_values[1] = r.origin.y; + v->_values[2] = r.size.width; + v->_values[3] = r.size.height; + return v; + } + +#if TARGET_OS_IPHONE + + UIEdgeInsets Vector::ui_edge_insets() const + { + return _count < 4 ? UIEdgeInsetsZero : UIEdgeInsetsMake(_values[0], _values[1], _values[2], _values[3]); + } + + Vector *Vector::new_ui_edge_insets(const UIEdgeInsets &i) + { + Vector *v = new Vector(4); + v->_values[0] = i.top; + v->_values[1] = i.left; + v->_values[2] = i.bottom; + v->_values[3] = i.right; + return v; + } + +#endif + + CGAffineTransform Vector::cg_affine_transform() const + { + if (_count < 6) { + return CGAffineTransformIdentity; + } + + NSCAssert(size() >= 6, @"unexpected vector size:%lu", (unsigned long)size()); + CGAffineTransform t; + t.a = _values[0]; + t.b = _values[1]; + t.c = _values[2]; + t.d = _values[3]; + t.tx = _values[4]; + t.ty = _values[5]; + return t; + } + + Vector *Vector::new_cg_affine_transform(const CGAffineTransform &t) + { + Vector *v = new Vector(6); + v->_values[0] = t.a; + v->_values[1] = t.b; + v->_values[2] = t.c; + v->_values[3] = t.d; + v->_values[4] = t.tx; + v->_values[5] = t.ty; + return v; + } + + CGColorRef Vector::cg_color() const + { + if (_count < 4) { + return NULL; + } + return POPCGColorRGBACreate(_values); + } + + Vector *Vector::new_cg_color(CGColorRef color) + { + CGFloat rgba[4]; + POPCGColorGetRGBAComponents(color, rgba); + return new_vector(4, rgba); + } + +#if SCENEKIT_SDK_AVAILABLE + SCNVector3 Vector::scn_vector3() const + { + return _count < 3 ? SCNVector3Make(0.0, 0.0, 0.0) : SCNVector3Make(_values[0], _values[1], _values[2]); + } + + Vector *Vector::new_scn_vector3(const SCNVector3 &vec3) + { + Vector *v = new Vector(3); + v->_values[0] = vec3.x; + v->_values[1] = vec3.y; + v->_values[2] = vec3.z; + return v; + } + + SCNVector4 Vector::scn_vector4() const + { + return _count < 4 ? SCNVector4Make(0.0, 0.0, 0.0, 0.0) : SCNVector4Make(_values[0], _values[1], _values[2], _values[3]); + } + + Vector *Vector::new_scn_vector4(const SCNVector4 &vec4) + { + Vector *v = new Vector(4); + v->_values[0] = vec4.x; + v->_values[1] = vec4.y; + v->_values[2] = vec4.z; + v->_values[3] = vec4.w; + return v; + } +#endif + + void Vector::subRound(CGFloat sub) + { + for (NSUInteger idx = 0; idx < _count; idx++) { + _values[idx] = POPSubRound(_values[idx], sub); + } + } + + CGFloat Vector::norm() const + { + return sqrtr(squaredNorm()); + } + + CGFloat Vector::squaredNorm() const + { + CGFloat d = 0; + for (NSUInteger idx = 0; idx < _count; idx++) { + d += (_values[idx] * _values[idx]); + } + return d; + } + + NSString * Vector::toString() const + { + if (0 == _count) + return @"()"; + + if (1 == _count) + return [NSString stringWithFormat:@"%f", _values[0]]; + + if (2 == _count) + return [NSString stringWithFormat:@"(%.3f, %.3f)", _values[0], _values[1]]; + + NSMutableString *s = [NSMutableString stringWithCapacity:10]; + + for (NSUInteger idx = 0; idx < _count; idx++) { + if (0 == idx) { + [s appendFormat:@"[%.3f", _values[idx]]; + } else if (idx == _count - 1) { + [s appendFormat:@", %.3f]", _values[idx]]; + } else { + [s appendFormat:@", %.3f", _values[idx]]; + } + } + + return s; + + } +} diff --git a/Pods/pop/pop/WebCore/FloatConversion.h b/Pods/pop/pop/WebCore/FloatConversion.h new file mode 100644 index 0000000..4a16166 --- /dev/null +++ b/Pods/pop/pop/WebCore/FloatConversion.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2007 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef FloatConversion_h +#define FloatConversion_h + +#include + +namespace WebCore { + + template + float narrowPrecisionToFloat(T); + + template<> + inline float narrowPrecisionToFloat(double number) + { + return static_cast(number); + } + + template + CGFloat narrowPrecisionToCGFloat(T); + + template<> + inline CGFloat narrowPrecisionToCGFloat(double number) + { + return static_cast(number); + } + +} // namespace WebCore + +#endif // FloatConversion_h diff --git a/Pods/pop/pop/WebCore/TransformationMatrix.cpp b/Pods/pop/pop/WebCore/TransformationMatrix.cpp new file mode 100644 index 0000000..7264ab5 --- /dev/null +++ b/Pods/pop/pop/WebCore/TransformationMatrix.cpp @@ -0,0 +1,1074 @@ +/* + * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2009 Torch Mobile, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "TransformationMatrix.h" + +#include + +#include "FloatConversion.h" + +inline double deg2rad(double d) { return d * M_PI / 180.0; } +inline double rad2deg(double r) { return r * 180.0 / M_PI; } +inline double deg2grad(double d) { return d * 400.0 / 360.0; } +inline double grad2deg(double g) { return g * 360.0 / 400.0; } +inline double turn2deg(double t) { return t * 360.0; } +inline double deg2turn(double d) { return d / 360.0; } +inline double rad2grad(double r) { return r * 200.0 / M_PI; } +inline double grad2rad(double g) { return g * M_PI / 200.0; } + +//using namespace std; + +namespace WebCore { + + // + // Supporting Math Functions + // + // This is a set of function from various places (attributed inline) to do things like + // inversion and decomposition of a 4x4 matrix. They are used throughout the code + // + + // + // Adapted from Matrix Inversion by Richard Carling, Graphics Gems . + + // EULA: The Graphics Gems code is copyright-protected. In other words, you cannot claim the text of the code + // as your own and resell it. Using the code is permitted in any program, product, or library, non-commercial + // or commercial. Giving credit is not required, though is a nice gesture. The code comes as-is, and if there + // are any flaws or problems with any Gems code, nobody involved with Gems - authors, editors, publishers, or + // webmasters - are to be held responsible. Basically, don't be a jerk, and remember that anything free comes + // with no guarantee. + + // A clarification about the storage of matrix elements + // + // This class uses a 2 dimensional array internally to store the elements of the matrix. The first index into + // the array refers to the column that the element lies in; the second index refers to the row. + // + // In other words, this is the layout of the matrix: + // + // | m_matrix[0][0] m_matrix[1][0] m_matrix[2][0] m_matrix[3][0] | + // | m_matrix[0][1] m_matrix[1][1] m_matrix[2][1] m_matrix[3][1] | + // | m_matrix[0][2] m_matrix[1][2] m_matrix[2][2] m_matrix[3][2] | + // | m_matrix[0][3] m_matrix[1][3] m_matrix[2][3] m_matrix[3][3] | + + typedef double Vector4[4]; + typedef double Vector3[3]; + + const double SMALL_NUMBER = 1.e-8; + + // inverse(original_matrix, inverse_matrix) + // + // calculate the inverse of a 4x4 matrix + // + // -1 + // A = ___1__ adjoint A + // det A + + // double = determinant2x2(double a, double b, double c, double d) + // + // calculate the determinant of a 2x2 matrix. + + static double determinant2x2(double a, double b, double c, double d) + { + return a * d - b * c; + } + + // double = determinant3x3(a1, a2, a3, b1, b2, b3, c1, c2, c3) + // + // Calculate the determinant of a 3x3 matrix + // in the form + // + // | a1, b1, c1 | + // | a2, b2, c2 | + // | a3, b3, c3 | + + static double determinant3x3(double a1, double a2, double a3, double b1, double b2, double b3, double c1, double c2, double c3) + { + return a1 * determinant2x2(b2, b3, c2, c3) + - b1 * determinant2x2(a2, a3, c2, c3) + + c1 * determinant2x2(a2, a3, b2, b3); + } + + // double = determinant4x4(matrix) + // + // calculate the determinant of a 4x4 matrix. + + static double determinant4x4(const TransformationMatrix::Matrix4& m) + { + // Assign to individual variable names to aid selecting + // correct elements + + double a1 = m[0][0]; + double b1 = m[0][1]; + double c1 = m[0][2]; + double d1 = m[0][3]; + + double a2 = m[1][0]; + double b2 = m[1][1]; + double c2 = m[1][2]; + double d2 = m[1][3]; + + double a3 = m[2][0]; + double b3 = m[2][1]; + double c3 = m[2][2]; + double d3 = m[2][3]; + + double a4 = m[3][0]; + double b4 = m[3][1]; + double c4 = m[3][2]; + double d4 = m[3][3]; + + return a1 * determinant3x3(b2, b3, b4, c2, c3, c4, d2, d3, d4) + - b1 * determinant3x3(a2, a3, a4, c2, c3, c4, d2, d3, d4) + + c1 * determinant3x3(a2, a3, a4, b2, b3, b4, d2, d3, d4) + - d1 * determinant3x3(a2, a3, a4, b2, b3, b4, c2, c3, c4); + } + + // adjoint( original_matrix, inverse_matrix ) + // + // calculate the adjoint of a 4x4 matrix + // + // Let a denote the minor determinant of matrix A obtained by + // ij + // + // deleting the ith row and jth column from A. + // + // i+j + // Let b = (-1) a + // ij ji + // + // The matrix B = (b ) is the adjoint of A + // ij + + static void adjoint(const TransformationMatrix::Matrix4& matrix, TransformationMatrix::Matrix4& result) + { + // Assign to individual variable names to aid + // selecting correct values + double a1 = matrix[0][0]; + double b1 = matrix[0][1]; + double c1 = matrix[0][2]; + double d1 = matrix[0][3]; + + double a2 = matrix[1][0]; + double b2 = matrix[1][1]; + double c2 = matrix[1][2]; + double d2 = matrix[1][3]; + + double a3 = matrix[2][0]; + double b3 = matrix[2][1]; + double c3 = matrix[2][2]; + double d3 = matrix[2][3]; + + double a4 = matrix[3][0]; + double b4 = matrix[3][1]; + double c4 = matrix[3][2]; + double d4 = matrix[3][3]; + + // Row column labeling reversed since we transpose rows & columns + result[0][0] = determinant3x3(b2, b3, b4, c2, c3, c4, d2, d3, d4); + result[1][0] = - determinant3x3(a2, a3, a4, c2, c3, c4, d2, d3, d4); + result[2][0] = determinant3x3(a2, a3, a4, b2, b3, b4, d2, d3, d4); + result[3][0] = - determinant3x3(a2, a3, a4, b2, b3, b4, c2, c3, c4); + + result[0][1] = - determinant3x3(b1, b3, b4, c1, c3, c4, d1, d3, d4); + result[1][1] = determinant3x3(a1, a3, a4, c1, c3, c4, d1, d3, d4); + result[2][1] = - determinant3x3(a1, a3, a4, b1, b3, b4, d1, d3, d4); + result[3][1] = determinant3x3(a1, a3, a4, b1, b3, b4, c1, c3, c4); + + result[0][2] = determinant3x3(b1, b2, b4, c1, c2, c4, d1, d2, d4); + result[1][2] = - determinant3x3(a1, a2, a4, c1, c2, c4, d1, d2, d4); + result[2][2] = determinant3x3(a1, a2, a4, b1, b2, b4, d1, d2, d4); + result[3][2] = - determinant3x3(a1, a2, a4, b1, b2, b4, c1, c2, c4); + + result[0][3] = - determinant3x3(b1, b2, b3, c1, c2, c3, d1, d2, d3); + result[1][3] = determinant3x3(a1, a2, a3, c1, c2, c3, d1, d2, d3); + result[2][3] = - determinant3x3(a1, a2, a3, b1, b2, b3, d1, d2, d3); + result[3][3] = determinant3x3(a1, a2, a3, b1, b2, b3, c1, c2, c3); + } + + // Returns false if the matrix is not invertible + static bool inverse(const TransformationMatrix::Matrix4& matrix, TransformationMatrix::Matrix4& result) + { + // Calculate the adjoint matrix + adjoint(matrix, result); + + // Calculate the 4x4 determinant + // If the determinant is zero, + // then the inverse matrix is not unique. + double det = determinant4x4(matrix); + + if (fabs(det) < SMALL_NUMBER) + return false; + + // Scale the adjoint matrix to get the inverse + + for (int i = 0; i < 4; i++) + for (int j = 0; j < 4; j++) + result[i][j] = result[i][j] / det; + + return true; + } + + // End of code adapted from Matrix Inversion by Richard Carling + + // Perform a decomposition on the passed matrix, return false if unsuccessful + // From Graphics Gems: unmatrix.c + + // Transpose rotation portion of matrix a, return b + static void transposeMatrix4(const TransformationMatrix::Matrix4& a, TransformationMatrix::Matrix4& b) + { + for (int i = 0; i < 4; i++) + for (int j = 0; j < 4; j++) + b[i][j] = a[j][i]; + } + + // Multiply a homogeneous point by a matrix and return the transformed point + static void v4MulPointByMatrix(const Vector4 p, const TransformationMatrix::Matrix4& m, Vector4 result) + { + result[0] = (p[0] * m[0][0]) + (p[1] * m[1][0]) + + (p[2] * m[2][0]) + (p[3] * m[3][0]); + result[1] = (p[0] * m[0][1]) + (p[1] * m[1][1]) + + (p[2] * m[2][1]) + (p[3] * m[3][1]); + result[2] = (p[0] * m[0][2]) + (p[1] * m[1][2]) + + (p[2] * m[2][2]) + (p[3] * m[3][2]); + result[3] = (p[0] * m[0][3]) + (p[1] * m[1][3]) + + (p[2] * m[2][3]) + (p[3] * m[3][3]); + } + + static double v3Length(Vector3 a) + { + return sqrt((a[0] * a[0]) + (a[1] * a[1]) + (a[2] * a[2])); + } + + static void v3Scale(Vector3 v, double desiredLength) + { + double len = v3Length(v); + if (len != 0) { + double l = desiredLength / len; + v[0] *= l; + v[1] *= l; + v[2] *= l; + } + } + + static double v3Dot(const Vector3 a, const Vector3 b) + { + return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]); + } + + // Make a linear combination of two vectors and return the result. + // result = (a * ascl) + (b * bscl) + static void v3Combine(const Vector3 a, const Vector3 b, Vector3 result, double ascl, double bscl) + { + result[0] = (ascl * a[0]) + (bscl * b[0]); + result[1] = (ascl * a[1]) + (bscl * b[1]); + result[2] = (ascl * a[2]) + (bscl * b[2]); + } + + // Return the cross product result = a cross b */ + static void v3Cross(const Vector3 a, const Vector3 b, Vector3 result) + { + result[0] = (a[1] * b[2]) - (a[2] * b[1]); + result[1] = (a[2] * b[0]) - (a[0] * b[2]); + result[2] = (a[0] * b[1]) - (a[1] * b[0]); + } + + static bool decompose(const TransformationMatrix::Matrix4& mat, TransformationMatrix::DecomposedType& result) + { + TransformationMatrix::Matrix4 localMatrix; + memcpy(localMatrix, mat, sizeof(TransformationMatrix::Matrix4)); + + // Normalize the matrix. + if (localMatrix[3][3] == 0) + return false; + + int i, j; + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + localMatrix[i][j] /= localMatrix[3][3]; + + // perspectiveMatrix is used to solve for perspective, but it also provides + // an easy way to test for singularity of the upper 3x3 component. + TransformationMatrix::Matrix4 perspectiveMatrix; + memcpy(perspectiveMatrix, localMatrix, sizeof(TransformationMatrix::Matrix4)); + for (i = 0; i < 3; i++) + perspectiveMatrix[i][3] = 0; + perspectiveMatrix[3][3] = 1; + + if (determinant4x4(perspectiveMatrix) == 0) + return false; + + // First, isolate perspective. This is the messiest. + if (localMatrix[0][3] != 0 || localMatrix[1][3] != 0 || localMatrix[2][3] != 0) { + // rightHandSide is the right hand side of the equation. + Vector4 rightHandSide; + rightHandSide[0] = localMatrix[0][3]; + rightHandSide[1] = localMatrix[1][3]; + rightHandSide[2] = localMatrix[2][3]; + rightHandSide[3] = localMatrix[3][3]; + + // Solve the equation by inverting perspectiveMatrix and multiplying + // rightHandSide by the inverse. (This is the easiest way, not + // necessarily the best.) + TransformationMatrix::Matrix4 inversePerspectiveMatrix, transposedInversePerspectiveMatrix; + inverse(perspectiveMatrix, inversePerspectiveMatrix); + transposeMatrix4(inversePerspectiveMatrix, transposedInversePerspectiveMatrix); + + Vector4 perspectivePoint; + v4MulPointByMatrix(rightHandSide, transposedInversePerspectiveMatrix, perspectivePoint); + + result.perspectiveX = perspectivePoint[0]; + result.perspectiveY = perspectivePoint[1]; + result.perspectiveZ = perspectivePoint[2]; + result.perspectiveW = perspectivePoint[3]; + + // Clear the perspective partition + localMatrix[0][3] = localMatrix[1][3] = localMatrix[2][3] = 0; + localMatrix[3][3] = 1; + } else { + // No perspective. + result.perspectiveX = result.perspectiveY = result.perspectiveZ = 0; + result.perspectiveW = 1; + } + + // Next take care of translation (easy). + result.translateX = localMatrix[3][0]; + localMatrix[3][0] = 0; + result.translateY = localMatrix[3][1]; + localMatrix[3][1] = 0; + result.translateZ = localMatrix[3][2]; + localMatrix[3][2] = 0; + + // Vector4 type and functions need to be added to the common set. + Vector3 row[3], pdum3; + + // Now get scale and shear. + for (i = 0; i < 3; i++) { + row[i][0] = localMatrix[i][0]; + row[i][1] = localMatrix[i][1]; + row[i][2] = localMatrix[i][2]; + } + + // Compute X scale factor and normalize first row. + result.scaleX = v3Length(row[0]); + v3Scale(row[0], 1.0); + + // Compute XY shear factor and make 2nd row orthogonal to 1st. + result.skewXY = v3Dot(row[0], row[1]); + v3Combine(row[1], row[0], row[1], 1.0, -result.skewXY); + + // Now, compute Y scale and normalize 2nd row. + result.scaleY = v3Length(row[1]); + v3Scale(row[1], 1.0); + result.skewXY /= result.scaleY; + + // Compute XZ and YZ shears, orthogonalize 3rd row. + result.skewXZ = v3Dot(row[0], row[2]); + v3Combine(row[2], row[0], row[2], 1.0, -result.skewXZ); + result.skewYZ = v3Dot(row[1], row[2]); + v3Combine(row[2], row[1], row[2], 1.0, -result.skewYZ); + + // Next, get Z scale and normalize 3rd row. + result.scaleZ = v3Length(row[2]); + v3Scale(row[2], 1.0); + result.skewXZ /= result.scaleZ; + result.skewYZ /= result.scaleZ; + + // At this point, the matrix (in rows[]) is orthonormal. + // Check for a coordinate system flip. If the determinant + // is -1, then negate the matrix and the scaling factors. + v3Cross(row[1], row[2], pdum3); + if (v3Dot(row[0], pdum3) < 0) { + + result.scaleX *= -1; + result.scaleY *= -1; + result.scaleZ *= -1; + + for (i = 0; i < 3; i++) { + row[i][0] *= -1; + row[i][1] *= -1; + row[i][2] *= -1; + } + } + + // Now, get the rotations out, as described in the gem. + + result.rotateY = asin(-row[0][2]); + if (cos(result.rotateY) != 0) { + result.rotateX = atan2(row[1][2], row[2][2]); + result.rotateZ = atan2(row[0][1], row[0][0]); + } else { + result.rotateX = atan2(-row[2][0], row[1][1]); + result.rotateZ = 0; + } + + double s, t, x, y, z, w; + + t = row[0][0] + row[1][1] + row[2][2] + 1.0; + + if (t > 1e-4) { + s = 0.5 / sqrt(t); + w = 0.25 / s; + x = (row[2][1] - row[1][2]) * s; + y = (row[0][2] - row[2][0]) * s; + z = (row[1][0] - row[0][1]) * s; + } else if (row[0][0] > row[1][1] && row[0][0] > row[2][2]) { + s = sqrt (1.0 + row[0][0] - row[1][1] - row[2][2]) * 2.0; // S=4*qx + x = 0.25 * s; + y = (row[0][1] + row[1][0]) / s; + z = (row[0][2] + row[2][0]) / s; + w = (row[2][1] - row[1][2]) / s; + } else if (row[1][1] > row[2][2]) { + s = sqrt (1.0 + row[1][1] - row[0][0] - row[2][2]) * 2.0; // S=4*qy + x = (row[0][1] + row[1][0]) / s; + y = 0.25 * s; + z = (row[1][2] + row[2][1]) / s; + w = (row[0][2] - row[2][0]) / s; + } else { + s = sqrt(1.0 + row[2][2] - row[0][0] - row[1][1]) * 2.0; // S=4*qz + x = (row[0][2] + row[2][0]) / s; + y = (row[1][2] + row[2][1]) / s; + z = 0.25 * s; + w = (row[1][0] - row[0][1]) / s; + } + + result.quaternionX = x; + result.quaternionY = y; + result.quaternionZ = z; + result.quaternionW = w; + + return true; + } + + // Perform a spherical linear interpolation between the two + // passed quaternions with 0 <= t <= 1 + static void slerp(double qa[4], const double qb[4], double t) + { + double ax, ay, az, aw; + double bx, by, bz, bw; + double cx, cy, cz, cw; + double angle; + double th, invth, scale, invscale; + + ax = qa[0]; ay = qa[1]; az = qa[2]; aw = qa[3]; + bx = qb[0]; by = qb[1]; bz = qb[2]; bw = qb[3]; + + angle = ax * bx + ay * by + az * bz + aw * bw; + + if (angle < 0.0) { + ax = -ax; ay = -ay; + az = -az; aw = -aw; + angle = -angle; + } + + if (angle + 1.0 > .05) { + if (1.0 - angle >= .05) { + th = acos (angle); + invth = 1.0 / sin (th); + scale = sin (th * (1.0 - t)) * invth; + invscale = sin (th * t) * invth; + } else { + scale = 1.0 - t; + invscale = t; + } + } else { + bx = -ay; + by = ax; + bz = -aw; + bw = az; + scale = sin(M_PI * (.5 - t)); + invscale = sin (M_PI * t); + } + + cx = ax * scale + bx * invscale; + cy = ay * scale + by * invscale; + cz = az * scale + bz * invscale; + cw = aw * scale + bw * invscale; + + qa[0] = cx; qa[1] = cy; qa[2] = cz; qa[3] = cw; + } + + // End of Supporting Math Functions + + TransformationMatrix::TransformationMatrix(const CGAffineTransform& t) + { + setMatrix(t.a, t.b, t.c, t.d, t.tx, t.ty); + } + + TransformationMatrix::TransformationMatrix(const CATransform3D& t) + { + setMatrix( + t.m11, t.m12, t.m13, t.m14, + t.m21, t.m22, t.m23, t.m24, + t.m31, t.m32, t.m33, t.m34, + t.m41, t.m42, t.m43, t.m44); + } + + CATransform3D TransformationMatrix::transform3d() const + { + CATransform3D t; + t.m11 = narrowPrecisionToFloat(m11()); + t.m12 = narrowPrecisionToFloat(m12()); + t.m13 = narrowPrecisionToFloat(m13()); + t.m14 = narrowPrecisionToFloat(m14()); + t.m21 = narrowPrecisionToFloat(m21()); + t.m22 = narrowPrecisionToFloat(m22()); + t.m23 = narrowPrecisionToFloat(m23()); + t.m24 = narrowPrecisionToFloat(m24()); + t.m31 = narrowPrecisionToFloat(m31()); + t.m32 = narrowPrecisionToFloat(m32()); + t.m33 = narrowPrecisionToFloat(m33()); + t.m34 = narrowPrecisionToFloat(m34()); + t.m41 = narrowPrecisionToFloat(m41()); + t.m42 = narrowPrecisionToFloat(m42()); + t.m43 = narrowPrecisionToFloat(m43()); + t.m44 = narrowPrecisionToFloat(m44()); + return t; + } + + CGAffineTransform TransformationMatrix::affineTransform () const + { + CGAffineTransform t; + t.a = narrowPrecisionToFloat(m11()); + t.b = narrowPrecisionToFloat(m12()); + t.c = narrowPrecisionToFloat(m21()); + t.d = narrowPrecisionToFloat(m22()); + t.tx = narrowPrecisionToFloat(m41()); + t.ty = narrowPrecisionToFloat(m42()); + return t; + } + + TransformationMatrix::operator CATransform3D() const + { + return transform3d(); + } + + TransformationMatrix& TransformationMatrix::scale(double s) + { + return scaleNonUniform(s, s); + } + + TransformationMatrix& TransformationMatrix::rotateFromVector(double x, double y) + { + return rotate(rad2deg(atan2(y, x))); + } + + TransformationMatrix& TransformationMatrix::flipX() + { + return scaleNonUniform(-1.0, 1.0); + } + + TransformationMatrix& TransformationMatrix::flipY() + { + return scaleNonUniform(1.0, -1.0); + } + + TransformationMatrix& TransformationMatrix::scaleNonUniform(double sx, double sy) + { + m_matrix[0][0] *= sx; + m_matrix[0][1] *= sx; + m_matrix[0][2] *= sx; + m_matrix[0][3] *= sx; + + m_matrix[1][0] *= sy; + m_matrix[1][1] *= sy; + m_matrix[1][2] *= sy; + m_matrix[1][3] *= sy; + return *this; + } + + TransformationMatrix& TransformationMatrix::scale3d(double sx, double sy, double sz) + { + scaleNonUniform(sx, sy); + + m_matrix[2][0] *= sz; + m_matrix[2][1] *= sz; + m_matrix[2][2] *= sz; + m_matrix[2][3] *= sz; + return *this; + } + + TransformationMatrix& TransformationMatrix::rotate3d(double x, double y, double z, double angle) + { + // Normalize the axis of rotation + double length = sqrt(x * x + y * y + z * z); + if (length == 0) { + // A direction vector that cannot be normalized, such as [0, 0, 0], will cause the rotation to not be applied. + return *this; + } else if (length != 1) { + x /= length; + y /= length; + z /= length; + } + + // Angles are in degrees. Switch to radians. + angle = deg2rad(angle); + + double sinTheta = sin(angle); + double cosTheta = cos(angle); + + TransformationMatrix mat; + + // Optimize cases where the axis is along a major axis + if (x == 1.0 && y == 0.0 && z == 0.0) { + mat.m_matrix[0][0] = 1.0; + mat.m_matrix[0][1] = 0.0; + mat.m_matrix[0][2] = 0.0; + mat.m_matrix[1][0] = 0.0; + mat.m_matrix[1][1] = cosTheta; + mat.m_matrix[1][2] = sinTheta; + mat.m_matrix[2][0] = 0.0; + mat.m_matrix[2][1] = -sinTheta; + mat.m_matrix[2][2] = cosTheta; + mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; + mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; + mat.m_matrix[3][3] = 1.0; + } else if (x == 0.0 && y == 1.0 && z == 0.0) { + mat.m_matrix[0][0] = cosTheta; + mat.m_matrix[0][1] = 0.0; + mat.m_matrix[0][2] = -sinTheta; + mat.m_matrix[1][0] = 0.0; + mat.m_matrix[1][1] = 1.0; + mat.m_matrix[1][2] = 0.0; + mat.m_matrix[2][0] = sinTheta; + mat.m_matrix[2][1] = 0.0; + mat.m_matrix[2][2] = cosTheta; + mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; + mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; + mat.m_matrix[3][3] = 1.0; + } else if (x == 0.0 && y == 0.0 && z == 1.0) { + mat.m_matrix[0][0] = cosTheta; + mat.m_matrix[0][1] = sinTheta; + mat.m_matrix[0][2] = 0.0; + mat.m_matrix[1][0] = -sinTheta; + mat.m_matrix[1][1] = cosTheta; + mat.m_matrix[1][2] = 0.0; + mat.m_matrix[2][0] = 0.0; + mat.m_matrix[2][1] = 0.0; + mat.m_matrix[2][2] = 1.0; + mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; + mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; + mat.m_matrix[3][3] = 1.0; + } else { + // This case is the rotation about an arbitrary unit vector. + // + // Formula is adapted from Wikipedia article on Rotation matrix, + // http://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle + // + // An alternate resource with the same matrix: http://www.fastgraph.com/makegames/3drotation/ + // + double oneMinusCosTheta = 1 - cosTheta; + mat.m_matrix[0][0] = cosTheta + x * x * oneMinusCosTheta; + mat.m_matrix[0][1] = y * x * oneMinusCosTheta + z * sinTheta; + mat.m_matrix[0][2] = z * x * oneMinusCosTheta - y * sinTheta; + mat.m_matrix[1][0] = x * y * oneMinusCosTheta - z * sinTheta; + mat.m_matrix[1][1] = cosTheta + y * y * oneMinusCosTheta; + mat.m_matrix[1][2] = z * y * oneMinusCosTheta + x * sinTheta; + mat.m_matrix[2][0] = x * z * oneMinusCosTheta + y * sinTheta; + mat.m_matrix[2][1] = y * z * oneMinusCosTheta - x * sinTheta; + mat.m_matrix[2][2] = cosTheta + z * z * oneMinusCosTheta; + mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; + mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; + mat.m_matrix[3][3] = 1.0; + } + multiply(mat); + return *this; + } + + TransformationMatrix& TransformationMatrix::rotate3d(double rx, double ry, double rz) + { + // Angles are in degrees. Switch to radians. + rx = deg2rad(rx); + ry = deg2rad(ry); + rz = deg2rad(rz); + + TransformationMatrix mat; + + double sinTheta = sin(rz); + double cosTheta = cos(rz); + + mat.m_matrix[0][0] = cosTheta; + mat.m_matrix[0][1] = sinTheta; + mat.m_matrix[0][2] = 0.0; + mat.m_matrix[1][0] = -sinTheta; + mat.m_matrix[1][1] = cosTheta; + mat.m_matrix[1][2] = 0.0; + mat.m_matrix[2][0] = 0.0; + mat.m_matrix[2][1] = 0.0; + mat.m_matrix[2][2] = 1.0; + mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; + mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; + mat.m_matrix[3][3] = 1.0; + + TransformationMatrix rmat(mat); + + sinTheta = sin(ry); + cosTheta = cos(ry); + + mat.m_matrix[0][0] = cosTheta; + mat.m_matrix[0][1] = 0.0; + mat.m_matrix[0][2] = -sinTheta; + mat.m_matrix[1][0] = 0.0; + mat.m_matrix[1][1] = 1.0; + mat.m_matrix[1][2] = 0.0; + mat.m_matrix[2][0] = sinTheta; + mat.m_matrix[2][1] = 0.0; + mat.m_matrix[2][2] = cosTheta; + mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; + mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; + mat.m_matrix[3][3] = 1.0; + + rmat.multiply(mat); + + sinTheta = sin(rx); + cosTheta = cos(rx); + + mat.m_matrix[0][0] = 1.0; + mat.m_matrix[0][1] = 0.0; + mat.m_matrix[0][2] = 0.0; + mat.m_matrix[1][0] = 0.0; + mat.m_matrix[1][1] = cosTheta; + mat.m_matrix[1][2] = sinTheta; + mat.m_matrix[2][0] = 0.0; + mat.m_matrix[2][1] = -sinTheta; + mat.m_matrix[2][2] = cosTheta; + mat.m_matrix[0][3] = mat.m_matrix[1][3] = mat.m_matrix[2][3] = 0.0; + mat.m_matrix[3][0] = mat.m_matrix[3][1] = mat.m_matrix[3][2] = 0.0; + mat.m_matrix[3][3] = 1.0; + + rmat.multiply(mat); + + multiply(rmat); + return *this; + } + + TransformationMatrix& TransformationMatrix::translate(double tx, double ty) + { + m_matrix[3][0] += tx * m_matrix[0][0] + ty * m_matrix[1][0]; + m_matrix[3][1] += tx * m_matrix[0][1] + ty * m_matrix[1][1]; + m_matrix[3][2] += tx * m_matrix[0][2] + ty * m_matrix[1][2]; + m_matrix[3][3] += tx * m_matrix[0][3] + ty * m_matrix[1][3]; + return *this; + } + + TransformationMatrix& TransformationMatrix::translate3d(double tx, double ty, double tz) + { + m_matrix[3][0] += tx * m_matrix[0][0] + ty * m_matrix[1][0] + tz * m_matrix[2][0]; + m_matrix[3][1] += tx * m_matrix[0][1] + ty * m_matrix[1][1] + tz * m_matrix[2][1]; + m_matrix[3][2] += tx * m_matrix[0][2] + ty * m_matrix[1][2] + tz * m_matrix[2][2]; + m_matrix[3][3] += tx * m_matrix[0][3] + ty * m_matrix[1][3] + tz * m_matrix[2][3]; + return *this; + } + + TransformationMatrix& TransformationMatrix::translateRight(double tx, double ty) + { + if (tx != 0) { + m_matrix[0][0] += m_matrix[0][3] * tx; + m_matrix[1][0] += m_matrix[1][3] * tx; + m_matrix[2][0] += m_matrix[2][3] * tx; + m_matrix[3][0] += m_matrix[3][3] * tx; + } + + if (ty != 0) { + m_matrix[0][1] += m_matrix[0][3] * ty; + m_matrix[1][1] += m_matrix[1][3] * ty; + m_matrix[2][1] += m_matrix[2][3] * ty; + m_matrix[3][1] += m_matrix[3][3] * ty; + } + + return *this; + } + + TransformationMatrix& TransformationMatrix::translateRight3d(double tx, double ty, double tz) + { + translateRight(tx, ty); + if (tz != 0) { + m_matrix[0][2] += m_matrix[0][3] * tz; + m_matrix[1][2] += m_matrix[1][3] * tz; + m_matrix[2][2] += m_matrix[2][3] * tz; + m_matrix[3][2] += m_matrix[3][3] * tz; + } + + return *this; + } + + TransformationMatrix& TransformationMatrix::skew(double sx, double sy) + { + // angles are in degrees. Switch to radians + sx = deg2rad(sx); + sy = deg2rad(sy); + + TransformationMatrix mat; + mat.m_matrix[0][1] = tan(sy); // note that the y shear goes in the first row + mat.m_matrix[1][0] = tan(sx); // and the x shear in the second row + + multiply(mat); + return *this; + } + + TransformationMatrix& TransformationMatrix::applyPerspective(double p) + { + TransformationMatrix mat; + if (p != 0) + mat.m_matrix[2][3] = -1/p; + + multiply(mat); + return *this; + } + + // this = mat * this. + TransformationMatrix& TransformationMatrix::multiply(const TransformationMatrix& mat) + { + Matrix4 tmp; + + tmp[0][0] = (mat.m_matrix[0][0] * m_matrix[0][0] + mat.m_matrix[0][1] * m_matrix[1][0] + + mat.m_matrix[0][2] * m_matrix[2][0] + mat.m_matrix[0][3] * m_matrix[3][0]); + tmp[0][1] = (mat.m_matrix[0][0] * m_matrix[0][1] + mat.m_matrix[0][1] * m_matrix[1][1] + + mat.m_matrix[0][2] * m_matrix[2][1] + mat.m_matrix[0][3] * m_matrix[3][1]); + tmp[0][2] = (mat.m_matrix[0][0] * m_matrix[0][2] + mat.m_matrix[0][1] * m_matrix[1][2] + + mat.m_matrix[0][2] * m_matrix[2][2] + mat.m_matrix[0][3] * m_matrix[3][2]); + tmp[0][3] = (mat.m_matrix[0][0] * m_matrix[0][3] + mat.m_matrix[0][1] * m_matrix[1][3] + + mat.m_matrix[0][2] * m_matrix[2][3] + mat.m_matrix[0][3] * m_matrix[3][3]); + + tmp[1][0] = (mat.m_matrix[1][0] * m_matrix[0][0] + mat.m_matrix[1][1] * m_matrix[1][0] + + mat.m_matrix[1][2] * m_matrix[2][0] + mat.m_matrix[1][3] * m_matrix[3][0]); + tmp[1][1] = (mat.m_matrix[1][0] * m_matrix[0][1] + mat.m_matrix[1][1] * m_matrix[1][1] + + mat.m_matrix[1][2] * m_matrix[2][1] + mat.m_matrix[1][3] * m_matrix[3][1]); + tmp[1][2] = (mat.m_matrix[1][0] * m_matrix[0][2] + mat.m_matrix[1][1] * m_matrix[1][2] + + mat.m_matrix[1][2] * m_matrix[2][2] + mat.m_matrix[1][3] * m_matrix[3][2]); + tmp[1][3] = (mat.m_matrix[1][0] * m_matrix[0][3] + mat.m_matrix[1][1] * m_matrix[1][3] + + mat.m_matrix[1][2] * m_matrix[2][3] + mat.m_matrix[1][3] * m_matrix[3][3]); + + tmp[2][0] = (mat.m_matrix[2][0] * m_matrix[0][0] + mat.m_matrix[2][1] * m_matrix[1][0] + + mat.m_matrix[2][2] * m_matrix[2][0] + mat.m_matrix[2][3] * m_matrix[3][0]); + tmp[2][1] = (mat.m_matrix[2][0] * m_matrix[0][1] + mat.m_matrix[2][1] * m_matrix[1][1] + + mat.m_matrix[2][2] * m_matrix[2][1] + mat.m_matrix[2][3] * m_matrix[3][1]); + tmp[2][2] = (mat.m_matrix[2][0] * m_matrix[0][2] + mat.m_matrix[2][1] * m_matrix[1][2] + + mat.m_matrix[2][2] * m_matrix[2][2] + mat.m_matrix[2][3] * m_matrix[3][2]); + tmp[2][3] = (mat.m_matrix[2][0] * m_matrix[0][3] + mat.m_matrix[2][1] * m_matrix[1][3] + + mat.m_matrix[2][2] * m_matrix[2][3] + mat.m_matrix[2][3] * m_matrix[3][3]); + + tmp[3][0] = (mat.m_matrix[3][0] * m_matrix[0][0] + mat.m_matrix[3][1] * m_matrix[1][0] + + mat.m_matrix[3][2] * m_matrix[2][0] + mat.m_matrix[3][3] * m_matrix[3][0]); + tmp[3][1] = (mat.m_matrix[3][0] * m_matrix[0][1] + mat.m_matrix[3][1] * m_matrix[1][1] + + mat.m_matrix[3][2] * m_matrix[2][1] + mat.m_matrix[3][3] * m_matrix[3][1]); + tmp[3][2] = (mat.m_matrix[3][0] * m_matrix[0][2] + mat.m_matrix[3][1] * m_matrix[1][2] + + mat.m_matrix[3][2] * m_matrix[2][2] + mat.m_matrix[3][3] * m_matrix[3][2]); + tmp[3][3] = (mat.m_matrix[3][0] * m_matrix[0][3] + mat.m_matrix[3][1] * m_matrix[1][3] + + mat.m_matrix[3][2] * m_matrix[2][3] + mat.m_matrix[3][3] * m_matrix[3][3]); + + setMatrix(tmp); + return *this; + } + + void TransformationMatrix::multVecMatrix(double x, double y, double& resultX, double& resultY) const + { + resultX = m_matrix[3][0] + x * m_matrix[0][0] + y * m_matrix[1][0]; + resultY = m_matrix[3][1] + x * m_matrix[0][1] + y * m_matrix[1][1]; + double w = m_matrix[3][3] + x * m_matrix[0][3] + y * m_matrix[1][3]; + if (w != 1 && w != 0) { + resultX /= w; + resultY /= w; + } + } + + void TransformationMatrix::multVecMatrix(double x, double y, double z, double& resultX, double& resultY, double& resultZ) const + { + resultX = m_matrix[3][0] + x * m_matrix[0][0] + y * m_matrix[1][0] + z * m_matrix[2][0]; + resultY = m_matrix[3][1] + x * m_matrix[0][1] + y * m_matrix[1][1] + z * m_matrix[2][1]; + resultZ = m_matrix[3][2] + x * m_matrix[0][2] + y * m_matrix[1][2] + z * m_matrix[2][2]; + double w = m_matrix[3][3] + x * m_matrix[0][3] + y * m_matrix[1][3] + z * m_matrix[2][3]; + if (w != 1 && w != 0) { + resultX /= w; + resultY /= w; + resultZ /= w; + } + } + + bool TransformationMatrix::isInvertible() const + { + if (isIdentityOrTranslation()) + return true; + + double det = WebCore::determinant4x4(m_matrix); + + if (fabs(det) < SMALL_NUMBER) + return false; + + return true; + } + + TransformationMatrix TransformationMatrix::inverse() const + { + if (isIdentityOrTranslation()) { + // identity matrix + if (m_matrix[3][0] == 0 && m_matrix[3][1] == 0 && m_matrix[3][2] == 0) + return TransformationMatrix(); + + // translation + return TransformationMatrix(1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + -m_matrix[3][0], -m_matrix[3][1], -m_matrix[3][2], 1); + } + + TransformationMatrix invMat; + bool inverted = WebCore::inverse(m_matrix, invMat.m_matrix); + if (!inverted) + return TransformationMatrix(); + + return invMat; + } + + void TransformationMatrix::makeAffine() + { + m_matrix[0][2] = 0; + m_matrix[0][3] = 0; + + m_matrix[1][2] = 0; + m_matrix[1][3] = 0; + + m_matrix[2][0] = 0; + m_matrix[2][1] = 0; + m_matrix[2][2] = 1; + m_matrix[2][3] = 0; + + m_matrix[3][2] = 0; + m_matrix[3][3] = 1; + } + + static inline void blendFloat(double& from, double to, double progress) + { + if (from != to) + from = from + (to - from) * progress; + } + + void TransformationMatrix::blend(const TransformationMatrix& from, double progress) + { + if (from.isIdentity() && isIdentity()) + return; + + // decompose + DecomposedType fromDecomp; + DecomposedType toDecomp; + from.decompose(fromDecomp); + decompose(toDecomp); + + // interpolate + blendFloat(fromDecomp.scaleX, toDecomp.scaleX, progress); + blendFloat(fromDecomp.scaleY, toDecomp.scaleY, progress); + blendFloat(fromDecomp.scaleZ, toDecomp.scaleZ, progress); + blendFloat(fromDecomp.skewXY, toDecomp.skewXY, progress); + blendFloat(fromDecomp.skewXZ, toDecomp.skewXZ, progress); + blendFloat(fromDecomp.skewYZ, toDecomp.skewYZ, progress); + blendFloat(fromDecomp.translateX, toDecomp.translateX, progress); + blendFloat(fromDecomp.translateY, toDecomp.translateY, progress); + blendFloat(fromDecomp.translateZ, toDecomp.translateZ, progress); + blendFloat(fromDecomp.perspectiveX, toDecomp.perspectiveX, progress); + blendFloat(fromDecomp.perspectiveY, toDecomp.perspectiveY, progress); + blendFloat(fromDecomp.perspectiveZ, toDecomp.perspectiveZ, progress); + blendFloat(fromDecomp.perspectiveW, toDecomp.perspectiveW, progress); + + slerp(&fromDecomp.quaternionX, &toDecomp.quaternionX, progress); + + // recompose + recompose(fromDecomp); + } + + bool TransformationMatrix::decompose(DecomposedType& decomp) const + { + if (isIdentity()) { + memset(&decomp, 0, sizeof(decomp)); + decomp.perspectiveW = 1; + decomp.scaleX = 1; + decomp.scaleY = 1; + decomp.scaleZ = 1; + } + + if (!WebCore::decompose(m_matrix, decomp)) + return false; + return true; + } + + void TransformationMatrix::recompose(const DecomposedType& decomp, bool useEulerAngle) + { + makeIdentity(); + + // first apply perspective + m_matrix[0][3] = decomp.perspectiveX; + m_matrix[1][3] = decomp.perspectiveY; + m_matrix[2][3] = decomp.perspectiveZ; + m_matrix[3][3] = decomp.perspectiveW; + + // now translate + translate3d(decomp.translateX, decomp.translateY, decomp.translateZ); + + if (!useEulerAngle) { + // apply rotation + double xx = decomp.quaternionX * decomp.quaternionX; + double xy = decomp.quaternionX * decomp.quaternionY; + double xz = decomp.quaternionX * decomp.quaternionZ; + double xw = decomp.quaternionX * decomp.quaternionW; + double yy = decomp.quaternionY * decomp.quaternionY; + double yz = decomp.quaternionY * decomp.quaternionZ; + double yw = decomp.quaternionY * decomp.quaternionW; + double zz = decomp.quaternionZ * decomp.quaternionZ; + double zw = decomp.quaternionZ * decomp.quaternionW; + + // Construct a composite rotation matrix from the quaternion values + TransformationMatrix rotationMatrix(1 - 2 * (yy + zz), 2 * (xy - zw), 2 * (xz + yw), 0, + 2 * (xy + zw), 1 - 2 * (xx + zz), 2 * (yz - xw), 0, + 2 * (xz - yw), 2 * (yz + xw), 1 - 2 * (xx + yy), 0, + 0, 0, 0, 1); + + multiply(rotationMatrix); + } else { + rotate3d(1.0, 0.0, 0.0, rad2deg(decomp.rotateX)); + rotate3d(0.0, 1.0, 0.0, rad2deg(decomp.rotateY)); + rotate3d(0.0, 0.0, 1.0, rad2deg(decomp.rotateZ)); + } + + // now apply skew + if (decomp.skewYZ) { + TransformationMatrix tmp; + tmp.setM32(decomp.skewYZ); + multiply(tmp); + } + + if (decomp.skewXZ) { + TransformationMatrix tmp; + tmp.setM31(decomp.skewXZ); + multiply(tmp); + } + + if (decomp.skewXY) { + TransformationMatrix tmp; + tmp.setM21(decomp.skewXY); + multiply(tmp); + } + + // finally, apply scale + scale3d(decomp.scaleX, decomp.scaleY, decomp.scaleZ); + } +} \ No newline at end of file diff --git a/Pods/pop/pop/WebCore/TransformationMatrix.h b/Pods/pop/pop/WebCore/TransformationMatrix.h new file mode 100644 index 0000000..b99ae89 --- /dev/null +++ b/Pods/pop/pop/WebCore/TransformationMatrix.h @@ -0,0 +1,279 @@ +/* + * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef TransformationMatrix_h +#define TransformationMatrix_h + +#include //for memcpy + +#include + +#include + +namespace WebCore { + + class TransformationMatrix { + public: + + typedef double Matrix4[4][4]; + + TransformationMatrix() { makeIdentity(); } + TransformationMatrix(const TransformationMatrix& t) { *this = t; } + TransformationMatrix(double a, double b, double c, double d, double e, double f) { setMatrix(a, b, c, d, e, f); } + TransformationMatrix(double m11, double m12, double m13, double m14, + double m21, double m22, double m23, double m24, + double m31, double m32, double m33, double m34, + double m41, double m42, double m43, double m44) + { + setMatrix(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44); + } + + void setMatrix(double a, double b, double c, double d, double e, double f) + { + m_matrix[0][0] = a; m_matrix[0][1] = b; m_matrix[0][2] = 0; m_matrix[0][3] = 0; + m_matrix[1][0] = c; m_matrix[1][1] = d; m_matrix[1][2] = 0; m_matrix[1][3] = 0; + m_matrix[2][0] = 0; m_matrix[2][1] = 0; m_matrix[2][2] = 1; m_matrix[2][3] = 0; + m_matrix[3][0] = e; m_matrix[3][1] = f; m_matrix[3][2] = 0; m_matrix[3][3] = 1; + } + + void setMatrix(double m11, double m12, double m13, double m14, + double m21, double m22, double m23, double m24, + double m31, double m32, double m33, double m34, + double m41, double m42, double m43, double m44) + { + m_matrix[0][0] = m11; m_matrix[0][1] = m12; m_matrix[0][2] = m13; m_matrix[0][3] = m14; + m_matrix[1][0] = m21; m_matrix[1][1] = m22; m_matrix[1][2] = m23; m_matrix[1][3] = m24; + m_matrix[2][0] = m31; m_matrix[2][1] = m32; m_matrix[2][2] = m33; m_matrix[2][3] = m34; + m_matrix[3][0] = m41; m_matrix[3][1] = m42; m_matrix[3][2] = m43; m_matrix[3][3] = m44; + } + + TransformationMatrix& operator =(const TransformationMatrix &t) + { + setMatrix(t.m_matrix); + return *this; + } + + TransformationMatrix& makeIdentity() + { + setMatrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + return *this; + } + + bool isIdentity() const + { + return m_matrix[0][0] == 1 && m_matrix[0][1] == 0 && m_matrix[0][2] == 0 && m_matrix[0][3] == 0 && + m_matrix[1][0] == 0 && m_matrix[1][1] == 1 && m_matrix[1][2] == 0 && m_matrix[1][3] == 0 && + m_matrix[2][0] == 0 && m_matrix[2][1] == 0 && m_matrix[2][2] == 1 && m_matrix[2][3] == 0 && + m_matrix[3][0] == 0 && m_matrix[3][1] == 0 && m_matrix[3][2] == 0 && m_matrix[3][3] == 1; + } + + // This form preserves the double math from input to output + void map(double x, double y, double& x2, double& y2) const { multVecMatrix(x, y, x2, y2); } + + double m11() const { return m_matrix[0][0]; } + void setM11(double f) { m_matrix[0][0] = f; } + double m12() const { return m_matrix[0][1]; } + void setM12(double f) { m_matrix[0][1] = f; } + double m13() const { return m_matrix[0][2]; } + void setM13(double f) { m_matrix[0][2] = f; } + double m14() const { return m_matrix[0][3]; } + void setM14(double f) { m_matrix[0][3] = f; } + double m21() const { return m_matrix[1][0]; } + void setM21(double f) { m_matrix[1][0] = f; } + double m22() const { return m_matrix[1][1]; } + void setM22(double f) { m_matrix[1][1] = f; } + double m23() const { return m_matrix[1][2]; } + void setM23(double f) { m_matrix[1][2] = f; } + double m24() const { return m_matrix[1][3]; } + void setM24(double f) { m_matrix[1][3] = f; } + double m31() const { return m_matrix[2][0]; } + void setM31(double f) { m_matrix[2][0] = f; } + double m32() const { return m_matrix[2][1]; } + void setM32(double f) { m_matrix[2][1] = f; } + double m33() const { return m_matrix[2][2]; } + void setM33(double f) { m_matrix[2][2] = f; } + double m34() const { return m_matrix[2][3]; } + void setM34(double f) { m_matrix[2][3] = f; } + double m41() const { return m_matrix[3][0]; } + void setM41(double f) { m_matrix[3][0] = f; } + double m42() const { return m_matrix[3][1]; } + void setM42(double f) { m_matrix[3][1] = f; } + double m43() const { return m_matrix[3][2]; } + void setM43(double f) { m_matrix[3][2] = f; } + double m44() const { return m_matrix[3][3]; } + void setM44(double f) { m_matrix[3][3] = f; } + + double a() const { return m_matrix[0][0]; } + void setA(double a) { m_matrix[0][0] = a; } + + double b() const { return m_matrix[0][1]; } + void setB(double b) { m_matrix[0][1] = b; } + + double c() const { return m_matrix[1][0]; } + void setC(double c) { m_matrix[1][0] = c; } + + double d() const { return m_matrix[1][1]; } + void setD(double d) { m_matrix[1][1] = d; } + + double e() const { return m_matrix[3][0]; } + void setE(double e) { m_matrix[3][0] = e; } + + double f() const { return m_matrix[3][1]; } + void setF(double f) { m_matrix[3][1] = f; } + + // this = this * mat + TransformationMatrix& multiply(const TransformationMatrix&); + + TransformationMatrix& scale(double); + TransformationMatrix& scaleNonUniform(double sx, double sy); + TransformationMatrix& scale3d(double sx, double sy, double sz); + + TransformationMatrix& rotate(double d) { return rotate3d(0, 0, d); } + TransformationMatrix& rotateFromVector(double x, double y); + TransformationMatrix& rotate3d(double rx, double ry, double rz); + + // The vector (x,y,z) is normalized if it's not already. A vector of + // (0,0,0) uses a vector of (0,0,1). + TransformationMatrix& rotate3d(double x, double y, double z, double angle); + + TransformationMatrix& translate(double tx, double ty); + TransformationMatrix& translate3d(double tx, double ty, double tz); + + // translation added with a post-multiply + TransformationMatrix& translateRight(double tx, double ty); + TransformationMatrix& translateRight3d(double tx, double ty, double tz); + + TransformationMatrix& flipX(); + TransformationMatrix& flipY(); + TransformationMatrix& skew(double angleX, double angleY); + TransformationMatrix& skewX(double angle) { return skew(angle, 0); } + TransformationMatrix& skewY(double angle) { return skew(0, angle); } + + TransformationMatrix& applyPerspective(double p); + bool hasPerspective() const { return m_matrix[2][3] != 0.0f; } + + bool isInvertible() const; + + // This method returns the identity matrix if it is not invertible. + // Use isInvertible() before calling this if you need to know. + TransformationMatrix inverse() const; + + // decompose the matrix into its component parts + typedef struct { + double scaleX, scaleY, scaleZ; + double skewXY, skewXZ, skewYZ; + double rotateX, rotateY, rotateZ; + double quaternionX, quaternionY, quaternionZ, quaternionW; + double translateX, translateY, translateZ; + double perspectiveX, perspectiveY, perspectiveZ, perspectiveW; + } DecomposedType; + + bool decompose(DecomposedType& decomp) const; + void recompose(const DecomposedType& decomp, bool useEulerAngle = false); + + void blend(const TransformationMatrix& from, double progress); + + bool isAffine() const + { + return (m13() == 0 && m14() == 0 && m23() == 0 && m24() == 0 && + m31() == 0 && m32() == 0 && m33() == 1 && m34() == 0 && m43() == 0 && m44() == 1); + } + + // Throw away the non-affine parts of the matrix (lossy!) + void makeAffine(); + + bool operator==(const TransformationMatrix& m2) const + { + return (m_matrix[0][0] == m2.m_matrix[0][0] && + m_matrix[0][1] == m2.m_matrix[0][1] && + m_matrix[0][2] == m2.m_matrix[0][2] && + m_matrix[0][3] == m2.m_matrix[0][3] && + m_matrix[1][0] == m2.m_matrix[1][0] && + m_matrix[1][1] == m2.m_matrix[1][1] && + m_matrix[1][2] == m2.m_matrix[1][2] && + m_matrix[1][3] == m2.m_matrix[1][3] && + m_matrix[2][0] == m2.m_matrix[2][0] && + m_matrix[2][1] == m2.m_matrix[2][1] && + m_matrix[2][2] == m2.m_matrix[2][2] && + m_matrix[2][3] == m2.m_matrix[2][3] && + m_matrix[3][0] == m2.m_matrix[3][0] && + m_matrix[3][1] == m2.m_matrix[3][1] && + m_matrix[3][2] == m2.m_matrix[3][2] && + m_matrix[3][3] == m2.m_matrix[3][3]); + } + + bool operator!=(const TransformationMatrix& other) const { return !(*this == other); } + + // *this = *this * t (i.e., a multRight) + TransformationMatrix& operator*=(const TransformationMatrix& t) + { + return multiply(t); + } + + // result = *this * t (i.e., a multRight) + TransformationMatrix operator*(const TransformationMatrix& t) + { + TransformationMatrix result = *this; + result.multiply(t); + return result; + } + + CATransform3D transform3d () const; + CGAffineTransform affineTransform () const; + + TransformationMatrix(const CATransform3D&); + operator CATransform3D() const; + + TransformationMatrix(const CGAffineTransform&); + operator CGAffineTransform() const; + + private: + + // multiply passed 2D point by matrix (assume z=0) + void multVecMatrix(double x, double y, double& dstX, double& dstY) const; + + // multiply passed 3D point by matrix + void multVecMatrix(double x, double y, double z, double& dstX, double& dstY, double& dstZ) const; + + void setMatrix(const Matrix4 m) + { + if (m && m != m_matrix) + memcpy(m_matrix, m, sizeof(Matrix4)); + } + + bool isIdentityOrTranslation() const + { + return m_matrix[0][0] == 1 && m_matrix[0][1] == 0 && m_matrix[0][2] == 0 && m_matrix[0][3] == 0 && + m_matrix[1][0] == 0 && m_matrix[1][1] == 1 && m_matrix[1][2] == 0 && m_matrix[1][3] == 0 && + m_matrix[2][0] == 0 && m_matrix[2][1] == 0 && m_matrix[2][2] == 1 && m_matrix[2][3] == 0 && + m_matrix[3][3] == 1; + } + + Matrix4 m_matrix; + }; + +} // namespace WebCore + +#endif // TransformationMatrix_h diff --git a/Pods/pop/pop/WebCore/UnitBezier.h b/Pods/pop/pop/WebCore/UnitBezier.h new file mode 100644 index 0000000..0f847a0 --- /dev/null +++ b/Pods/pop/pop/WebCore/UnitBezier.h @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef UnitBezier_h +#define UnitBezier_h + +#include + +namespace WebCore { + + struct UnitBezier { + UnitBezier(double p1x, double p1y, double p2x, double p2y) + { + // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1). + cx = 3.0 * p1x; + bx = 3.0 * (p2x - p1x) - cx; + ax = 1.0 - cx -bx; + + cy = 3.0 * p1y; + by = 3.0 * (p2y - p1y) - cy; + ay = 1.0 - cy - by; + } + + double sampleCurveX(double t) + { + // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule. + return ((ax * t + bx) * t + cx) * t; + } + + double sampleCurveY(double t) + { + return ((ay * t + by) * t + cy) * t; + } + + double sampleCurveDerivativeX(double t) + { + return (3.0 * ax * t + 2.0 * bx) * t + cx; + } + + // Given an x value, find a parametric value it came from. + double solveCurveX(double x, double epsilon) + { + double t0; + double t1; + double t2; + double x2; + double d2; + int i; + + // First try a few iterations of Newton's method -- normally very fast. + for (t2 = x, i = 0; i < 8; i++) { + x2 = sampleCurveX(t2) - x; + if (fabs (x2) < epsilon) + return t2; + d2 = sampleCurveDerivativeX(t2); + if (fabs(d2) < 1e-6) + break; + t2 = t2 - x2 / d2; + } + + // Fall back to the bisection method for reliability. + t0 = 0.0; + t1 = 1.0; + t2 = x; + + if (t2 < t0) + return t0; + if (t2 > t1) + return t1; + + while (t0 < t1) { + x2 = sampleCurveX(t2); + if (fabs(x2 - x) < epsilon) + return t2; + if (x > x2) + t0 = t2; + else + t1 = t2; + t2 = (t1 - t0) * .5 + t0; + } + + // Failure. + return t2; + } + + double solve(double x, double epsilon) + { + return sampleCurveY(solveCurveX(x, epsilon)); + } + + private: + double ax; + double bx; + double cx; + + double ay; + double by; + double cy; + }; +} +#endif diff --git a/WeChat.xcodeproj/project.pbxproj b/WeChat.xcodeproj/project.pbxproj index d82793d..e783fcb 100644 --- a/WeChat.xcodeproj/project.pbxproj +++ b/WeChat.xcodeproj/project.pbxproj @@ -18,6 +18,8 @@ F918F3FC1CB112B0003855FE /* EditorView.m in Sources */ = {isa = PBXBuildFile; fileRef = F918F3FB1CB112B0003855FE /* EditorView.m */; }; F918F3FE1CB112C1003855FE /* EditorView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F918F3FD1CB112C1003855FE /* EditorView.xib */; }; F918F4011CB139DA003855FE /* ChatroomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F918F4001CB139DA003855FE /* ChatroomViewController.m */; }; + F921D4341CCBB6160046A09B /* MomentTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F921D4331CCBB6160046A09B /* MomentTableViewCell.m */; }; + F921D4381CCBC9A80046A09B /* PhotosCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F921D4371CCBC9A80046A09B /* PhotosCollectionViewController.m */; }; F941930C1CC3A108000EC067 /* WeChat.m in Sources */ = {isa = PBXBuildFile; fileRef = F941930B1CC3A108000EC067 /* WeChat.m */; }; F962F64C1CB53218005D73EA /* InsetsTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = F962F64B1CB53218005D73EA /* InsetsTextField.m */; }; F97BF8A01CC4E45C00403E47 /* Messages+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F97BF89D1CC4E45C00403E47 /* Messages+CoreDataProperties.m */; }; @@ -175,6 +177,10 @@ F918F3FD1CB112C1003855FE /* EditorView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = EditorView.xib; sourceTree = ""; }; F918F3FF1CB139DA003855FE /* ChatroomViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatroomViewController.h; sourceTree = ""; }; F918F4001CB139DA003855FE /* ChatroomViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatroomViewController.m; sourceTree = ""; }; + F921D4321CCBB6160046A09B /* MomentTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MomentTableViewCell.h; sourceTree = ""; }; + F921D4331CCBB6160046A09B /* MomentTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MomentTableViewCell.m; sourceTree = ""; }; + F921D4361CCBC9A80046A09B /* PhotosCollectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhotosCollectionViewController.h; sourceTree = ""; }; + F921D4371CCBC9A80046A09B /* PhotosCollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhotosCollectionViewController.m; sourceTree = ""; }; F94193091CC3A108000EC067 /* WechatConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WechatConstants.h; sourceTree = ""; }; F941930A1CC3A108000EC067 /* WeChat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeChat.h; sourceTree = ""; }; F941930B1CC3A108000EC067 /* WeChat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeChat.m; sourceTree = ""; }; @@ -472,6 +478,17 @@ name = Category; sourceTree = ""; }; + F921D4351CCBC8960046A09B /* Cell */ = { + isa = PBXGroup; + children = ( + F921D4321CCBB6160046A09B /* MomentTableViewCell.h */, + F921D4331CCBB6160046A09B /* MomentTableViewCell.m */, + F921D4361CCBC9A80046A09B /* PhotosCollectionViewController.h */, + F921D4371CCBC9A80046A09B /* PhotosCollectionViewController.m */, + ); + name = Cell; + sourceTree = ""; + }; F9808A681CCB8E1100C67C2D /* moments */ = { isa = PBXGroup; children = ( @@ -865,6 +882,7 @@ F9E0738F1CA9155900468EDC /* View */ = { isa = PBXGroup; children = ( + F921D4351CCBC8960046A09B /* Cell */, F9B9746F1CC8C4780090D19E /* SpinningLoadingView.h */, F9B974701CC8C4780090D19E /* SpinningLoadingView.m */, F9B974721CC8CB630090D19E /* CoverHeaderView.h */, @@ -1233,10 +1251,12 @@ F962F64C1CB53218005D73EA /* InsetsTextField.m in Sources */, F9E072DF1CA90BD800468EDC /* AppDelegate.m in Sources */, F9E073AC1CA96AF000468EDC /* MeTableViewCell.m in Sources */, + F921D4381CCBC9A80046A09B /* PhotosCollectionViewController.m in Sources */, F91775AB1CAA7EF900557A45 /* ContactsTableViewCell.m in Sources */, F90B416B1CABC45600ECF391 /* GlassView.m in Sources */, F9B974751CC8CB630090D19E /* CoverHeaderView.m in Sources */, F918F3FC1CB112B0003855FE /* EditorView.m in Sources */, + F921D4341CCBB6160046A09B /* MomentTableViewCell.m in Sources */, F90B41731CAC1DC700ECF391 /* NSString+Pinyin.m in Sources */, F9B974711CC8C4780090D19E /* SpinningLoadingView.m in Sources */, F9E073A71CA9167300468EDC /* MainTabBarController.m in Sources */, diff --git a/WeChat/Found/Controller/MomentsTableViewController.m b/WeChat/Found/Controller/MomentsTableViewController.m index 77ab6dc..4036490 100644 --- a/WeChat/Found/Controller/MomentsTableViewController.m +++ b/WeChat/Found/Controller/MomentsTableViewController.m @@ -10,9 +10,14 @@ #import "MJRefresh/MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.h" #import "Masonry/Masonry/Masonry.h" #import "Moment.h" +#import "MomentTableViewCell.h" #import "MomentsDataSource.h" #import "MomentsTableViewController.h" #import "SpinningLoadingView.h" +#import "UIImage+RandomImage.h" +#import "UITableView+FDTemplateLayoutCell/Classes/UITableView+FDTemplateLayoutCell.h" + +static NSString* const kIdentifier = @"Identifier"; @interface MomentsTableViewController () @@ -36,7 +41,7 @@ - (MomentsDataSource*)datasource static MomentsDataSource* datasource = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - datasource = [[MomentsDataSource alloc] init]; + datasource = [[MomentsDataSource alloc] init]; }); return datasource; @@ -52,6 +57,9 @@ - (void)viewDidLoad } - (void)buildTableview { + [self.tableView registerClass:[MomentTableViewCell class] forCellReuseIdentifier:kIdentifier]; + + //cover self.coverView = [CoverHeaderView coverHeaderWithCover:[UIImage imageNamed:@"cover"] avatar:[UIImage imageNamed:@"siegrain_avatar"] @@ -59,33 +67,35 @@ - (void)buildTableview self.tableView.contentInset = UIEdgeInsetsMake(self.contentInsetY, 0, 0, 0); self.tableView.tableHeaderView = self.coverView; + //pull-down refresh SpinningLoadingView* loadingView = [SpinningLoadingView headerWithRefreshingBlock:^{ - dispatch_after( - dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), - dispatch_get_main_queue(), ^{ - [self loadData:true]; - [self.tableView.mj_header endRefreshing]; - }); + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), + dispatch_get_main_queue(), ^{ + [self loadData:true]; + [self.tableView.mj_header endRefreshing]; + }); }]; loadingView.ignoredScrollViewContentInsetTop = self.contentInsetY; self.tableView.mj_header = loadingView; + //pull-up refresh self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{ - dispatch_after( - dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), - ^{ - [self loadData:false]; - [self.tableView.mj_footer endRefreshing]; - }); + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), + ^{ + [self loadData:false]; + [self.tableView.mj_footer endRefreshing]; + }); }]; } - (void)bindConstraints { [self.coverView mas_makeConstraints:^(MASConstraintMaker* make) { - make.right.left.top.offset(0); - make.width.equalTo(self.tableView.mas_width); - make.height.equalTo(self.tableView.mas_width).offset(30); + make.right.left.top.offset(0); + make.width.equalTo(self.tableView.mas_width); + make.height.equalTo(self.tableView.mas_width).offset(30); }]; } @@ -128,7 +138,11 @@ - (void)didReceiveMemoryWarning - (CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath*)indexPath { - return 50; + CGFloat height = [tableView fd_heightForCellWithIdentifier:kIdentifier + configuration:^(id cell) { + [self configureCell:cell atIndexPath:indexPath]; + }]; + return height; } - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section @@ -138,12 +152,19 @@ - (NSInteger)tableView:(UITableView*)tableView - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { - UITableViewCell* cell = - [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault - reuseIdentifier:@"ss"]; - cell.textLabel.text = self.momentsArray[indexPath.row].content; + MomentTableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:kIdentifier forIndexPath:indexPath]; + + [self configureCell:cell atIndexPath:indexPath]; + return cell; } +- (void)configureCell:(MomentTableViewCell*)cell atIndexPath:(NSIndexPath*)indexPath +{ + Moment* model = self.momentsArray[indexPath.row]; + model.avatar = [UIImage randomImageInPath:@"Images/cell_icons"]; + + cell.model = model; +} #pragma mark - scrollview - (void)scrollViewDidScroll:(UIScrollView*)scrollView { diff --git a/WeChat/Found/View/MomentTableViewCell.h b/WeChat/Found/View/MomentTableViewCell.h new file mode 100644 index 0000000..cdacc17 --- /dev/null +++ b/WeChat/Found/View/MomentTableViewCell.h @@ -0,0 +1,15 @@ +// +// MomentTableViewCell.h +// WeChat +// +// Created by Siegrain on 16/4/23. +// Copyright © 2016年 siegrain. weChat. All rights reserved. +// + +#import + +@class Moment; + +@interface MomentTableViewCell : UITableViewCell +@property (strong, nonatomic) Moment* model; +@end diff --git a/WeChat/Found/View/MomentTableViewCell.m b/WeChat/Found/View/MomentTableViewCell.m new file mode 100644 index 0000000..9b00a2d --- /dev/null +++ b/WeChat/Found/View/MomentTableViewCell.m @@ -0,0 +1,85 @@ +// +// MomentTableViewCell.m +// WeChat +// +// Created by Siegrain on 16/4/23. +// Copyright © 2016年 siegrain. weChat. All rights reserved. +// + +#import "IDMPhotoBrowser/Classes/IDMPhotoBrowser.h" +#import "Masonry/Masonry/Masonry.h" +#import "Moment.h" +#import "MomentTableViewCell.h" +#import "TTTAttributedLabel/TTTAttributedLabel/TTTAttributedLabel.h" + +@interface +MomentTableViewCell () +@property (strong, nonatomic) UIImageView* avatarImageView; +@property (strong, nonatomic) TTTAttributedLabel* nameLabel; +@property (strong, nonatomic) TTTAttributedLabel* contentLabel; +@property (strong, nonatomic) IDMPhotoBrowser* photoBrowser; +@end + +@implementation MomentTableViewCell +#pragma mark - init +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)reuseIdentifier +{ + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + [self buildCell]; + [self bindConstraints]; + } + return self; +} +- (void)setModel:(Moment*)model +{ + _model = model; + + self.avatarImageView.image = model.avatar; + self.nameLabel.text = model.name; + self.contentLabel.text = model.content; + + // __block NSMutableArray* idmPhotos = [NSMutableArray array]; + // [model.pictures enumerateObjectsUsingBlock:^(UIImage* obj, NSUInteger idx, BOOL* _Nonnull stop) { + // [idmPhotos addObject:[IDMPhoto photoWithImage:obj]]; + // }]; +} + +#pragma mark - build +- (void)buildCell +{ + self.avatarImageView = [[UIImageView alloc] init]; + [self.contentView addSubview:self.avatarImageView]; + + self.nameLabel = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero]; + self.nameLabel.textColor = [UIColor colorWithRed:(54 / 255.0) green:(71 / 255.0) blue:(121 / 255.0) alpha:1]; + self.nameLabel.font = [UIFont systemFontOfSize:15 weight:0.2]; + self.nameLabel.verticalAlignment = UIControlContentVerticalAlignmentTop; + [self.contentView addSubview:self.nameLabel]; + + self.contentLabel = [[TTTAttributedLabel alloc] initWithFrame:CGRectZero]; + self.contentLabel.numberOfLines = 0; + self.contentLabel.verticalAlignment = TTTAttributedLabelVerticalAlignmentTop; + self.contentLabel.font = [UIFont systemFontOfSize:15]; + [self.contentView addSubview:self.contentLabel]; +} + +- (void)bindConstraints +{ + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker* make) { + make.top.left.offset(10); + make.width.height.offset(40); + }]; + [self.nameLabel mas_makeConstraints:^(MASConstraintMaker* make) { + // make.height.offset(30); + + make.left.equalTo(self.avatarImageView.mas_right).offset(10); + make.top.equalTo(self.avatarImageView); + make.right.offset(-10); + }]; + [self.contentLabel mas_makeConstraints:^(MASConstraintMaker* make) { + make.top.equalTo(self.nameLabel.mas_bottom).offset(5); + make.left.right.equalTo(self.nameLabel); + make.bottom.offset(-10); + }]; +} +@end diff --git a/WeChat/Found/View/PhotosCollectionViewController.h b/WeChat/Found/View/PhotosCollectionViewController.h new file mode 100644 index 0000000..e76f0b7 --- /dev/null +++ b/WeChat/Found/View/PhotosCollectionViewController.h @@ -0,0 +1,13 @@ +// +// PhotosCollectionViewController.h +// WeChat +// +// Created by Siegrain on 16/4/23. +// Copyright © 2016年 siegrain. weChat. All rights reserved. +// + +#import + +@interface PhotosCollectionViewController : UICollectionViewController +@property (copy, nonatomic) NSArray* photosArray; +@end diff --git a/WeChat/Found/View/PhotosCollectionViewController.m b/WeChat/Found/View/PhotosCollectionViewController.m new file mode 100644 index 0000000..ab1463e --- /dev/null +++ b/WeChat/Found/View/PhotosCollectionViewController.m @@ -0,0 +1,53 @@ +// +// PhotosCollectionViewController.m +// WeChat +// +// Created by Siegrain on 16/4/23. +// Copyright © 2016年 siegrain. weChat. All rights reserved. +// + +#import "PhotosCollectionViewController.h" + +@interface +PhotosCollectionViewController () + +@end + +@implementation PhotosCollectionViewController +static NSString* const reuseIdentifier = @"Cell"; + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + _photosArray = [NSArray array]; +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +#pragma mark - collectionview +-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ + return self.photosArray.count / 3; +} +- (NSInteger)collectionView:(UICollectionView*)collectionView numberOfItemsInSection:(NSInteger)section +{ + return self.photosArray.count / 3; +} + +- (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView cellForItemAtIndexPath:(NSIndexPath*)indexPath +{ + UICollectionViewCell* cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath]; + + return cell; +} + +- (void)configureCell:(UICollectionViewCell*)cell atIndexPath:(NSIndexPath*)indexPath +{ + UIImage* image = self.photosArray[indexPath.row]; + UIImageView* imageView = [[UIImageView alloc] initWithFrame:cell.frame]; +} +@end diff --git a/_clang-format b/_clang-format index 81f2bf9..336c9b9 100644 --- a/_clang-format +++ b/_clang-format @@ -56,7 +56,6 @@ MacroBlockBegin: '' MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None -ObjCBlockIndentWidth: 2 ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: false PenaltyBreakBeforeFirstCallParameter: 19 @@ -88,5 +87,6 @@ AllowShortBlocksOnASingleLine: true AllowShortIfStatementsOnASingleLine: true ColumnLimit: 0 IndentWidth: 4 +ObjCBlockIndentWidth: 4 ...