diff --git a/MiniScanner.xcodeproj/project.pbxproj b/MiniScanner.xcodeproj/project.pbxproj index b452d23405afdb938ac67c7abc6e38072d8e79c6..67bac262ec35cd6d3cf8929a5672b8ee2bbeaf8a 100644 --- a/MiniScanner.xcodeproj/project.pbxproj +++ b/MiniScanner.xcodeproj/project.pbxproj @@ -156,9 +156,6 @@ 53E7D33A2C1B00880025A1D3 /* FSPageControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53E7D3322C1B00880025A1D3 /* FSPageControl.swift */; }; 53E7D33B2C1B00880025A1D3 /* FSPagerViewObjcCompat.m in Sources */ = {isa = PBXBuildFile; fileRef = 53E7D3332C1B00880025A1D3 /* FSPagerViewObjcCompat.m */; }; 53E7D33C2C1B00880025A1D3 /* FSPagerCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53E7D3342C1B00880025A1D3 /* FSPagerCollectionView.swift */; }; - 53EDED962C18387E00DB8DF9 /* TYPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDED922C18387E00DB8DF9 /* TYPageControl.m */; }; - 53EDED972C18387E00DB8DF9 /* TYCyclePagerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDED932C18387E00DB8DF9 /* TYCyclePagerView.m */; }; - 53EDED982C18387E00DB8DF9 /* TYCyclePagerTransformLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDED942C18387E00DB8DF9 /* TYCyclePagerTransformLayout.m */; }; 53EDED9D2C183CDF00DB8DF9 /* BannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53EDED9C2C183CDF00DB8DF9 /* BannerView.swift */; }; 53EDED9F2C183CEB00DB8DF9 /* BannerView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 53EDED9E2C183CEB00DB8DF9 /* BannerView.xib */; }; 53EDEDA32C183FFF00DB8DF9 /* PagerImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53EDEDA12C183FFF00DB8DF9 /* PagerImageCollectionViewCell.swift */; }; @@ -385,12 +382,6 @@ 53E7D3322C1B00880025A1D3 /* FSPageControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPageControl.swift; sourceTree = "<group>"; }; 53E7D3332C1B00880025A1D3 /* FSPagerViewObjcCompat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FSPagerViewObjcCompat.m; sourceTree = "<group>"; }; 53E7D3342C1B00880025A1D3 /* FSPagerCollectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FSPagerCollectionView.swift; sourceTree = "<group>"; }; - 53EDED902C18387E00DB8DF9 /* TYCyclePagerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TYCyclePagerView.h; sourceTree = "<group>"; }; - 53EDED912C18387E00DB8DF9 /* TYCyclePagerTransformLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TYCyclePagerTransformLayout.h; sourceTree = "<group>"; }; - 53EDED922C18387E00DB8DF9 /* TYPageControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TYPageControl.m; sourceTree = "<group>"; }; - 53EDED932C18387E00DB8DF9 /* TYCyclePagerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TYCyclePagerView.m; sourceTree = "<group>"; }; - 53EDED942C18387E00DB8DF9 /* TYCyclePagerTransformLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TYCyclePagerTransformLayout.m; sourceTree = "<group>"; }; - 53EDED952C18387E00DB8DF9 /* TYPageControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TYPageControl.h; sourceTree = "<group>"; }; 53EDED992C18392B00DB8DF9 /* MiniScanner_Bridging_Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MiniScanner_Bridging_Header.h; sourceTree = "<group>"; }; 53EDED9C2C183CDF00DB8DF9 /* BannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BannerView.swift; sourceTree = "<group>"; }; 53EDED9E2C183CEB00DB8DF9 /* BannerView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BannerView.xib; sourceTree = "<group>"; }; @@ -780,6 +771,18 @@ path = Customs; sourceTree = "<group>"; }; + 53A4788B2C35BB700073E956 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 53014F4B2C11A8E80071CE39 /* CustomWeScan */, + 53D9D1BD2C1AF521004D1C1C /* LogoAnimationView */, + 53E7D32B2C1B00880025A1D3 /* FSPager */, + 539996362C26E86700671340 /* CDOverlay */, + 539996592C27130000671340 /* SnapKit */, + ); + path = Frameworks; + sourceTree = "<group>"; + }; 53AF29712C1098AC0046E9C1 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -837,7 +840,7 @@ path = LogoAnimationView; sourceTree = "<group>"; }; - 53E7D32B2C1B00880025A1D3 /* Sources */ = { + 53E7D32B2C1B00880025A1D3 /* FSPager */ = { isa = PBXGroup; children = ( 53E7D32C2C1B00880025A1D3 /* FSPagerView.swift */, @@ -850,20 +853,7 @@ 53E7D3332C1B00880025A1D3 /* FSPagerViewObjcCompat.m */, 53E7D3342C1B00880025A1D3 /* FSPagerCollectionView.swift */, ); - path = Sources; - sourceTree = "<group>"; - }; - 53EDED8F2C18387E00DB8DF9 /* CyclePagerView */ = { - isa = PBXGroup; - children = ( - 53EDED902C18387E00DB8DF9 /* TYCyclePagerView.h */, - 53EDED912C18387E00DB8DF9 /* TYCyclePagerTransformLayout.h */, - 53EDED922C18387E00DB8DF9 /* TYPageControl.m */, - 53EDED932C18387E00DB8DF9 /* TYCyclePagerView.m */, - 53EDED942C18387E00DB8DF9 /* TYCyclePagerTransformLayout.m */, - 53EDED952C18387E00DB8DF9 /* TYPageControl.h */, - ); - path = CyclePagerView; + path = FSPager; sourceTree = "<group>"; }; 53EDED9A2C183CB600DB8DF9 /* CustomCells */ = { @@ -1037,17 +1027,12 @@ EC8A9B0C254DC30800F9AF99 /* Supporting Files */ = { isa = PBXGroup; children = ( + 53A4788B2C35BB700073E956 /* Frameworks */, 539EF14D2C2AA43B0041AE1F /* ara.traineddata */, - 539996592C27130000671340 /* SnapKit */, 539996552C27124B00671340 /* FontChooserContainerView.swift */, 539996562C27124B00671340 /* ImageStickerContainerView.swift */, - 539996362C26E86700671340 /* CDOverlay */, - 53E7D32B2C1B00880025A1D3 /* Sources */, - 53D9D1BD2C1AF521004D1C1C /* LogoAnimationView */, 53D9D1C12C1AF521004D1C1C /* MyExtention.swift */, - 53EDED8F2C18387E00DB8DF9 /* CyclePagerView */, 53F21F932C1377B900172BFC /* Fonts */, - 53014F4B2C11A8E80071CE39 /* CustomWeScan */, EC0CF206254D8BC000888722 /* Assets.xcassets */, EC0CF1FD254D8BBF00888722 /* AppDelegate.swift */, EC0CF1FF254D8BBF00888722 /* SceneDelegate.swift */, @@ -1296,7 +1281,6 @@ 53014FAA2C11A8E80071CE39 /* Quadrilateral.swift in Sources */, 539996832C27130000671340 /* ConstraintMakerPriortizable.swift in Sources */, 5399969E2C27130000671340 /* Debugging.swift in Sources */, - 53EDED982C18387E00DB8DF9 /* TYCyclePagerTransformLayout.m in Sources */, 5399968E2C27130000671340 /* ConstraintMakerRelatable+Extensions.swift in Sources */, 539996512C26E86700671340 /* DefaultValues.m in Sources */, 53014FA42C11A8E80071CE39 /* EditScanViewController.swift in Sources */, @@ -1352,13 +1336,11 @@ 5359841A2C145E55003EB6ED /* DocumentsTableViewCell.swift in Sources */, EC702522254DF13200BE1958 /* PencilKitViewController.swift in Sources */, 5399968F2C27130000671340 /* ConstraintConfig.swift in Sources */, - 53EDED972C18387E00DB8DF9 /* TYCyclePagerView.m in Sources */, 539996342C26D41300671340 /* OCRViewController.swift in Sources */, 53014F902C11A8E80071CE39 /* CaptureSessionManager.swift in Sources */, 539996912C27130000671340 /* ConstraintView.swift in Sources */, ECA1FAA4254DEB140081F00B /* CustomPDFView.swift in Sources */, 53014FA32C11A8E80071CE39 /* ZoomGestureController.swift in Sources */, - 53EDED962C18387E00DB8DF9 /* TYPageControl.m in Sources */, 5399964C2C26E86700671340 /* CDCameraView.m in Sources */, 5399969B2C27130000671340 /* ConstraintView+Extensions.swift in Sources */, 53E3A2092C19D17100C9B95E /* PreviewImageViewController.swift in Sources */, diff --git a/MiniScanner.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate b/MiniScanner.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate index 7305b6b567fe33d2551efbbdb1d2286b354ffa56..719752d00ece37543010fea0bc83f99804f94de3 100644 Binary files a/MiniScanner.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate and b/MiniScanner.xcworkspace/xcuserdata/g.makhoul.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/MiniScanner/Supporting Files/.DS_Store b/MiniScanner/Supporting Files/.DS_Store index c331cc559e0e044a054d0a099e4b06abd7fa22d0..ee9cd30b2743fed5e928ce37fc1af6e7b3327333 100644 Binary files a/MiniScanner/Supporting Files/.DS_Store and b/MiniScanner/Supporting Files/.DS_Store differ diff --git a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerTransformLayout.h b/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerTransformLayout.h deleted file mode 100755 index ee8807e73034af4373675433f3a67bc99fbaf5f7..0000000000000000000000000000000000000000 --- a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerTransformLayout.h +++ /dev/null @@ -1,74 +0,0 @@ -// -// TYCyclePagerViewLayout.h -// TYCyclePagerViewDemo -// -// Created by tany on 2017/6/19. -// Copyright © 2017年 tany. All rights reserved. -// - -#import <UIKit/UIKit.h> - -NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(NSUInteger, TYCyclePagerTransformLayoutType) { - TYCyclePagerTransformLayoutNormal, - TYCyclePagerTransformLayoutLinear, - TYCyclePagerTransformLayoutCoverflow, -}; - -@class TYCyclePagerTransformLayout; -@protocol TYCyclePagerTransformLayoutDelegate <NSObject> - -// initialize layout attributes -- (void)pagerViewTransformLayout:(TYCyclePagerTransformLayout *)pagerViewTransformLayout initializeTransformAttributes:(UICollectionViewLayoutAttributes *)attributes; - -// apply layout attributes -- (void)pagerViewTransformLayout:(TYCyclePagerTransformLayout *)pagerViewTransformLayout applyTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes; - -@end - - -@interface TYCyclePagerViewLayout : NSObject - -@property (nonatomic, assign) CGSize itemSize; -@property (nonatomic, assign) CGFloat itemSpacing; -@property (nonatomic, assign) UIEdgeInsets sectionInset; - -@property (nonatomic, assign) TYCyclePagerTransformLayoutType layoutType; - -@property (nonatomic, assign) CGFloat minimumScale; // sacle default 0.8 -@property (nonatomic, assign) CGFloat minimumAlpha; // alpha default 1.0 -@property (nonatomic, assign) CGFloat maximumAngle; // angle is % default 0.2 - -@property (nonatomic, assign) BOOL isInfiniteLoop; // infinte scroll -@property (nonatomic, assign) CGFloat rateOfChange; // scale and angle change rate -@property (nonatomic, assign) BOOL adjustSpacingWhenScroling; - -/** - pageView cell item vertical centering - */ -@property (nonatomic, assign) BOOL itemVerticalCenter; - -/** - first and last item horizontalc enter, when isInfiniteLoop is NO - */ -@property (nonatomic, assign) BOOL itemHorizontalCenter; - -// sectionInset -@property (nonatomic, assign, readonly) UIEdgeInsets onlyOneSectionInset; -@property (nonatomic, assign, readonly) UIEdgeInsets firstSectionInset; -@property (nonatomic, assign, readonly) UIEdgeInsets lastSectionInset; -@property (nonatomic, assign, readonly) UIEdgeInsets middleSectionInset; - -@end - - -@interface TYCyclePagerTransformLayout : UICollectionViewFlowLayout - -@property (nonatomic, strong) TYCyclePagerViewLayout *layout; - -@property (nonatomic, weak, nullable) id<TYCyclePagerTransformLayoutDelegate> delegate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerTransformLayout.m b/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerTransformLayout.m deleted file mode 100755 index 8bd77ba16c8e36538690f7c2d097f60640d4bb4d..0000000000000000000000000000000000000000 --- a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerTransformLayout.m +++ /dev/null @@ -1,300 +0,0 @@ -// -// TYCyclePagerViewLayout.m -// TYCyclePagerViewDemo -// -// Created by tany on 2017/6/19. -// Copyright © 2017年 tany. All rights reserved. -// - -#import "TYCyclePagerTransformLayout.h" - -typedef NS_ENUM(NSUInteger, TYTransformLayoutItemDirection) { - TYTransformLayoutItemLeft, - TYTransformLayoutItemCenter, - TYTransformLayoutItemRight, -}; - - -@interface TYCyclePagerTransformLayout () { - struct { - unsigned int applyTransformToAttributes :1; - unsigned int initializeTransformAttributes :1; - }_delegateFlags; -} - -@property (nonatomic, assign) BOOL applyTransformToAttributesDelegate; - -@end - - -@interface TYCyclePagerViewLayout () - -@property (nonatomic, weak) UIView *pageView; - -@end - - -@implementation TYCyclePagerTransformLayout - -- (instancetype)init { - if (self = [super init]) { - self.scrollDirection = UICollectionViewScrollDirectionHorizontal; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if (self = [super initWithCoder:aDecoder]) { - self.scrollDirection = UICollectionViewScrollDirectionHorizontal; - } - return self; -} - -#pragma mark - getter setter - -- (void)setDelegate:(id<TYCyclePagerTransformLayoutDelegate>)delegate { - _delegate = delegate; - _delegateFlags.initializeTransformAttributes = [delegate respondsToSelector:@selector(pagerViewTransformLayout:initializeTransformAttributes:)]; - _delegateFlags.applyTransformToAttributes = [delegate respondsToSelector:@selector(pagerViewTransformLayout:applyTransformToAttributes:)]; -} - -- (void)setLayout:(TYCyclePagerViewLayout *)layout { - _layout = layout; - _layout.pageView = self.collectionView; - self.itemSize = _layout.itemSize; - self.minimumInteritemSpacing = _layout.itemSpacing; - self.minimumLineSpacing = _layout.itemSpacing; -} - -- (CGSize)itemSize { - if (!_layout) { - return [super itemSize]; - } - return _layout.itemSize; -} - -- (CGFloat)minimumLineSpacing { - if (!_layout) { - return [super minimumLineSpacing]; - } - return _layout.itemSpacing; -} - -- (CGFloat)minimumInteritemSpacing { - if (!_layout) { - return [super minimumInteritemSpacing]; - } - return _layout.itemSpacing; -} - -- (TYTransformLayoutItemDirection)directionWithCenterX:(CGFloat)centerX { - TYTransformLayoutItemDirection direction= TYTransformLayoutItemRight; - CGFloat contentCenterX = self.collectionView.contentOffset.x + CGRectGetWidth(self.collectionView.frame)/2; - if (ABS(centerX - contentCenterX) < 0.5) { - direction = TYTransformLayoutItemCenter; - }else if (centerX - contentCenterX < 0) { - direction = TYTransformLayoutItemLeft; - } - return direction; -} - -#pragma mark - layout - --(BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds -{ - return _layout.layoutType == TYCyclePagerTransformLayoutNormal ? [super shouldInvalidateLayoutForBoundsChange:newBounds] : YES; -} - -- (NSArray<UICollectionViewLayoutAttributes *> *)layoutAttributesForElementsInRect:(CGRect)rect { - if (_delegateFlags.applyTransformToAttributes || _layout.layoutType != TYCyclePagerTransformLayoutNormal) { - NSArray *attributesArray = [[NSArray alloc] initWithArray:[super layoutAttributesForElementsInRect:rect] copyItems:YES]; - CGRect visibleRect = {self.collectionView.contentOffset,self.collectionView.bounds.size}; - for (UICollectionViewLayoutAttributes *attributes in attributesArray) { - if (!CGRectIntersectsRect(visibleRect, attributes.frame)) { - continue; - } - if (_delegateFlags.applyTransformToAttributes) { - [_delegate pagerViewTransformLayout:self applyTransformToAttributes:attributes]; - }else { - [self applyTransformToAttributes:attributes layoutType:_layout.layoutType]; - } - } - return attributesArray; - } - return [super layoutAttributesForElementsInRect:rect]; -} - -- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath { - UICollectionViewLayoutAttributes *attributes = [super layoutAttributesForItemAtIndexPath:indexPath]; - if (_delegateFlags.initializeTransformAttributes) { - [_delegate pagerViewTransformLayout:self initializeTransformAttributes:attributes]; - }else if(_layout.layoutType != TYCyclePagerTransformLayoutNormal){ - [self initializeTransformAttributes:attributes layoutType:_layout.layoutType]; - } - return attributes; -} - -#pragma mark - transform - -- (void)initializeTransformAttributes:(UICollectionViewLayoutAttributes *)attributes layoutType:(TYCyclePagerTransformLayoutType)layoutType { - switch (layoutType) { - case TYCyclePagerTransformLayoutLinear: - [self applyLinearTransformToAttributes:attributes scale:_layout.minimumScale alpha:_layout.minimumAlpha]; - break; - case TYCyclePagerTransformLayoutCoverflow: - { - [self applyCoverflowTransformToAttributes:attributes angle:_layout.maximumAngle alpha:_layout.minimumAlpha]; - break; - } - default: - break; - } -} - -- (void)applyTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes layoutType:(TYCyclePagerTransformLayoutType)layoutType { - switch (layoutType) { - case TYCyclePagerTransformLayoutLinear: - [self applyLinearTransformToAttributes:attributes]; - break; - case TYCyclePagerTransformLayoutCoverflow: - [self applyCoverflowTransformToAttributes:attributes]; - break; - default: - break; - } -} - -#pragma mark - LinearTransform - -- (void)applyLinearTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes { - CGFloat collectionViewWidth = self.collectionView.frame.size.width; - if (collectionViewWidth <= 0) { - return; - } - CGFloat centetX = self.collectionView.contentOffset.x + collectionViewWidth/2; - CGFloat delta = ABS(attributes.center.x - centetX); - CGFloat scale = MAX(1 - delta/collectionViewWidth*_layout.rateOfChange, _layout.minimumScale); - CGFloat alpha = MAX(1 - delta/collectionViewWidth, _layout.minimumAlpha); - [self applyLinearTransformToAttributes:attributes scale:scale alpha:alpha]; -} - -- (void)applyLinearTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes scale:(CGFloat)scale alpha:(CGFloat)alpha { - CGAffineTransform transform = CGAffineTransformMakeScale(scale, scale); - if (_layout.adjustSpacingWhenScroling) { - TYTransformLayoutItemDirection direction = [self directionWithCenterX:attributes.center.x]; - CGFloat translate = 0; - switch (direction) { - case TYTransformLayoutItemLeft: - translate = 1.15 * attributes.size.width*(1-scale)/2; - break; - case TYTransformLayoutItemRight: - translate = -1.15 * attributes.size.width*(1-scale)/2; - break; - default: - // center - scale = 1.0; - alpha = 1.0; - break; - } - transform = CGAffineTransformTranslate(transform,translate, 0); - } - attributes.transform = transform; - attributes.alpha = alpha; -} - -#pragma mark - CoverflowTransform - -- (void)applyCoverflowTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes{ - CGFloat collectionViewWidth = self.collectionView.frame.size.width; - if (collectionViewWidth <= 0) { - return; - } - CGFloat centetX = self.collectionView.contentOffset.x + collectionViewWidth/2; - CGFloat delta = ABS(attributes.center.x - centetX); - CGFloat angle = MIN(delta/collectionViewWidth*(1-_layout.rateOfChange), _layout.maximumAngle); - CGFloat alpha = MAX(1 - delta/collectionViewWidth, _layout.minimumAlpha); - [self applyCoverflowTransformToAttributes:attributes angle:angle alpha:alpha]; -} - -- (void)applyCoverflowTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes angle:(CGFloat)angle alpha:(CGFloat)alpha { - TYTransformLayoutItemDirection direction = [self directionWithCenterX:attributes.center.x]; - CATransform3D transform3D = CATransform3DIdentity; - transform3D.m34 = -0.002; - CGFloat translate = 0; - switch (direction) { - case TYTransformLayoutItemLeft: - translate = (1-cos(angle*1.2*M_PI))*attributes.size.width; - break; - case TYTransformLayoutItemRight: - translate = -(1-cos(angle*1.2*M_PI))*attributes.size.width; - angle = -angle; - break; - default: - // center - angle = 0; - alpha = 1; - break; - } - - transform3D = CATransform3DRotate(transform3D, M_PI*angle, 0, 1, 0); - if (_layout.adjustSpacingWhenScroling) { - transform3D = CATransform3DTranslate(transform3D, translate, 0, 0); - } - attributes.transform3D = transform3D; - attributes.alpha = alpha; - -} -@end - - -@implementation TYCyclePagerViewLayout - -- (instancetype)init { - if (self = [super init]) { - _itemVerticalCenter = YES; - _minimumScale = 0.8; - _minimumAlpha = 1.0; - _maximumAngle = 0.2; - _rateOfChange = 0.4; - _adjustSpacingWhenScroling = YES; - } - return self; -} - -#pragma mark - getter - -- (UIEdgeInsets)onlyOneSectionInset { - CGFloat leftSpace = _pageView && !_isInfiniteLoop && _itemHorizontalCenter ? (CGRectGetWidth(_pageView.frame) - _itemSize.width)/2 : _sectionInset.left; - CGFloat rightSpace = _pageView && !_isInfiniteLoop && _itemHorizontalCenter ? (CGRectGetWidth(_pageView.frame) - _itemSize.width)/2 : _sectionInset.right; - if (_itemVerticalCenter) { - CGFloat verticalSpace = (CGRectGetHeight(_pageView.frame) - _itemSize.height)/2; - return UIEdgeInsetsMake(verticalSpace, leftSpace, verticalSpace, rightSpace); - } - return UIEdgeInsetsMake(_sectionInset.top, leftSpace, _sectionInset.bottom, rightSpace); -} - -- (UIEdgeInsets)firstSectionInset { - if (_itemVerticalCenter) { - CGFloat verticalSpace = (CGRectGetHeight(_pageView.frame) - _itemSize.height)/2; - return UIEdgeInsetsMake(verticalSpace, _sectionInset.left, verticalSpace, _itemSpacing); - } - return UIEdgeInsetsMake(_sectionInset.top, _sectionInset.left, _sectionInset.bottom, _itemSpacing); -} - -- (UIEdgeInsets)lastSectionInset { - if (_itemVerticalCenter) { - CGFloat verticalSpace = (CGRectGetHeight(_pageView.frame) - _itemSize.height)/2; - return UIEdgeInsetsMake(verticalSpace, 0, verticalSpace, _sectionInset.right); - } - return UIEdgeInsetsMake(_sectionInset.top, 0, _sectionInset.bottom, _sectionInset.right); -} - -- (UIEdgeInsets)middleSectionInset { - if (_itemVerticalCenter) { - CGFloat verticalSpace = (CGRectGetHeight(_pageView.frame) - _itemSize.height)/2; - return UIEdgeInsetsMake(verticalSpace, 0, verticalSpace, _itemSpacing); - } - return _sectionInset; -} - -@end diff --git a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerView.h b/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerView.h deleted file mode 100755 index c9c70a40951756f91619cc546e58df4bbd770c0c..0000000000000000000000000000000000000000 --- a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerView.h +++ /dev/null @@ -1,180 +0,0 @@ -// -// TYCyclePagerView.h -// TYCyclePagerViewDemo -// -// Created by tany on 2017/6/14. -// Copyright © 2017年 tany. All rights reserved. -// - -#import <UIKit/UIKit.h> -#import "TYCyclePagerTransformLayout.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef struct { - NSInteger index; - NSInteger section; -}TYIndexSection; - -// pagerView scrolling direction -typedef NS_ENUM(NSUInteger, TYPagerScrollDirection) { - TYPagerScrollDirectionLeft, - TYPagerScrollDirectionRight, -}; - -@class TYCyclePagerView; -@protocol TYCyclePagerViewDataSource <NSObject> - -- (NSInteger)numberOfItemsInPagerView:(TYCyclePagerView *)pageView; - -- (__kindof UICollectionViewCell *)pagerView:(TYCyclePagerView *)pagerView cellForItemAtIndex:(NSInteger)index; - -/** - return pagerView layout,and cache layout - */ -- (TYCyclePagerViewLayout *)layoutForPagerView:(TYCyclePagerView *)pageView; - -@end - -@protocol TYCyclePagerViewDelegate <NSObject> - -@optional - -/** - pagerView did scroll to new index page - */ -- (void)pagerView:(TYCyclePagerView *)pageView didScrollFromIndex:(NSInteger)fromIndex toIndex:(NSInteger)toIndex; - -/** - pagerView did selected item cell - */ -- (void)pagerView:(TYCyclePagerView *)pageView didSelectedItemCell:(__kindof UICollectionViewCell *)cell atIndex:(NSInteger)index; -- (void)pagerView:(TYCyclePagerView *)pageView didSelectedItemCell:(__kindof UICollectionViewCell *)cell atIndexSection:(TYIndexSection)indexSection; - -// custom layout -- (void)pagerView:(TYCyclePagerView *)pageView initializeTransformAttributes:(UICollectionViewLayoutAttributes *)attributes; - -- (void)pagerView:(TYCyclePagerView *)pageView applyTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes; - - -// scrollViewDelegate - -- (void)pagerViewDidScroll:(TYCyclePagerView *)pageView; - -- (void)pagerViewWillBeginDragging:(TYCyclePagerView *)pageView; - -- (void)pagerViewDidEndDragging:(TYCyclePagerView *)pageView willDecelerate:(BOOL)decelerate; - -- (void)pagerViewWillBeginDecelerating:(TYCyclePagerView *)pageView; - -- (void)pagerViewDidEndDecelerating:(TYCyclePagerView *)pageView; - -- (void)pagerViewWillBeginScrollingAnimation:(TYCyclePagerView *)pageView; - -- (void)pagerViewDidEndScrollingAnimation:(TYCyclePagerView *)pageView; - -@end - - -@interface TYCyclePagerView : UIView - -// will be automatically resized to track the size of the pagerView -@property (nonatomic, strong, nullable) UIView *backgroundView; - -@property (nonatomic, weak, nullable) id<TYCyclePagerViewDataSource> dataSource; -@property (nonatomic, weak, nullable) id<TYCyclePagerViewDelegate> delegate; - -// pager view, don't set dataSource and delegate -@property (nonatomic, weak, readonly) UICollectionView *collectionView; -// pager view layout -@property (nonatomic, strong, readonly) TYCyclePagerViewLayout *layout; - -/** - is infinite cycle pageview - */ -@property (nonatomic, assign) BOOL isInfiniteLoop; - -/** - pagerView automatic scroll time interval, default 0,disable automatic - */ -@property (nonatomic, assign) CGFloat autoScrollInterval; - -@property (nonatomic, assign) BOOL reloadDataNeedResetIndex; - -/** - current page index - */ -@property (nonatomic, assign, readonly) NSInteger curIndex; -@property (nonatomic, assign, readonly) TYIndexSection indexSection; - -// scrollView property -@property (nonatomic, assign, readonly) CGPoint contentOffset; -@property (nonatomic, assign, readonly) BOOL tracking; -@property (nonatomic, assign, readonly) BOOL dragging; -@property (nonatomic, assign, readonly) BOOL decelerating; - - -/** - reload data, !!important!!: will clear layout and call delegate layoutForPagerView - */ -- (void)reloadData; - -/** - update data is reload data, but not clear layuot - */ -- (void)updateData; - -/** - if you only want update layout - */ -- (void)setNeedUpdateLayout; - -/** - will set layout nil and call delegate->layoutForPagerView - */ -- (void)setNeedClearLayout; - -/** - current index cell in pagerView - */ -- (__kindof UICollectionViewCell * _Nullable)curIndexCell; - -/** - visible cells in pageView - */ -- (NSArray<__kindof UICollectionViewCell *> *_Nullable)visibleCells; - - -/** - visible pageView indexs, maybe repeat index - */ -- (NSArray *)visibleIndexs; - -/** - scroll to item at index - */ -- (void)scrollToItemAtIndex:(NSInteger)index animate:(BOOL)animate; -- (void)scrollToItemAtIndexSection:(TYIndexSection)indexSection animate:(BOOL)animate; -/** - scroll to next or pre item - */ -- (void)scrollToNearlyIndexAtDirection:(TYPagerScrollDirection)direction animate:(BOOL)animate; - -/** - register pager view cell with class - */ -- (void)registerClass:(Class)Class forCellWithReuseIdentifier:(NSString *)identifier; - -/** - register pager view cell with nib - */ -- (void)registerNib:(UINib *)nib forCellWithReuseIdentifier:(NSString *)identifier; - -/** - dequeue reusable cell for pagerView - */ -- (__kindof UICollectionViewCell *)dequeueReusableCellWithReuseIdentifier:(NSString *)identifier forIndex:(NSInteger)index; - -@end - -NS_ASSUME_NONNULL_END diff --git a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerView.m b/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerView.m deleted file mode 100755 index a2f42d52524079365ca2e2a883f946ec43962c3f..0000000000000000000000000000000000000000 --- a/MiniScanner/Supporting Files/CyclePagerView/TYCyclePagerView.m +++ /dev/null @@ -1,607 +0,0 @@ -// -// TYCyclePagerView.m -// TYCyclePagerViewDemo -// -// Created by tany on 2017/6/14. -// Copyright © 2017年 tany. All rights reserved. -// - -#import "TYCyclePagerView.h" - -NS_INLINE BOOL TYEqualIndexSection(TYIndexSection indexSection1,TYIndexSection indexSection2) { - return indexSection1.index == indexSection2.index && indexSection1.section == indexSection2.section; -} - -NS_INLINE TYIndexSection TYMakeIndexSection(NSInteger index, NSInteger section) { - TYIndexSection indexSection; - indexSection.index = index; - indexSection.section = section; - return indexSection; -} - -@interface TYCyclePagerView () <UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, TYCyclePagerTransformLayoutDelegate> { - struct { - unsigned int pagerViewDidScroll :1; - unsigned int didScrollFromIndexToNewIndex :1; - unsigned int initializeTransformAttributes :1; - unsigned int applyTransformToAttributes :1; - }_delegateFlags; - struct { - unsigned int cellForItemAtIndex :1; - unsigned int layoutForPagerView :1; - }_dataSourceFlags; -} - -// UI -@property (nonatomic, weak) UICollectionView *collectionView; -@property (nonatomic, strong) TYCyclePagerViewLayout *layout; -@property (nonatomic, strong) NSTimer *timer; - -// Data -@property (nonatomic, assign) NSInteger numberOfItems; - -@property (nonatomic, assign) NSInteger dequeueSection; -@property (nonatomic, assign) TYIndexSection beginDragIndexSection; -@property (nonatomic, assign) NSInteger firstScrollIndex; - -@property (nonatomic, assign) BOOL needClearLayout; -@property (nonatomic, assign) BOOL didReloadData; -@property (nonatomic, assign) BOOL didLayout; -@property (nonatomic, assign) BOOL needResetIndex; - -@end - -#define kPagerViewMaxSectionCount 200 -#define kPagerViewMinSectionCount 18 - -@implementation TYCyclePagerView - -#pragma mark - life Cycle - -- (instancetype)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - [self configureProperty]; - - [self addCollectionView]; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if (self = [super initWithCoder:aDecoder]) { - [self configureProperty]; - - [self addCollectionView]; - } - return self; -} - -- (void)configureProperty { - _needResetIndex = NO; - _didReloadData = NO; - _didLayout = NO; - _autoScrollInterval = 0; - _isInfiniteLoop = YES; - _beginDragIndexSection.index = 0; - _beginDragIndexSection.section = 0; - _indexSection.index = -1; - _indexSection.section = -1; - _firstScrollIndex = -1; -} - -- (void)addCollectionView { - TYCyclePagerTransformLayout *layout = [[TYCyclePagerTransformLayout alloc]init]; - UICollectionView *collectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:layout]; - layout.delegate = _delegateFlags.applyTransformToAttributes ? self : nil;; - collectionView.backgroundColor = [UIColor clearColor]; - collectionView.dataSource = self; - collectionView.delegate = self; - collectionView.pagingEnabled = NO; - collectionView.decelerationRate = 1-0.0076; - if ([collectionView respondsToSelector:@selector(setPrefetchingEnabled:)]) { - collectionView.prefetchingEnabled = NO; - } - collectionView.showsHorizontalScrollIndicator = NO; - collectionView.showsVerticalScrollIndicator = NO; - [self addSubview:collectionView]; - _collectionView = collectionView; -} - -- (void)willMoveToSuperview:(UIView *)newSuperview { - if (!newSuperview) { - [self removeTimer]; - }else { - [self removeTimer]; - if (_autoScrollInterval > 0) { - [self addTimer]; - } - } -} - - -#pragma mark - timer - -- (void)addTimer { - if (_timer || _autoScrollInterval <= 0) { - return; - } - _timer = [NSTimer timerWithTimeInterval:_autoScrollInterval target:self selector:@selector(timerFired:) userInfo:nil repeats:YES]; - [[NSRunLoop mainRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes]; -} - -- (void)removeTimer { - if (!_timer) { - return; - } - [_timer invalidate]; - _timer = nil; -} - -- (void)timerFired:(NSTimer *)timer { - if (!self.superview || !self.window || _numberOfItems == 0 || self.tracking) { - return; - } - - [self scrollToNearlyIndexAtDirection:TYPagerScrollDirectionRight animate:YES]; -} - -#pragma mark - getter - -- (TYCyclePagerViewLayout *)layout { - if (!_layout) { - if (_dataSourceFlags.layoutForPagerView) { - _layout = [_dataSource layoutForPagerView:self]; - _layout.isInfiniteLoop = _isInfiniteLoop; - } - if (_layout.itemSize.width <= 0 || _layout.itemSize.height <= 0) { - _layout = nil; - } - } - return _layout; -} - -- (NSInteger)curIndex { - return _indexSection.index; -} - -- (CGPoint)contentOffset { - return _collectionView.contentOffset; -} - -- (BOOL)tracking { - return _collectionView.tracking; -} - -- (BOOL)dragging { - return _collectionView.dragging; -} - -- (BOOL)decelerating { - return _collectionView.decelerating; -} - -- (UIView *)backgroundView { - return _collectionView.backgroundView; -} - -- (__kindof UICollectionViewCell *)curIndexCell { - return [_collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForItem:_indexSection.index inSection:_indexSection.section]]; -} - -- (NSArray<__kindof UICollectionViewCell *> *)visibleCells { - return _collectionView.visibleCells; -} - -- (NSArray *)visibleIndexs { - NSMutableArray *indexs = [NSMutableArray array]; - for (NSIndexPath *indexPath in _collectionView.indexPathsForVisibleItems) { - [indexs addObject:@(indexPath.item)]; - } - return [indexs copy]; -} - -#pragma mark - setter - -- (void)setBackgroundView:(UIView *)backgroundView { - [_collectionView setBackgroundView:backgroundView]; -} - -- (void)setAutoScrollInterval:(CGFloat)autoScrollInterval { - _autoScrollInterval = autoScrollInterval; - [self removeTimer]; - if (autoScrollInterval > 0 && self.superview) { - [self addTimer]; - } -} - -- (void)setDelegate:(id<TYCyclePagerViewDelegate>)delegate { - _delegate = delegate; - _delegateFlags.pagerViewDidScroll = [delegate respondsToSelector:@selector(pagerViewDidScroll:)]; - _delegateFlags.didScrollFromIndexToNewIndex = [delegate respondsToSelector:@selector(pagerView:didScrollFromIndex:toIndex:)]; - _delegateFlags.initializeTransformAttributes = [delegate respondsToSelector:@selector(pagerView:initializeTransformAttributes:)]; - _delegateFlags.applyTransformToAttributes = [delegate respondsToSelector:@selector(pagerView:applyTransformToAttributes:)]; - if (self.collectionView && self.collectionView.collectionViewLayout) { - ((TYCyclePagerTransformLayout *)self.collectionView.collectionViewLayout).delegate = _delegateFlags.applyTransformToAttributes ? self : nil; - } -} - -- (void)setDataSource:(id<TYCyclePagerViewDataSource>)dataSource { - _dataSource = dataSource; - _dataSourceFlags.cellForItemAtIndex = [dataSource respondsToSelector:@selector(pagerView:cellForItemAtIndex:)]; - _dataSourceFlags.layoutForPagerView = [dataSource respondsToSelector:@selector(layoutForPagerView:)]; -} - -#pragma mark - public - -- (void)reloadData { - _didReloadData = YES; - _needResetIndex = YES; - [self setNeedClearLayout]; - [self clearLayout]; - [self updateData]; -} - -// not clear layout -- (void)updateData { - [self updateLayout]; - _numberOfItems = [_dataSource numberOfItemsInPagerView:self]; - [_collectionView reloadData]; - if (!_didLayout && !CGRectIsEmpty(self.collectionView.frame) && _indexSection.index < 0) { - _didLayout = YES; - } - BOOL needResetIndex = _needResetIndex && _reloadDataNeedResetIndex; - _needResetIndex = NO; - if (needResetIndex) { - [self removeTimer]; - } - [self resetPagerViewAtIndex:(_indexSection.index < 0 && !CGRectIsEmpty(self.collectionView.frame)) || needResetIndex ? 0 :_indexSection.index]; - if (needResetIndex) { - [self addTimer]; - } -} - -- (void)scrollToNearlyIndexAtDirection:(TYPagerScrollDirection)direction animate:(BOOL)animate { - TYIndexSection indexSection = [self nearlyIndexPathAtDirection:direction]; - [self scrollToItemAtIndexSection:indexSection animate:animate]; -} - -- (void)scrollToItemAtIndex:(NSInteger)index animate:(BOOL)animate { - if (!_didLayout && _didReloadData) { - _firstScrollIndex = index; - }else { - _firstScrollIndex = -1; - } - if (!_isInfiniteLoop) { - [self scrollToItemAtIndexSection:TYMakeIndexSection(index, 0) animate:animate]; - return; - } - - [self scrollToItemAtIndexSection:TYMakeIndexSection(index, index >= self.curIndex ? _indexSection.section : _indexSection.section+1) animate:animate]; -} - -- (void)scrollToItemAtIndexSection:(TYIndexSection)indexSection animate:(BOOL)animate { - if (_numberOfItems <= 0 || ![self isValidIndexSection:indexSection]) { - //NSLog(@"scrollToItemAtIndex: item indexSection is invalid!"); - return; - } - - if (animate && [_delegate respondsToSelector:@selector(pagerViewWillBeginScrollingAnimation:)]) { - [_delegate pagerViewWillBeginScrollingAnimation:self]; - } - CGFloat offset = [self caculateOffsetXAtIndexSection:indexSection]; - [_collectionView setContentOffset:CGPointMake(offset, _collectionView.contentOffset.y) animated:animate]; -} - -- (void)registerClass:(Class)Class forCellWithReuseIdentifier:(NSString *)identifier { - [_collectionView registerClass:Class forCellWithReuseIdentifier:identifier]; -} - -- (void)registerNib:(UINib *)nib forCellWithReuseIdentifier:(NSString *)identifier { - [_collectionView registerNib:nib forCellWithReuseIdentifier:identifier]; -} - -- (__kindof UICollectionViewCell *)dequeueReusableCellWithReuseIdentifier:(NSString *)identifier forIndex:(NSInteger)index { - UICollectionViewCell *cell = [_collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:[NSIndexPath indexPathForItem:index inSection:_dequeueSection]]; - return cell; -} - -#pragma mark - configure layout - -- (void)updateLayout { - if (!self.layout) { - return; - } - self.layout.isInfiniteLoop = _isInfiniteLoop; - ((TYCyclePagerTransformLayout *)_collectionView.collectionViewLayout).layout = self.layout; -} - -- (void)clearLayout { - if (_needClearLayout) { - _layout = nil; - _needClearLayout = NO; - } -} - -- (void)setNeedClearLayout { - _needClearLayout = YES; -} - -- (void)setNeedUpdateLayout { - if (!self.layout) { - return; - } - [self clearLayout]; - [self updateLayout]; - [_collectionView.collectionViewLayout invalidateLayout]; - [self resetPagerViewAtIndex:_indexSection.index < 0 ? 0 :_indexSection.index]; -} - -#pragma mark - pager index - -- (BOOL)isValidIndexSection:(TYIndexSection)indexSection { - return indexSection.index >= 0 && indexSection.index < _numberOfItems && indexSection.section >= 0 && indexSection.section < kPagerViewMaxSectionCount; -} - -- (TYIndexSection)nearlyIndexPathAtDirection:(TYPagerScrollDirection)direction{ - return [self nearlyIndexPathForIndexSection:_indexSection direction:direction]; -} - -- (TYIndexSection)nearlyIndexPathForIndexSection:(TYIndexSection)indexSection direction:(TYPagerScrollDirection)direction { - if (indexSection.index < 0 || indexSection.index >= _numberOfItems) { - return indexSection; - } - - if (!_isInfiniteLoop) { - if (direction == TYPagerScrollDirectionRight && indexSection.index == _numberOfItems - 1) { - return _autoScrollInterval > 0 ? TYMakeIndexSection(0, 0) : indexSection; - } else if (direction == TYPagerScrollDirectionRight) { - return TYMakeIndexSection(indexSection.index+1, 0); - } - - if (indexSection.index == 0) { - return _autoScrollInterval > 0 ? TYMakeIndexSection(_numberOfItems - 1, 0) : indexSection; - } - return TYMakeIndexSection(indexSection.index-1, 0); - } - - if (direction == TYPagerScrollDirectionRight) { - if (indexSection.index < _numberOfItems-1) { - return TYMakeIndexSection(indexSection.index+1, indexSection.section); - } - if (indexSection.section >= kPagerViewMaxSectionCount-1) { - return TYMakeIndexSection(indexSection.index, kPagerViewMaxSectionCount-1); - } - return TYMakeIndexSection(0, indexSection.section+1); - } - - if (indexSection.index > 0) { - return TYMakeIndexSection(indexSection.index-1, indexSection.section); - } - if (indexSection.section <= 0) { - return TYMakeIndexSection(indexSection.index, 0); - } - return TYMakeIndexSection(_numberOfItems-1, indexSection.section-1); -} - -- (TYIndexSection)caculateIndexSectionWithOffsetX:(CGFloat)offsetX { - if (_numberOfItems <= 0) { - return TYMakeIndexSection(0, 0); - } - UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)_collectionView.collectionViewLayout; - CGFloat leftEdge = _isInfiniteLoop ? _layout.sectionInset.left : _layout.onlyOneSectionInset.left; - CGFloat width = CGRectGetWidth(_collectionView.frame); - CGFloat middleOffset = offsetX + width/2; - CGFloat itemWidth = layout.itemSize.width + layout.minimumInteritemSpacing; - NSInteger curIndex = 0; - NSInteger curSection = 0; - if (middleOffset - leftEdge >= 0) { - NSInteger itemIndex = (middleOffset - leftEdge+layout.minimumInteritemSpacing/2)/itemWidth; - if (itemIndex < 0) { - itemIndex = 0; - }else if (itemIndex >= _numberOfItems*kPagerViewMaxSectionCount) { - itemIndex = _numberOfItems*kPagerViewMaxSectionCount-1; - } - curIndex = itemIndex%_numberOfItems; - curSection = itemIndex/_numberOfItems; - } - return TYMakeIndexSection(curIndex, curSection); -} - -- (CGFloat)caculateOffsetXAtIndexSection:(TYIndexSection)indexSection{ - if (_numberOfItems == 0) { - return 0; - } - UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)_collectionView.collectionViewLayout; - UIEdgeInsets edge = _isInfiniteLoop ? _layout.sectionInset : _layout.onlyOneSectionInset; - CGFloat leftEdge = edge.left; - CGFloat rightEdge = edge.right; - CGFloat width = CGRectGetWidth(_collectionView.frame); - CGFloat itemWidth = layout.itemSize.width + layout.minimumInteritemSpacing; - CGFloat offsetX = 0; - if (!_isInfiniteLoop && !_layout.itemHorizontalCenter && indexSection.index == _numberOfItems - 1) { - offsetX = leftEdge + itemWidth*(indexSection.index + indexSection.section*_numberOfItems) - (width - itemWidth) - layout.minimumInteritemSpacing + rightEdge; - }else { - offsetX = leftEdge + itemWidth*(indexSection.index + indexSection.section*_numberOfItems) - layout.minimumInteritemSpacing/2 - (width - itemWidth)/2; - } - return MAX(offsetX, 0); -} - -- (void)resetPagerViewAtIndex:(NSInteger)index { - if (_didLayout && _firstScrollIndex >= 0) { - index = _firstScrollIndex; - _firstScrollIndex = -1; - } - if (index < 0) { - return; - } - if (index >= _numberOfItems) { - index = 0; - } - [self scrollToItemAtIndexSection:TYMakeIndexSection(index, _isInfiniteLoop ? kPagerViewMaxSectionCount/3 : 0) animate:NO]; - if (!_isInfiniteLoop && _indexSection.index < 0) { - [self scrollViewDidScroll:_collectionView]; - } -} - -- (void)recyclePagerViewIfNeed { - if (!_isInfiniteLoop) { - return; - } - if (_indexSection.section > kPagerViewMaxSectionCount - kPagerViewMinSectionCount || _indexSection.section < kPagerViewMinSectionCount) { - [self resetPagerViewAtIndex:_indexSection.index]; - } -} - -#pragma mark - UICollectionViewDataSource - -- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { - return _isInfiniteLoop ? kPagerViewMaxSectionCount : 1; -} - -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - _numberOfItems = [_dataSource numberOfItemsInPagerView:self]; - return _numberOfItems; -} - -- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - _dequeueSection = indexPath.section; - if (_dataSourceFlags.cellForItemAtIndex) { - return [_dataSource pagerView:self cellForItemAtIndex:indexPath.row]; - } - NSAssert(NO, @"pagerView cellForItemAtIndex: is nil!"); - return nil; -} - -#pragma mark - UICollectionViewDelegateFlowLayout - -- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { - if (!_isInfiniteLoop) { - return _layout.onlyOneSectionInset; - } - if (section == 0 ) { - return _layout.firstSectionInset; - }else if (section == kPagerViewMaxSectionCount -1) { - return _layout.lastSectionInset; - } - return _layout.middleSectionInset; -} - -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { - UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath]; - if ([_delegate respondsToSelector:@selector(pagerView:didSelectedItemCell:atIndex:)]) { - [_delegate pagerView:self didSelectedItemCell:cell atIndex:indexPath.item]; - } - if ([_delegate respondsToSelector:@selector(pagerView:didSelectedItemCell:atIndexSection:)]) { - [_delegate pagerView:self didSelectedItemCell:cell atIndexSection:TYMakeIndexSection(indexPath.item, indexPath.section)]; - } -} - -#pragma mark - UIScrollViewDelegate - -- (void)scrollViewDidScroll:(UIScrollView *)scrollView { - if (!_didLayout) { - return; - } - TYIndexSection newIndexSection = [self caculateIndexSectionWithOffsetX:scrollView.contentOffset.x]; - if (_numberOfItems <= 0 || ![self isValidIndexSection:newIndexSection]) { - NSLog(@"inVlaidIndexSection:(%ld,%ld)!",(long)newIndexSection.index,(long)newIndexSection.section); - return; - } - TYIndexSection indexSection = _indexSection; - _indexSection = newIndexSection; - - if (_delegateFlags.pagerViewDidScroll) { - [_delegate pagerViewDidScroll:self]; - } - - if (_delegateFlags.didScrollFromIndexToNewIndex && !TYEqualIndexSection(_indexSection, indexSection)) { - //NSLog(@"curIndex %ld",(long)_indexSection.index); - [_delegate pagerView:self didScrollFromIndex:MAX(indexSection.index, 0) toIndex:_indexSection.index]; - } -} - -- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { - if (_autoScrollInterval > 0) { - [self removeTimer]; - } - _beginDragIndexSection = [self caculateIndexSectionWithOffsetX:scrollView.contentOffset.x]; - if ([_delegate respondsToSelector:@selector(pagerViewWillBeginDragging:)]) { - [_delegate pagerViewWillBeginDragging:self]; - } -} - -- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset { - if (fabs(velocity.x) < 0.35 || !TYEqualIndexSection(_beginDragIndexSection, _indexSection)) { - targetContentOffset->x = [self caculateOffsetXAtIndexSection:_indexSection]; - return; - } - TYPagerScrollDirection direction = TYPagerScrollDirectionRight; - if ((scrollView.contentOffset.x < 0 && targetContentOffset->x <= 0) || (targetContentOffset->x < scrollView.contentOffset.x && scrollView.contentOffset.x < scrollView.contentSize.width - scrollView.frame.size.width)) { - direction = TYPagerScrollDirectionLeft; - } - TYIndexSection indexSection = [self nearlyIndexPathForIndexSection:_indexSection direction:direction]; - targetContentOffset->x = [self caculateOffsetXAtIndexSection:indexSection]; -} - -- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { - if (_autoScrollInterval > 0) { - [self addTimer]; - } - if ([_delegate respondsToSelector:@selector(pagerViewDidEndDragging:willDecelerate:)]) { - [_delegate pagerViewDidEndDragging:self willDecelerate:decelerate]; - } -} - -- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView { - if ([_delegate respondsToSelector:@selector(pagerViewWillBeginDecelerating:)]) { - [_delegate pagerViewWillBeginDecelerating:self]; - } -} - -- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { - [self recyclePagerViewIfNeed]; - if ([_delegate respondsToSelector:@selector(pagerViewDidEndDecelerating:)]) { - [_delegate pagerViewDidEndDecelerating:self]; - } -} - -- (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView { - [self recyclePagerViewIfNeed]; - if ([_delegate respondsToSelector:@selector(pagerViewDidEndScrollingAnimation:)]) { - [_delegate pagerViewDidEndScrollingAnimation:self]; - } -} - -#pragma mark - TYCyclePagerTransformLayoutDelegate - -- (void)pagerViewTransformLayout:(TYCyclePagerTransformLayout *)pagerViewTransformLayout initializeTransformAttributes:(UICollectionViewLayoutAttributes *)attributes { - if (_delegateFlags.initializeTransformAttributes) { - [_delegate pagerView:self initializeTransformAttributes:attributes]; - } -} - -- (void)pagerViewTransformLayout:(TYCyclePagerTransformLayout *)pagerViewTransformLayout applyTransformToAttributes:(UICollectionViewLayoutAttributes *)attributes { - if (_delegateFlags.applyTransformToAttributes) { - [_delegate pagerView:self applyTransformToAttributes:attributes]; - } -} - -- (void)layoutSubviews { - [super layoutSubviews]; - BOOL needUpdateLayout = !CGRectEqualToRect(_collectionView.frame, self.bounds); - _collectionView.frame = self.bounds; - if ((_indexSection.section < 0 || needUpdateLayout) && (_numberOfItems > 0 || _didReloadData)) { - _didLayout = YES; - [self setNeedUpdateLayout]; - } -} - -- (void)dealloc { - ((TYCyclePagerTransformLayout *)_collectionView.collectionViewLayout).delegate = nil; - _collectionView.delegate = nil; - _collectionView.dataSource = nil; -} - -@end - - diff --git a/MiniScanner/Supporting Files/CyclePagerView/TYPageControl.h b/MiniScanner/Supporting Files/CyclePagerView/TYPageControl.h deleted file mode 100755 index 584596a0a9875b06c2d78fca86ef972bff045350..0000000000000000000000000000000000000000 --- a/MiniScanner/Supporting Files/CyclePagerView/TYPageControl.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// TYPageControl.h -// TYCyclePagerViewDemo -// -// Created by tany on 2017/6/20. -// Copyright © 2017年 tany. All rights reserved. -// - -#import <UIKit/UIKit.h> - -NS_ASSUME_NONNULL_BEGIN - -@interface TYPageControl : UIControl - -@property (nonatomic, assign) NSInteger numberOfPages; // default is 0 -@property (nonatomic, assign) NSInteger currentPage; // default is 0. value pinned to 0..numberOfPages-1 - -@property (nonatomic, assign) BOOL hidesForSinglePage; // hide the the indicator if there is only one page. default is NO - -@property (nonatomic, assign) CGFloat pageIndicatorSpaing; -@property (nonatomic, assign) UIEdgeInsets contentInset; // center will ignore this -@property (nonatomic, assign ,readonly) CGSize contentSize; // real content size - -// override super -//@property (nonatomic, assign) UIControlContentVerticalAlignment contentVerticalAlignment; // how to position content vertically inside control. default is center -//@property (nonatomic, assign) UIControlContentHorizontalAlignment contentHorizontalAlignment; // how to position content hozontally inside control. default is center - -// indicatorTint color -@property (nullable, nonatomic,strong) UIColor *pageIndicatorTintColor; -@property (nullable, nonatomic,strong) UIColor *currentPageIndicatorTintColor; - -// indicator image -@property (nullable, nonatomic,strong) UIImage *pageIndicatorImage; -@property (nullable, nonatomic,strong) UIImage *currentPageIndicatorImage; - -@property (nonatomic, assign) UIViewContentMode indicatorImageContentMode; // default is UIViewContentModeCenter - -@property (nonatomic, assign) CGSize pageIndicatorSize; // indicator size -@property (nonatomic, assign) CGSize currentPageIndicatorSize; // default pageIndicatorSize - -@property (nonatomic, assign) CGFloat animateDuring; // default 0.3 - -- (void)setCurrentPage:(NSInteger)currentPage animate:(BOOL)animate; - -@end - -NS_ASSUME_NONNULL_END diff --git a/MiniScanner/Supporting Files/CyclePagerView/TYPageControl.m b/MiniScanner/Supporting Files/CyclePagerView/TYPageControl.m deleted file mode 100755 index 672998a08ca6795116251bfb0604c51d9cf43394..0000000000000000000000000000000000000000 --- a/MiniScanner/Supporting Files/CyclePagerView/TYPageControl.m +++ /dev/null @@ -1,285 +0,0 @@ -// -// TYPageControl.m -// TYCyclePagerViewDemo -// -// Created by tany on 2017/6/20. -// Copyright © 2017年 tany. All rights reserved. -// - -#import "TYPageControl.h" - -@interface TYPageControl () -// UI -@property (nonatomic, strong) NSArray<UIImageView *> *indicatorViews; - -// Data -@property (nonatomic, assign) BOOL forceUpdate; - -@end - -@implementation TYPageControl - -#pragma mark - life cycle - -- (instancetype)initWithFrame:(CGRect)frame { - if (self = [super initWithFrame:frame]) { - [self configurePropertys]; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)aDecoder { - if (self = [super initWithCoder:aDecoder]) { - [self configurePropertys]; - } - return self; -} - -- (void)configurePropertys { - self.userInteractionEnabled = NO; - _forceUpdate = NO; - _animateDuring = 0.3; - _pageIndicatorSpaing = 10; - _indicatorImageContentMode = UIViewContentModeCenter; - _pageIndicatorSize = CGSizeMake(6,6); - _currentPageIndicatorSize = _pageIndicatorSize; - _pageIndicatorTintColor = [UIColor colorWithRed:128/255. green:128/255. blue:128/255. alpha:1]; - _currentPageIndicatorTintColor = [UIColor whiteColor]; -} - -- (void)willMoveToSuperview:(UIView *)newSuperview { - [super willMoveToSuperview:newSuperview]; - if (newSuperview) { - _forceUpdate = YES; - [self updateIndicatorViews]; - _forceUpdate = NO; - } -} - -#pragma mark - getter setter - -- (CGSize)contentSize { - CGFloat width = (_indicatorViews.count - 1) * (_pageIndicatorSize.width + _pageIndicatorSpaing) + _pageIndicatorSize.width + _contentInset.left +_contentInset.right; - CGFloat height = _currentPageIndicatorSize.height + _contentInset.top + _contentInset.bottom; - return CGSizeMake(width, height); -} - -- (void)setNumberOfPages:(NSInteger)numberOfPages { - if (numberOfPages == _numberOfPages) { - return; - } - _numberOfPages = numberOfPages; - if (_currentPage >= numberOfPages) { - _currentPage = 0; - } - [self updateIndicatorViews]; - if (_indicatorViews.count > 0) { - [self setNeedsLayout]; - } -} - -- (void)setCurrentPage:(NSInteger)currentPage { - if (_currentPage == currentPage || _indicatorViews.count <= currentPage) { - return; - } - _currentPage = currentPage; - if (!CGSizeEqualToSize(_currentPageIndicatorSize, _pageIndicatorSize)) { - [self setNeedsLayout]; - } - [self updateIndicatorViewsBehavior]; - if (self.userInteractionEnabled) { - [self sendActionsForControlEvents:UIControlEventValueChanged]; - } -} - -- (void)setCurrentPage:(NSInteger)currentPage animate:(BOOL)animate { - if (animate) { - [UIView animateWithDuration:_animateDuring animations:^{ - [self setCurrentPage:currentPage]; - }]; - }else { - [self setCurrentPage:currentPage]; - } -} - -- (void)setPageIndicatorImage:(UIImage *)pageIndicatorImage { - _pageIndicatorImage = pageIndicatorImage; - [self updateIndicatorViewsBehavior]; -} - -- (void)setCurrentPageIndicatorImage:(UIImage *)currentPageIndicatorImage { - _currentPageIndicatorImage = currentPageIndicatorImage; - [self updateIndicatorViewsBehavior]; -} - -- (void)setPageIndicatorTintColor:(UIColor *)pageIndicatorTintColor { - _pageIndicatorTintColor = pageIndicatorTintColor; - [self updateIndicatorViewsBehavior]; -} - -- (void)setCurrentPageIndicatorTintColor:(UIColor *)currentPageIndicatorTintColor { - _currentPageIndicatorTintColor = currentPageIndicatorTintColor; - [self updateIndicatorViewsBehavior]; -} - -- (void)setPageIndicatorSize:(CGSize)pageIndicatorSize { - if (CGSizeEqualToSize(_pageIndicatorSize, pageIndicatorSize)) { - return; - } - _pageIndicatorSize = pageIndicatorSize; - if (CGSizeEqualToSize(_currentPageIndicatorSize, CGSizeZero) || (_currentPageIndicatorSize.width < pageIndicatorSize.width && _currentPageIndicatorSize.height < pageIndicatorSize.height)) { - _currentPageIndicatorSize = pageIndicatorSize; - } - if (_indicatorViews.count > 0) { - [self setNeedsLayout]; - } -} - -- (void)setPageIndicatorSpaing:(CGFloat)pageIndicatorSpaing { - _pageIndicatorSpaing = pageIndicatorSpaing; - if (_indicatorViews.count > 0) { - [self setNeedsLayout]; - } -} - -- (void)setCurrentPageIndicatorSize:(CGSize)currentPageIndicatorSize { - if (CGSizeEqualToSize(_currentPageIndicatorSize, currentPageIndicatorSize)) { - return; - } - _currentPageIndicatorSize = currentPageIndicatorSize; - if (_indicatorViews.count > 0) { - [self setNeedsLayout]; - } -} - -- (void)setContentHorizontalAlignment:(UIControlContentHorizontalAlignment)contentHorizontalAlignment { - [super setContentHorizontalAlignment:contentHorizontalAlignment]; - if (_indicatorViews.count > 0) { - [self setNeedsLayout]; - } -} - -- (void)setContentVerticalAlignment:(UIControlContentVerticalAlignment)contentVerticalAlignment { - [super setContentVerticalAlignment:contentVerticalAlignment]; - if (_indicatorViews.count > 0) { - [self setNeedsLayout]; - } -} - -#pragma mark - update indicator - -- (void)updateIndicatorViews { - if (!self.superview && !_forceUpdate) { - return; - } - if (_indicatorViews.count == _numberOfPages) { - [self updateIndicatorViewsBehavior]; - return; - } - NSMutableArray *indicatorViews = _indicatorViews ? [_indicatorViews mutableCopy] :[NSMutableArray array]; - if (indicatorViews.count < _numberOfPages) { - for (NSInteger idx = indicatorViews.count; idx < _numberOfPages; ++idx) { - UIImageView *indicatorView = [[UIImageView alloc]init]; - indicatorView.contentMode = _indicatorImageContentMode; - [self addSubview:indicatorView]; - [indicatorViews addObject:indicatorView]; - } - }else if (indicatorViews.count > _numberOfPages) { - for (NSInteger idx = indicatorViews.count - 1; idx >= _numberOfPages; --idx) { - UIImageView *indicatorView = indicatorViews[idx]; - [indicatorView removeFromSuperview]; - [indicatorViews removeObjectAtIndex:idx]; - } - } - _indicatorViews = [indicatorViews copy]; - [self updateIndicatorViewsBehavior]; -} - -- (void)updateIndicatorViewsBehavior { - if (_indicatorViews.count == 0 || (!self.superview && !_forceUpdate)) { - return; - } - if (_hidesForSinglePage && _indicatorViews.count == 1) { - UIImageView *indicatorView = _indicatorViews.lastObject; - indicatorView.hidden = YES; - return; - } - NSInteger index = 0; - for (UIImageView *indicatorView in _indicatorViews) { - if (_pageIndicatorImage) { - indicatorView.contentMode = _indicatorImageContentMode; - indicatorView.image = _currentPage == index ? _currentPageIndicatorImage : _pageIndicatorImage; - }else { - indicatorView.image = nil; - indicatorView.backgroundColor = _currentPage == index ? _currentPageIndicatorTintColor : _pageIndicatorTintColor; - } - indicatorView.hidden = NO; - ++index; - } -} - -#pragma mark - layout - -- (void)layoutIndicatorViews { - if (_indicatorViews.count == 0) { - return; - } - CGFloat orignX = 0; - CGFloat centerY = 0; - CGFloat pageIndicatorSpaing = _pageIndicatorSpaing; - switch (self.contentHorizontalAlignment) { - case UIControlContentHorizontalAlignmentCenter: - // ignore contentInset - orignX = (CGRectGetWidth(self.frame) - (_indicatorViews.count - 1) * (_pageIndicatorSize.width + _pageIndicatorSpaing) - _currentPageIndicatorSize.width)/2; - break; - case UIControlContentHorizontalAlignmentLeft: - orignX = _contentInset.left; - break; - case UIControlContentHorizontalAlignmentRight: - orignX = CGRectGetWidth(self.frame) - ((_indicatorViews.count - 1) * (_pageIndicatorSize.width + _pageIndicatorSpaing) + _currentPageIndicatorSize.width) - _contentInset.right; - break; - case UIControlContentHorizontalAlignmentFill: - orignX = _contentInset.left; - if (_indicatorViews.count > 1) { - pageIndicatorSpaing = (CGRectGetWidth(self.frame) - _contentInset.left - _contentInset.right - _pageIndicatorSize.width - (_indicatorViews.count - 1) * _pageIndicatorSize.width)/(_indicatorViews.count - 1); - } - break; - default: - break; - } - switch (self.contentVerticalAlignment) { - case UIControlContentVerticalAlignmentCenter: - centerY = CGRectGetHeight(self.frame)/2; - break; - case UIControlContentVerticalAlignmentTop: - centerY = _contentInset.top + _currentPageIndicatorSize.height/2; - break; - case UIControlContentVerticalAlignmentBottom: - centerY = CGRectGetHeight(self.frame) - _currentPageIndicatorSize.height/2 - _contentInset.bottom; - break; - case UIControlContentVerticalAlignmentFill: - centerY = (CGRectGetHeight(self.frame) - _contentInset.top - _contentInset.bottom)/2 + _contentInset.top; - break; - default: - break; - } - NSInteger index = 0; - for (UIImageView *indicatorView in _indicatorViews) { - if (_pageIndicatorImage) { - indicatorView.layer.cornerRadius = 0; - }else { - indicatorView.layer.cornerRadius = _currentPage == index ? _currentPageIndicatorSize.height/2 : _pageIndicatorSize.height/2; - } - CGSize size = index == _currentPage ? _currentPageIndicatorSize : _pageIndicatorSize; - indicatorView.frame = CGRectMake(orignX, centerY - size.height/2, size.width, size.height); - orignX += size.width + pageIndicatorSpaing; - ++index; - } -} - -- (void)layoutSubviews { - [super layoutSubviews]; - [self layoutIndicatorViews]; -} - -@end diff --git a/MiniScanner/Supporting Files/CDOverlay/CDCameraOverlayView.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraOverlayView.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDCameraOverlayView.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraOverlayView.h diff --git a/MiniScanner/Supporting Files/CDOverlay/CDCameraOverlayView.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraOverlayView.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDCameraOverlayView.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraOverlayView.m diff --git a/MiniScanner/Supporting Files/CDOverlay/CDCameraView.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraView.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDCameraView.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraView.h diff --git a/MiniScanner/Supporting Files/CDOverlay/CDCameraView.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraView.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDCameraView.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDCameraView.m diff --git a/MiniScanner/Supporting Files/CDOverlay/CDImageRectangleDetector.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDImageRectangleDetector.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDImageRectangleDetector.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDImageRectangleDetector.h diff --git a/MiniScanner/Supporting Files/CDOverlay/CDImageRectangleDetector.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDImageRectangleDetector.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDImageRectangleDetector.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDImageRectangleDetector.m diff --git a/MiniScanner/Supporting Files/CDOverlay/CDOverlayView.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDOverlayView.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDOverlayView.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDOverlayView.h diff --git a/MiniScanner/Supporting Files/CDOverlay/CDOverlayView.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDOverlayView.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDOverlayView.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDOverlayView.m diff --git a/MiniScanner/Supporting Files/CDOverlay/CDZoomView.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDZoomView.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDZoomView.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDZoomView.h diff --git a/MiniScanner/Supporting Files/CDOverlay/CDZoomView.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CDZoomView.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CDZoomView.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CDZoomView.m diff --git a/MiniScanner/Supporting Files/CDOverlay/CropperConstantValues.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CropperConstantValues.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CropperConstantValues.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CropperConstantValues.h diff --git a/MiniScanner/Supporting Files/CDOverlay/CropperConstantValues.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/CropperConstantValues.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/CropperConstantValues.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/CropperConstantValues.m diff --git a/MiniScanner/Supporting Files/CDOverlay/DefaultValues.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/DefaultValues.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/DefaultValues.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/DefaultValues.h diff --git a/MiniScanner/Supporting Files/CDOverlay/DefaultValues.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/DefaultValues.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/DefaultValues.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/DefaultValues.m diff --git a/MiniScanner/Supporting Files/CDOverlay/FlashButton.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/FlashButton.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/FlashButton.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/FlashButton.h diff --git a/MiniScanner/Supporting Files/CDOverlay/FlashButton.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/FlashButton.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/FlashButton.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/FlashButton.m diff --git a/MiniScanner/Supporting Files/CDOverlay/SelectableRoundView.h b/MiniScanner/Supporting Files/Frameworks/CDOverlay/SelectableRoundView.h similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/SelectableRoundView.h rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/SelectableRoundView.h diff --git a/MiniScanner/Supporting Files/CDOverlay/SelectableRoundView.m b/MiniScanner/Supporting Files/Frameworks/CDOverlay/SelectableRoundView.m similarity index 100% rename from MiniScanner/Supporting Files/CDOverlay/SelectableRoundView.m rename to MiniScanner/Supporting Files/Frameworks/CDOverlay/SelectableRoundView.m diff --git a/MiniScanner/Supporting Files/CustomWeScan/.DS_Store b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/.DS_Store similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/.DS_Store rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/.DS_Store diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/enhance.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/enhance.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/enhance.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/enhance.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/enhance@2x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/enhance@2x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/enhance@2x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/enhance@2x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/enhance@3x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/enhance@3x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/enhance@3x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/enhance@3x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/flash.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flash.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/flash.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flash.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/flash@2x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flash@2x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/flash@2x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flash@2x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/flash@3x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flash@3x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/flash@3x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flash@3x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/flashUnavailable.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flashUnavailable.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/flashUnavailable.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flashUnavailable.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/flashUnavailable@2x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flashUnavailable@2x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/flashUnavailable@2x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flashUnavailable@2x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/flashUnavailable@3x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flashUnavailable@3x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/flashUnavailable@3x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/flashUnavailable@3x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/rotate.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/rotate.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/rotate.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/rotate.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/rotate@2x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/rotate@2x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/rotate@2x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/rotate@2x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Assets/rotate@3x.png b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/rotate@3x.png similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Assets/rotate@3x.png rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Assets/rotate@3x.png diff --git a/MiniScanner/Supporting Files/CustomWeScan/Common/CIRectangleDetector.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/CIRectangleDetector.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Common/CIRectangleDetector.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/CIRectangleDetector.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Common/EditScanCornerView.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/EditScanCornerView.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Common/EditScanCornerView.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/EditScanCornerView.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Common/Error.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/Error.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Common/Error.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/Error.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Common/Quadrilateral.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/Quadrilateral.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Common/Quadrilateral.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/Quadrilateral.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Common/QuadrilateralView.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/QuadrilateralView.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Common/QuadrilateralView.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/QuadrilateralView.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Common/VisionRectangleDetector.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/VisionRectangleDetector.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Common/VisionRectangleDetector.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Common/VisionRectangleDetector.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Edit/EditScanViewController.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Edit/EditScanViewController.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Edit/EditScanViewController.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Edit/EditScanViewController.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Edit/ZoomGestureController.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Edit/ZoomGestureController.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Edit/ZoomGestureController.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Edit/ZoomGestureController.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/AVCaptureVideoOrientation+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/AVCaptureVideoOrientation+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/AVCaptureVideoOrientation+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/AVCaptureVideoOrientation+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/Array+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/Array+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/Array+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/Array+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/CGAffineTransform+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CGAffineTransform+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/CGAffineTransform+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CGAffineTransform+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/CGPoint+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CGPoint+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/CGPoint+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CGPoint+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/CGRect+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CGRect+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/CGRect+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CGRect+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/CIImage+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CIImage+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/CIImage+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/CIImage+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/UIImage+Orientation.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/UIImage+Orientation.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/UIImage+Orientation.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/UIImage+Orientation.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/UIImage+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/UIImage+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/UIImage+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/UIImage+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Extensions/URL+Utils.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/URL+Utils.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Extensions/URL+Utils.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Extensions/URL+Utils.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/ImageScannerController.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/ImageScannerController.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/ImageScannerController.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/ImageScannerController.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/MultiPageSession/MultiPageScanSession.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/MultiPageSession/MultiPageScanSession.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/MultiPageSession/MultiPageScanSession.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/MultiPageSession/MultiPageScanSession.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/MultiPageSession/MultiPageScanSessionViewController.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/MultiPageSession/MultiPageScanSessionViewController.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/MultiPageSession/MultiPageScanSessionViewController.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/MultiPageSession/MultiPageScanSessionViewController.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/MultiPageSession/ScannedPageViewController.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/MultiPageSession/ScannedPageViewController.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/MultiPageSession/ScannedPageViewController.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/MultiPageSession/ScannedPageViewController.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Protocols/CaptureDevice.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Protocols/CaptureDevice.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Protocols/CaptureDevice.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Protocols/CaptureDevice.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Protocols/Transformable.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Protocols/Transformable.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Protocols/Transformable.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Protocols/Transformable.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/CaptureSessionManager.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/CaptureSessionManager.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/CaptureSessionManager.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/CaptureSessionManager.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/DeviceOrientationHelper.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/DeviceOrientationHelper.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/DeviceOrientationHelper.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/DeviceOrientationHelper.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/FocusRectangleView.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/FocusRectangleView.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/FocusRectangleView.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/FocusRectangleView.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/PDFCreator.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/PDFCreator.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/PDFCreator.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/PDFCreator.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/RectangleFeaturesFunnel.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/RectangleFeaturesFunnel.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/RectangleFeaturesFunnel.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/RectangleFeaturesFunnel.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/ScannedItemRenderer.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/ScannedItemRenderer.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/ScannedItemRenderer.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/ScannedItemRenderer.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/ScannerViewController.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/ScannerViewController.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/ScannerViewController.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/ScannerViewController.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Scan/ShutterButton.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/ShutterButton.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Scan/ShutterButton.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Scan/ShutterButton.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession+Flash.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession+Flash.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession+Flash.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession+Flash.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession+Focus.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession+Focus.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession+Focus.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession+Focus.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession+Orientation.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession+Orientation.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession+Orientation.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession+Orientation.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession.swift b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession.swift similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/Session/CaptureSession.swift rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/Session/CaptureSession.swift diff --git a/MiniScanner/Supporting Files/CustomWeScan/WeScan.h b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/WeScan.h similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/WeScan.h rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/WeScan.h diff --git a/MiniScanner/Supporting Files/CustomWeScan/de.lproj/Localizable.strings b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/de.lproj/Localizable.strings similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/de.lproj/Localizable.strings rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/de.lproj/Localizable.strings diff --git a/MiniScanner/Supporting Files/CustomWeScan/en.lproj/Localizable.strings b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/en.lproj/Localizable.strings similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/en.lproj/Localizable.strings rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/en.lproj/Localizable.strings diff --git a/MiniScanner/Supporting Files/CustomWeScan/fr.lproj/Localizable.strings b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/fr.lproj/Localizable.strings similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/fr.lproj/Localizable.strings rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/fr.lproj/Localizable.strings diff --git a/MiniScanner/Supporting Files/CustomWeScan/it.lproj/Localizable.strings b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/it.lproj/Localizable.strings similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/it.lproj/Localizable.strings rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/it.lproj/Localizable.strings diff --git a/MiniScanner/Supporting Files/CustomWeScan/pt-PT.lproj/Localizable.strings b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/pt-PT.lproj/Localizable.strings similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/pt-PT.lproj/Localizable.strings rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/pt-PT.lproj/Localizable.strings diff --git a/MiniScanner/Supporting Files/CustomWeScan/zh-Hans.lproj/Localizable.strings b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/zh-Hans.lproj/Localizable.strings similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/zh-Hans.lproj/Localizable.strings rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/zh-Hans.lproj/Localizable.strings diff --git a/MiniScanner/Supporting Files/CustomWeScan/zh-Hant.lproj/Localizable.strings b/MiniScanner/Supporting Files/Frameworks/CustomWeScan/zh-Hant.lproj/Localizable.strings similarity index 100% rename from MiniScanner/Supporting Files/CustomWeScan/zh-Hant.lproj/Localizable.strings rename to MiniScanner/Supporting Files/Frameworks/CustomWeScan/zh-Hant.lproj/Localizable.strings diff --git a/MiniScanner/Supporting Files/Sources/FSPageControl.swift b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPageControl.swift similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPageControl.swift rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPageControl.swift diff --git a/MiniScanner/Supporting Files/Sources/FSPageViewLayout.swift b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPageViewLayout.swift similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPageViewLayout.swift rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPageViewLayout.swift diff --git a/MiniScanner/Supporting Files/Sources/FSPageViewTransformer.swift b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPageViewTransformer.swift similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPageViewTransformer.swift rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPageViewTransformer.swift diff --git a/MiniScanner/Supporting Files/Sources/FSPagerCollectionView.swift b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerCollectionView.swift similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPagerCollectionView.swift rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerCollectionView.swift diff --git a/MiniScanner/Supporting Files/Sources/FSPagerView.swift b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerView.swift similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPagerView.swift rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerView.swift diff --git a/MiniScanner/Supporting Files/Sources/FSPagerViewCell.swift b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewCell.swift similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPagerViewCell.swift rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewCell.swift diff --git a/MiniScanner/Supporting Files/Sources/FSPagerViewLayoutAttributes.swift b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewLayoutAttributes.swift similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPagerViewLayoutAttributes.swift rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewLayoutAttributes.swift diff --git a/MiniScanner/Supporting Files/Sources/FSPagerViewObjcCompat.h b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewObjcCompat.h similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPagerViewObjcCompat.h rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewObjcCompat.h diff --git a/MiniScanner/Supporting Files/Sources/FSPagerViewObjcCompat.m b/MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewObjcCompat.m similarity index 100% rename from MiniScanner/Supporting Files/Sources/FSPagerViewObjcCompat.m rename to MiniScanner/Supporting Files/Frameworks/FSPager/FSPagerViewObjcCompat.m diff --git a/MiniScanner/Supporting Files/LogoAnimationView/.DS_Store b/MiniScanner/Supporting Files/Frameworks/LogoAnimationView/.DS_Store similarity index 100% rename from MiniScanner/Supporting Files/LogoAnimationView/.DS_Store rename to MiniScanner/Supporting Files/Frameworks/LogoAnimationView/.DS_Store diff --git a/MiniScanner/Supporting Files/LogoAnimationView/StickerView.swift b/MiniScanner/Supporting Files/Frameworks/LogoAnimationView/StickerView.swift similarity index 100% rename from MiniScanner/Supporting Files/LogoAnimationView/StickerView.swift rename to MiniScanner/Supporting Files/Frameworks/LogoAnimationView/StickerView.swift diff --git a/MiniScanner/Supporting Files/LogoAnimationView/UIView+Constraints.swift b/MiniScanner/Supporting Files/Frameworks/LogoAnimationView/UIView+Constraints.swift similarity index 100% rename from MiniScanner/Supporting Files/LogoAnimationView/UIView+Constraints.swift rename to MiniScanner/Supporting Files/Frameworks/LogoAnimationView/UIView+Constraints.swift diff --git a/MiniScanner/Supporting Files/SnapKit/Constraint.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/Constraint.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/Constraint.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/Constraint.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintAttributes.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintAttributes.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintAttributes.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintAttributes.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintConfig.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintConfig.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintConfig.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintConfig.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintConstantTarget.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintConstantTarget.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintConstantTarget.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintConstantTarget.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintDSL.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDSL.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintDSL.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDSL.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintDescription.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDescription.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintDescription.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDescription.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintDirectionalInsetTarget.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDirectionalInsetTarget.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintDirectionalInsetTarget.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDirectionalInsetTarget.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintDirectionalInsets.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDirectionalInsets.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintDirectionalInsets.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintDirectionalInsets.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintInsetTarget.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintInsetTarget.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintInsetTarget.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintInsetTarget.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintInsets.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintInsets.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintInsets.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintInsets.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintItem.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintItem.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintItem.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintItem.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintLayoutGuide+Extensions.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutGuide+Extensions.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintLayoutGuide+Extensions.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutGuide+Extensions.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintLayoutGuide.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutGuide.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintLayoutGuide.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutGuide.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintLayoutGuideDSL.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutGuideDSL.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintLayoutGuideDSL.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutGuideDSL.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintLayoutSupport.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutSupport.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintLayoutSupport.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutSupport.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintLayoutSupportDSL.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutSupportDSL.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintLayoutSupportDSL.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintLayoutSupportDSL.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMaker.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMaker.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMaker.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMaker.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMakerEditable.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerEditable.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMakerEditable.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerEditable.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMakerExtendable.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerExtendable.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMakerExtendable.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerExtendable.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMakerFinalizable.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerFinalizable.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMakerFinalizable.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerFinalizable.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMakerPriortizable.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerPriortizable.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMakerPriortizable.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerPriortizable.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMakerRelatable+Extensions.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerRelatable+Extensions.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMakerRelatable+Extensions.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerRelatable+Extensions.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMakerRelatable.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerRelatable.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMakerRelatable.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMakerRelatable.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintMultiplierTarget.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMultiplierTarget.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintMultiplierTarget.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintMultiplierTarget.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintOffsetTarget.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintOffsetTarget.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintOffsetTarget.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintOffsetTarget.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintPriority.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintPriority.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintPriority.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintPriority.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintPriorityTarget.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintPriorityTarget.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintPriorityTarget.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintPriorityTarget.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintRelatableTarget.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintRelatableTarget.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintRelatableTarget.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintRelatableTarget.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintRelation.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintRelation.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintRelation.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintRelation.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintView+Extensions.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintView+Extensions.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintView+Extensions.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintView+Extensions.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintView.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintView.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintView.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintView.swift diff --git a/MiniScanner/Supporting Files/SnapKit/ConstraintViewDSL.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintViewDSL.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/ConstraintViewDSL.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/ConstraintViewDSL.swift diff --git a/MiniScanner/Supporting Files/SnapKit/Debugging.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/Debugging.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/Debugging.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/Debugging.swift diff --git a/MiniScanner/Supporting Files/SnapKit/LayoutConstraint.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/LayoutConstraint.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/LayoutConstraint.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/LayoutConstraint.swift diff --git a/MiniScanner/Supporting Files/SnapKit/LayoutConstraintItem.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/LayoutConstraintItem.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/LayoutConstraintItem.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/LayoutConstraintItem.swift diff --git a/MiniScanner/Supporting Files/SnapKit/SnapKit.h b/MiniScanner/Supporting Files/Frameworks/SnapKit/SnapKit.h similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/SnapKit.h rename to MiniScanner/Supporting Files/Frameworks/SnapKit/SnapKit.h diff --git a/MiniScanner/Supporting Files/SnapKit/Typealiases.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/Typealiases.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/Typealiases.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/Typealiases.swift diff --git a/MiniScanner/Supporting Files/SnapKit/UILayoutSupport+Extensions.swift b/MiniScanner/Supporting Files/Frameworks/SnapKit/UILayoutSupport+Extensions.swift similarity index 100% rename from MiniScanner/Supporting Files/SnapKit/UILayoutSupport+Extensions.swift rename to MiniScanner/Supporting Files/Frameworks/SnapKit/UILayoutSupport+Extensions.swift diff --git a/MiniScanner/Supporting Files/MiniScanner_Bridging_Header.h b/MiniScanner/Supporting Files/MiniScanner_Bridging_Header.h index 50d3b71c4af6150ba30a4ac46c030ed1c3a5a3a2..f14358173531e07e042e24f684041cd0557b7d9a 100644 --- a/MiniScanner/Supporting Files/MiniScanner_Bridging_Header.h +++ b/MiniScanner/Supporting Files/MiniScanner_Bridging_Header.h @@ -9,8 +9,6 @@ #ifndef MiniScanner_Bridging_Header_h #define MiniScanner_Bridging_Header_h -#import "TYCyclePagerView.h" -#import "TYPageControl.h" #import "CDOverlayView.h" #import "CDCameraView.h"