├── _Pods.xcodeproj ├── JJCollectionViewRoundFlowLayout ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── JJCollectionViewRoundConfigModel.m │ ├── JJCollectionViewFlowLayoutConfig.h │ ├── JJCollectionViewTouchAnimationConfigModel.m │ ├── JJCollectionViewTouchAnimationConfigModel.h │ ├── JJCollectionViewRoundConfigModel.h │ ├── JJCollectionViewFlowLayoutUtils.h │ └── JJCollectionViewRoundFlowLayout+Alignment.h ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── Example ├── Tests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── Tests-Prefix.pch │ ├── Tests-Info.plist │ └── Tests.m ├── JJCollectionViewRoundFlowLayout │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── JJViewController.h │ ├── JJAppDelegate.h │ ├── SeventhViewController.h │ ├── JJTestWakeFormNibViewController.h │ ├── main.m │ ├── JJCollectionViewRoundFlowLayout-Prefix.pch │ ├── MyCollectionViewCell.h │ ├── FifthlyViewController.h │ ├── IGListkitViewController.h │ ├── MyCollectionReusableView.h │ ├── MyLabelCollectionViewCell.h │ ├── SecondViewController.h │ ├── SixthViewController.h │ ├── ThirdViewController.h │ ├── FourthViewController.h │ ├── NextViewController.h │ ├── SQCollectionRoundFlowLayout.h │ ├── JJCollectionViewRoundFlowLayout-Info.plist │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── JJAppDelegate.m │ ├── JJTestWakeFormNibViewController.xib │ ├── MyCollectionReusableView.m │ ├── MyCollectionViewCell.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── MyLabelCollectionViewCell.m ├── Pods │ ├── Target Support Files │ │ ├── IGListKit │ │ │ ├── IGListKit.modulemap │ │ │ ├── IGListKit-dummy.m │ │ │ ├── IGListKit-prefix.pch │ │ │ ├── IGListKit.debug.xcconfig │ │ │ ├── IGListKit.release.xcconfig │ │ │ ├── IGListKit-Info.plist │ │ │ └── IGListKit-umbrella.h │ │ ├── JJCollectionViewRoundFlowLayout │ │ │ ├── JJCollectionViewRoundFlowLayout.modulemap │ │ │ ├── JJCollectionViewRoundFlowLayout-dummy.m │ │ │ ├── JJCollectionViewRoundFlowLayout-prefix.pch │ │ │ ├── JJCollectionViewRoundFlowLayout.xcconfig │ │ │ ├── JJCollectionViewRoundFlowLayout.debug.xcconfig │ │ │ ├── JJCollectionViewRoundFlowLayout.release.xcconfig │ │ │ ├── JJCollectionViewRoundFlowLayout-umbrella.h │ │ │ └── JJCollectionViewRoundFlowLayout-Info.plist │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests-acknowledgements.markdown │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests.modulemap │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests-dummy.m │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests-umbrella.h │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests-Info.plist │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests-acknowledgements.plist │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests.debug.xcconfig │ │ │ └── Pods-JJCollectionViewRoundFlowLayout_Tests.release.xcconfig │ │ └── Pods-JJCollectionViewRoundFlowLayout_Example │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example.modulemap │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example-dummy.m │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example-umbrella.h │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example-Info.plist │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example.debug.xcconfig │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example.release.xcconfig │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example-acknowledgements.markdown │ │ │ └── Pods-JJCollectionViewRoundFlowLayout_Example-acknowledgements.plist │ ├── Pods.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── JJCollectionViewRoundFlowLayout.xcscheme │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Tests.xcscheme │ │ │ ├── Pods-JJCollectionViewRoundFlowLayout_Example.xcscheme │ │ │ └── JJCollectionViewRoundFlowLayout-Example.xcscheme │ ├── IGListKit │ │ ├── Source │ │ │ ├── Common │ │ │ │ ├── IGListCompatibility.h │ │ │ │ ├── NSNumber+IGListDiffable.h │ │ │ │ ├── NSString+IGListDiffable.h │ │ │ │ ├── Internal │ │ │ │ │ ├── IGListMoveIndexPathInternal.h │ │ │ │ │ ├── IGListMoveIndexInternal.h │ │ │ │ │ ├── IGListIndexSetResultInternal.h │ │ │ │ │ └── IGListIndexPathResultInternal.h │ │ │ │ ├── NSNumber+IGListDiffable.m │ │ │ │ ├── NSString+IGListDiffable.m │ │ │ │ ├── IGListAssert.h │ │ │ │ ├── IGListMoveIndex.h │ │ │ │ ├── IGListMoveIndexPath.h │ │ │ │ ├── IGListMacros.h │ │ │ │ ├── IGListDiffKit.h │ │ │ │ ├── IGListDiffable.h │ │ │ │ ├── IGListMoveIndexPath.m │ │ │ │ ├── IGListMoveIndex.m │ │ │ │ ├── IGListDiff.h │ │ │ │ ├── IGListIndexSetResult.h │ │ │ │ ├── IGListIndexPathResult.h │ │ │ │ ├── IGListBatchUpdateData.h │ │ │ │ ├── IGListExperiments.h │ │ │ │ ├── IGListIndexSetResult.m │ │ │ │ └── IGListIndexPathResult.m │ │ │ ├── Internal │ │ │ │ ├── UICollectionView+IGListBatchUpdateData.h │ │ │ │ ├── IGListSectionControllerInternal.h │ │ │ │ ├── UICollectionView+IGListBatchUpdateData.m │ │ │ │ ├── IGListAdapterProxy.h │ │ │ │ ├── IGListWorkingRangeHandler.h │ │ │ │ ├── IGListStackedSectionControllerInternal.h │ │ │ │ ├── IGListDisplayHandler.h │ │ │ │ ├── IGListAdapterUpdaterInternal.h │ │ │ │ ├── IGListAdapterInternal.h │ │ │ │ ├── IGListSectionMap.h │ │ │ │ ├── IGListDisplayHandler.m │ │ │ │ └── IGListAdapterProxy.m │ │ │ ├── IGListReloadDataUpdater.h │ │ │ ├── IGListAdapterDelegate.h │ │ │ ├── IGListWorkingRangeDelegate.h │ │ │ ├── IGListGridCollectionViewLayout.h │ │ │ ├── IGListCollectionView.m │ │ │ ├── IGListScrollDelegate.h │ │ │ ├── IGListStackedSectionController.h │ │ │ ├── IGListSupplementaryViewSource.h │ │ │ ├── IGListAdapterUpdater.h │ │ │ ├── IGListKit.h │ │ │ ├── IGListAdapterDataSource.h │ │ │ ├── IGListSectionController.m │ │ │ ├── IGListDisplayDelegate.h │ │ │ ├── IGListReloadDataUpdater.m │ │ │ ├── IGListCollectionView.h │ │ │ ├── IGListSectionType.h │ │ │ ├── IGListSectionController.h │ │ │ └── IGListSingleSectionController.m │ │ ├── LICENSE.md │ │ └── README.md │ ├── Manifest.lock │ └── Local Podspecs │ │ └── JJCollectionViewRoundFlowLayout.podspec.json ├── JJCollectionViewRoundFlowLayout.xcodeproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── JJCollectionViewRoundFlowLayout.xcworkspace │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── contents.xcworkspacedata ├── Podfile └── Podfile.lock ├── BGTouch.gif ├── BGAnimation.gif ├── show_video.gif ├── .gitignore ├── .travis.yml ├── LICENSE └── JJCollectionViewRoundFlowLayout.podspec /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/1.png -------------------------------------------------------------------------------- /2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/2.png -------------------------------------------------------------------------------- /3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/3.png -------------------------------------------------------------------------------- /4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/4.png -------------------------------------------------------------------------------- /5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/5.png -------------------------------------------------------------------------------- /6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/6.png -------------------------------------------------------------------------------- /7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/7.png -------------------------------------------------------------------------------- /8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/8.png -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /BGTouch.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/BGTouch.gif -------------------------------------------------------------------------------- /BGAnimation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/BGAnimation.gif -------------------------------------------------------------------------------- /show_video.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kingjiajie/JJCollectionViewRoundFlowLayout/HEAD/show_video.gif -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IGListKit/IGListKit.modulemap: -------------------------------------------------------------------------------- 1 | framework module IGListKit { 2 | umbrella header "IGListKit-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IGListKit/IGListKit-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_IGListKit : NSObject 3 | @end 4 | @implementation PodsDummy_IGListKit 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.modulemap: -------------------------------------------------------------------------------- 1 | framework module JJCollectionViewRoundFlowLayout { 2 | umbrella header "JJCollectionViewRoundFlowLayout-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JJCollectionViewRoundFlowLayout : NSObject 3 | @end 4 | @implementation PodsDummy_JJCollectionViewRoundFlowLayout 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IGListKit/IGListKit-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_JJCollectionViewRoundFlowLayout_Tests { 2 | umbrella header "Pods-JJCollectionViewRoundFlowLayout_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_JJCollectionViewRoundFlowLayout_Example { 2 | umbrella header "Pods-JJCollectionViewRoundFlowLayout_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_JJCollectionViewRoundFlowLayout_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_JJCollectionViewRoundFlowLayout_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_JJCollectionViewRoundFlowLayout_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_JJCollectionViewRoundFlowLayout_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/JJViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJViewController.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by 谢家杰 on 10/30/2019. 6 | // Copyright (c) 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface JJViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | platform :ios, '8.0' 4 | 5 | target 'JJCollectionViewRoundFlowLayout_Example' do 6 | pod 'JJCollectionViewRoundFlowLayout', :path => '../' 7 | pod 'IGListKit', '~> 2.1.0' 8 | 9 | target 'JJCollectionViewRoundFlowLayout_Tests' do 10 | inherit! :search_paths 11 | 12 | 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/JJAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJAppDelegate.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by 谢家杰 on 10/30/2019. 6 | // Copyright (c) 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface JJAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/SeventhViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SeventhViewController.h 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2021/9/12. 6 | // Copyright © 2021 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface SeventhViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/JJTestWakeFormNibViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJTestWakeFormNibViewController.h 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2020/9/3. 6 | // Copyright © 2020 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface JJTestWakeFormNibViewController : UIViewController 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by 谢家杰 on 10/30/2019. 6 | // Copyright (c) 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "JJAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([JJAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/MyCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // CollectionViewCell.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2019/10/30. 6 | // Copyright © 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MyCollectionViewCell : UICollectionViewCell 14 | 15 | @property (strong, nonatomic, readonly) UILabel *myLabel; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/FifthlyViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FifthlyViewController.h 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2020/9/24. 6 | // Copyright © 2020 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface FifthlyViewController : UIViewController 14 | 15 | @property (nonatomic, assign) BOOL isShowTouchAnimation; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/IGListkitViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SQCollectionRoundFlowLayout.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by liaoyp on 2021/7/8. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface IGListkitViewController : UIViewController 13 | 14 | @property (assign, nonatomic) BOOL isHaveShadow; 15 | @property (assign, nonatomic) BOOL isHaveBGColor; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/MyCollectionReusableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyCollectionReusableView.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2019/10/30. 6 | // Copyright © 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MyCollectionReusableView : UICollectionReusableView 14 | 15 | @property (strong, nonatomic,readonly) UILabel *myLabel; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/MyLabelCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyLabelCollectionViewCell.h 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2020/1/11. 6 | // Copyright © 2020 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface MyLabelCollectionViewCell : UICollectionViewCell 14 | 15 | @property (strong, nonatomic, readonly) UILabel *myLabel; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListCompatibility.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #if TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR 13 | #import 14 | #else 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_JJCollectionViewRoundFlowLayout_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_JJCollectionViewRoundFlowLayout_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_JJCollectionViewRoundFlowLayout_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_JJCollectionViewRoundFlowLayout_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/SecondViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SecondViewController.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2019/10/30. 6 | // Copyright © 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface SecondViewController : UIViewController 14 | 15 | @property (assign, nonatomic) BOOL isHaveShadow; 16 | @property (assign, nonatomic) BOOL isHaveBGColor; 17 | @property (assign, nonatomic) BOOL isMaskedCorners; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/SixthViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SixthViewController.h 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2021/3/6. 6 | // Copyright © 2021 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface SixthViewController : UIViewController 14 | 15 | @property (assign, nonatomic) BOOL isHaveHeaderFooterView; 16 | @property (assign, nonatomic) BOOL isRoundWithHeaerView; 17 | @property (assign, nonatomic) BOOL isRoundWithFooterView; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | PODS_BUILD_DIR = ${BUILD_DIR} 4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 5 | PODS_ROOT = ${SRCROOT} 6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 8 | SKIP_INSTALL = YES 9 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 10 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/ThirdViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdViewController.h 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2019/12/16. 6 | // Copyright © 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface ThirdViewController : UIViewController 14 | 15 | @property (assign, nonatomic) BOOL isHaveHeaderFooterView; 16 | @property (assign, nonatomic) BOOL isRoundWithHeaerView; 17 | @property (assign, nonatomic) BOOL isRoundWithFooterView; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/FourthViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FourthViewController.h 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2020/1/11. 6 | // Copyright © 2020 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | @import JJCollectionViewRoundFlowLayout; 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface FourthViewController : UIViewController 15 | 16 | @property (assign, nonatomic) BOOL isHaveRoundBGView; 17 | @property (assign, nonatomic) JJCollectionViewRoundFlowLayoutAlignmentType myAlignmentType; 18 | 19 | @end 20 | 21 | NS_ASSUME_NONNULL_END 22 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/UICollectionView+IGListBatchUpdateData.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class IGListBatchUpdateData; 13 | 14 | @interface UICollectionView (IGListBatchUpdateData) 15 | 16 | - (void)ig_applyBatchUpdateData:(IGListBatchUpdateData *)updateData; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/JJCollectionViewRoundConfigModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewRoundConfigModel.m 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2020/1/9. 6 | // 7 | 8 | #import "JJCollectionViewRoundConfigModel.h" 9 | 10 | @implementation JJCollectionViewRoundConfigModel 11 | 12 | - (instancetype)init 13 | { 14 | self = [super init]; 15 | if (self) { 16 | if (@available(iOS 11.0, *)) { 17 | self.maskedCorners = kCALayerMinXMinYCorner|kCALayerMaxXMinYCorner|kCALayerMinXMaxYCorner|kCALayerMaxXMaxYCorner; 18 | } 19 | } 20 | return self; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/NSNumber+IGListDiffable.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | /** 15 | This category provides default `IGListDiffable` conformance for `NSNumber`. 16 | */ 17 | @interface NSNumber (IGListDiffable) 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/NSString+IGListDiffable.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | /** 15 | This category provides default `IGListDiffable` conformance for `NSString`. 16 | */ 17 | @interface NSString (IGListDiffable) 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/Internal/IGListMoveIndexPathInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface IGListMoveIndexPath () 15 | 16 | - (instancetype)initWithFrom:(NSIndexPath *)from to:(NSIndexPath *)to NS_DESIGNATED_INITIALIZER; 17 | 18 | @end 19 | 20 | NS_ASSUME_NONNULL_END 21 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/NSNumber+IGListDiffable.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "NSNumber+IGListDiffable.h" 11 | 12 | @implementation NSNumber (IGListDiffable) 13 | 14 | - (id)diffIdentifier { 15 | return self; 16 | } 17 | 18 | - (BOOL)isEqualToDiffableObject:(id)object { 19 | return [self isEqual:object]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/NSString+IGListDiffable.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "NSString+IGListDiffable.h" 11 | 12 | @implementation NSString (IGListDiffable) 13 | 14 | - (id)diffIdentifier { 15 | return self; 16 | } 17 | 18 | - (BOOL)isEqualToDiffableObject:(id)object { 19 | return [self isEqual:object]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/Internal/IGListMoveIndexInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface IGListMoveIndex () 17 | 18 | - (instancetype)initWithFrom:(NSInteger)from to:(NSInteger)to NS_DESIGNATED_INITIALIZER; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/NextViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NextViewController.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2019/10/30. 6 | // Copyright © 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface NextViewController : UIViewController 14 | 15 | @property (assign, nonatomic) BOOL isHaveHeaderFooterView; 16 | @property (assign, nonatomic) BOOL isRoundWithHeaerView; 17 | @property (assign, nonatomic) BOOL isRoundWithFooterView; 18 | 19 | @property (assign, nonatomic) BOOL isHorizontal; 20 | 21 | @property (assign, nonatomic) BOOL isShowDifferentColor; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/JJCollectionViewFlowLayoutConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewFlowLayoutConfig.h 3 | // Pods 4 | // 5 | // Created by jiajie on 2020/1/10. 6 | // 7 | 8 | #ifndef JJCollectionViewFlowLayoutConfig_h 9 | #define JJCollectionViewFlowLayoutConfig_h 10 | 11 | typedef enum : NSUInteger { 12 | JJCollectionViewFlowLayoutAlignmentTypeBySystem = 0, 13 | JJCollectionViewFlowLayoutAlignmentTypeByLeft, 14 | JJCollectionViewFlowLayoutAlignmentTypeByCenter, 15 | JJCollectionViewFlowLayoutAlignmentTypeByRight, 16 | JJCollectionViewFlowLayoutAlignmentTypeByRightAndStartR, 17 | } JJCollectionViewRoundFlowLayoutAlignmentType; 18 | 19 | #endif /* JJCollectionViewFlowLayoutConfig_h */ 20 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - IGListKit (2.1.0): 3 | - IGListKit/Default (= 2.1.0) 4 | - IGListKit/Default (2.1.0): 5 | - IGListKit/Diffing 6 | - IGListKit/Diffing (2.1.0) 7 | - JJCollectionViewRoundFlowLayout (2.7.1) 8 | 9 | DEPENDENCIES: 10 | - IGListKit (~> 2.1.0) 11 | - JJCollectionViewRoundFlowLayout (from `../`) 12 | 13 | SPEC REPOS: 14 | trunk: 15 | - IGListKit 16 | 17 | EXTERNAL SOURCES: 18 | JJCollectionViewRoundFlowLayout: 19 | :path: "../" 20 | 21 | SPEC CHECKSUMS: 22 | IGListKit: b826c68ef7a4ae1626c09d4d3e1ea7a169e6c36e 23 | JJCollectionViewRoundFlowLayout: cd9dcc00ecf99a90b3567650f64aaabe5bbe8d9e 24 | 25 | PODFILE CHECKSUM: 6f9033a7e3e8bd94cb6cd707153cb1eecd76bad8 26 | 27 | COCOAPODS: 1.10.1 28 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - IGListKit (2.1.0): 3 | - IGListKit/Default (= 2.1.0) 4 | - IGListKit/Default (2.1.0): 5 | - IGListKit/Diffing 6 | - IGListKit/Diffing (2.1.0) 7 | - JJCollectionViewRoundFlowLayout (2.7.1) 8 | 9 | DEPENDENCIES: 10 | - IGListKit (~> 2.1.0) 11 | - JJCollectionViewRoundFlowLayout (from `../`) 12 | 13 | SPEC REPOS: 14 | trunk: 15 | - IGListKit 16 | 17 | EXTERNAL SOURCES: 18 | JJCollectionViewRoundFlowLayout: 19 | :path: "../" 20 | 21 | SPEC CHECKSUMS: 22 | IGListKit: b826c68ef7a4ae1626c09d4d3e1ea7a169e6c36e 23 | JJCollectionViewRoundFlowLayout: cd9dcc00ecf99a90b3567650f64aaabe5bbe8d9e 24 | 25 | PODFILE CHECKSUM: 6f9033a7e3e8bd94cb6cd707153cb1eecd76bad8 26 | 27 | COCOAPODS: 1.10.1 28 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewRoundFlowLayoutTests.m 3 | // JJCollectionViewRoundFlowLayoutTests 4 | // 5 | // Created by 谢家杰 on 10/30/2019. 6 | // Copyright (c) 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IGListKit/IGListKit.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_CXX_LANGUAGE_STANDARD = c++11 2 | CLANG_CXX_LIBRARY = libc++ 3 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 4 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/IGListKit 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | OTHER_LDFLAGS = $(inherited) -l"c++" -framework "UIKit" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/IGListKit 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IGListKit/IGListKit.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_CXX_LANGUAGE_STANDARD = c++11 2 | CLANG_CXX_LIBRARY = libc++ 3 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 4 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/IGListKit 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | OTHER_LDFLAGS = $(inherited) -l"c++" -framework "UIKit" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/IGListKit 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "JJCollectionViewFlowLayoutConfig.h" 14 | #import "JJCollectionViewFlowLayoutUtils.h" 15 | #import "JJCollectionViewRoundConfigModel.h" 16 | #import "JJCollectionViewRoundFlowLayout+Alignment.h" 17 | #import "JJCollectionViewRoundFlowLayout.h" 18 | #import "JJCollectionViewTouchAnimationConfigModel.h" 19 | 20 | FOUNDATION_EXPORT double JJCollectionViewRoundFlowLayoutVersionNumber; 21 | FOUNDATION_EXPORT const unsigned char JJCollectionViewRoundFlowLayoutVersionString[]; 22 | 23 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/JJCollectionViewTouchAnimationConfigModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewTouchAnimationConfigModel.m 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2021/3/29. 6 | // 7 | 8 | #import "JJCollectionViewTouchAnimationConfigModel.h" 9 | 10 | @implementation JJCollectionViewTouchAnimationConfigModel 11 | 12 | + (instancetype)createDefaultModel { 13 | return [[JJCollectionViewTouchAnimationConfigModel alloc]init]; 14 | }; 15 | 16 | - (instancetype)init{ 17 | self = [super init]; 18 | if (self) { 19 | [self initialization]; 20 | } 21 | return self; 22 | } 23 | 24 | - (void)initialization { 25 | _transformScaleSx = 0.98; 26 | _transformScaleSy = 0.98; 27 | _startDuration = 0.2; 28 | _endDuration = 0.2; 29 | _isCellsAnimationEnable = YES; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListAssert.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #ifndef IGAssert 11 | #define IGAssert( condition, ... ) NSCAssert( (condition) , ##__VA_ARGS__) 12 | #endif // IGAssert 13 | 14 | #ifndef IGParameterAssert 15 | #define IGParameterAssert( condition ) IGAssert( (condition) , @"Invalid parameter not satisfying: %@", @#condition) 16 | #endif // IGParameterAssert 17 | 18 | #ifndef IGAssertMainThread 19 | #define IGAssertMainThread() IGAssert( ([NSThread isMainThread] == YES), @"Must be on the main thread") 20 | #endif // IGAssertMainThread 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 26 | # Carthage/Checkouts 27 | 28 | Carthage/Build 29 | 30 | # We recommend against adding the Pods directory to your .gitignore. However 31 | # you should judge for yourself, the pros and cons are mentioned at: 32 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 33 | # 34 | # Note: if you ignore the Pods directory, make sure to uncomment 35 | # `pod install` in .travis.yml 36 | # 37 | # Pods/ 38 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListReloadDataUpdater.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | #import 14 | 15 | /** 16 | An `IGListReloadDataUpdater` is a concrete type that conforms to `IGListUpdatingDelegate`. 17 | It is an out-of-box upater for `IGListAdapter` objects to use. 18 | 19 | @note This updater performs simple, synchronous updates using `-[UICollectionView reloadData]`. 20 | */ 21 | IGLK_SUBCLASSING_RESTRICTED 22 | @interface IGListReloadDataUpdater : NSObject 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IGListKit/IGListKit-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/SQCollectionRoundFlowLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // SQCollectionRoundFlowLayout.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by liaoyp on 2021/7/8. 6 | // 7 | 8 | #import 9 | #import 10 | @class IGListAdapter; 11 | 12 | #define CP_UNAVAILABLE(message) __attribute__((unavailable(message))) 13 | 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | @interface SQCollectionRoundFlowLayout : JJCollectionViewRoundFlowLayout 18 | 19 | @property (nonatomic, weak) IGListAdapter *adapter; 20 | 21 | - (instancetype)init CP_UNAVAILABLE("Use -[SQCollectionRoundFlowLayout initWithIGListAdapter:] instead"); 22 | + (instancetype)new CP_UNAVAILABLE("Use -[SQCollectionRoundFlowLayout initWithIGListAdapter:] instead"); 23 | - (instancetype)initWithIGListAdapter:(IGListAdapter *)adapter NS_DESIGNATED_INITIALIZER; 24 | 25 | @end 26 | 27 | 28 | NS_ASSUME_NONNULL_END 29 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListMoveIndex.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | An object representing a move between indexes. 16 | */ 17 | @interface IGListMoveIndex : NSObject 18 | 19 | /** 20 | An index in the old collection. 21 | */ 22 | @property (nonatomic, assign, readonly) NSInteger from; 23 | 24 | /** 25 | An index in the new collection. 26 | */ 27 | @property (nonatomic, assign, readonly) NSInteger to; 28 | 29 | /** 30 | :nodoc: 31 | */ 32 | - (instancetype)init NS_UNAVAILABLE; 33 | 34 | /** 35 | :nodoc: 36 | */ 37 | + (instancetype)new NS_UNAVAILABLE; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.7.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/JJCollectionViewRoundFlowLayout.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JJCollectionViewRoundFlowLayout", 3 | "version": "2.7.1", 4 | "summary": "JJCollectionViewRoundFlowLayout可设置CollectionView的BackgroundColor,设置简单,可自定义背景颜色偏移等功能。", 5 | "description": "TODO:JJCollectionViewRoundFlowLayout可设置CollectionView的BackgroundColor,可根据用户Cell个数计算背景图尺寸,可自定义是否包括计算CollectionViewHeaderView、CollectionViewFootererView或只计算Cells。设置简单,可自定义背景颜色偏移,设置显示方向(竖向、横向)显示,不同Section设置不同的背景颜色。支持Cell对齐模式。支持左、中、右、右开启模式。支持背景图点击事件响应.", 6 | "homepage": "https://github.com/kingjiajie/JJCollectionViewRoundFlowLayout", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "kingjiajie": "kingjiajie@sina.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/kingjiajie/JJCollectionViewRoundFlowLayout.git", 16 | "tag": "2.7.1" 17 | }, 18 | "platforms": { 19 | "ios": "8.0" 20 | }, 21 | "source_files": "JJCollectionViewRoundFlowLayout/Classes/**/*", 22 | "frameworks": "UIKit" 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListMoveIndexPath.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | An object representing a move between indexes. 16 | */ 17 | @interface IGListMoveIndexPath : NSObject 18 | 19 | /** 20 | An index path in the old collection. 21 | */ 22 | @property (nonatomic, strong, readonly) NSIndexPath *from; 23 | 24 | /** 25 | An index path in the new collection. 26 | */ 27 | @property (nonatomic, strong, readonly) NSIndexPath *to; 28 | 29 | /** 30 | :nodoc: 31 | */ 32 | - (instancetype)init NS_UNAVAILABLE; 33 | 34 | /** 35 | :nodoc: 36 | */ 37 | + (instancetype)new NS_UNAVAILABLE; 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListSectionControllerInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListSectionController.h" 11 | 12 | FOUNDATION_EXTERN void IGListSectionControllerPushThread(UIViewController *viewController, id collectionContext); 13 | 14 | FOUNDATION_EXTERN void IGListSectionControllerPopThread(void); 15 | 16 | @interface IGListSectionController() 17 | 18 | @property (nonatomic, weak, readwrite) id collectionContext; 19 | 20 | @property (nonatomic, weak, readwrite) UIViewController *viewController; 21 | 22 | @property (nonatomic, assign, readwrite) BOOL isFirstSection; 23 | 24 | @property (nonatomic, assign, readwrite) BOOL isLastSection; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/Internal/IGListIndexSetResultInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface IGListIndexSetResult() 17 | 18 | - (instancetype)initWithInserts:(NSIndexSet *)inserts 19 | deletes:(NSIndexSet *)deletes 20 | updates:(NSIndexSet *)updates 21 | moves:(NSArray *)moves 22 | oldIndexMap:(NSMapTable, NSNumber *> *)oldIndexMap 23 | newIndexMap:(NSMapTable, NSNumber *> *)newIndexMap; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * https://www.objc.io/issues/6-build-tools/travis-ci/ 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode11.4 6 | language: objective-c 7 | cache: cocoapods 8 | podfile: Example/Podfile 9 | before_install: 10 | - gem install cocoapods # Since Travis is not always on latest version 11 | - pod install --project-directory=Example 12 | script: 13 | #- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/JJCollectionViewRoundFlowLayout.xcworkspace -scheme JJCollectionViewRoundFlowLayout-Example | xcpretty 14 | #- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/JJCollectionViewRoundFlowLayout.xcworkspace -scheme JJCollectionViewRoundFlowLayout-Example -sdk iphonesimulator11.4 ONLY_ACTIVE_ARCH=NO | xcpretty 15 | - set -o pipefail && xcodebuild -workspace Example/JJCollectionViewRoundFlowLayout.xcworkspace -scheme JJCollectionViewRoundFlowLayout-Example -destination 'platform=iOS Simulator,name=iPhone 6s,OS=10.3.1' ONLY_ACTIVE_ARCH=NO | xcpretty -c 16 | - pod lib lint 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit/IGListKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -l"c++" -framework "IGListKit" -framework "JJCollectionViewRoundFlowLayout" -framework "UIKit" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Tests/Pods-JJCollectionViewRoundFlowLayout_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit/IGListKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -l"c++" -framework "IGListKit" -framework "JJCollectionViewRoundFlowLayout" -framework "UIKit" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 12 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/Internal/IGListIndexPathResultInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface IGListIndexPathResult() 17 | 18 | - (instancetype)initWithInserts:(NSArray *)inserts 19 | deletes:(NSArray *)deletes 20 | updates:(NSArray *)updates 21 | moves:(NSArray *)moves 22 | oldIndexPathMap:(NSMapTable, NSIndexPath *> *)oldIndexPathMap 23 | newIndexPathMap:(NSMapTable, NSIndexPath *> *)newIndexPathMap; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/JJCollectionViewTouchAnimationConfigModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewTouchAnimationConfigModel.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2021/3/29. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface JJCollectionViewTouchAnimationConfigModel : NSObject 13 | 14 | /** 15 | transformScaleSx、transformScaleSy的值最大为1,缩放时数值不宜太小,基本0.95~0.99可以达到轻点缩放视觉效果。 16 | */ 17 | ///TransformScale的sx属性(影响缩放大小,默认0.980) 18 | @property (nonatomic, assign) CGFloat transformScaleSx; 19 | 20 | ///TransformScale的sy属性(影响缩放大小,默认0.980) 21 | @property (nonatomic, assign) CGFloat transformScaleSy; 22 | 23 | /// 点按动画时长,默认0.3 24 | @property (nonatomic, assign) CGFloat startDuration; 25 | 26 | /// 回弹动画时长,默认0.3 27 | @property (nonatomic, assign) CGFloat endDuration; 28 | 29 | /// Cells们是否也参与动画(如没有显示的Cell或者超出显示范围的Cell,collectionView系统不会显示,无法进行动画操作) 30 | @property (nonatomic, assign) BOOL isCellsAnimationEnable; 31 | 32 | /// 创建默认数值model 33 | + (instancetype)createDefaultModel; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 谢家杰 <303559363@qq.com> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListMacros.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #ifndef IGLK_SUBCLASSING_RESTRICTED 11 | #if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) 12 | #define IGLK_SUBCLASSING_RESTRICTED __attribute__((objc_subclassing_restricted)) 13 | #else 14 | #define IGLK_SUBCLASSING_RESTRICTED 15 | #endif // #if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) 16 | #endif // #ifndef IGLK_SUBCLASSING_RESTRICTED 17 | 18 | #ifndef IGLK_UNAVAILABLE 19 | #define IGLK_UNAVAILABLE(message) __attribute__((unavailable(message))) 20 | #endif // #ifndef IGLK_UNAVAILABLE 21 | 22 | #if IGLK_LOGGING_ENABLED 23 | #define IGLKLog( s, ... ) do { NSLog( @"IGListKit: %@", [NSString stringWithFormat: (s), ##__VA_ARGS__] ); } while(0) 24 | #else 25 | #define IGLKLog( s, ... ) 26 | #endif 27 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/JJCollectionViewRoundConfigModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewRoundConfigModel.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2020/1/9. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface JJCollectionViewRoundConfigModel : NSObject 13 | 14 | /// 外圈line边显示宽度 15 | @property (nonatomic, assign) CGFloat borderWidth; 16 | 17 | /// 外圈line边显示颜色 18 | @property (nonatomic, strong) UIColor *borderColor; 19 | 20 | /// 背景颜色 21 | @property (nonatomic, strong) UIColor *backgroundColor; 22 | 23 | /// 投影相关参数 24 | @property (nonatomic, strong) UIColor *shadowColor; 25 | @property (nonatomic, assign) CGSize shadowOffset; 26 | @property (nonatomic, assign) CGFloat shadowOpacity; 27 | @property (nonatomic, assign) CGFloat shadowRadius; 28 | 29 | /// 圆角 30 | @property (nonatomic, assign) CGFloat cornerRadius; 31 | /// Defaults to all four corners 32 | @property (nonatomic, assign) CACornerMask maskedCorners API_AVAILABLE(ios(11.0)); 33 | 34 | //图片 35 | @property (nonatomic, strong) UIImage *bgImage; 36 | 37 | @end 38 | 39 | NS_ASSUME_NONNULL_END 40 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/UICollectionView+IGListBatchUpdateData.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "UICollectionView+IGListBatchUpdateData.h" 11 | 12 | #import "IGListBatchUpdateData.h" 13 | 14 | @implementation UICollectionView (IGListBatchUpdateData) 15 | 16 | - (void)ig_applyBatchUpdateData:(IGListBatchUpdateData *)updateData { 17 | [self deleteItemsAtIndexPaths:[updateData.deleteIndexPaths allObjects]]; 18 | [self insertItemsAtIndexPaths:[updateData.insertIndexPaths allObjects]]; 19 | [self reloadItemsAtIndexPaths:[updateData.reloadIndexPaths allObjects]]; 20 | 21 | for (IGListMoveIndex *move in updateData.moveSections) { 22 | [self moveSection:move.from toSection:move.to]; 23 | } 24 | 25 | [self deleteSections:updateData.deleteSections]; 26 | [self insertSections:updateData.insertSections]; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit/IGListKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -l"c++" -framework "IGListKit" -framework "JJCollectionViewRoundFlowLayout" -framework "UIKit" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/IGListKit/IGListKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -l"c++" -framework "IGListKit" -framework "JJCollectionViewRoundFlowLayout" -framework "UIKit" 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListDiffKit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | /** 13 | * Project version number for IGListKit. 14 | */ 15 | FOUNDATION_EXPORT double IGListKitVersionNumber; 16 | 17 | /** 18 | * Project version string for IGListKit. 19 | */ 20 | FOUNDATION_EXPORT const unsigned char IGListKitVersionString[]; 21 | 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListAdapterDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class IGListAdapter; 13 | 14 | /** 15 | Conform to `IGListAdapterDelegate` to receive display events for objects in a list. 16 | */ 17 | @protocol IGListAdapterDelegate 18 | 19 | /** 20 | Notifies the delegate that a list object is about to be displayed. 21 | 22 | @param listAdapter The list adapter sending this information. 23 | @param object The object that will display. 24 | @param index The index of the object in the list. 25 | */ 26 | - (void)listAdapter:(IGListAdapter *)listAdapter willDisplayObject:(id)object atIndex:(NSInteger)index; 27 | 28 | /** 29 | Notifies the delegate that a list object is no longer being displayed. 30 | 31 | @param listAdapter The list adapter sending this information. 32 | @param object The object that ended display. 33 | @param index The index of the object in the list. 34 | */ 35 | - (void)listAdapter:(IGListAdapter *)listAdapter didEndDisplayingObject:(id)object atIndex:(NSInteger)index; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListDiffable.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | /** 13 | The `IGListDiffable` protocol provides methods needed to compare the identity and equality of two objects. 14 | */ 15 | @protocol IGListDiffable 16 | 17 | /** 18 | Returns a key that uniquely identifies the object. 19 | 20 | @return A key that can be used to uniquely identify the object. 21 | 22 | @note Two objects may share the same identifier, but are not equal. A common pattern is to use the `NSObject` 23 | category for automatic conformance. However this means that objects will be identified on their 24 | pointer value so finding updates becomes impossible. 25 | 26 | @warning This value should never be mutated. 27 | */ 28 | - (nonnull id)diffIdentifier; 29 | 30 | /** 31 | Returns whether the receiver and a given object are equal. 32 | 33 | @param object The object to be compared to the receiver. 34 | 35 | @return `YES` if the receiver and object are equal, otherwise `NO`. 36 | */ 37 | - (BOOL)isEqualToDiffableObject:(nullable id)object; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListAdapterProxy.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | @class IGListAdapter; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | /** 19 | A proxy that sends a custom set of selectors to an IGListAdapter object and the rest to a UICollectionViewDelegate 20 | target. 21 | */ 22 | IGLK_SUBCLASSING_RESTRICTED 23 | @interface IGListAdapterProxy : NSProxy 24 | 25 | /** 26 | Create a new proxy object with targets and interceptor. 27 | 28 | @param collectionViewTarget A UICollectionViewDelegate conforming object that receives unintercepted messages. 29 | @param scrollViewTarget A UIScrollViewDelegate conforming object that receives unintercepted messages. 30 | @param interceptor An IGListAdapter object that intercepts a set of messages. 31 | 32 | @return A new IGListAdapterProxy object. 33 | */ 34 | - (instancetype)initWithCollectionViewTarget:(nullable id)collectionViewTarget 35 | scrollViewTarget:(nullable id)scrollViewTarget 36 | interceptor:(IGListAdapter *)interceptor; 37 | 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListMoveIndexPath.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListMoveIndexPath.h" 11 | #import "IGListMoveIndexPathInternal.h" 12 | 13 | #import 14 | 15 | @implementation IGListMoveIndexPath 16 | 17 | - (instancetype)initWithFrom:(NSIndexPath *)from to:(NSIndexPath *)to { 18 | NSParameterAssert(from != nil); 19 | NSParameterAssert(to != nil); 20 | if (self = [super init]) { 21 | _from = from; 22 | _to = to; 23 | } 24 | return self; 25 | } 26 | 27 | - (NSUInteger)hash { 28 | return [_from hash] ^ [_to hash]; 29 | } 30 | 31 | - (BOOL)isEqual:(id)object { 32 | if (object == self) { 33 | return YES; 34 | } 35 | if ([object isKindOfClass:[IGListMoveIndexPath class]]) { 36 | NSIndexPath *f1 = self.from, *f2 = [object from]; 37 | NSIndexPath *t1 = self.to, *t2 = [object to]; 38 | return [f1 isEqual:f2] && [t1 isEqual:t2]; 39 | } 40 | return NO; 41 | } 42 | 43 | - (NSComparisonResult)compare:(id)object { 44 | return [[self from] compare:[object from]]; 45 | } 46 | 47 | - (NSString *)description { 48 | return [NSString stringWithFormat:@"<%@ %p; from: %@; to: %@;>", NSStringFromClass(self.class), self, self.from, self.to]; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/LICENSE.md: -------------------------------------------------------------------------------- 1 | BSD License 2 | 3 | For `IGListKit` software 4 | 5 | Copyright (c) 2016, Facebook, Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | * Neither the name Facebook nor the names of its contributors may be used to 18 | endorse or promote products derived from this software without specific 19 | prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListWorkingRangeHandler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class IGListAdapter; 13 | 14 | @protocol IGListSectionType; 15 | 16 | @interface IGListWorkingRangeHandler : NSObject 17 | 18 | /** 19 | Initializes the working range handler. 20 | 21 | @param workingRangeSize the number of sections beyond the visible viewport that should be considered within the working 22 | range. Applies equally in both directions above and below the viewport. 23 | */ 24 | - (instancetype)initWithWorkingRangeSize:(NSInteger)workingRangeSize; 25 | 26 | /** 27 | Tells the handler that a cell will be displayed in the IGListKit infra. 28 | 29 | @param indexPath The index path of the cell in the UICollectionView. 30 | @param listAdapter The adapter managing the infra. 31 | */ 32 | - (void)willDisplayItemAtIndexPath:(NSIndexPath *)indexPath 33 | forListAdapter:(IGListAdapter *)listAdapter; 34 | 35 | /** 36 | Tells the handler that a cell did end display in the IGListKit infra. 37 | 38 | @param indexPath The index path of the cell in the UICollectionView. 39 | @param listAdapter The adapter managing the infra. 40 | */ 41 | - (void)didEndDisplayingItemAtIndexPath:(NSIndexPath *)indexPath 42 | forListAdapter:(IGListAdapter *)listAdapter; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListMoveIndex.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListMoveIndex.h" 11 | #import "IGListMoveIndexInternal.h" 12 | 13 | @implementation IGListMoveIndex 14 | 15 | - (instancetype)initWithFrom:(NSInteger)from to:(NSInteger)to { 16 | if (self = [super init]) { 17 | _from = from; 18 | _to = to; 19 | } 20 | return self; 21 | } 22 | 23 | - (NSUInteger)hash { 24 | return _from ^ _to; 25 | } 26 | 27 | - (BOOL)isEqual:(id)object { 28 | if (object == self) { 29 | return YES; 30 | } 31 | if ([object isKindOfClass:[IGListMoveIndex class]]) { 32 | const NSInteger f1 = self.from, f2 = [object from]; 33 | const NSInteger t1 = self.to, t2 = [object to]; 34 | return f1 == f2 && t1 == t2; 35 | } 36 | return NO; 37 | } 38 | 39 | - (NSComparisonResult)compare:(id)object { 40 | const NSInteger right = [object from]; 41 | const NSInteger left = [self from]; 42 | if (left == right) { 43 | return NSOrderedSame; 44 | } else if (left < right) { 45 | return NSOrderedAscending; 46 | } else { 47 | return NSOrderedDescending; 48 | } 49 | } 50 | 51 | - (NSString *)description { 52 | return [NSString stringWithFormat:@"<%@ %p; from: %zi; to: %zi;>", NSStringFromClass(self.class), self, self.from, self.to]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListWorkingRangeDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class IGListAdapter; 13 | @class IGListSectionController; 14 | 15 | @protocol IGListSectionType; 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | Implement this protocol to receive working range events for a list. 21 | 22 | The working range is a range *near* the viewport in which you can begin preparing content for display. For example, 23 | you could begin decoding images, or warming text caches. 24 | */ 25 | @protocol IGListWorkingRangeDelegate 26 | 27 | /** 28 | Notifies the delegate that an section controller will enter the working range. 29 | 30 | @param listAdapter The adapter controlling the list. 31 | @param sectionController The section controller entering the range. 32 | */ 33 | - (void)listAdapter:(IGListAdapter *)listAdapter sectionControllerWillEnterWorkingRange:(IGListSectionController *)sectionController; 34 | 35 | /** 36 | Notifies the delegate that an section controller exited the working range. 37 | 38 | @param listAdapter The adapter controlling the list. 39 | @param sectionController The section controller that exited the range. 40 | */ 41 | - (void)listAdapter:(IGListAdapter *)listAdapter sectionControllerDidExitWorkingRange:(IGListSectionController *)sectionController; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListGridCollectionViewLayout.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | /** 16 | `IGListGridCollectionViewLayout` provides a vertically-scrolling, section-based grid layout for `UICollectionView`. 17 | Items in the layout are displayed consecutively in a grid with exactly 1 item per section. 18 | If items are square, the appearance would be similar to the iOS Photos app. 19 | However, the size of the items for each section can vary. 20 | */ 21 | IGLK_SUBCLASSING_RESTRICTED 22 | @interface IGListGridCollectionViewLayout : UICollectionViewLayout 23 | 24 | /** 25 | The minimum spacing to use between lines of items in the grid. The default value is `0.0`. 26 | */ 27 | @property (nonatomic, assign) IBInspectable CGFloat minimumLineSpacing; 28 | 29 | /** 30 | The minimum spacing to use between items in the same row. The default value is `0.0`. 31 | */ 32 | @property (nonatomic, assign) IBInspectable CGFloat minimumInteritemSpacing; 33 | 34 | /** 35 | The default size to use for cells. The default value is `(0.0, 0.0)`. 36 | If this size is non-zero, the layout will use this item size for all items. 37 | When the size is zero (the default), then the layout will query the collection view's delegate for the size. 38 | */ 39 | @property (nonatomic, assign) IBInspectable CGSize itemSize; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/JJCollectionViewRoundFlowLayout-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListStackedSectionControllerInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "IGListStackedSectionController.h" 13 | 14 | @interface IGListStackedSectionController () 15 | < 16 | IGListCollectionContext, 17 | IGListDisplayDelegate, 18 | IGListScrollDelegate, 19 | IGListWorkingRangeDelegate 20 | > 21 | 22 | @property (nonatomic, strong, readonly) NSOrderedSet<__kindof IGListSectionController *> *sectionControllers; 23 | 24 | /// An array the length of the total number of items in the stack, pointing to a section controller for the item index. 25 | @property (nonatomic, copy) NSArray *> *sectionControllersForItems; 26 | 27 | /// An array of index offsets for each item in the flattened stack. 28 | @property (nonatomic, copy) NSArray *sectionControllerOffsets; 29 | 30 | /// A cached collection of the number of items summed from each section controller in the stack. 31 | @property (nonatomic, assign) NSInteger flattenedNumberOfItems; 32 | 33 | /// A counted set of the visible section controllers, used to forward granular display events to child section controllers 34 | @property (nonatomic, strong, readonly) NSCountedSet *visibleSectionControllers; 35 | 36 | - (IGListSectionController *)sectionControllerForObjectIndex:(NSInteger)itemIndex; 37 | - (NSInteger)offsetForSectionController:(IGListSectionController *)sectionController; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint JJCollectionViewRoundFlowLayout.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'JJCollectionViewRoundFlowLayout' 11 | s.version = '2.9.2' 12 | s.summary = 'JJCollectionViewRoundFlowLayout可设置CollectionView的BackgroundColor,设置简单,可自定义背景颜色偏移等功能。' 13 | 14 | # This description is used to generate tags and improve search results. 15 | # * Think: What does it do? Why did you write it? What is the focus? 16 | # * Try to keep it short, snappy and to the point. 17 | # * Write the description between the DESC delimiters below. 18 | # * Finally, don't worry about the indent, CocoaPods strips it! 19 | 20 | s.description = <<-DESC 21 | TODO:JJCollectionViewRoundFlowLayout可设置CollectionView的BackgroundColor,可根据用户Cell个数计算背景图尺寸,可自定义是否包括计算CollectionViewHeaderView、CollectionViewFootererView或只计算Cells。设置简单,可自定义背景颜色偏移,设置显示方向(竖向、横向)显示,不同Section设置不同的背景颜色。支持Cell对齐模式。支持左、中、右、右开启模式。支持背景图点击事件响应,点击事件可支持动画点按. 22 | DESC 23 | 24 | s.homepage = 'https://github.com/kingjiajie/JJCollectionViewRoundFlowLayout' 25 | # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 26 | s.license = { :type => 'MIT', :file => 'LICENSE' } 27 | s.author = { 'kingjiajie' => 'kingjiajie@sina.com' } 28 | s.source = { :git => 'https://github.com/kingjiajie/JJCollectionViewRoundFlowLayout.git', :tag => s.version.to_s } 29 | 30 | s.ios.deployment_target = '8.0' 31 | s.source_files = 'JJCollectionViewRoundFlowLayout/Classes/**/*' 32 | s.frameworks = 'UIKit' 33 | 34 | end 35 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListCollectionView.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListCollectionView.h" 11 | 12 | @implementation IGListCollectionView 13 | 14 | - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout { 15 | if (self = [super initWithFrame:frame collectionViewLayout:layout]) { 16 | 17 | UIColor *backgroundAppearanceColor = (UIColor *) [[[self class] appearance] backgroundColor]; 18 | if (!backgroundAppearanceColor) { 19 | self.backgroundColor = [UIColor whiteColor]; 20 | } 21 | 22 | if ([self respondsToSelector:@selector(setPrefetchingEnabled:)]) { 23 | self.prefetchingEnabled = NO; 24 | } 25 | 26 | self.alwaysBounceVertical = YES; 27 | } 28 | return self; 29 | } 30 | 31 | - (instancetype)initWithCoder:(NSCoder *)aDecoder { 32 | if (self = [super initWithCoder:aDecoder]) { 33 | if ([self respondsToSelector:@selector(setPrefetchingEnabled:)]) { 34 | self.prefetchingEnabled = NO; 35 | } 36 | } 37 | return self; 38 | } 39 | 40 | - (void)layoutSubviews { 41 | /** 42 | UICollectionView will sometimes lay its cells out with an animation. This is especially noticeable on older devices 43 | while scrolling quickly. The simplest fix is to just disable animations for -layoutSubviews, which is where cells 44 | and other views inside the UICollectionView are laid out. 45 | */ 46 | [UIView performWithoutAnimation:^{ 47 | [super layoutSubviews]; 48 | }]; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListScrollDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class IGListAdapter; 13 | @class IGListSectionController; 14 | 15 | @protocol IGListSectionType; 16 | 17 | /** 18 | Implement this protocol to receive display events for an section controller when it is on screen. 19 | */ 20 | @protocol IGListScrollDelegate 21 | 22 | /** 23 | Tells the delegate that the section controller was scrolled on screen. 24 | 25 | @param listAdapter The list adapter whose collection view was scrolled. 26 | @param sectionController The visible section controller that was scrolled. 27 | */ 28 | - (void)listAdapter:(IGListAdapter *)listAdapter didScrollSectionController:(IGListSectionController *)sectionController; 29 | 30 | /** 31 | Tells the delegate that the section controller will be dragged on screen. 32 | 33 | @param listAdapter The list adapter whose collection view will drag. 34 | @param sectionController The visible section controller that will drag. 35 | */ 36 | - (void)listAdapter:(IGListAdapter *)listAdapter willBeginDraggingSectionController:(IGListSectionController *)sectionController; 37 | 38 | /** 39 | Tells the delegate that the section controller did end dragging on screen. 40 | 41 | @param listAdapter The list adapter whose collection view ended dragging. 42 | @param sectionController The visible section controller that ended dragging. 43 | */ 44 | - (void)listAdapter:(IGListAdapter *)listAdapter didEndDraggingSectionController:(IGListSectionController *)sectionController willDecelerate:(BOOL)decelerate; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListStackedSectionController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | /** 15 | An instace of `IGListStackedSectionController` is a clustered section controller, 16 | composed of many child section controllers. It constructs and routes item-level 17 | indexes to the appropriate child section controller with a local index. This lets you build section controllers made up 18 | of individual units that can be shared and reused with other section controllers. 19 | 20 | For example, you can create a "Comments" section controller that displays lists of text that is used alongside photo, 21 | video, or slideshow section controllers. You then have four small and manageable section controllers instead of one 22 | huge class. 23 | */ 24 | IGLK_SUBCLASSING_RESTRICTED 25 | @interface IGListStackedSectionController : IGListSectionController 26 | 27 | /** 28 | Creates a new stacked section controller. 29 | 30 | @param sectionControllers An array of section controllers that make up the stack. 31 | 32 | @note The order of the section controllers dictates the order in which they appear. 33 | 34 | @warning The first section controller that is the supplementary source decides which supplementary views get displayed. 35 | */ 36 | - (instancetype)initWithSectionControllers:(NSArray *> *)sectionControllers NS_DESIGNATED_INITIALIZER; 37 | 38 | /** 39 | :nodoc: 40 | */ 41 | - (instancetype)init NS_UNAVAILABLE; 42 | 43 | /** 44 | :nodoc: 45 | */ 46 | + (instancetype)new NS_UNAVAILABLE; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/JJCollectionViewFlowLayoutUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewFlowLayoutUtils.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2020/1/10. 6 | // 7 | 8 | #import 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | @interface JJCollectionViewFlowLayoutUtils : NSObject 13 | 14 | /// 获取cell间距 15 | /// @param sectionIndex sectionIndex description 16 | + (CGFloat)evaluatedMinimumInteritemSpacingForSectionWithCollectionLayout:(UICollectionViewFlowLayout *)layout atIndex:(NSInteger)sectionIndex; 17 | 18 | /// 获取用户设置CollectionView 对应section的 sectionInset 19 | /// @param index index description 20 | + (UIEdgeInsets)evaluatedSectionInsetForItemWithCollectionLayout:(UICollectionViewFlowLayout *)layout atIndex:(NSInteger)index; 21 | 22 | 23 | #pragma mark - 不规则Cell计算方案 24 | 25 | /// 不规则cell找出top最高位置 26 | /// @param section section description 27 | /// @param numberOfItems numberOfItems description 28 | /// @param defaultFrame defaultFrame description 29 | + (CGRect)calculateIrregularitiesCellByMinTopFrameWithLayout:(UICollectionViewFlowLayout *)layout 30 | section:(NSInteger)section 31 | numberOfItems:(NSInteger)numberOfItems 32 | defaultFrame:(CGRect)defaultFrame; 33 | 34 | /// 不规则cell找出bootom最低位置 35 | /// @param layout layout description 36 | /// @param section section description 37 | /// @param numberOfItems numberOfItems description 38 | /// @param defaultFrame defaultFrame description 39 | + (CGRect)calculateIrregularitiesCellByMaxBottomFrameWithLayout:(UICollectionViewFlowLayout *)layout 40 | section:(NSInteger)section 41 | numberOfItems:(NSInteger)numberOfItems 42 | defaultFrame:(CGRect)defaultFrame; 43 | 44 | @end 45 | 46 | NS_ASSUME_NONNULL_END 47 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListDisplayHandler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | @class IGListAdapter; 15 | @class IGListSectionController; 16 | 17 | @protocol IGListSectionType; 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | IGLK_SUBCLASSING_RESTRICTED 22 | @interface IGListDisplayHandler : NSObject 23 | 24 | /** 25 | Tells the handler that a cell will be displayed in the IGListKit infra. 26 | 27 | @param cell A cell that will display. 28 | @param listAdapter The adapter managing the infra. 29 | @param sectionController The section controller the cell is in. 30 | @param object The object associated with the section controller. 31 | @param indexPath The index path of the cell in the UICollectionView. 32 | */ 33 | - (void)willDisplayCell:(UICollectionViewCell *)cell 34 | forListAdapter:(IGListAdapter *)listAdapter 35 | sectionController:(IGListSectionController *)sectionController 36 | object:(id)object 37 | indexPath:(NSIndexPath *)indexPath; 38 | 39 | /** 40 | Tells the handler that a cell did end display in the IGListKit infra. 41 | 42 | @param cell A cell that did end display. 43 | @param listAdapter The adapter managing the infra. 44 | @param sectionController The section controller the cell is in. 45 | @param indexPath The index path of the cell in the UICollectionView. 46 | */ 47 | - (void)didEndDisplayingCell:(UICollectionViewCell *)cell 48 | forListAdapter:(IGListAdapter *)listAdapter 49 | sectionController:(IGListSectionController *)sectionController 50 | indexPath:(NSIndexPath *)indexPath; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/IGListKit/IGListKit-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "IGListAssert.h" 14 | #import "IGListBatchUpdateData.h" 15 | #import "IGListCompatibility.h" 16 | #import "IGListDiff.h" 17 | #import "IGListDiffable.h" 18 | #import "IGListDiffKit.h" 19 | #import "IGListExperiments.h" 20 | #import "IGListIndexPathResult.h" 21 | #import "IGListIndexSetResult.h" 22 | #import "IGListMacros.h" 23 | #import "IGListMoveIndex.h" 24 | #import "IGListMoveIndexPath.h" 25 | #import "NSNumber+IGListDiffable.h" 26 | #import "NSString+IGListDiffable.h" 27 | #import "IGListAdapter.h" 28 | #import "IGListAdapterDataSource.h" 29 | #import "IGListAdapterDelegate.h" 30 | #import "IGListAdapterUpdater.h" 31 | #import "IGListAdapterUpdaterDelegate.h" 32 | #import "IGListCollectionContext.h" 33 | #import "IGListCollectionView.h" 34 | #import "IGListDisplayDelegate.h" 35 | #import "IGListGridCollectionViewLayout.h" 36 | #import "IGListKit.h" 37 | #import "IGListReloadDataUpdater.h" 38 | #import "IGListScrollDelegate.h" 39 | #import "IGListSectionController.h" 40 | #import "IGListSectionType.h" 41 | #import "IGListSingleSectionController.h" 42 | #import "IGListStackedSectionController.h" 43 | #import "IGListSupplementaryViewSource.h" 44 | #import "IGListUpdatingDelegate.h" 45 | #import "IGListWorkingRangeDelegate.h" 46 | #import "IGListAssert.h" 47 | #import "IGListBatchUpdateData.h" 48 | #import "IGListCompatibility.h" 49 | #import "IGListDiff.h" 50 | #import "IGListDiffable.h" 51 | #import "IGListDiffKit.h" 52 | #import "IGListExperiments.h" 53 | #import "IGListIndexPathResult.h" 54 | #import "IGListIndexSetResult.h" 55 | #import "IGListMacros.h" 56 | #import "IGListMoveIndex.h" 57 | #import "IGListMoveIndexPath.h" 58 | #import "NSNumber+IGListDiffable.h" 59 | #import "NSString+IGListDiffable.h" 60 | 61 | FOUNDATION_EXPORT double IGListKitVersionNumber; 62 | FOUNDATION_EXPORT const unsigned char IGListKitVersionString[]; 63 | 64 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/JJAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // JJAppDelegate.m 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by 谢家杰 on 10/30/2019. 6 | // Copyright (c) 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import "JJAppDelegate.h" 10 | 11 | @implementation JJAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListSupplementaryViewSource.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | /** 15 | Conform to this protocol to provide information about a list's supplementary views. This data is used in 16 | `IGListAdapter` which then configures and maintains a `UICollectionView`. The supplementary API reflects that in 17 | `UICollectionView`, `UICollectionViewLayout`, and `UICollectionViewDataSource`. 18 | */ 19 | @protocol IGListSupplementaryViewSource 20 | 21 | /** 22 | Asks the SupplementaryViewSource for an array of supported element kinds. 23 | 24 | @return An array of element kind strings that the supplementary source handles. 25 | */ 26 | - (NSArray *)supportedElementKinds; 27 | 28 | /** 29 | Asks the SupplementaryViewSource for a configured supplementary view for the specified kind and index. 30 | 31 | @param elementKind The kind of supplementary view being requested 32 | @param index The index for the supplementary veiw being requested. 33 | 34 | @note This is your opportunity to do any supplementary view setup and configuration. 35 | 36 | @warning You should never allocate new views in this method. Instead deque a view from the `IGListCollectionContext`. 37 | */ 38 | - (__kindof UICollectionReusableView *)viewForSupplementaryElementOfKind:(NSString *)elementKind 39 | atIndex:(NSInteger)index; 40 | 41 | /** 42 | Asks the SupplementaryViewSource for the size of a supplementary view for the given kind and index path. 43 | 44 | @param elementKind The kind of supplementary view. 45 | @param index The index of the requested view. 46 | 47 | @return The size for the supplementary view. 48 | */ 49 | - (CGSize)sizeForSupplementaryViewOfKind:(NSString *)elementKind 50 | atIndex:(NSInteger)index; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListAdapterUpdater.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | An `IGListAdapterUpdater` is a concrete type that conforms to `IGListUpdatingDelegate`. 21 | It is an out-of-box upater for `IGListAdapter` objects to use. 22 | 23 | @note This updater performs re-entrant, coalesced updating for a list. It also uses a least-minimal diff 24 | for calculating UI updates when `IGListAdapter` calls 25 | `-performUpdateWithCollectionView:fromObjects:toObjects:completion:`. 26 | */ 27 | IGLK_SUBCLASSING_RESTRICTED 28 | @interface IGListAdapterUpdater : NSObject 29 | 30 | /** 31 | The delegate that receives events with data on the performance of a transition. 32 | */ 33 | @property (nonatomic, weak) id delegate; 34 | 35 | /** 36 | A flag indicating if a move should be treated as a "delete, then insert" operation. 37 | */ 38 | @property (nonatomic, assign) BOOL movesAsDeletesInserts; 39 | 40 | /** 41 | A flag indicating whether this updater should skip diffing and simply call 42 | `reloadData` for updates when the collection view is not in a window. The default value is `YES`. 43 | 44 | @note This will result in better performance, but will not generate the same delegate 45 | callbacks. If using a custom layout, it will not receive `prepareForCollectionViewUpdates:`. 46 | 47 | @warning On iOS < 8.3, this behavior is unsupported and will always be treated as `NO`. 48 | */ 49 | @property (nonatomic, assign) BOOL allowsBackgroundReloading; 50 | 51 | /** 52 | A bitmask of experiments to conduct on the updater. 53 | */ 54 | @property (nonatomic, assign) IGListExperiment experiments; 55 | 56 | @end 57 | 58 | NS_ASSUME_NONNULL_END 59 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListKit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | /** 13 | * Project version number for IGListKit. 14 | */ 15 | FOUNDATION_EXPORT double IGListKitVersionNumber; 16 | 17 | /** 18 | * Project version string for IGListKit. 19 | */ 20 | FOUNDATION_EXPORT const unsigned char IGListKitVersionString[]; 21 | 22 | #if TARGET_OS_EMBEDDED || TARGET_OS_SIMULATOR 23 | 24 | // iOS and tvOS only: 25 | 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | #import 38 | #import 39 | #import 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | 46 | #endif 47 | 48 | // Shared (iOS, tvOS, macOS compatible): 49 | 50 | #import 51 | #import 52 | #import 53 | #import 54 | #import 55 | #import 56 | #import 57 | #import 58 | #import 59 | #import 60 | #import 61 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/JJCollectionViewRoundFlowLayout.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-JJCollectionViewRoundFlowLayout_Tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-JJCollectionViewRoundFlowLayout_Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListDiff.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | #import 14 | #import 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | /** 19 | An option for how to do comparisons between similar objects. 20 | */ 21 | typedef NS_ENUM(NSInteger, IGListDiffOption) { 22 | /** 23 | Compare objects using pointer personality. 24 | */ 25 | IGListDiffPointerPersonality, 26 | /** 27 | Compare objects using `-[IGListDiffable isEqualToDiffableObject:]`. 28 | */ 29 | IGListDiffEquality 30 | }; 31 | 32 | /** 33 | Creates a diff using indexes between two collections. 34 | 35 | @param oldArray The old objects to diff against. 36 | @param newArray The new objects. 37 | @param option An option on how to compare objects. 38 | 39 | @return A result object containing affected indexes. 40 | */ 41 | FOUNDATION_EXTERN IGListIndexSetResult *IGListDiff(NSArray> *_Nullable oldArray, 42 | NSArray> *_Nullable newArray, 43 | IGListDiffOption option); 44 | 45 | /** 46 | Creates a diff using index paths between two collections. 47 | 48 | @param fromSection The old section. 49 | @param toSection The new section. 50 | @param oldArray The old objects to diff against. 51 | @param newArray The new objects. 52 | @param option An option on how to compare objects. 53 | 54 | @return A result object containing affected indexes. 55 | */ 56 | FOUNDATION_EXTERN IGListIndexPathResult *IGListDiffPaths(NSInteger fromSection, 57 | NSInteger toSection, 58 | NSArray> *_Nullable oldArray, 59 | NSArray> *_Nullable newArray, 60 | IGListDiffOption option); 61 | 62 | NS_ASSUME_NONNULL_END 63 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListAdapterUpdaterInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "IGListAdapterUpdater.h" 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | FOUNDATION_EXTERN void convertReloadToDeleteInsert(NSMutableIndexSet *reloads, 18 | NSMutableIndexSet *deletes, 19 | NSMutableIndexSet *inserts, 20 | IGListIndexSetResult *result, 21 | NSArray> *fromObjects); 22 | 23 | @interface IGListAdapterUpdater () 24 | 25 | @property (nonatomic, strong, readonly) NSMutableArray *completionBlocks; 26 | 27 | @property (nonatomic, copy, nullable) NSArray *fromObjects; 28 | @property (nonatomic, copy, nullable) NSArray *toObjects; 29 | @property (nonatomic, copy, nullable) NSArray *pendingTransitionToObjects; 30 | 31 | @property (nonatomic, assign) BOOL queuedUpdateIsAnimated; 32 | 33 | @property (nonatomic, strong, readonly) NSMutableSet *deleteIndexPaths; 34 | @property (nonatomic, strong, readonly) NSMutableSet *insertIndexPaths; 35 | @property (nonatomic, strong, readonly) NSMutableSet *reloadIndexPaths; 36 | @property (nonatomic, strong, readonly) NSMutableIndexSet *reloadSections; 37 | 38 | @property (nonatomic, copy, nullable) IGListObjectTransitionBlock objectTransitionBlock; 39 | @property (nonatomic, copy, nullable) NSMutableArray *itemUpdateBlocks; 40 | 41 | @property (nonatomic, copy, nullable) IGListReloadUpdateBlock reloadUpdates; 42 | @property (nonatomic, assign, getter=hasQueuedReloadData) BOOL queuedReloadData; 43 | 44 | @property (nonatomic, assign) BOOL batchUpdateOrReloadInProgress; 45 | 46 | - (void)performReloadDataWithCollectionView:(UICollectionView *)collectionView; 47 | - (void)performBatchUpdatesWithCollectionView:(UICollectionView *)collectionView; 48 | - (void)cleanupState; 49 | - (BOOL)hasChanges; 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListIndexSetResult.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | A result object returned when diffing with indexes. 18 | */ 19 | @interface IGListIndexSetResult : NSObject 20 | 21 | /** 22 | The indexes inserted into the new collection. 23 | */ 24 | @property (nonatomic, strong, readonly) NSIndexSet *inserts; 25 | 26 | /** 27 | The indexes deleted from the old collection. 28 | */ 29 | @property (nonatomic, strong, readonly) NSIndexSet *deletes; 30 | 31 | /** 32 | The indexes in the new collection that need updated. 33 | */ 34 | @property (nonatomic, strong, readonly) NSIndexSet *updates; 35 | 36 | /** 37 | The moves from an index in the old collection to an index in the new collection. 38 | */ 39 | @property (nonatomic, copy, readonly) NSArray *moves; 40 | 41 | /** 42 | Returns whether the result has any changes or not. 43 | 44 | @return `YES` if the result has changes, `NO` otherwise. 45 | */ 46 | - (BOOL)hasChanges; 47 | 48 | /** 49 | Returns the index of the object with the specified identifier *before* the diff. 50 | 51 | @param identifier The diff identifier of the object. 52 | 53 | @return The index of the object before the diff, or `NSNotFound`. 54 | 55 | @see `-[IGListDiffable diffIdentifier]`. 56 | */ 57 | - (NSInteger)oldIndexForIdentifier:(id)identifier; 58 | 59 | /** 60 | Returns the index of the object with the specified identifier *after* the diff. 61 | 62 | @param identifier The diff identifier of the object. 63 | 64 | @return The index path of the object after the diff, or `NSNotFound`. 65 | 66 | @see `-[IGListDiffable diffIdentifier]`. 67 | */ 68 | - (NSInteger)newIndexForIdentifier:(id)identifier; 69 | 70 | /** 71 | Creates a new result object with operations safe for use in `UITableView` and `UICollectionView` batch updates. 72 | */ 73 | - (IGListIndexSetResult *)resultForBatchUpdates; 74 | 75 | /** 76 | :nodoc: 77 | */ 78 | - (instancetype)init NS_UNAVAILABLE; 79 | 80 | /** 81 | :nodoc: 82 | */ 83 | + (instancetype)new NS_UNAVAILABLE; 84 | 85 | @end 86 | 87 | NS_ASSUME_NONNULL_END 88 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListIndexPathResult.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | /** 17 | A result object returned when diffing with sections. 18 | */ 19 | @interface IGListIndexPathResult : NSObject 20 | 21 | /** 22 | The index paths inserted into the new collection. 23 | */ 24 | @property (nonatomic, copy, readonly) NSArray *inserts; 25 | 26 | /** 27 | The index paths deleted from the old collection. 28 | */ 29 | @property (nonatomic, copy, readonly) NSArray *deletes; 30 | 31 | /** 32 | The index paths in the new collection that need updated. 33 | */ 34 | @property (nonatomic, copy, readonly) NSArray *updates; 35 | 36 | /** 37 | The moves from an index path in the old collection to an index path in the new collection. 38 | */ 39 | @property (nonatomic, copy, readonly) NSArray *moves; 40 | 41 | /** 42 | Returns whether the result has any changes or not. 43 | 44 | @return `YES` if the result has changes, `NO` otherwise. 45 | */ 46 | - (BOOL)hasChanges; 47 | 48 | /** 49 | Returns the index path of the object with the specified identifier *before* the diff. 50 | 51 | @param identifier The diff identifier of the object. 52 | 53 | @return The index path of the object before the diff, or `nil`. 54 | 55 | @see `-[IGListDiffable diffIdentifier]`. 56 | */ 57 | - (nullable NSIndexPath *)oldIndexPathForIdentifier:(id)identifier; 58 | 59 | /** 60 | Returns the index path of the object with the specified identifier *after* the diff. 61 | 62 | @param identifier The diff identifier of the object. 63 | 64 | @return The index path of the object after the diff, or `nil`. 65 | 66 | @see `-[IGListDiffable diffIdentifier]`. 67 | */ 68 | - (nullable NSIndexPath *)newIndexPathForIdentifier:(id)identifier; 69 | 70 | /** 71 | Creates a new result object with operations safe for use in `UITableView` and `UICollectionView` batch updates. 72 | */ 73 | - (IGListIndexPathResult *)resultForBatchUpdates; 74 | 75 | /** 76 | :nodoc: 77 | */ 78 | - (instancetype)init NS_UNAVAILABLE; 79 | 80 | /** 81 | :nodoc: 82 | */ 83 | + (instancetype)new NS_UNAVAILABLE; 84 | 85 | @end 86 | 87 | NS_ASSUME_NONNULL_END 88 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListAdapterDataSource.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | @class IGListAdapter; 15 | @class IGListSectionController; 16 | 17 | @protocol IGListSectionType; 18 | 19 | NS_ASSUME_NONNULL_BEGIN 20 | 21 | /** 22 | Implement this protocol to provide data to an `IGListAdapter`. 23 | */ 24 | @protocol IGListAdapterDataSource 25 | 26 | /** 27 | Asks the data source for the objects to display in the list. 28 | 29 | @param listAdapter The list adapter requesting this information. 30 | 31 | @return An array of objects for the list. 32 | */ 33 | - (NSArray> *)objectsForListAdapter:(IGListAdapter *)listAdapter; 34 | 35 | /** 36 | Asks the data source for a section controller for the specified object in the list. 37 | 38 | @param listAdapter The list adapter requesting this information. 39 | @param object An object in the list. 40 | 41 | @return A new section controller instance that can be displayed in the list. 42 | 43 | @note New section controllers should be initialized here for objects when asked. You may pass any other data to 44 | the section controller at this time. 45 | 46 | Section controllers are initialized for all objects whenever the `IGListAdapter` is created, updated, or reloaded. 47 | Section controllers are reused when objects are moved or updated. Maintaining the `-[IGListDiffable diffIdentifier]` 48 | guarentees this. 49 | */ 50 | - (IGListSectionController *)listAdapter:(IGListAdapter *)listAdapter sectionControllerForObject:(id)object; 51 | 52 | /** 53 | Asks the data source for a view to use as the collection view background when the list is empty. 54 | 55 | @param listAdapter The list adapter requesting this information. 56 | 57 | @return A view to use as the collection view background, or `nil` if you don't want a background view. 58 | 59 | @note This method is called every time the list adapter is updated. You are free to return new views every time, 60 | but for performance reasons you may want to retain the view and return it here. The infra is only responsible for 61 | adding the background view and maintaining its visibility. 62 | */ 63 | - (nullable UIView *)emptyViewForListAdapter:(IGListAdapter *)listAdapter; 64 | 65 | @end 66 | 67 | NS_ASSUME_NONNULL_END 68 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListBatchUpdateData.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | #import 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | /** 18 | An instance of `IGListBatchUpdateData` takes section indexes and item index paths 19 | and performs cleanup on init in order to perform a crash-free 20 | update via `-[UICollectionView performBatchUpdates:completion:]`. 21 | */ 22 | IGLK_SUBCLASSING_RESTRICTED 23 | @interface IGListBatchUpdateData : NSObject 24 | 25 | /** 26 | Section insert indexes. 27 | */ 28 | @property (nonatomic, strong, readonly) NSIndexSet *insertSections; 29 | 30 | /** 31 | Section delete indexes. 32 | */ 33 | @property (nonatomic, strong, readonly) NSIndexSet *deleteSections; 34 | 35 | /** 36 | section moves. 37 | */ 38 | @property (nonatomic, strong, readonly) NSSet *moveSections; 39 | 40 | /** 41 | Item insert index paths. 42 | */ 43 | @property (nonatomic, strong, readonly) NSSet *insertIndexPaths; 44 | 45 | /** 46 | Item delete index paths. 47 | */ 48 | @property (nonatomic, strong, readonly) NSSet *deleteIndexPaths; 49 | 50 | /** 51 | Item reload index paths. 52 | */ 53 | @property (nonatomic, strong, readonly) NSSet *reloadIndexPaths; 54 | 55 | /** 56 | Creates a new batch update object with section and item operations. 57 | 58 | @param insertSections Section indexes to insert. 59 | @param deleteSections Section indexes to delete. 60 | @param moveSections Section moves. 61 | @param insertIndexPaths Item index paths to insert. 62 | @param deleteIndexPaths Item index paths to delete. 63 | @param reloadIndexPaths Item index paths to reload. 64 | 65 | @return A new batch update object. 66 | */ 67 | - (instancetype)initWithInsertSections:(NSIndexSet *)insertSections 68 | deleteSections:(NSIndexSet *)deleteSections 69 | moveSections:(NSSet *)moveSections 70 | insertIndexPaths:(NSSet *)insertIndexPaths 71 | deleteIndexPaths:(NSSet *)deleteIndexPaths 72 | reloadIndexPaths:(NSSet *)reloadIndexPaths NS_DESIGNATED_INITIALIZER; 73 | 74 | /** 75 | :nodoc: 76 | */ 77 | - (instancetype)init NS_UNAVAILABLE; 78 | 79 | /** 80 | :nodoc: 81 | */ 82 | + (instancetype)new NS_UNAVAILABLE; 83 | 84 | @end 85 | 86 | NS_ASSUME_NONNULL_END 87 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListSectionController.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListSectionControllerInternal.h" 11 | 12 | #import 13 | #import 14 | 15 | static NSString * const kIGListSectionControllerThreadKey = @"kIGListSectionControllerThreadKey"; 16 | 17 | @interface IGListSectionControllerThreadContext : NSObject 18 | @property (nonatomic, weak) UIViewController *viewController; 19 | @property (nonatomic, weak) id collectionContext; 20 | @end 21 | @implementation IGListSectionControllerThreadContext 22 | @end 23 | 24 | static NSMutableArray *threadContextStack(void) { 25 | IGAssertMainThread(); 26 | NSMutableDictionary *threadDictionary = [[NSThread currentThread] threadDictionary]; 27 | NSMutableArray *stack = threadDictionary[kIGListSectionControllerThreadKey]; 28 | if (stack == nil) { 29 | stack = [NSMutableArray new]; 30 | threadDictionary[kIGListSectionControllerThreadKey] = stack; 31 | } 32 | return stack; 33 | } 34 | 35 | void IGListSectionControllerPushThread(UIViewController *viewController, id collectionContext) { 36 | IGListSectionControllerThreadContext *context = [IGListSectionControllerThreadContext new]; 37 | context.viewController = viewController; 38 | context.collectionContext = collectionContext; 39 | 40 | [threadContextStack() addObject:context]; 41 | } 42 | 43 | void IGListSectionControllerPopThread(void) { 44 | NSMutableArray *stack = threadContextStack(); 45 | IGAssert(stack.count > 0, @"IGListSectionController thread stack is empty"); 46 | [stack removeLastObject]; 47 | } 48 | 49 | @implementation IGListSectionController 50 | 51 | - (instancetype)init { 52 | if (self = [super init]) { 53 | IGListSectionControllerThreadContext *context = [threadContextStack() lastObject]; 54 | _viewController = context.viewController; 55 | _collectionContext = context.collectionContext; 56 | 57 | if (_collectionContext == nil) { 58 | IGLKLog(@"Warning: Creating %@ outside of -[IGListAdapterDataSource listAdapter:sectionControllerForObject:]. Collection context and view controller will be set later.", 59 | NSStringFromClass([self class])); 60 | } 61 | 62 | _minimumInteritemSpacing = 0.0; 63 | _minimumLineSpacing = 0.0; 64 | _inset = UIEdgeInsetsZero; 65 | } 66 | return self; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListDisplayDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class IGListAdapter; 13 | @class IGListSectionController; 14 | 15 | @protocol IGListSectionType; 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | Implement this protocol to receive display events for an section controller when it is on screen. 21 | */ 22 | @protocol IGListDisplayDelegate 23 | 24 | /** 25 | Tells the delegate that the specified section controller is about to be displayed. 26 | 27 | @param listAdapter The list adapter for the section controller. 28 | @param sectionController The section controller about to be displayed. 29 | */ 30 | - (void)listAdapter:(IGListAdapter *)listAdapter willDisplaySectionController:(IGListSectionController *)sectionController; 31 | 32 | /** 33 | Tells the delegate that the specified section controller is no longer being displayed. 34 | 35 | @param listAdapter The list adapter for the section controller. 36 | @param sectionController The section controller that is no longer displayed. 37 | */ 38 | - (void)listAdapter:(IGListAdapter *)listAdapter didEndDisplayingSectionController:(IGListSectionController *)sectionController; 39 | 40 | /** 41 | Tells the delegate that a cell in the specified list is about to be displayed. 42 | 43 | @param listAdapter The list adapter in which the cell will display. 44 | @param sectionController The section controller that is displaying the cell. 45 | @param cell The cell about to be displayed. 46 | @param index The index of the cell in the section. 47 | */ 48 | - (void)listAdapter:(IGListAdapter *)listAdapter willDisplaySectionController:(IGListSectionController *)sectionController 49 | cell:(UICollectionViewCell *)cell 50 | atIndex:(NSInteger)index; 51 | 52 | /** 53 | Tells the delegate that a cell in the specified list is no longer being displayed. 54 | 55 | @param listAdapter The list adapter in which the cell was displayed. 56 | @param sectionController The section controller that is no longer displaying the cell. 57 | @param cell The cell that is no longer displayed. 58 | @param index The index of the cell in the section. 59 | */ 60 | - (void)listAdapter:(IGListAdapter *)listAdapter didEndDisplayingSectionController:(IGListSectionController *)sectionController 61 | cell:(UICollectionViewCell *)cell 62 | atIndex:(NSInteger)index; 63 | 64 | @end 65 | 66 | NS_ASSUME_NONNULL_END 67 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/JJTestWakeFormNibViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListExperiments.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | /** 15 | Bitmask-able options used for pre-release feature testing. 16 | */ 17 | typedef NS_OPTIONS (NSInteger, IGListExperiment) { 18 | /// Specifies no experiements. 19 | IGListExperimentNone = 1 << 1, 20 | }; 21 | 22 | /** 23 | Check if an experiment is enabled in a bitmask. 24 | 25 | @param mask The bitmask of experiments. 26 | @param option The option to compare with. 27 | 28 | @return `YES` if the option is in the bitmask, otherwise `NO`. 29 | */ 30 | static inline BOOL IGListExperimentEnabled(IGListExperiment mask, IGListExperiment option) { 31 | return (mask & option) != 0; 32 | } 33 | 34 | NS_ASSUME_NONNULL_BEGIN 35 | 36 | /** 37 | Performs an index diff with an experiment bitmask. 38 | 39 | @param oldArray The old array of objects. 40 | @param newArray The new array of objects. 41 | @param option Option to specify the type of diff. 42 | @param experiments Optional experiments. 43 | 44 | @return An index set result object contained the changed indexes. 45 | 46 | @see `IGListDiff()`. 47 | */ 48 | FOUNDATION_EXTERN IGListIndexSetResult *IGListDiffExperiment(NSArray> *_Nullable oldArray, 49 | NSArray> *_Nullable newArray, 50 | IGListDiffOption option, 51 | IGListExperiment experiments); 52 | 53 | /** 54 | Performs a index path diff with an experiment bitmask. 55 | 56 | @param fromSection The old section. 57 | @param toSection The new section. 58 | @param oldArray The old array of objects. 59 | @param newArray The new array of objects. 60 | @param option Option to specify the type of diff. 61 | @param experiments Optional experiments. 62 | 63 | @return An index path result object containing the changed indexPaths. 64 | 65 | @see `IGListDiffPaths()`. 66 | */ 67 | FOUNDATION_EXTERN IGListIndexPathResult *IGListDiffPathsExperiment(NSInteger fromSection, 68 | NSInteger toSection, 69 | NSArray> *_Nullable oldArray, 70 | NSArray> *_Nullable newArray, 71 | IGListDiffOption option, 72 | IGListExperiment experiments); 73 | 74 | NS_ASSUME_NONNULL_END 75 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/MyCollectionReusableView.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyCollectionReusableView.m 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2019/10/30. 6 | // Copyright © 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import "MyCollectionReusableView.h" 10 | 11 | @interface MyCollectionReusableView () 12 | 13 | 14 | @property (strong, nonatomic,readwrite) UILabel *myLabel; 15 | 16 | @end 17 | 18 | @implementation MyCollectionReusableView 19 | 20 | - (instancetype)initWithFrame:(CGRect)frame{ 21 | self = [super initWithFrame:frame]; 22 | if (self) { 23 | [self initialization]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)initialization{ 29 | _myLabel = ({ 30 | UILabel *label = [[UILabel alloc]init]; 31 | label.translatesAutoresizingMaskIntoConstraints = NO; 32 | [self addSubview:label]; 33 | 34 | label; 35 | }); 36 | 37 | [self initLayout]; 38 | 39 | // [self setBackgroundColor:[UIColor colorWithRed:250/255.0 green:185/255.0 blue:105/255.0 alpha:1.0]]; 40 | } 41 | 42 | 43 | - (void)initLayout{ 44 | 45 | UIView *view = _myLabel; 46 | 47 | UIView *superview = self; 48 | [superview addConstraints:@[ 49 | 50 | //tableview constraints 51 | [NSLayoutConstraint constraintWithItem:view 52 | attribute:NSLayoutAttributeTop 53 | relatedBy:NSLayoutRelationEqual 54 | toItem:superview 55 | attribute:NSLayoutAttributeTop 56 | multiplier:1.0 57 | constant:0], 58 | 59 | [NSLayoutConstraint constraintWithItem:view 60 | attribute:NSLayoutAttributeLeft 61 | relatedBy:NSLayoutRelationEqual 62 | toItem:superview 63 | attribute:NSLayoutAttributeLeft 64 | multiplier:1.0 65 | constant:20.f], 66 | 67 | [NSLayoutConstraint constraintWithItem:view 68 | attribute:NSLayoutAttributeBottom 69 | relatedBy:NSLayoutRelationEqual 70 | toItem:superview 71 | attribute:NSLayoutAttributeBottom 72 | multiplier:1.0 73 | constant:0], 74 | 75 | [NSLayoutConstraint constraintWithItem:view 76 | attribute:NSLayoutAttributeRight 77 | relatedBy:NSLayoutRelationEqual 78 | toItem:superview 79 | attribute:NSLayoutAttributeRight 80 | multiplier:1 81 | constant:0], 82 | 83 | ]]; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/MyCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // CollectionViewCell.m 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2019/10/30. 6 | // Copyright © 2019 谢家杰. All rights reserved. 7 | // 8 | 9 | #import "MyCollectionViewCell.h" 10 | 11 | @interface MyCollectionViewCell() 12 | 13 | @property (strong, nonatomic,readwrite) UILabel *myLabel; 14 | 15 | @end 16 | 17 | @implementation MyCollectionViewCell 18 | 19 | - (instancetype)initWithFrame:(CGRect)frame{ 20 | self = [super initWithFrame:frame]; 21 | if (self) { 22 | [self initialization]; 23 | } 24 | return self; 25 | } 26 | 27 | - (void)initialization{ 28 | _myLabel = ({ 29 | UILabel *label = [[UILabel alloc]init]; 30 | label.translatesAutoresizingMaskIntoConstraints = NO; 31 | 32 | [label setTextAlignment:NSTextAlignmentCenter]; 33 | [self addSubview:label]; 34 | 35 | label; 36 | }); 37 | 38 | [self initLayout]; 39 | 40 | [self setBackgroundColor:[UIColor colorWithRed:250/255.0 green:185/255.0 blue:105/255.0 alpha:1.0]]; 41 | } 42 | 43 | 44 | - (void)initLayout{ 45 | 46 | UIView *view = _myLabel; 47 | 48 | UIView *superview = self; 49 | [superview addConstraints:@[ 50 | 51 | //tableview constraints 52 | [NSLayoutConstraint constraintWithItem:view 53 | attribute:NSLayoutAttributeTop 54 | relatedBy:NSLayoutRelationEqual 55 | toItem:superview 56 | attribute:NSLayoutAttributeTop 57 | multiplier:1.0 58 | constant:0], 59 | 60 | [NSLayoutConstraint constraintWithItem:view 61 | attribute:NSLayoutAttributeLeft 62 | relatedBy:NSLayoutRelationEqual 63 | toItem:superview 64 | attribute:NSLayoutAttributeLeft 65 | multiplier:1.0 66 | constant:0], 67 | 68 | [NSLayoutConstraint constraintWithItem:view 69 | attribute:NSLayoutAttributeBottom 70 | relatedBy:NSLayoutRelationEqual 71 | toItem:superview 72 | attribute:NSLayoutAttributeBottom 73 | multiplier:1.0 74 | constant:0], 75 | 76 | [NSLayoutConstraint constraintWithItem:view 77 | attribute:NSLayoutAttributeRight 78 | relatedBy:NSLayoutRelationEqual 79 | toItem:superview 80 | attribute:NSLayoutAttributeRight 81 | multiplier:1 82 | constant:0], 83 | 84 | ]]; 85 | } 86 | 87 | @end 88 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## IGListKit 5 | 6 | BSD License 7 | 8 | For `IGListKit` software 9 | 10 | Copyright (c) 2016, Facebook, Inc. All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright notice, this 16 | list of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright notice, 19 | this list of conditions and the following disclaimer in the documentation 20 | and/or other materials provided with the distribution. 21 | 22 | * Neither the name Facebook nor the names of its contributors may be used to 23 | endorse or promote products derived from this software without specific 24 | prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 27 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 28 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 30 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 31 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 32 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 33 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | 37 | 38 | ## JJCollectionViewRoundFlowLayout 39 | 40 | Copyright (c) 2019 谢家杰 <303559363@qq.com> 41 | 42 | Permission is hereby granted, free of charge, to any person obtaining a copy 43 | of this software and associated documentation files (the "Software"), to deal 44 | in the Software without restriction, including without limitation the rights 45 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 46 | copies of the Software, and to permit persons to whom the Software is 47 | furnished to do so, subject to the following conditions: 48 | 49 | The above copyright notice and this permission notice shall be included in 50 | all copies or substantial portions of the Software. 51 | 52 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 53 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 54 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 55 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 56 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 57 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 58 | THE SOFTWARE. 59 | 60 | Generated by CocoaPods - https://cocoapods.org 61 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListReloadDataUpdater.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @implementation IGListReloadDataUpdater 13 | 14 | #pragma mark - IGListUpdatingDelegate 15 | 16 | - (NSPointerFunctions *)objectLookupPointerFunctions { 17 | return [NSPointerFunctions pointerFunctionsWithOptions:NSPointerFunctionsObjectPersonality]; 18 | } 19 | 20 | - (void)performUpdateWithCollectionView:(UICollectionView *)collectionView 21 | fromObjects:(NSArray *)fromObjects 22 | toObjects:(NSArray *)toObjects 23 | animated:(BOOL)animated 24 | objectTransitionBlock:(IGListObjectTransitionBlock)objectTransitionBlock 25 | completion:(IGListUpdatingCompletion)completion { 26 | objectTransitionBlock(toObjects); 27 | [self synchronousReloadDataWithCollectionView:collectionView]; 28 | if (completion) { 29 | completion(YES); 30 | } 31 | } 32 | 33 | - (void)performUpdateWithCollectionView:(UICollectionView *)collectionView 34 | animated:(BOOL)animated 35 | itemUpdates:(IGListItemUpdateBlock)itemUpdates 36 | completion:(IGListUpdatingCompletion)completion { 37 | itemUpdates(); 38 | [self synchronousReloadDataWithCollectionView:collectionView]; 39 | if (completion) { 40 | completion(YES); 41 | } 42 | } 43 | 44 | - (void)insertItemsIntoCollectionView:(UICollectionView *)collectionView indexPaths:(NSArray *)indexPaths { 45 | [self synchronousReloadDataWithCollectionView:collectionView]; 46 | } 47 | 48 | - (void)deleteItemsFromCollectionView:(UICollectionView *)collectionView indexPaths:(NSArray *)indexPaths { 49 | [self synchronousReloadDataWithCollectionView:collectionView]; 50 | } 51 | 52 | - (void)reloadItemsInCollectionView:(UICollectionView *)collectionView indexPaths:(NSArray *)indexPaths { 53 | [self synchronousReloadDataWithCollectionView:collectionView]; 54 | } 55 | 56 | - (void)reloadDataWithCollectionView:(UICollectionView *)collectionView reloadUpdateBlock:(IGListReloadUpdateBlock)reloadUpdateBlock completion:(IGListUpdatingCompletion)completion { 57 | reloadUpdateBlock(); 58 | [self synchronousReloadDataWithCollectionView:collectionView]; 59 | if (completion) { 60 | completion(YES); 61 | } 62 | } 63 | 64 | - (void)reloadCollectionView:(UICollectionView *)collectionView sections:(NSIndexSet *)sections { 65 | [self synchronousReloadDataWithCollectionView:collectionView]; 66 | } 67 | 68 | - (void)synchronousReloadDataWithCollectionView:(UICollectionView *)collectionView { 69 | [collectionView reloadData]; 70 | [collectionView layoutIfNeeded]; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListCollectionView.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | /** 15 | This class is never actually used by the `IGListKit` infrastructure. 16 | It exists only to give compiler errors when editing 17 | methods are called on the collection view returned by `-[IGListAdapter collectionView]`. 18 | */ 19 | IGLK_SUBCLASSING_RESTRICTED 20 | @interface IGListCollectionView : UICollectionView 21 | 22 | /** 23 | :nodoc: 24 | */ 25 | - (void)performBatchUpdates:(void (^)(void))updates 26 | completion:(void (^)(BOOL))completion IGLK_UNAVAILABLE("Call -[IGListAdapter performUpdatesWithCompletion:] instead"); 27 | 28 | /** 29 | :nodoc: 30 | */ 31 | - (void)reloadData IGLK_UNAVAILABLE("Call -[IGListAdapter reloadDataWithCompletion:] instead"); 32 | 33 | /** 34 | :nodoc: 35 | */ 36 | - (void)reloadSections:(NSIndexSet *)sections IGLK_UNAVAILABLE("Call -[IGListAdapter reloadItems:] instead"); 37 | 38 | /** 39 | :nodoc: 40 | */ 41 | - (void)insertSections:(NSIndexSet *)sections IGLK_UNAVAILABLE("Call -[IGListAdapter performUpdatesWithCompletion:] instead"); 42 | 43 | /** 44 | :nodoc: 45 | */ 46 | - (void)deleteSections:(NSIndexSet *)sections IGLK_UNAVAILABLE("Call -[IGListAdapter performUpdatesWithCompletion:] instead"); 47 | 48 | /** 49 | :nodoc: 50 | */ 51 | - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection IGLK_UNAVAILABLE("Call -[IGListAdapter performUpdatesWithCompletion:] instead"); 52 | 53 | /** 54 | :nodoc: 55 | */ 56 | - (void)insertItemsAtIndexPaths:(NSArray *)indexPaths IGLK_UNAVAILABLE("Call -[ insertSectionController:forItems:completion:] instead"); 57 | 58 | /** 59 | :nodoc: 60 | */ 61 | - (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths IGLK_UNAVAILABLE("Call -[ reloadSectionController:forItems:completion:] instead"); 62 | 63 | /** 64 | :nodoc: 65 | */ 66 | - (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths IGLK_UNAVAILABLE("Call -[ deleteSectionController:forItems:completion:] instead"); 67 | 68 | /** 69 | :nodoc: 70 | */ 71 | - (void)moveItemAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath IGLK_UNAVAILABLE("Moving items currently unsupported"); 72 | 73 | /** 74 | :nodoc: 75 | */ 76 | - (void)setDelegate:(id)delegate IGLK_UNAVAILABLE("IGListAdapter should be the delegate of the collection view"); 77 | 78 | /** 79 | :nodoc: 80 | */ 81 | - (void)setDataSource:(id)dataSource IGLK_UNAVAILABLE("IGListAdapter should be the data source of the collection view"); 82 | 83 | /** 84 | :nodoc: 85 | */ 86 | - (void)setBackgroundView:(UIView *)backgroundView IGLK_UNAVAILABLE("Return a view in -[IGListAdapterDataSource emptyViewForListAdapter:] instead"); 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /JJCollectionViewRoundFlowLayout/Classes/JJCollectionViewRoundFlowLayout+Alignment.h: -------------------------------------------------------------------------------- 1 | // 2 | // JJCollectionViewRoundFlowLayout+Alignment.h 3 | // JJCollectionViewRoundFlowLayout 4 | // 5 | // Created by jiajie on 2020/1/10. 6 | // 7 | 8 | #import 9 | #import "JJCollectionViewFlowLayoutConfig.h" 10 | #import "JJCollectionViewRoundFlowLayout.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface JJCollectionViewRoundFlowLayout (Alignment) 15 | 16 | /// 将相同section的cell集合到一个集合中(竖向) 17 | /// @param layoutAttributesAttrs layoutAttributesAttrs description 18 | - (NSDictionary *)groupLayoutAttributesForElementsBySectionWithLayoutAttributesAttrs:(NSArray *)layoutAttributesAttrs; 19 | 20 | /// 将相同y位置的cell集合到一个列表中(竖向) 21 | /// @param layoutAttributesAttrs layoutAttributesAttrs description 22 | - (NSArray *)groupLayoutAttributesForElementsByYLineWithLayoutAttributesAttrs:(NSArray *)layoutAttributesAttrs; 23 | 24 | 25 | /// 将相同x位置的cell集合到一个列表中(横向) 26 | /// @param layoutAttributesAttrs layoutAttributesAttrs description 27 | - (NSArray *)groupLayoutAttributesForElementsByXLineWithLayoutAttributesAttrs:(NSArray *)layoutAttributesAttrs; 28 | 29 | /// 进行cells集合对齐方式判断解析 30 | /// @param layoutAttributesAttrs layoutAttributesAttrs description 31 | /// @param toChangeAttributesAttrsList toChangeAttributesAttrsList description 32 | /// @param alignmentType alignmentType description 33 | - (void)analysisCellSettingFrameWithLayoutAttributesAttrs:(NSArray *)layoutAttributesAttrs 34 | toChangeAttributesAttrsList:(NSMutableArray *_Nonnull *_Nonnull)toChangeAttributesAttrsList 35 | cellAlignmentType:(JJCollectionViewRoundFlowLayoutAlignmentType)alignmentType; 36 | 37 | /// 根据不同对齐方式进行Cell位置计算 38 | /// @param layoutAttributesAttrs 传入需计算的AttributesAttrs集合列表 39 | /// @param toChangeAttributesAttrsList 用来保存所有计算后的AttributesAttrs 40 | /// @param alignmentType 对齐方式 41 | - (NSMutableArray *)evaluatedAllCellSettingFrameWithLayoutAttributesAttrs:(NSArray *)layoutAttributesAttrs toChangeAttributesAttrsList:(NSMutableArray *_Nonnull *_Nonnull)toChangeAttributesAttrsList cellAlignmentType:(JJCollectionViewRoundFlowLayoutAlignmentType)alignmentType; 42 | 43 | 44 | #pragma mark - alignment 45 | 46 | /// 计算AttributesAttrs左对齐 47 | /// @param layout JJCollectionViewRoundFlowLayout 48 | /// @param layoutAttributesAttrs 需计算的AttributesAttrs列表 49 | - (void)evaluatedCellSettingFrameByLeftWithWithJJCollectionLayout:(JJCollectionViewRoundFlowLayout *)layout layoutAttributesAttrs:(NSArray *)layoutAttributesAttrs; 50 | 51 | /// 计算AttributesAttrs居中对齐 52 | /// @param layout JJCollectionViewRoundFlowLayout 53 | /// @param layoutAttributesAttrs 需计算的AttributesAttrs列表 54 | - (void)evaluatedCellSettingFrameByCentertWithWithJJCollectionLayout:(JJCollectionViewRoundFlowLayout *)layout layoutAttributesAttrs:(NSArray *)layoutAttributesAttrs; 55 | 56 | /// 计算AttributesAttrs右对齐 57 | /// @param layout JJCollectionViewRoundFlowLayout 58 | /// @param layoutAttributesAttrs 需计算的AttributesAttrs列表 59 | - (void)evaluatedCellSettingFrameByRightWithWithJJCollectionLayout:(JJCollectionViewRoundFlowLayout *)layout layoutAttributesAttrs:(NSArray *)layoutAttributesAttrs; 60 | 61 | @end 62 | 63 | 64 | NS_ASSUME_NONNULL_END 65 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListAdapterInternal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "IGListAdapterProxy.h" 14 | #import "IGListDisplayHandler.h" 15 | #import "IGListSectionMap.h" 16 | #import "IGListWorkingRangeHandler.h" 17 | 18 | NS_ASSUME_NONNULL_BEGIN 19 | 20 | /// Generate a string representation of a reusable view class when registering with a UICollectionView. 21 | NS_INLINE NSString *IGListReusableViewIdentifier(Class viewClass, NSString * _Nullable nibName, NSString * _Nullable kind) { 22 | return [NSString stringWithFormat:@"%@%@%@", kind ?: @"", nibName ?: @"", NSStringFromClass(viewClass)]; 23 | } 24 | 25 | @interface IGListAdapter () 26 | < 27 | UICollectionViewDataSource, 28 | UICollectionViewDelegateFlowLayout, 29 | IGListCollectionContext 30 | > 31 | { 32 | __weak UICollectionView *_collectionView; 33 | } 34 | 35 | @property (nonatomic, strong) id updater; 36 | 37 | @property (nonatomic, strong, readonly) IGListSectionMap *sectionMap; 38 | @property (nonatomic, strong, readonly) IGListDisplayHandler *displayHandler; 39 | @property (nonatomic, strong, readonly) IGListWorkingRangeHandler *workingRangeHandler; 40 | 41 | @property (nonatomic, strong, nullable) IGListAdapterProxy *delegateProxy; 42 | 43 | @property (nonatomic, strong, nullable) UIView *emptyBackgroundView; 44 | 45 | /** 46 | When making object updates inside a batch update block, delete operations must use the section /before/ any moves take 47 | place. This includes when other objects are deleted or inserted ahead of the section controller making the mutations. 48 | In order to account for this we must track when the adapter is in the middle of an update block as well as the section 49 | controller mapping prior to the transition. 50 | 51 | Note that the previous section controller map is destroyed as soon as a transition is finished so there is no dangling 52 | objects or section controllers. 53 | */ 54 | @property (nonatomic, assign) BOOL isInUpdateBlock; 55 | @property (nonatomic, strong, nullable) IGListSectionMap *previoussectionMap; 56 | 57 | @property (nonatomic, strong) NSMutableSet *registeredCellClasses; 58 | @property (nonatomic, strong) NSMutableSet *registeredNibNames; 59 | @property (nonatomic, strong) NSMutableSet *registeredSupplementaryViewIdentifiers; 60 | @property (nonatomic, strong) NSMutableSet *registeredSupplementaryViewNibNames; 61 | 62 | - (NSArray *)indexPathsFromSectionController:(IGListSectionController *)sectionController 63 | indexes:(NSIndexSet *)indexes 64 | adjustForUpdateBlock:(BOOL)adjustForUpdateBlock; 65 | - (nullable NSIndexPath *)indexPathForSectionController:(IGListSectionController *)controller index:(NSInteger)index; 66 | 67 | @end 68 | 69 | NS_ASSUME_NONNULL_END 70 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/MyLabelCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyLabelCollectionViewCell.m 3 | // JJCollectionViewRoundFlowLayout_Example 4 | // 5 | // Created by jiajie on 2020/1/11. 6 | // Copyright © 2020 谢家杰. All rights reserved. 7 | // 8 | 9 | #import "MyLabelCollectionViewCell.h" 10 | 11 | @interface MyLabelCollectionViewCell () 12 | 13 | @property (strong, nonatomic,readwrite) UILabel *myLabel; 14 | 15 | @end 16 | 17 | @implementation MyLabelCollectionViewCell 18 | 19 | 20 | - (instancetype)initWithFrame:(CGRect)frame{ 21 | self = [super initWithFrame:frame]; 22 | if (self) { 23 | [self initialization]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)initialization{ 29 | _myLabel = ({ 30 | UILabel *label = [[UILabel alloc]init]; 31 | label.translatesAutoresizingMaskIntoConstraints = NO; 32 | 33 | [label setBackgroundColor:[UIColor clearColor]]; 34 | [label setTextColor:[UIColor whiteColor]]; 35 | [label setFont:[UIFont systemFontOfSize:15.f]]; 36 | [label setTextAlignment:NSTextAlignmentCenter]; 37 | [self.contentView addSubview:label]; 38 | label; 39 | }); 40 | 41 | [self initLayout]; 42 | 43 | self.contentView.layer.cornerRadius = 15.f; 44 | [self.contentView setBackgroundColor:[UIColor colorWithRed:250/255.0 green:185/255.0 blue:105/255.0 alpha:1.0]]; 45 | } 46 | 47 | 48 | - (void)initLayout{ 49 | 50 | UIView *view = _myLabel; 51 | 52 | UIView *superview = self; 53 | [superview addConstraints:@[ 54 | 55 | //tableview constraints 56 | [NSLayoutConstraint constraintWithItem:view 57 | attribute:NSLayoutAttributeTop 58 | relatedBy:NSLayoutRelationEqual 59 | toItem:superview 60 | attribute:NSLayoutAttributeTop 61 | multiplier:1.0 62 | constant:0], 63 | 64 | [NSLayoutConstraint constraintWithItem:view 65 | attribute:NSLayoutAttributeLeft 66 | relatedBy:NSLayoutRelationEqual 67 | toItem:superview 68 | attribute:NSLayoutAttributeLeft 69 | multiplier:1.0 70 | constant:5], 71 | 72 | [NSLayoutConstraint constraintWithItem:view 73 | attribute:NSLayoutAttributeBottom 74 | relatedBy:NSLayoutRelationEqual 75 | toItem:superview 76 | attribute:NSLayoutAttributeBottom 77 | multiplier:1.0 78 | constant:0], 79 | 80 | [NSLayoutConstraint constraintWithItem:view 81 | attribute:NSLayoutAttributeRight 82 | relatedBy:NSLayoutRelationEqual 83 | toItem:superview 84 | attribute:NSLayoutAttributeRight 85 | multiplier:1 86 | constant:-5], 87 | 88 | ]]; 89 | } 90 | 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListSectionMap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | 14 | @class IGListSectionController; 15 | @protocol IGListSectionType; 16 | 17 | NS_ASSUME_NONNULL_BEGIN 18 | 19 | /** 20 | The IGListSectionMap provides a way to map a collection of objects to a collection of section controllers and achieve 21 | constant-time lookups O(1). 22 | 23 | IGListSectionMap is a mutable object and does not garauntee thread safety. 24 | */ 25 | IGLK_SUBCLASSING_RESTRICTED 26 | @interface IGListSectionMap : NSObject 27 | 28 | - (instancetype)initWithMapTable:(NSMapTable *)mapTable NS_DESIGNATED_INITIALIZER; 29 | 30 | /** 31 | The objects stored in the map. 32 | */ 33 | @property (nonatomic, strong, readonly) NSArray *objects; 34 | 35 | /** 36 | Update the map with objects and the section controller counterparts. 37 | 38 | @param objects The objects in the collection. 39 | @param sectionControllers The section controllers that map to each object. 40 | */ 41 | - (void)updateWithObjects:(NSArray > *)objects sectionControllers:(NSArray > *)sectionControllers; 42 | 43 | /** 44 | Fetch a section controller given a section. 45 | 46 | @param section The section index of the section controller. 47 | 48 | @return A section controller. 49 | */ 50 | - (nullable IGListSectionController *)sectionControllerForSection:(NSInteger)section; 51 | 52 | /** 53 | Fetch the object for a section 54 | 55 | @param section The section index of the object. 56 | 57 | @return The object corresponding to the section. 58 | */ 59 | - (nullable id)objectForSection:(NSInteger)section; 60 | 61 | /** 62 | Fetch a section controller given an object. Can return nil. 63 | 64 | @param object The object that maps to a section controller. 65 | 66 | @return A section controller. 67 | */ 68 | - (nullable id)sectionControllerForObject:(id)object; 69 | 70 | /** 71 | Look up the section index for a section controller. 72 | 73 | @param sectionController The list to look up. 74 | 75 | @return The section index of the given section controller if it exists, NSNotFound otherwise. 76 | */ 77 | - (NSInteger)sectionForSectionController:(id)sectionController; 78 | 79 | /** 80 | Look up the section index for an object. 81 | 82 | @param object The object to look up. 83 | 84 | @return The section index of the given object if it exists, NSNotFound otherwise. 85 | */ 86 | - (NSInteger)sectionForObject:(id)object; 87 | 88 | /** 89 | Remove all saved objects and section controllers. 90 | */ 91 | - (void)reset; 92 | 93 | /** 94 | Update an object with a new instance. 95 | */ 96 | - (void)updateObject:(id)object; 97 | 98 | /** 99 | Applies a given block object to the entries of the section controller map. 100 | 101 | @param block A block object to operate on entries in the section controller map. 102 | */ 103 | - (void)enumerateUsingBlock:(void (^)(id object, IGListSectionController *sectionController, NSInteger section, BOOL *stop))block; 104 | 105 | /** 106 | :nodoc: 107 | */ 108 | - (instancetype)init NS_UNAVAILABLE; 109 | 110 | @end 111 | 112 | NS_ASSUME_NONNULL_END 113 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListDisplayHandler.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListDisplayHandler.h" 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | 17 | @interface IGListDisplayHandler () 18 | 19 | @property (nonatomic, strong) NSCountedSet *visibleListSections; 20 | @property (nonatomic, strong) NSMapTable *visibleCellObjectMap; 21 | 22 | @end 23 | 24 | @implementation IGListDisplayHandler 25 | 26 | - (instancetype)init { 27 | if (self = [super init]) { 28 | _visibleListSections = [[NSCountedSet alloc] init]; 29 | _visibleCellObjectMap = [[NSMapTable alloc] initWithKeyOptions:NSMapTableStrongMemory valueOptions:NSMapTableStrongMemory capacity:0]; 30 | } 31 | return self; 32 | } 33 | 34 | - (void)willDisplayCell:(UICollectionViewCell *)cell 35 | forListAdapter:(IGListAdapter *)listAdapter 36 | sectionController:(IGListSectionController *)sectionController 37 | object:(id)object 38 | indexPath:(NSIndexPath *)indexPath { 39 | IGParameterAssert(cell != nil); 40 | IGParameterAssert(listAdapter != nil); 41 | IGParameterAssert(object != nil); 42 | IGParameterAssert(indexPath != nil); 43 | 44 | id displayDelegate = [sectionController displayDelegate]; 45 | 46 | [displayDelegate listAdapter:listAdapter willDisplaySectionController:sectionController cell:cell atIndex:indexPath.item]; 47 | 48 | [self.visibleCellObjectMap setObject:object forKey:cell]; 49 | 50 | if ([self.visibleListSections countForObject:sectionController] == 0) { 51 | [displayDelegate listAdapter:listAdapter willDisplaySectionController:sectionController]; 52 | [listAdapter.delegate listAdapter:listAdapter willDisplayObject:object atIndex:indexPath.section]; 53 | } 54 | [self.visibleListSections addObject:sectionController]; 55 | } 56 | 57 | - (void)didEndDisplayingCell:(UICollectionViewCell *)cell 58 | forListAdapter:(IGListAdapter *)listAdapter 59 | sectionController:(IGListSectionController *)sectionController 60 | indexPath:(NSIndexPath *)indexPath { 61 | IGParameterAssert(cell != nil); 62 | IGParameterAssert(listAdapter != nil); 63 | IGParameterAssert(indexPath != nil); 64 | 65 | const NSUInteger section = indexPath.section; 66 | 67 | NSMapTable *cellObjectMap = self.visibleCellObjectMap; 68 | id object = [cellObjectMap objectForKey:cell]; 69 | [cellObjectMap removeObjectForKey:cell]; 70 | 71 | if (object == nil || sectionController == nil) { 72 | return; 73 | } 74 | 75 | id displayDelegate = [sectionController displayDelegate]; 76 | [displayDelegate listAdapter:listAdapter didEndDisplayingSectionController:sectionController cell:cell atIndex:indexPath.item]; 77 | 78 | NSCountedSet *visibleSections = self.visibleListSections; 79 | [visibleSections removeObject:sectionController]; 80 | if ([visibleSections countForObject:sectionController] == 0) { 81 | [displayDelegate listAdapter:listAdapter didEndDisplayingSectionController:sectionController]; 82 | [listAdapter.delegate listAdapter:listAdapter didEndDisplayingObject:object atIndex:section]; 83 | } 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListSectionType.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @protocol IGListSupplementaryViewSource; 13 | @protocol IGListDisplayDelegate; 14 | @protocol IGListWorkingRangeDelegate; 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | /** 19 | Implement this protocol in order to be used within the `IGListKit` data infrastructure and be registered for use in an 20 | `IGListAdapter`. An `IGListSectionType` conforming object represents a single instance of an object in a collection of 21 | objects. 22 | 23 | The infrastructure uses each `IGListSectionType` conforming object as a "view model" to populate and control cells as 24 | part of a section in a `UICollectionView`. `IGListSectionType` objects should be architected without knowledge of 25 | "global" state of the list in which they are contained. 26 | 27 | Index paths are used as a convenience for communicating the section index to each section object without allowing each 28 | section to mutate its own position within a list. The row of an index path can be directly mapped to a cell within 29 | an `IGListSectionType` conforming object. 30 | */ 31 | @protocol IGListSectionType 32 | 33 | /** 34 | Returns the number of items in the section. 35 | 36 | @return A count of items in the list. 37 | 38 | @note The count returned is used to drive the number of cells displayed for this list. You are free to change 39 | this value between data loading passes. 40 | */ 41 | - (NSInteger)numberOfItems; 42 | 43 | /** 44 | The specific size for the item at the specified index. 45 | 46 | @param index The row index of the item. 47 | 48 | @return The size for the item at index. 49 | 50 | @note The returned size is not garaunteed to be used. The implementation may query sections for their 51 | layout information at will, or use its own layout metrics. For example, consider a dynamic-text sized list versus a fixed 52 | height-and-width grid. The former will ask each section for a size, and the latter will likely not. 53 | */ 54 | - (CGSize)sizeForItemAtIndex:(NSInteger)index; 55 | 56 | /** 57 | Asks the section controller for a fully configured cell at the specified index. 58 | 59 | @param index The index of the requested row. 60 | 61 | @return A configured `UICollectionViewCell` subclass. 62 | 63 | @note This is your opportunity to do any cell setup and configuration. The infrastructure requests a cell when it 64 | will be used on screen. You should never allocate new cells in this method, instead use the provided adapter to call 65 | `-dequeCellClass:forIndexPath:` which either deques a cell from the collection view or creates a new one for you. 66 | */ 67 | - (__kindof UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index; 68 | 69 | /** 70 | Tells the section that the controller was updated to a new object. 71 | 72 | @param object The object mapped to this section controller. 73 | 74 | @note When this method is called, all available contexts and configurations have been set for the section 75 | controller. Also, depending on the updating strategy used, your item models may have changed objects in memory, so you 76 | can use this event to update the object stored on your section controller. 77 | 78 | This method will only be called when the object instance has changed, including from `nil` or a previous object. 79 | */ 80 | - (void)didUpdateToObject:(id)object; 81 | 82 | /** 83 | Tells the section that the cell at the specified index path was selected. 84 | 85 | @param index The index of the selected cell. 86 | */ 87 | - (void)didSelectItemAtIndex:(NSInteger)index; 88 | 89 | @end 90 | 91 | NS_ASSUME_NONNULL_END 92 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Internal/IGListAdapterProxy.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListAdapterProxy.h" 11 | 12 | #import 13 | 14 | /** 15 | Define messages that you want the IGListAdapter object to intercept. Pattern copied from 16 | https://github.com/facebook/AsyncDisplayKit/blob/7b112a2dcd0391ddf3671f9dcb63521f554b78bd/AsyncDisplayKit/ASCollectionView.mm#L34-L53 17 | */ 18 | static BOOL isInterceptedSelector(SEL sel) { 19 | return ( 20 | // UICollectionViewDelegate 21 | sel == @selector(collectionView:didSelectItemAtIndexPath:) || 22 | sel == @selector(collectionView:willDisplayCell:forItemAtIndexPath:) || 23 | sel == @selector(collectionView:didEndDisplayingCell:forItemAtIndexPath:) || 24 | // UICollectionViewDelegateFlowLayout 25 | sel == @selector(collectionView:layout:sizeForItemAtIndexPath:) || 26 | sel == @selector(collectionView:layout:insetForSectionAtIndex:) || 27 | sel == @selector(collectionView:layout:minimumInteritemSpacingForSectionAtIndex:) || 28 | sel == @selector(collectionView:layout:minimumLineSpacingForSectionAtIndex:) || 29 | sel == @selector(collectionView:layout:referenceSizeForFooterInSection:) || 30 | sel == @selector(collectionView:layout:referenceSizeForHeaderInSection:) || 31 | // UIScrollViewDelegate 32 | sel == @selector(scrollViewDidScroll:) || 33 | sel == @selector(scrollViewWillBeginDragging:) || 34 | sel == @selector(scrollViewDidEndDragging:willDecelerate:) 35 | ); 36 | } 37 | 38 | @interface IGListAdapterProxy () { 39 | __weak id _collectionViewTarget; 40 | __weak id _scrollViewTarget; 41 | __weak IGListAdapter *_interceptor; 42 | } 43 | 44 | @end 45 | 46 | @implementation IGListAdapterProxy 47 | 48 | - (instancetype)initWithCollectionViewTarget:(nullable id)collectionViewTarget 49 | scrollViewTarget:(nullable id)scrollViewTarget 50 | interceptor:(IGListAdapter *)interceptor { 51 | IGParameterAssert(interceptor != nil); 52 | // -[NSProxy init] is undefined 53 | if (self) { 54 | _collectionViewTarget = collectionViewTarget; 55 | _scrollViewTarget = scrollViewTarget; 56 | _interceptor = interceptor; 57 | } 58 | return self; 59 | } 60 | 61 | - (BOOL)respondsToSelector:(SEL)aSelector { 62 | return isInterceptedSelector(aSelector) 63 | || [_collectionViewTarget respondsToSelector:aSelector] 64 | || [_scrollViewTarget respondsToSelector:aSelector]; 65 | } 66 | 67 | - (id)forwardingTargetForSelector:(SEL)aSelector { 68 | if (isInterceptedSelector(aSelector)) { 69 | return _interceptor; 70 | } 71 | 72 | // since UICollectionViewDelegate is a superset of UIScrollViewDelegate, first check if the method exists in 73 | // _scrollViewTarget, otherwise use the _collectionViewTarget 74 | return [_scrollViewTarget respondsToSelector:aSelector] ? _scrollViewTarget : _collectionViewTarget; 75 | } 76 | 77 | // handling unimplemented methods and nil target/interceptor 78 | // https://github.com/Flipboard/FLAnimatedImage/blob/76a31aefc645cc09463a62d42c02954a30434d7d/FLAnimatedImage/FLAnimatedImage.m#L786-L807 79 | - (void)forwardInvocation:(NSInvocation *)invocation { 80 | void *nullPointer = NULL; 81 | [invocation setReturnValue:&nullPointer]; 82 | } 83 | 84 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { 85 | return [NSObject instanceMethodSignatureForSelector:@selector(init)]; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListIndexSetResult.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListIndexSetResult.h" 11 | #import "IGListIndexSetResultInternal.h" 12 | 13 | #import 14 | 15 | @implementation IGListIndexSetResult { 16 | NSMapTable, NSNumber *> *_oldIndexMap; 17 | NSMapTable, NSNumber *> *_newIndexMap; 18 | } 19 | 20 | - (instancetype)initWithInserts:(NSIndexSet *)inserts 21 | deletes:(NSIndexSet *)deletes 22 | updates:(NSIndexSet *)updates 23 | moves:(NSArray *)moves 24 | oldIndexMap:(NSMapTable, NSNumber *> *)oldIndexMap 25 | newIndexMap:(NSMapTable, NSNumber *> *)newIndexMap { 26 | if (self = [super init]) { 27 | _inserts = [inserts copy]; 28 | _deletes = [deletes copy]; 29 | _updates = [updates copy]; 30 | _moves = [moves copy]; 31 | _oldIndexMap = [oldIndexMap copy]; 32 | _newIndexMap = [newIndexMap copy]; 33 | } 34 | return self; 35 | } 36 | 37 | - (BOOL)hasChanges { 38 | return self.inserts.count || self.deletes.count || self.updates.count || self.moves.count; 39 | } 40 | 41 | - (IGListIndexSetResult *)resultForBatchUpdates { 42 | NSMutableIndexSet *deletes = [self.deletes mutableCopy]; 43 | NSMutableIndexSet *inserts = [self.inserts mutableCopy]; 44 | NSMutableIndexSet *filteredUpdates = [self.updates mutableCopy]; 45 | 46 | NSArray *moves = self.moves; 47 | NSMutableArray *filteredMoves = [moves mutableCopy]; 48 | 49 | // convert all update+move to delete+insert 50 | const NSUInteger moveCount = moves.count; 51 | for (NSInteger i = moveCount - 1; i >= 0; i--) { 52 | IGListMoveIndex *move = moves[i]; 53 | if ([filteredUpdates containsIndex:move.from]) { 54 | [filteredMoves removeObjectAtIndex:i]; 55 | [filteredUpdates removeIndex:move.from]; 56 | [deletes addIndex:move.from]; 57 | [inserts addIndex:move.to]; 58 | } 59 | } 60 | 61 | // iterate all new identifiers. if its index is updated, delete from the old index and insert the new index 62 | for (id key in [_oldIndexMap keyEnumerator]) { 63 | const NSInteger index = [[_oldIndexMap objectForKey:key] integerValue]; 64 | if ([filteredUpdates containsIndex:index]) { 65 | [deletes addIndex:index]; 66 | [inserts addIndex:[[_newIndexMap objectForKey:key] integerValue]]; 67 | } 68 | } 69 | 70 | return [[IGListIndexSetResult alloc] initWithInserts:inserts 71 | deletes:deletes 72 | updates:[NSIndexSet new] 73 | moves:filteredMoves 74 | oldIndexMap:_oldIndexMap 75 | newIndexMap:_newIndexMap]; 76 | } 77 | 78 | - (NSInteger)oldIndexForIdentifier:(id)identifier { 79 | NSNumber *index = [_oldIndexMap objectForKey:identifier]; 80 | return index == nil ? NSNotFound : [index integerValue]; 81 | } 82 | 83 | - (NSInteger)newIndexForIdentifier:(id)identifier { 84 | NSNumber *index = [_newIndexMap objectForKey:identifier]; 85 | return index == nil ? NSNotFound : [index integerValue]; 86 | } 87 | 88 | - (NSString *)description { 89 | return [NSString stringWithFormat:@"<%@ %p; %zi inserts; %zi deletes; %zi updates; %zi moves>", 90 | NSStringFromClass(self.class), self, self.inserts.count, self.deletes.count, self.updates.count, self.moves.count]; 91 | } 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

6 | 7 | Build Status 9 | 10 | 11 | Coverage Status 13 | 14 | 15 | Pods Version 17 | 18 | 19 | Platforms 21 | 22 | 23 | Carthage Compatible 25 | 26 |

27 | 28 | ---------------- 29 | 30 | A data-driven `UICollectionView` framework for building fast and flexible lists. 31 | 32 | | | Main Features | 33 | ----------|----------------- 34 | 🙅 | Never call `performBatchUpdates(_:, completion:)` or `reloadData()` again 35 | 🏠 | Better architecture with reusable cells and components 36 | 🔠 | Create collections with multiple data types 37 | 🔑 | Decoupled diffing algorithm 38 | ✅ | Fully unit tested 39 | 🔍 | Customize your diffing behavior for your models 40 | 📱 | Simply `UICollectionView` at its core 41 | 🚀 | Extendable API 42 | 🐦 | Written in Objective-C with full Swift interop support 43 | 44 | `IGListKit` is built and maintained with ❤️ by [Instagram engineering](https://engineering.instagram.com/). 45 | We use the open source version `master` branch in the Instagram app. 46 | 47 | ## Requirements 48 | 49 | - Xcode 8.0+ 50 | - iOS 8.0+ 51 | - tvOS 9.0+ 52 | - macOS 10.10+ *(diffing algorithm components only)* 53 | - Interoperability with Swift 3.0+ 54 | 55 | ## Installation 56 | 57 | ### CocoaPods 58 | 59 | The preferred installation method is with [CocoaPods](https://cocoapods.org). Add the following to your `Podfile`: 60 | 61 | ```ruby 62 | pod 'IGListKit', '~> 2.0.0' 63 | ``` 64 | 65 | ### Carthage 66 | 67 | For [Carthage](https://github.com/Carthage/Carthage), add the following to your `Cartfile`: 68 | 69 | ```ogdl 70 | github "Instagram/IGListKit" ~> 2.0.0 71 | ``` 72 | 73 | > For advanced usage, see our [Installation Guide](https://instagram.github.io/IGListKit/installation.html). 74 | 75 | ## Getting Started 76 | 77 | - Our [Getting Started guide](https://instagram.github.io/IGListKit/getting-started.html) 78 | - Ray Wenderlich's [IGListKit Tutorial: Better UICollectionViews](https://www.raywenderlich.com/147162/iglistkit-tutorial-better-uicollectionviews) 79 | - Ryan Nystrom's [talk at try! Swift NYC](https://realm.io/news/tryswift-ryan-nystrom-refactoring-at-scale-lessons-learned-rewriting-instagram-feed/) 80 | 81 | ## Documentation 82 | 83 | You can find [the docs here](https://instagram.github.io/IGListKit). Documentation is generated with [jazzy](https://github.com/realm/jazzy) and hosted on [GitHub-Pages](https://pages.github.com). 84 | 85 | ## Contributing 86 | 87 | Please see the [CONTRIBUTING](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) file for how to help out. At Instagram we sync the open source version of `IGListKit` daily, so we're always testing the latest changes. But that requires all changes be thoroughly tested and follow our style guide. 88 | 89 | ## License 90 | 91 | `IGListKit` is BSD-licensed. We also provide an additional patent grant. 92 | 93 | The files in the `/Examples/` directory are licensed under a separate license as specified in each file. Documentation is licensed [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). 94 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/Common/IGListIndexPathResult.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListIndexPathResult.h" 11 | #import "IGListIndexPathResultInternal.h" 12 | 13 | @implementation IGListIndexPathResult { 14 | NSMapTable, NSIndexPath *> *_oldIndexPathMap; 15 | NSMapTable, NSIndexPath *> *_newIndexPathMap; 16 | } 17 | 18 | - (instancetype)initWithInserts:(NSArray *)inserts 19 | deletes:(NSArray *)deletes 20 | updates:(NSArray *)updates 21 | moves:(NSArray *)moves 22 | oldIndexPathMap:(NSMapTable, NSIndexPath *> *)oldIndexPathMap 23 | newIndexPathMap:(NSMapTable, NSIndexPath *> *)newIndexPathMap { 24 | if (self = [super init]) { 25 | _inserts = [inserts copy]; 26 | _deletes = [deletes copy]; 27 | _updates = [updates copy]; 28 | _moves = [moves copy]; 29 | _oldIndexPathMap = [oldIndexPathMap copy]; 30 | _newIndexPathMap = [newIndexPathMap copy]; 31 | } 32 | return self; 33 | } 34 | 35 | - (BOOL)hasChanges { 36 | return self.inserts.count || self.deletes.count || self.updates.count || self.moves.count; 37 | } 38 | 39 | - (IGListIndexPathResult *)resultForBatchUpdates { 40 | NSMutableSet *deletes = [NSMutableSet setWithArray:self.deletes]; 41 | NSMutableSet *inserts = [NSMutableSet setWithArray:self.inserts]; 42 | NSMutableSet *filteredUpdates = [NSMutableSet setWithArray:self.updates]; 43 | 44 | NSArray *moves = self.moves; 45 | NSMutableArray *filteredMoves = [moves mutableCopy]; 46 | 47 | // convert move+update to delete+insert, respecting the from/to of the move 48 | const NSUInteger moveCount = moves.count; 49 | for (NSInteger i = moveCount - 1; i >= 0; i--) { 50 | IGListMoveIndexPath *move = moves[i]; 51 | if ([filteredUpdates containsObject:move.from]) { 52 | [filteredMoves removeObjectAtIndex:i]; 53 | [filteredUpdates removeObject:move.from]; 54 | [deletes addObject:move.from]; 55 | [inserts addObject:move.to]; 56 | } 57 | } 58 | 59 | // iterate all new identifiers. if its index is updated, delete from the old index and insert the new index 60 | for (id key in [_oldIndexPathMap keyEnumerator]) { 61 | NSIndexPath *indexPath = [_oldIndexPathMap objectForKey:key]; 62 | if ([filteredUpdates containsObject:indexPath]) { 63 | [deletes addObject:indexPath]; 64 | [inserts addObject:(id)[_newIndexPathMap objectForKey:key]]; 65 | } 66 | } 67 | 68 | return [[IGListIndexPathResult alloc] initWithInserts:[inserts allObjects] 69 | deletes:[deletes allObjects] 70 | updates:[NSArray new] 71 | moves:filteredMoves 72 | oldIndexPathMap:_oldIndexPathMap 73 | newIndexPathMap:_newIndexPathMap]; 74 | } 75 | 76 | - (NSIndexPath *)oldIndexPathForIdentifier:(id)identifier { 77 | return [_oldIndexPathMap objectForKey:identifier]; 78 | } 79 | 80 | - (NSIndexPath *)newIndexPathForIdentifier:(id)identifier { 81 | return [_newIndexPathMap objectForKey:identifier]; 82 | } 83 | 84 | - (NSString *)description { 85 | return [NSString stringWithFormat:@"<%@ %p; %zi inserts; %zi deletes; %zi updates; %zi moves>", 86 | NSStringFromClass(self.class), self, self.inserts.count, self.deletes.count, self.updates.count, self.moves.count]; 87 | } 88 | 89 | @end 90 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListSectionController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | 18 | /** 19 | The base class for section controllers used in a list. This class is intended to be subclassed. 20 | */ 21 | @interface IGListSectionController : NSObject 22 | 23 | /** 24 | The view controller housing the adapter that created this section controller. 25 | 26 | @note Use this view controller to push, pop, present, or do other custom transitions. 27 | 28 | @warning It is considered very bad practice to cast this to a known view controller 29 | and call methods on it other than for navigations and transitions. 30 | */ 31 | @property (nonatomic, weak, nullable, readonly) UIViewController *viewController; 32 | 33 | /** 34 | A context object for interacting with the collection. 35 | 36 | Use this property for accessing the collection size, dequeing cells, reloading, inserting, deleting, etc. 37 | */ 38 | @property (nonatomic, weak, nullable, readonly) id collectionContext; 39 | 40 | /** 41 | Returns `YES` if the section controller is the first section in the list, `NO` otherwise. 42 | */ 43 | @property (nonatomic, assign, readonly) BOOL isFirstSection; 44 | 45 | /** 46 | Returns `YES` if the section controller is the last section in the list, `NO` otherwise. 47 | */ 48 | @property (nonatomic, assign, readonly) BOOL isLastSection; 49 | 50 | /** 51 | The margins used to lay out content in the section controller. 52 | 53 | @see `-[UICollectionViewFlowLayout sectionInset]`. 54 | */ 55 | @property (nonatomic, assign) UIEdgeInsets inset; 56 | 57 | /** 58 | The minimum spacing to use between rows of items. 59 | 60 | @see `-[UICollectionViewFlowLayout minimumLineSpacing]`. 61 | */ 62 | @property (nonatomic, assign) CGFloat minimumLineSpacing; 63 | 64 | /** 65 | The minimum spacing to use between items in the same row. 66 | 67 | @see `-[UICollectionViewFlowLayout minimumInteritemSpacing]`. 68 | */ 69 | @property (nonatomic, assign) CGFloat minimumInteritemSpacing; 70 | 71 | /** 72 | The supplementary view source for the section controller. Can be `nil`. 73 | 74 | @return An object that conforms to `IGListSupplementaryViewSource` or `nil`. 75 | 76 | @note You may wish to return `self` if your section controller implements this protocol. 77 | */ 78 | @property (nonatomic, weak, nullable) id supplementaryViewSource; 79 | 80 | /** 81 | An object that handles display events for the section controller. Can be `nil`. 82 | 83 | @return An object that conforms to `IGListDisplayDelegate` or `nil`. 84 | 85 | @note You may wish to return `self` if your section controller implements this protocol. 86 | */ 87 | @property (nonatomic, weak, nullable) id displayDelegate; 88 | 89 | /** 90 | An object that handles working range events for the section controller. Can be `nil`. 91 | 92 | @return An object that conforms to `IGListWorkingRangeDelegate` or `nil`. 93 | 94 | @note You may wish to return `self` if your section controller implements this protocol. 95 | */ 96 | @property (nonatomic, weak, nullable) id workingRangeDelegate; 97 | 98 | /** 99 | An object that handles display events for the section controller. Can be `nil`. 100 | 101 | @return An object that conforms to `IGListDisplayDelegate` or `nil`. 102 | 103 | @note You may wish to return `self` if your section controller implements this protocol. 104 | */ 105 | @property (nonatomic, weak, nullable) id scrollDelegate; 106 | 107 | @end 108 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-JJCollectionViewRoundFlowLayout_Example/Pods-JJCollectionViewRoundFlowLayout_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | BSD License 18 | 19 | For `IGListKit` software 20 | 21 | Copyright (c) 2016, Facebook, Inc. All rights reserved. 22 | 23 | Redistribution and use in source and binary forms, with or without modification, 24 | are permitted provided that the following conditions are met: 25 | 26 | * Redistributions of source code must retain the above copyright notice, this 27 | list of conditions and the following disclaimer. 28 | 29 | * Redistributions in binary form must reproduce the above copyright notice, 30 | this list of conditions and the following disclaimer in the documentation 31 | and/or other materials provided with the distribution. 32 | 33 | * Neither the name Facebook nor the names of its contributors may be used to 34 | endorse or promote products derived from this software without specific 35 | prior written permission. 36 | 37 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 38 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 39 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 40 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 41 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 42 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 44 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 45 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 46 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 47 | 48 | License 49 | BSD 50 | Title 51 | IGListKit 52 | Type 53 | PSGroupSpecifier 54 | 55 | 56 | FooterText 57 | Copyright (c) 2019 谢家杰 <303559363@qq.com> 58 | 59 | Permission is hereby granted, free of charge, to any person obtaining a copy 60 | of this software and associated documentation files (the "Software"), to deal 61 | in the Software without restriction, including without limitation the rights 62 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 63 | copies of the Software, and to permit persons to whom the Software is 64 | furnished to do so, subject to the following conditions: 65 | 66 | The above copyright notice and this permission notice shall be included in 67 | all copies or substantial portions of the Software. 68 | 69 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 70 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 71 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 72 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 73 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 74 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 75 | THE SOFTWARE. 76 | 77 | License 78 | MIT 79 | Title 80 | JJCollectionViewRoundFlowLayout 81 | Type 82 | PSGroupSpecifier 83 | 84 | 85 | FooterText 86 | Generated by CocoaPods - https://cocoapods.org 87 | Title 88 | 89 | Type 90 | PSGroupSpecifier 91 | 92 | 93 | StringsTable 94 | Acknowledgements 95 | Title 96 | Acknowledgements 97 | 98 | 99 | -------------------------------------------------------------------------------- /Example/JJCollectionViewRoundFlowLayout/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/JJCollectionViewRoundFlowLayout-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 64 | 70 | 71 | 72 | 73 | 79 | 81 | 87 | 88 | 89 | 90 | 92 | 93 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /Example/Pods/IGListKit/Source/IGListSingleSectionController.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2016-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "IGListSingleSectionController.h" 11 | 12 | #import 13 | 14 | @interface IGListSingleSectionController () 15 | 16 | @property (nonatomic, strong, readonly) NSString *nibName; 17 | @property (nonatomic, strong, readonly) NSBundle *bundle; 18 | @property (nonatomic, strong, readonly) NSString *identifier; 19 | @property (nonatomic, strong, readonly) Class cellClass; 20 | @property (nonatomic, strong, readonly) IGListSingleSectionCellConfigureBlock configureBlock; 21 | @property (nonatomic, strong, readonly) IGListSingleSectionCellSizeBlock sizeBlock; 22 | 23 | @property (nonatomic, strong) id item; 24 | 25 | @end 26 | 27 | @implementation IGListSingleSectionController 28 | 29 | - (instancetype)initWithCellClass:(Class)cellClass 30 | configureBlock:(IGListSingleSectionCellConfigureBlock)configureBlock 31 | sizeBlock:(IGListSingleSectionCellSizeBlock)sizeBlock { 32 | IGParameterAssert(cellClass != nil); 33 | IGParameterAssert(configureBlock != nil); 34 | IGParameterAssert(sizeBlock != nil); 35 | if (self = [super init]) { 36 | _cellClass = cellClass; 37 | _configureBlock = [configureBlock copy]; 38 | _sizeBlock = [sizeBlock copy]; 39 | } 40 | return self; 41 | } 42 | 43 | - (instancetype)initWithNibName:(NSString *)nibName 44 | bundle:(NSBundle *)bundle 45 | configureBlock:(IGListSingleSectionCellConfigureBlock)configureBlock 46 | sizeBlock:(IGListSingleSectionCellSizeBlock)sizeBlock { 47 | IGParameterAssert(nibName != nil); 48 | IGParameterAssert(configureBlock != nil); 49 | IGParameterAssert(sizeBlock != nil); 50 | if (self = [super init]) { 51 | _nibName = [nibName copy]; 52 | _bundle = bundle; 53 | _configureBlock = [configureBlock copy]; 54 | _sizeBlock = [sizeBlock copy]; 55 | } 56 | return self; 57 | } 58 | 59 | - (instancetype)initWithStoryboardCellIdentifier:(NSString *)identifier 60 | configureBlock:(IGListSingleSectionCellConfigureBlock)configureBlock 61 | sizeBlock:(IGListSingleSectionCellSizeBlock)sizeBlock { 62 | IGParameterAssert(identifier.length > 0); 63 | IGParameterAssert(configureBlock != nil); 64 | IGParameterAssert(sizeBlock != nil); 65 | if (self = [super init]) { 66 | _identifier = [identifier copy]; 67 | _configureBlock = [configureBlock copy]; 68 | _sizeBlock = [sizeBlock copy]; 69 | } 70 | return self; 71 | 72 | } 73 | 74 | #pragma mark - IGListSectionType 75 | 76 | - (NSInteger)numberOfItems { 77 | return 1; 78 | } 79 | 80 | - (CGSize)sizeForItemAtIndex:(NSInteger)index { 81 | return self.sizeBlock(self.item, self.collectionContext); 82 | } 83 | 84 | - (UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index { 85 | IGParameterAssert(index == 0); 86 | id cell; 87 | id collectionContext = self.collectionContext; 88 | if ([self.nibName length] > 0) { 89 | cell = [collectionContext dequeueReusableCellWithNibName:self.nibName 90 | bundle:self.bundle 91 | forSectionController:self 92 | atIndex:index]; 93 | } else if ([self.identifier length] > 0) { 94 | cell = [collectionContext dequeueReusableCellFromStoryboardWithIdentifier:self.identifier 95 | forSectionController:self 96 | atIndex:index]; 97 | } else { 98 | cell = [collectionContext dequeueReusableCellOfClass:self.cellClass forSectionController:self atIndex:index]; 99 | } 100 | self.configureBlock(self.item, cell); 101 | return cell; 102 | } 103 | 104 | - (void)didUpdateToObject:(id)object { 105 | self.item = object; 106 | } 107 | 108 | - (void)didSelectItemAtIndex:(NSInteger)index { 109 | [self.selectionDelegate didSelectSingleSectionController:self]; 110 | } 111 | 112 | @end 113 | --------------------------------------------------------------------------------