Repository: touchlane/CampcotCollectionView
Branch: master
Commit: 0540049dad4c
Files: 38
Total size: 130.0 KB
Directory structure:
gitextract_0jr27f1c/
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CODEOWNERS
├── CampcotCollectionView.podspec
├── CampcotCollectionView.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── xcshareddata/
│ └── xcschemes/
│ └── CampcotCollectionView.xcscheme
├── CampcotCollectionView.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── Example/
│ ├── Example.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── Example.xcscheme
│ └── Source/
│ ├── AppDelegate.swift
│ ├── CustomCollectionViewCell.swift
│ ├── CustomHeaderView.swift
│ ├── Images.xcassets/
│ │ ├── AppIcon.appiconset/
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── logo.imageset/
│ │ │ └── Contents.json
│ │ └── logo_splash.imageset/
│ │ └── Contents.json
│ ├── Launch Screen.storyboard
│ ├── Main.storyboard
│ ├── StoryboardViewController.swift
│ ├── Supporting Files/
│ │ └── Info.plist
│ └── ViewController.swift
├── LICENSE
├── README.md
├── Source/
│ ├── CampcotCollectionView.swift
│ ├── CollapsedLayout.swift
│ ├── ContentSizeAdjustmentBehavior.swift
│ ├── ExpandedLayout.swift
│ └── Supporting Files/
│ ├── CampcotCollectionView.h
│ └── Info.plist
├── Tests/
│ ├── CampcotCollectionViewTests.swift
│ └── Supporting Files/
│ └── Info.plist
└── scripts/
└── deploy.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# OS X
.DS_Store
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
.build/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
================================================
FILE: .travis.yml
================================================
os: osx
osx_image: xcode13.1
language: objective-c
before_deploy:
- gem install cocoapods
- pod repo add-cdn trunk 'https://cdn.cocoapods.org/'
deploy:
provider: script
script: ./scripts/deploy.sh
on:
tags: true
script:
- set -o pipefail && xcodebuild -scheme CampcotCollectionView -workspace CampcotCollectionView.xcworkspace -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13,OS=15.0' build test | xcpretty --color
- pod lib lint
after_success:
- bash <(curl -s https://codecov.io/bash)
================================================
FILE: CHANGELOG.md
================================================
# Changelog for CampcotCollectionView 0.0.8
### Added
* Optional `isExpanded` parameter to `CampcotCollectionView` initializer.
# Changelog for CampcotCollectionView 0.0.7
### Fixed
* Fixed crash with storyboard implementation.
### Added
* Storyboard support.
* Properties in `Attributes Inspector` for `CampcotCollectionView`.
* Example for storyboard implementation.
# Changelog for CampcotCollectionView 0.0.6
### Added
* `contentSizeAdjustmentBehavior` property allows to manage content size calculation.
# Changelog for CampcotCollectionView 0.0.5
### Added
* Layout supports more than 2 items in row.
### Fixed
* Fixed bug with pinned header position when `contentInset.top` is bigger than section height.
# Changelog for CampcotCollectionView 0.0.4
### Changed
* Updates for Swift 5.0
# Changelog for CampcotCollectionView 0.0.2
### Added
* Example UI update.
# Changelog for CampcotCollectionView 0.0.1
### Added
* Initial setup.
================================================
FILE: CODEOWNERS
================================================
* @VadzimMarozau
================================================
FILE: CampcotCollectionView.podspec
================================================
Pod::Spec.new do |s|
s.name = 'CampcotCollectionView'
s.version = '0.0.8'
s.summary = 'CapmcotCollectionView is custom UICollectionView that allows to expand and collapse sections.'
s.description = 'This library provides a custom UICollectionView that allows to expand and collapse sections.' \
'It provides a simple API to manage collection view appearance.'
s.homepage = 'https://github.com/touchlane/CampcotCollectionView'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Touchlane LLC' => 'tech@touchlane.com' }
s.source = { :git => 'https://github.com/touchlane/CampcotCollectionView.git', :tag => s.version.to_s }
s.ios.deployment_target = '9.0'
s.source_files = 'Source/*.swift'
s.swift_versions = ['5.0']
end
================================================
FILE: CampcotCollectionView.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objects = {
/* Begin PBXBuildFile section */
DD35D937201B57C80049ED03 /* CampcotCollectionView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD35D92D201B57C80049ED03 /* CampcotCollectionView.framework */; };
DD35D93C201B57C80049ED03 /* CampcotCollectionViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD35D93B201B57C80049ED03 /* CampcotCollectionViewTests.swift */; };
DD35D93E201B57C80049ED03 /* CampcotCollectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = DD35D930201B57C80049ED03 /* CampcotCollectionView.h */; settings = {ATTRIBUTES = (Public, ); }; };
DD35D94A201B5E280049ED03 /* ExpandedLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD35D949201B5E280049ED03 /* ExpandedLayout.swift */; };
DD35D98A201B66B40049ED03 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = DD35D987201B66B40049ED03 /* LICENSE */; };
DD35D98B201B66B40049ED03 /* CampcotCollectionView.podspec in Resources */ = {isa = PBXBuildFile; fileRef = DD35D988201B66B40049ED03 /* CampcotCollectionView.podspec */; };
DD35D98C201B66B40049ED03 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = DD35D989201B66B40049ED03 /* README.md */; };
DDC6199F2369C68100B6981E /* ContentSizeAdjustmentBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC6199E2369C68100B6981E /* ContentSizeAdjustmentBehavior.swift */; };
DDFB5C80201F451E00F8E164 /* CollapsedLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFB5C7F201F451E00F8E164 /* CollapsedLayout.swift */; };
DDFB5C82201F522B00F8E164 /* CampcotCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFB5C81201F522B00F8E164 /* CampcotCollectionView.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
DD35D938201B57C80049ED03 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DD35D924201B57C80049ED03 /* Project object */;
proxyType = 1;
remoteGlobalIDString = DD35D92C201B57C80049ED03;
remoteInfo = ExpandableLayout;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
DD35D92D201B57C80049ED03 /* CampcotCollectionView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CampcotCollectionView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DD35D930201B57C80049ED03 /* CampcotCollectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CampcotCollectionView.h; sourceTree = "<group>"; };
DD35D931201B57C80049ED03 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DD35D936201B57C80049ED03 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
DD35D93B201B57C80049ED03 /* CampcotCollectionViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CampcotCollectionViewTests.swift; sourceTree = "<group>"; };
DD35D93D201B57C80049ED03 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DD35D949201B5E280049ED03 /* ExpandedLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpandedLayout.swift; sourceTree = "<group>"; };
DD35D987201B66B40049ED03 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
DD35D988201B66B40049ED03 /* CampcotCollectionView.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CampcotCollectionView.podspec; sourceTree = "<group>"; };
DD35D989201B66B40049ED03 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; tabWidth = 3; };
DDC6199E2369C68100B6981E /* ContentSizeAdjustmentBehavior.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentSizeAdjustmentBehavior.swift; sourceTree = "<group>"; };
DDFB5C7F201F451E00F8E164 /* CollapsedLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollapsedLayout.swift; sourceTree = "<group>"; };
DDFB5C81201F522B00F8E164 /* CampcotCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CampcotCollectionView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
DD35D929201B57C80049ED03 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
DD35D933201B57C80049ED03 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DD35D937201B57C80049ED03 /* CampcotCollectionView.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
DD35D923201B57C80049ED03 = {
isa = PBXGroup;
children = (
DD35D986201B66A00049ED03 /* Metadata */,
DD35D947201B58910049ED03 /* Source */,
DD35D93A201B57C80049ED03 /* Tests */,
DD35D92E201B57C80049ED03 /* Products */,
);
sourceTree = "<group>";
};
DD35D92E201B57C80049ED03 /* Products */ = {
isa = PBXGroup;
children = (
DD35D92D201B57C80049ED03 /* CampcotCollectionView.framework */,
DD35D936201B57C80049ED03 /* Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
DD35D92F201B57C80049ED03 /* Supporting Files */ = {
isa = PBXGroup;
children = (
DD35D930201B57C80049ED03 /* CampcotCollectionView.h */,
DD35D931201B57C80049ED03 /* Info.plist */,
);
path = "Supporting Files";
sourceTree = "<group>";
};
DD35D93A201B57C80049ED03 /* Tests */ = {
isa = PBXGroup;
children = (
DD35D93B201B57C80049ED03 /* CampcotCollectionViewTests.swift */,
DD35D948201B59420049ED03 /* Supporting Files */,
);
path = Tests;
sourceTree = "<group>";
};
DD35D947201B58910049ED03 /* Source */ = {
isa = PBXGroup;
children = (
DD35D92F201B57C80049ED03 /* Supporting Files */,
DDFB5C81201F522B00F8E164 /* CampcotCollectionView.swift */,
DD35D949201B5E280049ED03 /* ExpandedLayout.swift */,
DDFB5C7F201F451E00F8E164 /* CollapsedLayout.swift */,
DDC6199E2369C68100B6981E /* ContentSizeAdjustmentBehavior.swift */,
);
path = Source;
sourceTree = "<group>";
};
DD35D948201B59420049ED03 /* Supporting Files */ = {
isa = PBXGroup;
children = (
DD35D93D201B57C80049ED03 /* Info.plist */,
);
path = "Supporting Files";
sourceTree = "<group>";
};
DD35D986201B66A00049ED03 /* Metadata */ = {
isa = PBXGroup;
children = (
DD35D987201B66B40049ED03 /* LICENSE */,
DD35D989201B66B40049ED03 /* README.md */,
DD35D988201B66B40049ED03 /* CampcotCollectionView.podspec */,
);
name = Metadata;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
DD35D92A201B57C80049ED03 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
DD35D93E201B57C80049ED03 /* CampcotCollectionView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
DD35D92C201B57C80049ED03 /* CampcotCollectionView */ = {
isa = PBXNativeTarget;
buildConfigurationList = DD35D941201B57C80049ED03 /* Build configuration list for PBXNativeTarget "CampcotCollectionView" */;
buildPhases = (
DD35D928201B57C80049ED03 /* Sources */,
DD35D929201B57C80049ED03 /* Frameworks */,
DD35D92A201B57C80049ED03 /* Headers */,
DD35D92B201B57C80049ED03 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = CampcotCollectionView;
productName = ExpandableLayout;
productReference = DD35D92D201B57C80049ED03 /* CampcotCollectionView.framework */;
productType = "com.apple.product-type.framework";
};
DD35D935201B57C80049ED03 /* Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = DD35D944201B57C80049ED03 /* Build configuration list for PBXNativeTarget "Tests" */;
buildPhases = (
DD35D932201B57C80049ED03 /* Sources */,
DD35D933201B57C80049ED03 /* Frameworks */,
DD35D934201B57C80049ED03 /* Resources */,
);
buildRules = (
);
dependencies = (
DD35D939201B57C80049ED03 /* PBXTargetDependency */,
);
name = Tests;
productName = ExpandableLayoutTests;
productReference = DD35D936201B57C80049ED03 /* Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
DD35D924201B57C80049ED03 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Touchlane LLC";
TargetAttributes = {
DD35D92C201B57C80049ED03 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
DD35D935201B57C80049ED03 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = DD35D927201B57C80049ED03 /* Build configuration list for PBXProject "CampcotCollectionView" */;
compatibilityVersion = "Xcode 8.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = DD35D923201B57C80049ED03;
productRefGroup = DD35D92E201B57C80049ED03 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
DD35D92C201B57C80049ED03 /* CampcotCollectionView */,
DD35D935201B57C80049ED03 /* Tests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
DD35D92B201B57C80049ED03 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DD35D98C201B66B40049ED03 /* README.md in Resources */,
DD35D98B201B66B40049ED03 /* CampcotCollectionView.podspec in Resources */,
DD35D98A201B66B40049ED03 /* LICENSE in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DD35D934201B57C80049ED03 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
DD35D928201B57C80049ED03 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DDFB5C82201F522B00F8E164 /* CampcotCollectionView.swift in Sources */,
DD35D94A201B5E280049ED03 /* ExpandedLayout.swift in Sources */,
DDFB5C80201F451E00F8E164 /* CollapsedLayout.swift in Sources */,
DDC6199F2369C68100B6981E /* ContentSizeAdjustmentBehavior.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DD35D932201B57C80049ED03 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DD35D93C201B57C80049ED03 /* CampcotCollectionViewTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
DD35D939201B57C80049ED03 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = DD35D92C201B57C80049ED03 /* CampcotCollectionView */;
targetProxy = DD35D938201B57C80049ED03 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
DD35D93F201B57C80049ED03 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
DD35D940201B57C80049ED03 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
DD35D942201B57C80049ED03 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.touchlane.CampcotCollectionView;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
DD35D943201B57C80049ED03 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.touchlane.CampcotCollectionView;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
DD35D945201B57C80049ED03 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.touchlane.CampcotCollectionViewTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
DD35D946201B57C80049ED03 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.touchlane.CampcotCollectionViewTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
DD35D927201B57C80049ED03 /* Build configuration list for PBXProject "CampcotCollectionView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DD35D93F201B57C80049ED03 /* Debug */,
DD35D940201B57C80049ED03 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
DD35D941201B57C80049ED03 /* Build configuration list for PBXNativeTarget "CampcotCollectionView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DD35D942201B57C80049ED03 /* Debug */,
DD35D943201B57C80049ED03 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
DD35D944201B57C80049ED03 /* Build configuration list for PBXNativeTarget "Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DD35D945201B57C80049ED03 /* Debug */,
DD35D946201B57C80049ED03 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = DD35D924201B57C80049ED03 /* Project object */;
}
================================================
FILE: CampcotCollectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ExpandableLayout.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: CampcotCollectionView.xcodeproj/xcshareddata/xcschemes/CampcotCollectionView.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D92C201B57C80049ED03"
BuildableName = "CampcotCollectionView.framework"
BlueprintName = "CampcotCollectionView"
ReferencedContainer = "container:CampcotCollectionView.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D935201B57C80049ED03"
BuildableName = "Tests.xctest"
BlueprintName = "Tests"
ReferencedContainer = "container:CampcotCollectionView.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D935201B57C80049ED03"
BuildableName = "Tests.xctest"
BlueprintName = "Tests"
ReferencedContainer = "container:CampcotCollectionView.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D92C201B57C80049ED03"
BuildableName = "CampcotCollectionView.framework"
BlueprintName = "CampcotCollectionView"
ReferencedContainer = "container:CampcotCollectionView.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D92C201B57C80049ED03"
BuildableName = "CampcotCollectionView.framework"
BlueprintName = "CampcotCollectionView"
ReferencedContainer = "container:CampcotCollectionView.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D92C201B57C80049ED03"
BuildableName = "CampcotCollectionView.framework"
BlueprintName = "CampcotCollectionView"
ReferencedContainer = "container:CampcotCollectionView.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: CampcotCollectionView.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Example/Example.xcodeproj">
</FileRef>
<FileRef
location = "container:CampcotCollectionView.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: CampcotCollectionView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: CampcotCollectionView.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>
================================================
FILE: Example/Example.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objects = {
/* Begin PBXBuildFile section */
86EB284F203DE4920052BFA2 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 86EB284D203DE4920052BFA2 /* Launch Screen.storyboard */; };
A3B228A923ED503D00757A28 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A3B228A823ED503D00757A28 /* Main.storyboard */; };
A3B228AC23ED525100757A28 /* StoryboardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B228AB23ED525100757A28 /* StoryboardViewController.swift */; };
DD35D958201B5F390049ED03 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD35D957201B5F390049ED03 /* AppDelegate.swift */; };
DD35D95A201B5F390049ED03 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD35D959201B5F390049ED03 /* ViewController.swift */; };
DD35D95F201B5F390049ED03 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DD35D95E201B5F390049ED03 /* Images.xcassets */; };
DD35D980201B63F70049ED03 /* CustomHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD35D97E201B63F70049ED03 /* CustomHeaderView.swift */; };
DD35D981201B63F70049ED03 /* CustomCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD35D97F201B63F70049ED03 /* CustomCollectionViewCell.swift */; };
DDFB5C7A201F36BC00F8E164 /* CampcotCollectionView.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = DDFB5C75201F367A00F8E164 /* CampcotCollectionView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
DDFB5C74201F367A00F8E164 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DD35D96E201B62BA0049ED03 /* CampcotCollectionView.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = DD35D92D201B57C80049ED03;
remoteInfo = CampcotCollectionView;
};
DDFB5C76201F367A00F8E164 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DD35D96E201B62BA0049ED03 /* CampcotCollectionView.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = DD35D936201B57C80049ED03;
remoteInfo = Tests;
};
DDFB5C78201F36B400F8E164 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DD35D96E201B62BA0049ED03 /* CampcotCollectionView.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = DD35D92C201B57C80049ED03;
remoteInfo = CampcotCollectionView;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
DD35D979201B62CE0049ED03 /* Copy Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
DDFB5C7A201F36BC00F8E164 /* CampcotCollectionView.framework in Copy Frameworks */,
);
name = "Copy Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
86EB284D203DE4920052BFA2 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
A3B228A823ED503D00757A28 /* Main.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
A3B228AB23ED525100757A28 /* StoryboardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryboardViewController.swift; sourceTree = "<group>"; };
DD35D954201B5F390049ED03 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
DD35D957201B5F390049ED03 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
DD35D959201B5F390049ED03 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
DD35D95E201B5F390049ED03 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
DD35D963201B5F390049ED03 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DD35D96E201B62BA0049ED03 /* CampcotCollectionView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CampcotCollectionView.xcodeproj; path = ../CampcotCollectionView.xcodeproj; sourceTree = "<group>"; };
DD35D97E201B63F70049ED03 /* CustomHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomHeaderView.swift; sourceTree = "<group>"; };
DD35D97F201B63F70049ED03 /* CustomCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomCollectionViewCell.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
DD35D951201B5F390049ED03 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
DD35D94B201B5F390049ED03 = {
isa = PBXGroup;
children = (
DD35D956201B5F390049ED03 /* Source */,
DD35D955201B5F390049ED03 /* Products */,
DD35D96E201B62BA0049ED03 /* CampcotCollectionView.xcodeproj */,
);
sourceTree = "<group>";
};
DD35D955201B5F390049ED03 /* Products */ = {
isa = PBXGroup;
children = (
DD35D954201B5F390049ED03 /* Example.app */,
);
name = Products;
sourceTree = "<group>";
};
DD35D956201B5F390049ED03 /* Source */ = {
isa = PBXGroup;
children = (
DD35D959201B5F390049ED03 /* ViewController.swift */,
A3B228AB23ED525100757A28 /* StoryboardViewController.swift */,
DD35D97E201B63F70049ED03 /* CustomHeaderView.swift */,
DD35D97F201B63F70049ED03 /* CustomCollectionViewCell.swift */,
DD35D957201B5F390049ED03 /* AppDelegate.swift */,
DD35D95E201B5F390049ED03 /* Images.xcassets */,
86EB284D203DE4920052BFA2 /* Launch Screen.storyboard */,
A3B228A823ED503D00757A28 /* Main.storyboard */,
DD35D969201B5FB10049ED03 /* Supporting Files */,
);
path = Source;
sourceTree = "<group>";
};
DD35D969201B5FB10049ED03 /* Supporting Files */ = {
isa = PBXGroup;
children = (
DD35D963201B5F390049ED03 /* Info.plist */,
);
path = "Supporting Files";
sourceTree = "<group>";
};
DDFB5C70201F367800F8E164 /* Products */ = {
isa = PBXGroup;
children = (
DDFB5C75201F367A00F8E164 /* CampcotCollectionView.framework */,
DDFB5C77201F367A00F8E164 /* Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
DD35D953201B5F390049ED03 /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = DD35D966201B5F390049ED03 /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
DD35D950201B5F390049ED03 /* Sources */,
DD35D951201B5F390049ED03 /* Frameworks */,
DD35D952201B5F390049ED03 /* Resources */,
DD35D979201B62CE0049ED03 /* Copy Frameworks */,
);
buildRules = (
);
dependencies = (
DDFB5C79201F36B400F8E164 /* PBXTargetDependency */,
);
name = Example;
productName = Example;
productReference = DD35D954201B5F390049ED03 /* Example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
DD35D94C201B5F390049ED03 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Touchlane LLC";
TargetAttributes = {
DD35D953201B5F390049ED03 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = DD35D94F201B5F390049ED03 /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 8.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = DD35D94B201B5F390049ED03;
productRefGroup = DD35D955201B5F390049ED03 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = DDFB5C70201F367800F8E164 /* Products */;
ProjectRef = DD35D96E201B62BA0049ED03 /* CampcotCollectionView.xcodeproj */;
},
);
projectRoot = "";
targets = (
DD35D953201B5F390049ED03 /* Example */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
DDFB5C75201F367A00F8E164 /* CampcotCollectionView.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = CampcotCollectionView.framework;
remoteRef = DDFB5C74201F367A00F8E164 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
DDFB5C77201F367A00F8E164 /* Tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = Tests.xctest;
remoteRef = DDFB5C76201F367A00F8E164 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
DD35D952201B5F390049ED03 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
86EB284F203DE4920052BFA2 /* Launch Screen.storyboard in Resources */,
DD35D95F201B5F390049ED03 /* Images.xcassets in Resources */,
A3B228A923ED503D00757A28 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
DD35D950201B5F390049ED03 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
A3B228AC23ED525100757A28 /* StoryboardViewController.swift in Sources */,
DD35D95A201B5F390049ED03 /* ViewController.swift in Sources */,
DD35D981201B63F70049ED03 /* CustomCollectionViewCell.swift in Sources */,
DD35D980201B63F70049ED03 /* CustomHeaderView.swift in Sources */,
DD35D958201B5F390049ED03 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
DDFB5C79201F36B400F8E164 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = CampcotCollectionView;
targetProxy = DDFB5C78201F36B400F8E164 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
DD35D964201B5F390049ED03 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
DD35D965201B5F390049ED03 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
DD35D967201B5F390049ED03 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NPGMYNXF85;
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.touchlane.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
DD35D968201B5F390049ED03 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NPGMYNXF85;
INFOPLIST_FILE = "Source/Supporting Files/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.touchlane.Example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
DD35D94F201B5F390049ED03 /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DD35D964201B5F390049ED03 /* Debug */,
DD35D965201B5F390049ED03 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
DD35D966201B5F390049ED03 /* Build configuration list for PBXNativeTarget "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DD35D967201B5F390049ED03 /* Debug */,
DD35D968201B5F390049ED03 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = DD35D94C201B5F390049ED03 /* Project object */;
}
================================================
FILE: Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Example.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D953201B5F390049ED03"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D953201B5F390049ED03"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D953201B5F390049ED03"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD35D953201B5F390049ED03"
BuildableName = "Example.app"
BlueprintName = "Example"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: Example/Source/AppDelegate.swift
================================================
//
// AppDelegate.swift
// Example
//
// Created by Vadim Morozov on 1/26/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let rootVC = ViewController()
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window?.rootViewController = rootVC
self.window?.makeKeyAndVisible()
return true
}
}
================================================
FILE: Example/Source/CustomCollectionViewCell.swift
================================================
//
// CustomCollectionViewCell.swift
// Example
//
// Created by Panda Systems on 1/8/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
import UIKit
class CustomCollectionViewCell: UICollectionViewCell {
static let reuseIdentifier = "CustomCell"
private let internalBackgroundColor = UIColor(red: 61 / 255, green: 86 / 255, blue: 166 / 255, alpha: 1)
private let textLabel = UILabel()
var text: String? {
didSet {
self.textLabel.text = text
}
}
override init(frame: CGRect) {
super.init(frame: .zero)
self.commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.commonInit()
}
private func commonInit() {
self.clipsToBounds = true
self.backgroundColor = self.internalBackgroundColor
self.layer.cornerRadius = 10
self.textLabel.font = UIFont.boldSystemFont(ofSize: 24)
self.textLabel.translatesAutoresizingMaskIntoConstraints = false
self.textLabel.textColor = .white
self.addSubview(self.textLabel)
self.activateTextLabelConstraints(view: self.textLabel, anchorView: self)
}
override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) {
super.apply(layoutAttributes)
self.layoutIfNeeded()
}
private func activateTextLabelConstraints(view: UIView, anchorView: UIView) {
NSLayoutConstraint.activate([
view.centerXAnchor.constraint(equalTo: anchorView.centerXAnchor),
view.centerYAnchor.constraint(equalTo: anchorView.centerYAnchor)
])
}
}
================================================
FILE: Example/Source/CustomHeaderView.swift
================================================
//
// CustomHeaderView.swift
// Example
//
// Created by Panda Systems on 1/8/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
import UIKit
protocol CustomHeaderViewDelegate: class {
func selectSection(section: Int)
}
class CustomHeaderView: UICollectionReusableView {
static let reuseIdentifier = "CustomHeaderView"
private let internalBackgroundColor = UIColor.purple
private let textLeadingOffset: CGFloat = 20
private let textLabel = UILabel()
weak var delegate: CustomHeaderViewDelegate?
var section: Int?
var text: String? {
didSet {
self.textLabel.text = text
}
}
override init(frame: CGRect) {
super.init(frame: .zero)
self.commonInit()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.commonInit()
}
private func commonInit() {
self.backgroundColor = self.internalBackgroundColor
self.textLabel.translatesAutoresizingMaskIntoConstraints = false
self.textLabel.textColor = .white
self.textLabel.textAlignment = .center
self.textLabel.font = UIFont.boldSystemFont(ofSize: 24)
self.addSubview(self.textLabel)
self.activateTextLabelConstraints(view: self.textLabel, anchorView: self)
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(tapOnView(sender:)))
self.addGestureRecognizer(tapRecognizer)
}
override func prepareForReuse() {
super.prepareForReuse()
self.text = nil
self.section = nil
}
override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) {
super.apply(layoutAttributes)
self.layoutIfNeeded()
}
}
private typealias CustomHeaderViewPrivate = CustomHeaderView
private extension CustomHeaderViewPrivate {
func activateTextLabelConstraints(view: UIView, anchorView: UIView) {
NSLayoutConstraint.activate([
view.centerXAnchor.constraint(equalTo: anchorView.centerXAnchor),
view.centerYAnchor.constraint(equalTo: anchorView.centerYAnchor)
])
}
@objc func tapOnView(sender: UIGestureRecognizer) {
guard let section = self.section else {
return
}
self.delegate?.selectSection(section: section)
}
}
================================================
FILE: Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x-1.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "ItunesArtwork@2x.png",
"scale" : "1x"
},
{
"size" : "24x24",
"idiom" : "watch",
"filename" : "Icon-24@2x.png",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "38mm"
},
{
"size" : "27.5x27.5",
"idiom" : "watch",
"filename" : "Icon-27.5@2x.png",
"scale" : "2x",
"role" : "notificationCenter",
"subtype" : "42mm"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "Icon-29@2x.png",
"role" : "companionSettings",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "watch",
"filename" : "Icon-29@3x.png",
"role" : "companionSettings",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "watch",
"filename" : "Icon-40@2x.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "38mm"
},
{
"size" : "44x44",
"idiom" : "watch",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "40mm"
},
{
"size" : "50x50",
"idiom" : "watch",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "44mm"
},
{
"size" : "86x86",
"idiom" : "watch",
"filename" : "Icon-86@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "38mm"
},
{
"size" : "98x98",
"idiom" : "watch",
"filename" : "Icon-98@2x.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "42mm"
},
{
"size" : "108x108",
"idiom" : "watch",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "44mm"
},
{
"idiom" : "watch-marketing",
"size" : "1024x1024",
"scale" : "1x"
},
{
"size" : "44x44",
"idiom" : "watch",
"filename" : "Icon-44@2x.png",
"scale" : "2x",
"role" : "longLook",
"subtype" : "42mm"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"pre-rendered" : true
}
}
================================================
FILE: Example/Source/Images.xcassets/Contents.json
================================================
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/Source/Images.xcassets/logo.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "logo.pdf",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/Source/Images.xcassets/logo_splash.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "logo_splash.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Example/Source/Launch Screen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo_splash" translatesAutoresizingMaskIntoConstraints="NO" id="jDA-qd-c6t">
<rect key="frame" x="20" y="250.5" width="335" height="93"/>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="jDA-qd-c6t" firstAttribute="centerX" secondItem="Bcu-3y-fUS" secondAttribute="centerX" id="KDj-Ws-lJn"/>
<constraint firstItem="jDA-qd-c6t" firstAttribute="bottom" secondItem="Bcu-3y-fUS" secondAttribute="centerY" id="MZV-gS-tq4"/>
<constraint firstItem="Bcu-3y-fUS" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="jDA-qd-c6t" secondAttribute="trailing" constant="20" id="Ssm-rA-Wfr"/>
<constraint firstItem="jDA-qd-c6t" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Bcu-3y-fUS" secondAttribute="leading" constant="20" id="p15-l3-GLm"/>
<constraint firstItem="jDA-qd-c6t" firstAttribute="width" secondItem="jDA-qd-c6t" secondAttribute="height" multiplier="205:57" id="q5K-0n-3kS"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="logo_splash" width="410" height="114"/>
</resources>
</document>
================================================
FILE: Example/Source/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="50H-WV-jbO">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="collection view cell content view" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Storyboard View Controller-->
<scene sceneID="Bn2-4k-qfx">
<objects>
<viewController storyboardIdentifier="viewController" id="50H-WV-jbO" customClass="StoryboardViewController" customModule="Example" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="p7o-vJ-Y8e">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="CiI-U7-IGk" customClass="CampcotCollectionView" customModule="CampcotCollectionView">
<rect key="frame" x="0.0" y="44" width="414" height="818"/>
<color key="backgroundColor" red="0.74117647058823533" green="0.76470588235294112" blue="0.7803921568627451" alpha="1" colorSpace="calibratedRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="n55-JI-Luz">
<size key="itemSize" width="72" height="72"/>
<size key="headerReferenceSize" width="50" height="50"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="CustomCell" id="B6o-dS-0wb" customClass="CustomCollectionViewCell" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="72" height="72"/>
<autoresizingMask key="autoresizingMask"/>
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="mMo-R2-YRQ">
<rect key="frame" x="0.0" y="0.0" width="72" height="72"/>
<autoresizingMask key="autoresizingMask"/>
</collectionViewCellContentView>
<size key="customSize" width="72" height="72"/>
</collectionViewCell>
</cells>
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="CustomHeaderView" id="Zbe-JP-2ZF" customClass="CustomHeaderView" customModule="Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="414" height="50"/>
<autoresizingMask key="autoresizingMask"/>
</collectionReusableView>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="top">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="topInset">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="bottomInset">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="leftInset">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="rightInset">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="sectionHeadersPinToVisibleBounds" value="YES"/>
<userDefinedRuntimeAttribute type="number" keyPath="minimumSectionSpacing">
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="minimumInteritemSpacing">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="minimumLineSpacing">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="dataSource" destination="50H-WV-jbO" id="u27-tO-IDt"/>
<outlet property="delegate" destination="50H-WV-jbO" id="x0f-La-Hkc"/>
</connections>
</collectionView>
</subviews>
<color key="backgroundColor" red="0.74117647060000003" green="0.76470588240000004" blue="0.78039215689999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="03S-Zr-mha" firstAttribute="bottom" secondItem="CiI-U7-IGk" secondAttribute="bottom" id="TNE-uS-6yy"/>
<constraint firstItem="03S-Zr-mha" firstAttribute="trailing" secondItem="CiI-U7-IGk" secondAttribute="trailing" id="UyL-lV-7Ce"/>
<constraint firstItem="CiI-U7-IGk" firstAttribute="leading" secondItem="03S-Zr-mha" secondAttribute="leading" id="ZWJ-fV-Esm"/>
<constraint firstItem="CiI-U7-IGk" firstAttribute="top" secondItem="03S-Zr-mha" secondAttribute="top" id="aNo-19-2P1"/>
</constraints>
<viewLayoutGuide key="safeArea" id="03S-Zr-mha"/>
</view>
<connections>
<outlet property="collectionView" destination="CiI-U7-IGk" id="jdf-Vd-Nl0"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Tcc-yi-6ep" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-339.13043478260875" y="49.553571428571423"/>
</scene>
</scenes>
</document>
================================================
FILE: Example/Source/StoryboardViewController.swift
================================================
//
// StoryboardViewController.swift
// Example
//
// Created by Alex Yanski on 2/7/20.
// Copyright © 2020 Touchlane LLC. All rights reserved.
//
import UIKit
import CampcotCollectionView
class StoryboardViewController: UIViewController {
@IBOutlet weak var collectionView: CampcotCollectionView!
let itemsInRow = 2
var itemsInSection: [Int: Int] = [:]
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default
}
}
extension StoryboardViewController: UICollectionViewDataSource {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return 20
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if let numberOfItems = itemsInSection[section] {
return numberOfItems
}
let numberOfItems = Int.random(in: 1...6)
itemsInSection[section] = numberOfItems
return numberOfItems
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(
withReuseIdentifier: CustomCollectionViewCell.reuseIdentifier,
for: indexPath) as! CustomCollectionViewCell
cell.text = "\(indexPath.section):\(indexPath.row)"
return cell
}
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
let view = collectionView.dequeueReusableSupplementaryView(
ofKind: kind,
withReuseIdentifier: CustomHeaderView.reuseIdentifier,
for: indexPath) as! CustomHeaderView
view.section = indexPath.section
view.text = "section: \(indexPath.section)"
view.delegate = self
return view
}
}
extension StoryboardViewController: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let interitemSpacing = self.collectionView.minimumInteritemSpacing * CGFloat(itemsInRow - 1)
let totalSpacing = collectionView.bounds.width - self.collectionView.sectionInset.left - self.collectionView.sectionInset.right - interitemSpacing
let width = totalSpacing / CGFloat(itemsInRow)
return CGSize(width: width, height: width)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
return CGSize(width: UIScreen.main.bounds.size.width, height: 60)
}
}
extension StoryboardViewController: CustomHeaderViewDelegate {
func selectSection(section: Int) {
self.collectionView.toggle(to: section, animated: true)
}
}
================================================
FILE: Example/Source/Supporting Files/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>CampcotCollectionView</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>Launch Screen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleDefault</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: Example/Source/ViewController.swift
================================================
//
// ViewController.swift
// Example
//
// Created by Panda Systems on 12/19/17.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
import UIKit
import CampcotCollectionView
class ViewController: UIViewController {
let collectionView = CampcotCollectionView()
let interitemSpacing: CGFloat = 10
let lineSpacing: CGFloat = 10
let sectionInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
let backgroundColor = UIColor(red: 189 / 255, green: 195 / 255, blue: 199 / 255, alpha: 1)
let itemsInRow = 2
var itemsInSection: [Int: Int] = [:]
override func viewDidLoad() {
super.viewDidLoad()
self.view.backgroundColor = backgroundColor
self.collectionView.backgroundColor = backgroundColor
self.collectionView.clipsToBounds = true
self.collectionView.sectionInset = sectionInsets
self.collectionView.minimumSectionSpacing = 1
self.collectionView.minimumInteritemSpacing = interitemSpacing
self.collectionView.minimumLineSpacing = lineSpacing
self.collectionView.sectionHeadersPinToVisibleBounds = true
self.collectionView.register(
CustomCollectionViewCell.self,
forCellWithReuseIdentifier: CustomCollectionViewCell.reuseIdentifier
)
self.collectionView.register(
CustomHeaderView.self,
forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,
withReuseIdentifier: CustomHeaderView.reuseIdentifier
)
self.collectionView.delegate = self
self.collectionView.dataSource = self
self.collectionView.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(self.collectionView)
self.activateCollectionViewConstraints(view: self.collectionView, anchorView: self.view)
}
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default
}
private func activateCollectionViewConstraints(view: UIView, anchorView: UIView) {
NSLayoutConstraint.activate([
view.leadingAnchor.constraint(equalTo: anchorView.leadingAnchor),
view.trailingAnchor.constraint(equalTo: anchorView.trailingAnchor),
view.topAnchor.constraint(equalTo: self.topLayoutGuide.bottomAnchor),
view.bottomAnchor.constraint(equalTo: self.bottomLayoutGuide.topAnchor)
])
}
}
extension ViewController: UICollectionViewDataSource {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return 20
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if let numberOfItems = itemsInSection[section] {
return numberOfItems
}
let numberOfItems = Int.random(in: 1...6)
itemsInSection[section] = numberOfItems
return numberOfItems
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(
withReuseIdentifier: CustomCollectionViewCell.reuseIdentifier,
for: indexPath) as! CustomCollectionViewCell
cell.text = "\(indexPath.section):\(indexPath.row)"
return cell
}
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
let view = collectionView.dequeueReusableSupplementaryView(
ofKind: kind,
withReuseIdentifier: CustomHeaderView.reuseIdentifier,
for: indexPath) as! CustomHeaderView
view.section = indexPath.section
view.text = "section: \(indexPath.section)"
view.delegate = self
return view
}
}
extension ViewController: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let width = (collectionView.bounds.width - sectionInsets.left - sectionInsets.right - interitemSpacing * CGFloat(itemsInRow - 1)) / CGFloat(itemsInRow)
return CGSize(width: width, height: width)
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
return CGSize(width: UIScreen.main.bounds.size.width, height: 60)
}
}
extension ViewController: CustomHeaderViewDelegate {
func selectSection(section: Int) {
self.collectionView.toggle(to: section, animated: true)
}
}
================================================
FILE: LICENSE
================================================
Copyright (c) 2018 Touchlane LLC tech@touchlane.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: README.md
================================================


[](https://travis-ci.org/touchlane/CampcotCollectionView)
[](https://codecov.io/gh/touchlane/CampcotCollectionView)
[](http://cocoapods.org/pods/CampcotCollectionView)
[](http://cocoapods.org/pods/CampcotCollectionView)
[](http://cocoapods.org/pods/CampcotCollectionView)
This library provides a custom `UICollectionView` that allows to expand and collapse sections. Provides a simple API to manage collection view appearance.

# Requirements
* iOS 9.0+
* Xcode 10.2+
* Swift 5.0+
# Installation
## CocoaPods
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
```$ gem install cocoapods```
To integrate CampcotCollectionView into your Xcode project using CocoaPods, specify it in your ```Podfile```:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'CampcotCollectionView'
end
```
Then, run the following command:
```$ pod install```
# Usage
### Manual Setup
```swift
import CampcotCollectionView
```
1. Create CollectionView
```swift
let campcotCollectionView = CampcotCollectionView()
```
2. Add `campcotCollectionView` to view hierarchy.
3. Call `toggle` method on `campcotCollectionView`.
```swift
public func toggle(to section: Int,
offsetCorrection: CGFloat = default,
animated: Bool,
completion: ((Bool) -> Void)? = default)
```
### Storyboard Setup
1. Add UICollectionView to your Storyboard.
2. In `Identity Inspector` set the `Class` property to `CampcotCollectionView`.
3. Open `Attributes Inspector` and set the `Layout` property to `Custom`. Set `Class` property to either `ExpandedLayout` or `CollapsedLayout`.
4. Create outlet for your collectionView.
5. Set datasource and delegate for collectionView.
5. Set the settings for collectionView in `Attributes Inspector` or manualy.
# Documentation
### CampcotCollectionView
A Boolean value that determines whether the sections are expanded.
```swift
public var isExpanded: Bool { get }
```
Expands all the sections. Pins a section at index `section` to the top of view bounds.
`offsetCorrection` - the offset for pinned section from the top. Default value of `offsetCorrection` is `0`.
`animated` - if `true` expands sections with animation.
`completion` - callback for animation.
```swift
public func expand(from section: Int,
offsetCorrection: CGFloat = default,
animated: Bool,
completion: ((Bool) -> Void)? = default)
```
Collapses all the sections. Pins a section at index `section` to the top of view bounds.
`offsetCorrection` - the offset for pinned section from the top. Default value of `offsetCorrection` is `0`.
`animated` - if `true` collapses sections with animation.
`completion` - callback for animation.
```swift
public func collapse(to section: Int,
offsetCorrection: CGFloat = default,
animated: Bool,
completion: ((Bool) -> Void)? = default)
```
Toggles current state from collapsed to expaned and vise versa. Pins a section at index `section` to the top of view bounds.
`offsetCorrection` - the offset for pinned section from the top. Default value of `offsetCorrection` is `0`.
`animated` - if `true` toggles sections with animation.
`completion` - callback for animation.
```swift
public func toggle(to section: Int,
offsetCorrection: CGFloat = default,
animated: Bool,
completion: ((Bool) -> Void)? = default)
```
___
================================================
FILE: Source/CampcotCollectionView.swift
================================================
//
// CampcotCollectionView.swift
// CampcotCollectionView
//
// Created by Vadim Morozov on 1/29/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
public class CampcotCollectionView: UICollectionView {
private var expandedLayout: ExpandedLayout!
private var collapsedLayout: CollapsedLayout!
/// A Boolean value that determines whether the sections are expanded.
public var isExpanded: Bool {
return self.collectionViewLayout === self.expandedLayout
}
/// Space between section headers in collapsed state.
@IBInspectable
public var minimumSectionSpacing: CGFloat = 0 {
didSet {
self.expandedLayout.minimumSectionSpacing = minimumSectionSpacing
self.collapsedLayout.minimumSectionSpacing = minimumSectionSpacing
}
}
/// Layout minimum interitem spaceign.
@IBInspectable
public var minimumInteritemSpacing: CGFloat = 0 {
didSet {
self.expandedLayout.minimumInteritemSpacing = minimumInteritemSpacing
self.collapsedLayout.minimumInteritemSpacing = minimumInteritemSpacing
}
}
/// Layout minimum line spacing.
@IBInspectable
public var minimumLineSpacing: CGFloat = 0 {
didSet {
self.expandedLayout.minimumLineSpacing = minimumLineSpacing
self.collapsedLayout.minimumLineSpacing = minimumLineSpacing
}
}
/// Layout section inset.
public var sectionInset = UIEdgeInsets.zero {
didSet {
self.expandedLayout.sectionInset = sectionInset
self.collapsedLayout.sectionInset = sectionInset
}
}
@IBInspectable
private var topInset: CGFloat = 0 {
didSet {
sectionInset.top = topInset
}
}
@IBInspectable
private var bottomInset: CGFloat = 0 {
didSet {
sectionInset.bottom = bottomInset
}
}
@IBInspectable
private var leftInset: CGFloat = 0 {
didSet {
sectionInset.left = leftInset
}
}
@IBInspectable
private var rightInset: CGFloat = 0 {
didSet {
sectionInset.right = rightInset
}
}
/// Layout section headers pin to visible bounds.
@IBInspectable
public var sectionHeadersPinToVisibleBounds: Bool = false {
didSet {
self.expandedLayout.sectionHeadersPinToVisibleBounds = sectionHeadersPinToVisibleBounds
self.collapsedLayout.sectionHeadersPinToVisibleBounds = sectionHeadersPinToVisibleBounds
}
}
/// Content size calculation rules.
public var contentSizeAdjustmentBehavior: ContentSizeAdjustmentBehavior = .normal {
didSet {
self.expandedLayout.contentSizeAdjustmentBehavior = contentSizeAdjustmentBehavior
self.collapsedLayout.contentSizeAdjustmentBehavior = contentSizeAdjustmentBehavior
}
}
public init(isExpanded: Bool = true) {
expandedLayout = ExpandedLayout()
collapsedLayout = CollapsedLayout()
super.init(frame: .zero, collectionViewLayout: isExpanded ? self.expandedLayout : self.collapsedLayout)
}
required public init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
if let expandedLayout = self.collectionViewLayout as? ExpandedLayout {
/// When collectionViewLayout is expanded
self.expandedLayout = expandedLayout
self.collapsedLayout = CollapsedLayout()
} else if let collapsedLayout = self.collectionViewLayout as? CollapsedLayout {
/// When collectionViewLayout is collapsed
self.expandedLayout = ExpandedLayout()
self.collapsedLayout = collapsedLayout
} else {
/// By default, if collectionViewLayout was not set neither expanded nor collapsed
self.expandedLayout = ExpandedLayout()
self.collapsedLayout = CollapsedLayout()
self.collectionViewLayout = self.expandedLayout /// Default layout
}
}
/// Expand all sections and pin section from params to top.
public func expand(from section: Int,
offsetCorrection: CGFloat = 0,
animated: Bool,
completion: ((Bool) -> Void)? = nil) {
guard !self.isExpanded else {
return
}
self.expandedLayout.targetSection = section
self.expandedLayout.offsetCorrection = offsetCorrection
self.collapsedLayout.targetSection = section
self.collapsedLayout.offsetCorrection = offsetCorrection
self.setCollectionViewLayout(self.expandedLayout, animated: animated, completion: { completed in
DispatchQueue.main.async(execute: {
completion?(completed)
})
})
}
/// Collapse all sections and pin section from params to top.
public func collapse(to section: Int,
offsetCorrection: CGFloat = 0,
animated: Bool,
completion: ((Bool) -> Void)? = nil) {
guard self.isExpanded else {
return
}
self.expandedLayout.targetSection = section
self.expandedLayout.offsetCorrection = offsetCorrection
self.collapsedLayout.targetSection = section
self.collapsedLayout.offsetCorrection = offsetCorrection
self.setCollectionViewLayout(self.collapsedLayout, animated: animated, completion: { completed in
DispatchQueue.main.async(execute: {
completion?(completed)
})
})
}
/// Change sections mode to opposite.
public func toggle(to section: Int,
offsetCorrection: CGFloat = 0,
animated: Bool,
completion: ((Bool) -> Void)? = nil) {
if self.isExpanded {
self.collapse(to: section,
offsetCorrection: offsetCorrection,
animated: animated,
completion: completion)
}
else {
self.expand(from: section,
offsetCorrection: offsetCorrection,
animated: animated,
completion: completion)
}
}
}
================================================
FILE: Source/CollapsedLayout.swift
================================================
//
// CollapsedLayout.swift
// CampcotCollectionView
//
// Created by Vadim Morozov on 1/29/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
public class CollapsedLayout: UICollectionViewFlowLayout {
var targetSection: Int = 0
var offsetCorrection: CGFloat = 0
var minimumSectionSpacing: CGFloat = 0 {
didSet {
self.invalidateLayout()
}
}
private var contentHeight: CGFloat = 0
private var contentWidth: CGFloat {
guard let collectionView = self.collectionView else {
return 0
}
let insets = collectionView.contentInset
return collectionView.bounds.width - (insets.left + insets.right)
}
public var contentSizeAdjustmentBehavior: ContentSizeAdjustmentBehavior = .normal {
didSet {
self.invalidateLayout()
}
}
override public var collectionViewContentSize: CGSize {
switch self.contentSizeAdjustmentBehavior {
case .normal:
return CGSize(width: self.contentWidth, height: self.contentHeight)
case .fitHeight(let adjustInsets):
guard let collectionView = self.collectionView else {
return CGSize(width: self.contentWidth, height: self.contentHeight)
}
var adjustedContentHeight = collectionView.bounds.height
if adjustInsets.contains(.top) {
adjustedContentHeight -= collectionView.contentInset.top
}
if adjustInsets.contains(.bottom) {
adjustedContentHeight -= collectionView.contentInset.bottom
}
let contentHeight = max(self.contentHeight, adjustedContentHeight)
return CGSize(width: self.contentWidth, height: contentHeight)
}
}
override public var sectionInset: UIEdgeInsets {
get {
return super.sectionInset
}
set {
super.sectionInset = UIEdgeInsets(top: 0, left: newValue.left, bottom: 0, right: newValue.right)
}
}
private var headersAttributes: [UICollectionViewLayoutAttributes] = []
private var itemsAttributes: [[UICollectionViewLayoutAttributes]] = []
override public func prepare() {
super.prepare()
guard let collectionView = self.collectionView else {
return
}
guard let delegate = collectionView.delegate as? UICollectionViewDelegateFlowLayout else {
return
}
guard let dataSource = collectionView.dataSource else {
return
}
self.headersAttributes = []
self.itemsAttributes = []
self.contentHeight = 0
let numberOfSections = dataSource.numberOfSections!(in: collectionView)
for section in 0..<numberOfSections {
let headerSize = delegate.collectionView!(collectionView, layout: self, referenceSizeForHeaderInSection: section)
let height = headerSize.height
let width = headerSize.width
let indexPath = IndexPath(row: 0, section: section)
let attributes = UICollectionViewLayoutAttributes(
forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,
with: indexPath
)
attributes.frame = CGRect(x: 0, y: self.contentHeight, width: width, height: height)
self.headersAttributes.append(attributes)
self.contentHeight += height
self.contentHeight += self.minimumSectionSpacing / 2
self.itemsAttributes.append([])
let numberOfItems = dataSource.collectionView(collectionView, numberOfItemsInSection: section)
for row in 0..<numberOfItems {
let indexPath = IndexPath(row: row, section: section)
let itemSize = delegate.collectionView!(collectionView, layout: self, sizeForItemAt: indexPath)
let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
let columnsCount = Int(contentWidth / itemSize.width)
let column = row % columnsCount
attributes.frame = CGRect(
x: sectionInset.left + CGFloat(column) * (itemSize.width + minimumInteritemSpacing),
y: contentHeight,
width: itemSize.width,
height: 0
)
attributes.isHidden = true
self.itemsAttributes[section].append(attributes)
}
self.contentHeight += self.minimumSectionSpacing / 2
}
}
override public func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
guard self.collectionView?.dataSource != nil else {
return nil
}
var visibleLayoutAttributes: [UICollectionViewLayoutAttributes] = []
for attributes in headersAttributes {
if attributes.frame.intersects(rect) {
visibleLayoutAttributes.append(attributes)
}
}
return visibleLayoutAttributes
}
override public func layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
guard self.headersAttributes.indices.contains(indexPath.section) else {
return super.layoutAttributesForSupplementaryView(ofKind: elementKind, at: indexPath)
}
return self.headersAttributes[indexPath.section]
}
override public func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
guard self.itemsAttributes.indices.contains(indexPath.section) else {
return super.layoutAttributesForItem(at: indexPath)
}
guard self.itemsAttributes[indexPath.section].indices.contains(indexPath.row) else {
return super.layoutAttributesForItem(at: indexPath)
}
return self.itemsAttributes[indexPath.section][indexPath.row]
}
override public func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint) -> CGPoint {
guard let collectionView = self.collectionView else {
return proposedContentOffset
}
var targetOffset = proposedContentOffset
targetOffset.y = offsetCorrection
for section in 0..<self.targetSection {
let height = self.headersAttributes[section].frame.size.height
targetOffset.y += height
targetOffset.y += minimumSectionSpacing
}
let emptySpace = collectionView.bounds.size.height - (self.collectionViewContentSize.height - targetOffset.y)
if emptySpace > 0 {
targetOffset.y = targetOffset.y - emptySpace
}
if self.contentHeight < self.collectionViewContentSize.height {
let freeSpace = self.collectionViewContentSize.height - (targetOffset.y - self.offsetCorrection)
if freeSpace > 0 {
targetOffset.y = self.offsetCorrection
}
}
return targetOffset
}
}
================================================
FILE: Source/ContentSizeAdjustmentBehavior.swift
================================================
//
// ContentSizeAdjustmentBehavior.swift
// CampcotCollectionView
//
// Created by Vadim Morozov on 10/30/19.
// Copyright © 2019 Touchlane LLC. All rights reserved.
//
public enum ContentSizeAdjustmentBehavior {
public struct Inset: OptionSet {
public let rawValue: Int
public init(rawValue: Int) {
self.rawValue = rawValue
}
public static let top = Inset(rawValue: 1 << 0)
public static let bottom = Inset(rawValue: 1 << 1)
public static let none: Inset = []
public static let all: Inset = [.top, .bottom]
}
/// Content size depends only on content.
case normal
/// Content size can't be less than collection view frame without adjust insets.
case fitHeight(adjustInsets: Inset)
}
================================================
FILE: Source/ExpandedLayout.swift
================================================
//
// ExpandedLayout.swift
// CampcotCollectionView
//
// Created by Vadim Morozov on 1/26/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
public class ExpandedLayout: UICollectionViewFlowLayout {
var targetSection: Int = 0
var offsetCorrection: CGFloat = 0
var minimumSectionSpacing: CGFloat = 0
private var isTransitingToCollapsed = false {
didSet {
guard oldValue != isTransitingToCollapsed else {
return
}
self.invalidateLayout()
}
}
private var isTransitingToExpanded = false {
didSet {
guard oldValue != isTransitingToExpanded else {
return
}
self.didFinishExpandTransition = !isTransitingToExpanded
self.invalidateLayout()
}
}
private var didFinishExpandTransition = false
private var contentHeight: CGFloat = 0
private var contentWidth: CGFloat {
guard let collectionView = collectionView else {
return 0
}
let insets = collectionView.contentInset
return collectionView.bounds.width - (insets.left + insets.right)
}
public var contentSizeAdjustmentBehavior: ContentSizeAdjustmentBehavior = .normal {
didSet {
self.invalidateLayout()
}
}
override public var collectionViewContentSize: CGSize {
switch self.contentSizeAdjustmentBehavior {
case .normal:
return CGSize(width: self.contentWidth, height: self.contentHeight)
case .fitHeight(let adjustInsets):
guard let collectionView = self.collectionView else {
return CGSize(width: self.contentWidth, height: self.contentHeight)
}
var adjustedContentHeight = collectionView.bounds.height
if adjustInsets.contains(.top) {
adjustedContentHeight -= collectionView.contentInset.top
}
if adjustInsets.contains(.bottom) {
adjustedContentHeight -= collectionView.contentInset.bottom
}
let contentHeight = max(self.contentHeight, adjustedContentHeight)
return CGSize(width: self.contentWidth, height: contentHeight)
}
}
private var headersAttributes: [UICollectionViewLayoutAttributes] = []
private var itemsAttributes: [[UICollectionViewLayoutAttributes]] = []
override public func prepare() {
super.prepare()
guard !self.isTransitingToCollapsed else {
self.collapseInvisibleSections()
return
}
guard !self.isTransitingToExpanded else {
self.expandVisibleSections()
return
}
guard let collectionView = self.collectionView else {
return
}
guard let delegate = collectionView.delegate as? UICollectionViewDelegateFlowLayout else {
return
}
guard let dataSource = collectionView.dataSource else {
return
}
self.headersAttributes = []
self.itemsAttributes = []
self.contentHeight = 0
let numberOfSections = dataSource.numberOfSections!(in: collectionView)
for section in 0..<numberOfSections {
let headerSize = delegate.collectionView!(collectionView, layout: self, referenceSizeForHeaderInSection: section)
let height = headerSize.height
let width = headerSize.width
let indexPath = IndexPath(row: 0, section: section)
let attributes = UICollectionViewLayoutAttributes(forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, with: indexPath)
attributes.frame = CGRect(x: 0, y: contentHeight, width: width, height: height)
self.headersAttributes.append(attributes)
self.contentHeight += height
self.contentHeight += self.sectionInset.top
self.itemsAttributes.append([])
let numberOfItems = dataSource.collectionView(collectionView, numberOfItemsInSection: section)
for row in 0..<numberOfItems {
let indexPath = IndexPath(row: row, section: section)
let itemSize = delegate.collectionView!(collectionView, layout: self, sizeForItemAt: indexPath)
let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
let columnsCount = Int(contentWidth / itemSize.width)
let column = row % columnsCount
attributes.frame = CGRect(
x: sectionInset.left + CGFloat(column) * (itemSize.width + minimumInteritemSpacing),
y: contentHeight,
width: itemSize.width,
height: itemSize.height
)
attributes.isHidden = false
self.itemsAttributes[section].append(attributes)
if column == columnsCount - 1 || row == numberOfItems - 1 {
self.contentHeight += itemSize.height
if row < numberOfItems - 1 {
contentHeight += minimumLineSpacing
}
}
}
self.contentHeight += self.sectionInset.bottom
}
if self.didFinishExpandTransition {
self.setRealOffset()
self.didFinishExpandTransition = false
}
}
override public func prepareForTransition(to newLayout: UICollectionViewLayout) {
super.prepareForTransition(to: newLayout)
if newLayout is CollapsedLayout {
self.isTransitingToCollapsed = true
}
}
override public func prepareForTransition(from oldLayout: UICollectionViewLayout) {
super.prepareForTransition(from: oldLayout)
if oldLayout is CollapsedLayout {
self.isTransitingToExpanded = true
}
}
override public func finalizeLayoutTransition() {
super.finalizeLayoutTransition()
self.isTransitingToCollapsed = false
self.isTransitingToExpanded = false
}
override public func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
guard self.collectionView?.dataSource != nil else {
return nil
}
guard isTransitingToCollapsed || isTransitingToExpanded else {
let superAttributes = super.layoutAttributesForElements(in: rect)
guard let attributes = superAttributes else {
return superAttributes
}
for elementAttributes in attributes {
guard elementAttributes.representedElementCategory == .supplementaryView else {
continue
}
guard self.headersAttributes.indices.contains(elementAttributes.indexPath.section) else {
continue
}
elementAttributes.frame.origin.y -= self.sectionHeadersPinToBoundsCorrection(
proposedTopOffset: elementAttributes.frame.origin.y,
estimatedTopOffset: self.headersAttributes[elementAttributes.indexPath.section].frame.origin.y)
}
return attributes
}
var visibleLayoutAttributes: [UICollectionViewLayoutAttributes] = []
for attributes in headersAttributes {
if attributes.frame.intersects(rect) {
visibleLayoutAttributes.append(attributes)
}
}
for sectionAttributes in itemsAttributes {
for attributes in sectionAttributes {
if attributes.frame.intersects(rect) {
visibleLayoutAttributes.append(attributes)
}
}
}
return visibleLayoutAttributes
}
override public func layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
guard self.headersAttributes.indices.contains(indexPath.section) else {
return super.layoutAttributesForSupplementaryView(ofKind: elementKind, at: indexPath)
}
guard isTransitingToCollapsed || isTransitingToExpanded else {
let attributes = super.layoutAttributesForSupplementaryView(ofKind: elementKind, at: indexPath)
guard let proposedTopOffset = attributes?.frame.origin.y else {
return attributes
}
let estimatedTopOffset = self.headersAttributes[indexPath.section].frame.origin.y
attributes?.frame.origin.y -= self.sectionHeadersPinToBoundsCorrection(
proposedTopOffset: proposedTopOffset,
estimatedTopOffset: estimatedTopOffset)
return attributes
}
return self.headersAttributes[indexPath.section]
}
override public func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
guard self.itemsAttributes.indices.contains(indexPath.section) else {
return super.layoutAttributesForItem(at: indexPath)
}
guard self.itemsAttributes[indexPath.section].indices.contains(indexPath.row) else {
return super.layoutAttributesForItem(at: indexPath)
}
return self.itemsAttributes[indexPath.section][indexPath.row]
}
override public func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint) -> CGPoint {
guard let collectionView = self.collectionView else {
return proposedContentOffset
}
var targetOffset = proposedContentOffset
targetOffset.y = offsetCorrection
for section in 0..<self.targetSection {
let height = self.headersAttributes[section].frame.size.height
targetOffset.y += height
targetOffset.y += self.sectionInset.top
var sectionContentHeight: CGFloat = 0
let numberOfItems = self.itemsAttributes[section].count
for row in 0..<numberOfItems {
let itemSize = self.itemsAttributes[section][row].frame.size
let columnsCount = Int(self.contentWidth / itemSize.width)
let column = row % columnsCount
if column == columnsCount - 1 || row == numberOfItems - 1 {
sectionContentHeight += itemSize.height
targetOffset.y += itemSize.height
if row < numberOfItems - 1 && itemSize.height > 0 {
targetOffset.y += self.minimumLineSpacing
}
}
}
targetOffset.y += self.sectionInset.bottom
if sectionContentHeight == 0 {
targetOffset.y -= self.sectionInset.top
targetOffset.y -= self.sectionInset.bottom
targetOffset.y += self.minimumSectionSpacing
}
}
let emptySpace = collectionView.bounds.size.height - (max(self.contentHeight, collectionView.bounds.size.height) - targetOffset.y)
if emptySpace > 0 {
targetOffset.y = targetOffset.y - emptySpace
}
return targetOffset
}
public func collapseInvisibleSections() {
guard let collectionView = self.collectionView else {
return
}
guard let delegate = collectionView.delegate as? UICollectionViewDelegateFlowLayout else {
return
}
guard let dataSource = collectionView.dataSource else {
return
}
var contentOffset = collectionView.contentOffset
let previousItemsAttributes = self.itemsAttributes
let visibleItemIndexPaths = collectionView.indexPathsForVisibleItems
let visibleSections = Set<Int>(visibleItemIndexPaths.map({ $0.section }))
self.headersAttributes = []
self.itemsAttributes = []
self.contentHeight = 0
let numberOfSections = dataSource.numberOfSections!(in: collectionView)
for section in 0..<numberOfSections {
let headerSize = delegate.collectionView!(collectionView, layout: self, referenceSizeForHeaderInSection: section)
let height = headerSize.height
let width = headerSize.width
let indexPath = IndexPath(row: 0, section: section)
let attributes = UICollectionViewLayoutAttributes(
forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,
with: indexPath
)
attributes.frame = CGRect(x: 0, y: contentHeight, width: width, height: height)
self.headersAttributes.append(attributes)
self.contentHeight += height
if visibleSections.contains(section) {
self.contentHeight += self.sectionInset.top
}
else {
self.contentHeight += self.minimumSectionSpacing / 2
if section < targetSection {
contentOffset.y -= self.sectionInset.top
contentOffset.y += self.minimumSectionSpacing
}
}
self.itemsAttributes.append([])
let numberOfItems = dataSource.collectionView(collectionView, numberOfItemsInSection: section)
for row in 0..<numberOfItems {
let indexPath = IndexPath(row: row, section: section)
var itemSize = delegate.collectionView!(collectionView, layout: self, sizeForItemAt: indexPath)
itemSize.height = visibleItemIndexPaths.contains(indexPath) ? itemSize.height : 0
let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
let columnsCount = Int(self.contentWidth / itemSize.width)
let column = row % columnsCount
attributes.frame = CGRect(
x: self.sectionInset.left + CGFloat(column) * (itemSize.width + self.minimumInteritemSpacing),
y: contentHeight,
width: itemSize.width,
height: itemSize.height
)
attributes.isHidden = false
self.itemsAttributes[section].append(attributes)
if column == columnsCount - 1 || row == numberOfItems - 1 {
self.contentHeight += itemSize.height
if !visibleItemIndexPaths.contains(indexPath) && section < targetSection {
contentOffset.y -= previousItemsAttributes[section][row].frame.size.height
}
let hasVisibleItemsAfterCurrent = visibleItemIndexPaths.filter({ $0.section == section && $0.row > row }).count > 0
if !visibleItemIndexPaths.contains(indexPath) && section == targetSection && hasVisibleItemsAfterCurrent {
contentOffset.y -= previousItemsAttributes[section][row].frame.size.height
}
if row < numberOfItems - 1 && visibleItemIndexPaths.contains(indexPath) {
let nextIndexPath = IndexPath(row: indexPath.row + 1, section: indexPath.section)
if visibleItemIndexPaths.contains(nextIndexPath) {
contentHeight += self.minimumLineSpacing
}
}
if row < numberOfItems - 1 && !visibleItemIndexPaths.contains(indexPath) && section < targetSection {
contentOffset.y -= self.minimumLineSpacing
}
if !visibleItemIndexPaths.contains(indexPath) && section == targetSection && hasVisibleItemsAfterCurrent {
contentOffset.y -= self.minimumLineSpacing
}
}
}
if visibleSections.contains(section) {
self.contentHeight += self.sectionInset.bottom
}
else {
self.contentHeight += self.minimumSectionSpacing / 2
if section < targetSection {
contentOffset.y -= self.sectionInset.bottom
}
}
if sectionHeadersPinToVisibleBounds {
let headerAttributes = self.headersAttributes[section]
if section == self.targetSection &&
self.contentHeight - contentOffset.y < collectionView.contentInset.top {
headerAttributes.frame.origin.y = min(self.contentHeight - headerAttributes.frame.size.height, contentOffset.y)
let originY = headerAttributes.frame.origin.y
for i in (0..<section).reversed() {
self.headersAttributes[i].frame.origin.y = originY - self.headersAttributes[i].frame.size.height * CGFloat(section - i)
}
headerAttributes.frame.origin.y = originY
}
else if visibleSections.contains(section) && contentOffset.y > headerAttributes.frame.origin.y {
let originY = min(self.contentHeight - headerAttributes.frame.size.height, contentOffset.y)
for i in (0..<section).reversed() {
self.headersAttributes[i].frame.origin.y = originY - self.headersAttributes[i].frame.size.height * CGFloat(section - i)
}
headerAttributes.frame.origin.y = originY
}
}
}
collectionView.setContentOffset(contentOffset, animated: false)
}
public func expandVisibleSections() {
guard let collectionView = self.collectionView else {
return
}
guard let delegate = collectionView.delegate as? UICollectionViewDelegateFlowLayout else {
return
}
guard let dataSource = collectionView.dataSource else {
return
}
let visibleItemIndexPaths = self.determineVisibleIndexPaths()
let visibleSections = Set<Int>(visibleItemIndexPaths.map({ $0.section }))
self.headersAttributes = []
self.itemsAttributes = []
self.contentHeight = 0
let numberOfSections = dataSource.numberOfSections!(in: collectionView)
for section in 0..<numberOfSections {
let headerSize = delegate.collectionView!(collectionView, layout: self, referenceSizeForHeaderInSection: section)
let height = headerSize.height
let width = headerSize.width
let indexPath = IndexPath(row: 0, section: section)
let attributes = UICollectionViewLayoutAttributes(
forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,
with: indexPath
)
attributes.frame = CGRect(x: 0, y: contentHeight, width: width, height: height)
self.headersAttributes.append(attributes)
self.contentHeight += height
if visibleSections.contains(section) {
self.contentHeight += self.sectionInset.top
}
else {
self.contentHeight += self.minimumSectionSpacing / 2
}
self.itemsAttributes.append([])
let numberOfItems = dataSource.collectionView(collectionView, numberOfItemsInSection: section)
for row in 0..<numberOfItems {
let indexPath = IndexPath(row: row, section: section)
var itemSize = delegate.collectionView!(collectionView, layout: self, sizeForItemAt: indexPath)
itemSize.height = visibleItemIndexPaths.contains(indexPath) ? itemSize.height : 0
let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
let columnsCount = Int(self.contentWidth / itemSize.width)
let column = row % columnsCount
attributes.frame = CGRect(
x: self.sectionInset.left + CGFloat(column) * (itemSize.width + self.minimumInteritemSpacing),
y: contentHeight,
width: itemSize.width,
height: itemSize.height
)
attributes.isHidden = false
// Sometimes cells overlap headers, the code below fixes it
attributes.transform3D = CATransform3DMakeTranslation(0, 0, -1)
self.itemsAttributes[section].append(attributes)
if column == columnsCount - 1 || row == numberOfItems - 1 {
self.contentHeight += itemSize.height
if row < numberOfItems - 1 && visibleItemIndexPaths.contains(indexPath) {
let nextIndexPath = IndexPath(row: indexPath.row + 1, section: indexPath.section)
if visibleItemIndexPaths.contains(nextIndexPath) {
contentHeight += self.minimumLineSpacing
}
}
}
}
if visibleSections.contains(section) {
self.contentHeight += self.sectionInset.bottom
}
else {
self.contentHeight += self.minimumSectionSpacing / 2
}
}
if self.sectionHeadersPinToVisibleBounds {
let visibleFrameHeight = collectionView.bounds.size.height + offsetCorrection
let visibleContentOffset = self.contentHeight - visibleFrameHeight
for section in 0..<numberOfSections {
if visibleSections.contains(section) {
if self.headersAttributes[section].frame.origin.y < visibleContentOffset {
if section <= self.targetSection && section < numberOfSections - 1 && self.headersAttributes[section + 1].frame.origin.y > visibleContentOffset {
if section != self.targetSection {
self.headersAttributes[section].frame.origin.y = min(
self.headersAttributes[section + 1].frame.origin.y - self.headersAttributes[section].frame.size.height,
visibleContentOffset)
}
let originY = self.headersAttributes[section].frame.origin.y
for i in (0..<section).reversed() {
self.headersAttributes[i].frame.origin.y = originY - self.headersAttributes[i].frame.size.height * CGFloat(section - i)
}
}
}
}
}
}
}
}
private typealias ExpandedLayoutPrivate = ExpandedLayout
private extension ExpandedLayoutPrivate {
private func sectionHeadersPinToBoundsCorrection(proposedTopOffset: CGFloat,
estimatedTopOffset: CGFloat) -> CGFloat {
guard let collectionViewContentOffset = self.collectionView?.contentOffset.y,
let collectionViewTopInset = self.collectionView?.contentInset.top,
self.sectionHeadersPinToVisibleBounds else {
return 0
}
var topOffsetCorrection: CGFloat = 0
if proposedTopOffset <= estimatedTopOffset {
topOffsetCorrection = 0
}
else if proposedTopOffset - estimatedTopOffset <= collectionViewTopInset {
if proposedTopOffset - collectionViewContentOffset >= collectionViewTopInset {
topOffsetCorrection = proposedTopOffset - estimatedTopOffset
} else {
let newProposedTopOffset = proposedTopOffset - (collectionViewContentOffset - estimatedTopOffset)
topOffsetCorrection = min(newProposedTopOffset, proposedTopOffset) - estimatedTopOffset
}
}
else if proposedTopOffset - collectionViewContentOffset < collectionViewTopInset {
topOffsetCorrection = proposedTopOffset - collectionViewContentOffset
}
else if proposedTopOffset - estimatedTopOffset > collectionViewTopInset {
topOffsetCorrection = collectionViewTopInset
}
topOffsetCorrection = max(topOffsetCorrection, 0)
return topOffsetCorrection
}
private func determineVisibleIndexPaths() -> [IndexPath] {
guard let collectionView = self.collectionView,
let delegate = collectionView.delegate as? UICollectionViewDelegateFlowLayout,
let dataSource = collectionView.dataSource else {
return []
}
let visibleFrameHeight = collectionView.bounds.size.height + offsetCorrection
var visibleItems: [IndexPath] = []
var visibleContentHeight: CGFloat = 0
guard visibleContentHeight < visibleFrameHeight else {
return visibleItems
}
let numberOfSections = dataSource.numberOfSections!(in: collectionView)
for section in self.targetSection..<numberOfSections {
let headerHeight = delegate.collectionView!(collectionView, layout: self, referenceSizeForHeaderInSection: section).height
visibleContentHeight += headerHeight
visibleContentHeight += self.sectionInset.top
guard visibleContentHeight < visibleFrameHeight else {
return visibleItems
}
let numberOfItems = dataSource.collectionView(collectionView, numberOfItemsInSection: section)
for row in 0..<numberOfItems {
let indexPath = IndexPath(row: row, section: section)
visibleItems.append(indexPath)
let itemSize = delegate.collectionView!(collectionView, layout: self, sizeForItemAt: indexPath)
let columnsCount = Int(self.contentWidth / itemSize.width)
let column = row % columnsCount
if column == columnsCount - 1 || row == numberOfItems - 1 {
visibleContentHeight += itemSize.height
if row < numberOfItems - 1 {
visibleContentHeight += self.minimumLineSpacing
}
guard visibleContentHeight < visibleFrameHeight else {
return visibleItems
}
}
}
visibleContentHeight += self.sectionInset.bottom
}
for section in (0..<self.targetSection).reversed() {
visibleContentHeight += self.sectionInset.bottom
let numberOfItems = dataSource.collectionView(collectionView, numberOfItemsInSection: section)
for row in 0..<numberOfItems {
let indexPath = IndexPath(row: row, section: section)
visibleItems.append(indexPath)
let itemSize = delegate.collectionView!(collectionView, layout: self, sizeForItemAt: indexPath)
let columnsCount = Int(self.contentWidth / itemSize.width)
let column = row % columnsCount
if column == columnsCount - 1 {
visibleContentHeight += itemSize.height
if row > 0 {
visibleContentHeight += self.minimumLineSpacing
}
guard visibleContentHeight < visibleFrameHeight else {
return visibleItems
}
}
}
visibleContentHeight += self.sectionInset.top
let headerHeight = delegate.collectionView!(collectionView, layout: self, referenceSizeForHeaderInSection: section).height
visibleContentHeight += headerHeight
guard visibleContentHeight < visibleFrameHeight else {
return visibleItems
}
}
return visibleItems
}
private func setRealOffset() {
guard let collectionView = self.collectionView,
let delegate = collectionView.delegate as? UICollectionViewDelegateFlowLayout,
let dataSource = collectionView.dataSource else {
return
}
var contentOffset: CGFloat = self.offsetCorrection
for section in 0..<targetSection {
let headerHeigth = self.headersAttributes[section].frame.size.height
contentOffset += headerHeigth
contentOffset += self.sectionInset.top
let numberOfItems = dataSource.collectionView(collectionView, numberOfItemsInSection: section)
for row in 0..<numberOfItems {
let indexPath = IndexPath(row: row, section: section)
let itemSize = delegate.collectionView!(collectionView, layout: self, sizeForItemAt: indexPath)
let columnsCount = Int(self.contentWidth / itemSize.width)
let column = row % columnsCount
if column == columnsCount - 1 || row == numberOfItems - 1 {
contentOffset += itemSize.height
if row < numberOfItems - 1 {
contentOffset += self.minimumLineSpacing
}
}
}
contentOffset += self.sectionInset.bottom
}
let maxContentOffset = max(self.contentHeight, collectionView.bounds.size.height) - collectionView.bounds.size.height
contentOffset = min(contentOffset, maxContentOffset)
collectionView.setContentOffset(CGPoint(x: collectionView.contentOffset.x, y: contentOffset),
animated: false)
}
}
================================================
FILE: Source/Supporting Files/CampcotCollectionView.h
================================================
//
// CampcotCollectionView.h
// CampcotCollectionView
//
// Created by Vadim Morozov on 1/26/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for CampcotCollectionView.
FOUNDATION_EXPORT double CampcotCollectionViewVersionNumber;
//! Project version string for CampcotCollectionView.
FOUNDATION_EXPORT const unsigned char CampcotCollectionViewVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <CampcotCollectionView/PublicHeader.h>
================================================
FILE: Source/Supporting Files/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.0.8</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
================================================
FILE: Tests/CampcotCollectionViewTests.swift
================================================
//
// CampcotCollectionViewTests.swift
// CampcotCollectionViewTests
//
// Created by Vadim Morozov on 1/26/18.
// Copyright © 2018 Touchlane LLC. All rights reserved.
//
import XCTest
@testable import CampcotCollectionView
class CampcotCollectionViewTests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}
}
================================================
FILE: Tests/Supporting Files/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
FILE: scripts/deploy.sh
================================================
#!/usr/bin/env bash
source ~/.rvm/scripts/rvm
rvm use default
pod trunk push --verbose | ruby -e 'ARGF.each{ print "." }'
gitextract_0jr27f1c/
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── CODEOWNERS
├── CampcotCollectionView.podspec
├── CampcotCollectionView.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── xcshareddata/
│ └── xcschemes/
│ └── CampcotCollectionView.xcscheme
├── CampcotCollectionView.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── Example/
│ ├── Example.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── Example.xcscheme
│ └── Source/
│ ├── AppDelegate.swift
│ ├── CustomCollectionViewCell.swift
│ ├── CustomHeaderView.swift
│ ├── Images.xcassets/
│ │ ├── AppIcon.appiconset/
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── logo.imageset/
│ │ │ └── Contents.json
│ │ └── logo_splash.imageset/
│ │ └── Contents.json
│ ├── Launch Screen.storyboard
│ ├── Main.storyboard
│ ├── StoryboardViewController.swift
│ ├── Supporting Files/
│ │ └── Info.plist
│ └── ViewController.swift
├── LICENSE
├── README.md
├── Source/
│ ├── CampcotCollectionView.swift
│ ├── CollapsedLayout.swift
│ ├── ContentSizeAdjustmentBehavior.swift
│ ├── ExpandedLayout.swift
│ └── Supporting Files/
│ ├── CampcotCollectionView.h
│ └── Info.plist
├── Tests/
│ ├── CampcotCollectionViewTests.swift
│ └── Supporting Files/
│ └── Info.plist
└── scripts/
└── deploy.sh
Condensed preview — 38 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (144K chars).
[
{
"path": ".gitignore",
"chars": 943,
"preview": "# OS X\n.DS_Store\n\n# Xcode\n#\n# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore &"
},
{
"path": ".travis.yml",
"chars": 531,
"preview": "os: osx\nosx_image: xcode13.1\nlanguage: objective-c\n\nbefore_deploy:\n- gem install cocoapods\n- pod repo add-cdn trunk 'htt"
},
{
"path": "CHANGELOG.md",
"chars": 946,
"preview": "# Changelog for CampcotCollectionView 0.0.8\n### Added\n* Optional `isExpanded` parameter to `CampcotCollectionView` initi"
},
{
"path": "CODEOWNERS",
"chars": 16,
"preview": "* @VadzimMarozau"
},
{
"path": "CampcotCollectionView.podspec",
"chars": 852,
"preview": "Pod::Spec.new do |s|\n s.name = 'CampcotCollectionView'\n s.version = '0.0.8'\n s.summary "
},
{
"path": "CampcotCollectionView.xcodeproj/project.pbxproj",
"chars": 20096,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 48;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "CampcotCollectionView.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 161,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:ExpandableLayou"
},
{
"path": "CampcotCollectionView.xcodeproj/xcshareddata/xcschemes/CampcotCollectionView.xcscheme",
"chars": 4428,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"1010\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "CampcotCollectionView.xcworkspace/contents.xcworkspacedata",
"chars": 249,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Example/Exampl"
},
{
"path": "CampcotCollectionView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "CampcotCollectionView.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 181,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Example/Example.xcodeproj/project.pbxproj",
"chars": 16941,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 48;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 152,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:Example.xcodepr"
},
{
"path": "Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme",
"chars": 3303,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"1010\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "Example/Source/AppDelegate.swift",
"chars": 637,
"preview": "//\n// AppDelegate.swift\n// Example\n//\n// Created by Vadim Morozov on 1/26/18.\n// Copyright © 2018 Touchlane LLC. All"
},
{
"path": "Example/Source/CustomCollectionViewCell.swift",
"chars": 1679,
"preview": "//\n// CustomCollectionViewCell.swift\n// Example\n//\n// Created by Panda Systems on 1/8/18.\n// Copyright © 2018 Touchl"
},
{
"path": "Example/Source/CustomHeaderView.swift",
"chars": 2373,
"preview": "//\n// CustomHeaderView.swift\n// Example\n//\n// Created by Panda Systems on 1/8/18.\n// Copyright © 2018 Touchlane LLC."
},
{
"path": "Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 4336,
"preview": "{\n \"images\" : [\n {\n \"size\" : \"20x20\",\n \"idiom\" : \"iphone\",\n \"filename\" : \"Icon-App-20x20@2x.png\",\n "
},
{
"path": "Example/Source/Images.xcassets/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "Example/Source/Images.xcassets/logo.imageset/Contents.json",
"chars": 301,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"logo.pdf\",\n \"scale\" : \"1x\"\n },\n {\n "
},
{
"path": "Example/Source/Images.xcassets/logo_splash.imageset/Contents.json",
"chars": 308,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"logo_splash.png\",\n \"scale\" : \"1x\"\n },\n "
},
{
"path": "Example/Source/Launch Screen.storyboard",
"chars": 3463,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3"
},
{
"path": "Example/Source/Main.storyboard",
"chars": 8449,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3"
},
{
"path": "Example/Source/StoryboardViewController.swift",
"chars": 2922,
"preview": "//\n// StoryboardViewController.swift\n// Example\n//\n// Created by Alex Yanski on 2/7/20.\n// Copyright © 2020 Touchlan"
},
{
"path": "Example/Source/Supporting Files/Info.plist",
"chars": 1607,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Example/Source/ViewController.swift",
"chars": 4725,
"preview": "//\n// ViewController.swift\n// Example\n//\n// Created by Panda Systems on 12/19/17.\n// Copyright © 2018 Touchlane LLC."
},
{
"path": "LICENSE",
"chars": 1076,
"preview": "Copyright (c) 2018 Touchlane LLC tech@touchlane.com\n\nPermission is hereby granted, free of charge, to any person obtaini"
},
{
"path": "README.md",
"chars": 4259,
"preview": "\n\n. The extraction includes 38 files (130.0 KB), approximately 34.1k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.