Repository: BenjaminPrieur/IOStickyHeader Branch: master Commit: 370a7b0533ee Files: 35 Total size: 96.0 KB Directory structure: gitextract_ax4hll5y/ ├── .gitignore ├── .swift-version ├── .travis.yml ├── Example/ │ ├── IOStickyHeader/ │ │ ├── AppDelegate.swift │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.xib │ │ │ └── Main.storyboard │ │ ├── IOCell.swift │ │ ├── IOGrowHeader.swift │ │ ├── IOGrowHeader.xib │ │ ├── IOGrowVC.swift │ │ ├── IOParallaxHeader.swift │ │ ├── IOParallaxHeader.xib │ │ ├── IOParallaxVC.swift │ │ ├── IOSectionHeader.swift │ │ ├── IOStickyHeader.h │ │ ├── Images.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── photo1.imageset/ │ │ │ └── Contents.json │ │ └── Info.plist │ ├── IOStickyHeader.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ ├── IOStickyHeader-Example.xcscheme │ │ └── IOStickyHeader.xcscheme │ ├── IOStickyHeader.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ ├── Podfile │ └── Tests/ │ ├── Info.plist │ └── Tests.swift ├── IOStickyHeader.podspec ├── LICENSE ├── Package.swift ├── README.md └── Sources/ ├── IOStickyHeaderFlowLayout.swift └── IOStickyHeaderFlowLayoutAttributes.swift ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # OS X .DS_Store .gitmodules # Xcode build/ .build/ *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata *.xccheckout profile *.moved-aside DerivedData *.hmap *.ipa # Bundler .bundle Carthage/ Cartfile Cartfile.resolved # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control # # Note: if you ignore the Pods directory, make sure to uncomment # `pod install` in .travis.yml # Pods/ ================================================ FILE: .swift-version ================================================ 4.2 ================================================ FILE: .travis.yml ================================================ # references: # * http://www.objc.io/issue-6/travis-ci.html # * https://github.com/supermarin/xcpretty#usage language: objective-c # cache: cocoapods # podfile: Example/Podfile # before_install: # - gem install cocoapods # Since Travis is not always on latest version # - pod install --project-directory=Example install: - gem install xcpretty --no-rdoc --no-ri --no-document --quiet script: - set -o pipefail && xcodebuild test -workspace Example/IOStickyHeader.xcworkspace -scheme IOStickyHeader-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c - pod lib lint --quick ================================================ FILE: Example/IOStickyHeader/AppDelegate.swift ================================================ // // AppDelegate.swift // IOStickyHeader // // Created by Benjamin Prieur on 06/29/2015. // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } } ================================================ FILE: Example/IOStickyHeader/Base.lproj/LaunchScreen.xib ================================================ ================================================ FILE: Example/IOStickyHeader/Base.lproj/Main.storyboard ================================================ ================================================ FILE: Example/IOStickyHeader/IOCell.swift ================================================ // // IOCell.swift // IOStickyHeader // // Created by ben on 02/07/2015. // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. // import UIKit class IOCell: UICollectionViewCell { @IBOutlet weak var lblTitle: UILabel! } ================================================ FILE: Example/IOStickyHeader/IOGrowHeader.swift ================================================ // // IOParallaxHeader.swift // IOStickyHeader // // Created by ben on 29/06/2015. // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. // import UIKit import IOStickyHeader class IOGrowHeader: UICollectionViewCell { @IBOutlet weak var imgPhoto: UIImageView! @IBOutlet weak var btnBot: UIButton! @IBOutlet weak var constraintImgSize: NSLayoutConstraint! override func awakeFromNib() { self.imgPhoto.layer.cornerRadius = self.imgPhoto.frame.size.width * 0.5 self.btnBot.layer.cornerRadius = 5 } override func apply(_ layoutAttributes: UICollectionViewLayoutAttributes) { guard let layoutAttributes:IOStickyHeaderFlowLayoutAttributes = layoutAttributes as? IOStickyHeaderFlowLayoutAttributes else { return } if layoutAttributes.progressiveness < 1 { self.constraintImgSize.constant = 130 self.imgPhoto.updateConstraintsIfNeeded() } else { self.constraintImgSize.constant = 130 * layoutAttributes.progressiveness self.imgPhoto.updateConstraintsIfNeeded() } } } ================================================ FILE: Example/IOStickyHeader/IOGrowHeader.xib ================================================ ================================================ FILE: Example/IOStickyHeader/IOGrowVC.swift ================================================ // // IOParallaxVC.swift // IOStickyHeader // // Created by ben on 29/06/2015. // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. // import UIKit import IOStickyHeader class IOGrowVC: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout { @IBOutlet weak var collectionView: UICollectionView! let headerNib = UINib(nibName: "IOGrowHeader", bundle: Bundle.main) var section: Array> = [[]] override func viewDidLoad() { super.viewDidLoad() self.section = [ [ "Song 1", "Song 2", "Song 3", "Song 4", "Song 5", "Song 6", "Song 7", "Song 8", "Song 9", "Song 10", "Song 11", "Song 12", "Song 13", "Song 14", "Song 15", "Song 16", "Song 17", "Song 18", "Song 19", "Song 20", ] ] self.setupCollectionView() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } func setupCollectionView() { self.collectionView.dataSource = self self.collectionView.delegate = self if let layout: IOStickyHeaderFlowLayout = self.collectionView.collectionViewLayout as? IOStickyHeaderFlowLayout { layout.parallaxHeaderReferenceSize = CGSize(width: UIScreen.main.bounds.size.width, height: 274) layout.parallaxHeaderMinimumReferenceSize = CGSize(width: UIScreen.main.bounds.size.width, height: 180) layout.itemSize = CGSize(width: UIScreen.main.bounds.size.width, height: layout.itemSize.height) layout.parallaxHeaderAlwaysOnTop = true layout.disableStickyHeaders = true self.collectionView.collectionViewLayout = layout } self.collectionView.scrollIndicatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) self.collectionView.register(self.headerNib, forSupplementaryViewOfKind: IOStickyHeaderParallaxHeader, withReuseIdentifier: "header") } //MARK: UICollectionViewDataSource & UICollectionViewDelegate func numberOfSections(in collectionView: UICollectionView) -> Int { return self.section.count } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return self.section[section].count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell: IOCell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! IOCell let obj = self.section[(indexPath as NSIndexPath).section][(indexPath as NSIndexPath).row] cell.lblTitle.text = obj return cell } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: UIScreen.main.bounds.size.width, height: 50); } func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { switch kind { case IOStickyHeaderParallaxHeader: let cell = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "header", for: indexPath) as! IOGrowHeader return cell default: assert(false, "Unexpected element kind") } } } ================================================ FILE: Example/IOStickyHeader/IOParallaxHeader.swift ================================================ // // IOParallaxHeader.swift // IOStickyHeader // // Created by ben on 02/07/2015. // Copyright © 2015 Benjamin Prieur. All rights reserved. // import UIKit import MapKit class IOParallaxHeader: UICollectionViewCell { @IBOutlet weak var mapView: MKMapView! } ================================================ FILE: Example/IOStickyHeader/IOParallaxHeader.xib ================================================ ================================================ FILE: Example/IOStickyHeader/IOParallaxVC.swift ================================================ // // IOParallaxVC.swift // IOStickyHeader // // Created by ben on 02/07/2015. // Copyright © 2015 Benjamin Prieur. All rights reserved. // import UIKit import IOStickyHeader class IOParallaxVC: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout { @IBOutlet weak var collectionView: UICollectionView! let headerNib = UINib(nibName: "IOParallaxHeader", bundle: Bundle.main) var section: Array = [] override func viewDidLoad() { super.viewDidLoad() self.section = [ "City 1", "City 2", "City 3", "City 4", "City 5", "City 6", "City 7", "City 8", "City 9", "City 10", "City 11", "City 12", "City 13", "City 14", "City 15", "City 16", "City 17", "City 18", "City 19", "City 20", ] self.setupCollectionView() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } func setupCollectionView() { self.collectionView.dataSource = self self.collectionView.delegate = self if let layout: IOStickyHeaderFlowLayout = self.collectionView.collectionViewLayout as? IOStickyHeaderFlowLayout { layout.parallaxHeaderReferenceSize = CGSize(width: UIScreen.main.bounds.size.width, height: 300) layout.parallaxHeaderMinimumReferenceSize = CGSize(width: UIScreen.main.bounds.size.width, height: 0) layout.itemSize = CGSize(width: UIScreen.main.bounds.size.width, height: layout.itemSize.height) layout.parallaxHeaderAlwaysOnTop = true layout.disableStickyHeaders = true self.collectionView.collectionViewLayout = layout } self.collectionView.scrollIndicatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) self.collectionView.register(self.headerNib, forSupplementaryViewOfKind: IOStickyHeaderParallaxHeader, withReuseIdentifier: "header") } //MARK: UICollectionViewDataSource & UICollectionViewDelegate func numberOfSections(in collectionView: UICollectionView) -> Int { return self.section.count } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return 1 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell: IOCell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! IOCell let obj = self.section[(indexPath as NSIndexPath).section] cell.lblTitle.text = obj return cell } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: UIScreen.main.bounds.size.width, height: 50); } func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { switch kind { case UICollectionView.elementKindSectionHeader: let cell = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "sectionHeader", for: indexPath) as! IOSectionHeader return cell case IOStickyHeaderParallaxHeader: let cell = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "header", for: indexPath) as! IOParallaxHeader return cell default: assert(false, "Unexpected element kind") } } } ================================================ FILE: Example/IOStickyHeader/IOSectionHeader.swift ================================================ // // IOSectionHeader.swift // IOStickyHeader // // Created by ben on 02/07/2015. // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. // import UIKit class IOSectionHeader: UICollectionViewCell { @IBOutlet weak var lblText: UILabel! } ================================================ FILE: Example/IOStickyHeader/IOStickyHeader.h ================================================ // // IOStickyHeader.h // IOStickyHeader // // Created by Benjamin Prieur on 22/11/2016. // Copyright © 2016 Benjamin Prieur. All rights reserved. // #import //! Project version number for IOStickyHeader. FOUNDATION_EXPORT double IOStickyHeaderVersionNumber; //! Project version string for IOStickyHeader. FOUNDATION_EXPORT const unsigned char IOStickyHeaderVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import ================================================ FILE: Example/IOStickyHeader/Images.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "3x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/IOStickyHeader/Images.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/IOStickyHeader/Images.xcassets/photo1.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "photo1.png", "scale" : "1x" }, { "idiom" : "universal", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/IOStickyHeader/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion 1.0.0 LSApplicationCategoryType NSPrincipalClass UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main ================================================ FILE: Example/IOStickyHeader.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 2C7B937C6185C12607C0B712 /* Pods_IOStickyHeader_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D614FEE32B3E3B2A320BB785 /* Pods_IOStickyHeader_Example.framework */; }; 3719931C920064821746A28C /* Pods_IOStickyHeader_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B85A2E615546B1854FF2198E /* Pods_IOStickyHeader_Tests.framework */; }; 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; B5BBF3F71B4527530036E522 /* IOCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5BBF3F61B4527530036E522 /* IOCell.swift */; }; B5BBF3F91B45278A0036E522 /* IOSectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5BBF3F81B45278A0036E522 /* IOSectionHeader.swift */; }; B5BBF3FB1B4533360036E522 /* IOParallaxVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5BBF3FA1B4533360036E522 /* IOParallaxVC.swift */; }; B5BBF3FD1B4534B40036E522 /* IOParallaxHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = B5BBF3FC1B4534B40036E522 /* IOParallaxHeader.xib */; }; B5BBF4001B4539D70036E522 /* IOParallaxHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5BBF3FF1B4539D70036E522 /* IOParallaxHeader.swift */; }; B5FDDAF31B41707C00FCE454 /* IOGrowVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5FDDAF21B41707C00FCE454 /* IOGrowVC.swift */; }; B5FDDAF61B4171B400FCE454 /* IOGrowHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5FDDAF41B4171B400FCE454 /* IOGrowHeader.swift */; }; B5FDDAF71B4171B400FCE454 /* IOGrowHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = B5FDDAF51B4171B400FCE454 /* IOGrowHeader.xib */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 607FACC81AFB9204008FA782 /* Project object */; proxyType = 1; remoteGlobalIDString = 607FACCF1AFB9204008FA782; remoteInfo = IOStickyHeader; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ B5A103C91DE4DAC8007A0543 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 1CEE91C5D26F28AE3F1A72C1 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 3A821C5AE99B2DA5F9DAE72D /* Pods-IOStickyHeader_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IOStickyHeader_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-IOStickyHeader_Example/Pods-IOStickyHeader_Example.release.xcconfig"; sourceTree = ""; }; 42CB45BE0D2D8AA9AF35EF4F /* Pods-IOStickyHeader_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IOStickyHeader_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-IOStickyHeader_Example/Pods-IOStickyHeader_Example.debug.xcconfig"; sourceTree = ""; }; 453879E8AAFF88C0851E23EC /* Pods-IOStickyHeader_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IOStickyHeader_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-IOStickyHeader_Tests/Pods-IOStickyHeader_Tests.release.xcconfig"; sourceTree = ""; }; 4DEE4639C9130DFBCA00CA7A /* IOStickyHeader.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = IOStickyHeader.podspec; path = ../IOStickyHeader.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 607FACD01AFB9204008FA782 /* IOStickyHeader_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IOStickyHeader_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 607FACE51AFB9204008FA782 /* IOStickyHeader_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IOStickyHeader_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 87E7E66C0A7CA20296B918BA /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; B5A103BF1DE4DAC7007A0543 /* IOStickyHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IOStickyHeader.h; sourceTree = ""; }; B5BBF3F61B4527530036E522 /* IOCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOCell.swift; sourceTree = ""; }; B5BBF3F81B45278A0036E522 /* IOSectionHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOSectionHeader.swift; sourceTree = ""; }; B5BBF3FA1B4533360036E522 /* IOParallaxVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOParallaxVC.swift; sourceTree = ""; }; B5BBF3FC1B4534B40036E522 /* IOParallaxHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IOParallaxHeader.xib; sourceTree = ""; }; B5BBF3FF1B4539D70036E522 /* IOParallaxHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOParallaxHeader.swift; sourceTree = ""; }; B5FDDAF21B41707C00FCE454 /* IOGrowVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOGrowVC.swift; sourceTree = ""; }; B5FDDAF41B4171B400FCE454 /* IOGrowHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOGrowHeader.swift; sourceTree = ""; }; B5FDDAF51B4171B400FCE454 /* IOGrowHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IOGrowHeader.xib; sourceTree = ""; }; B85A2E615546B1854FF2198E /* Pods_IOStickyHeader_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IOStickyHeader_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D614FEE32B3E3B2A320BB785 /* Pods_IOStickyHeader_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IOStickyHeader_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; ECFE5D69D3E485BE5D3550ED /* Pods-IOStickyHeader_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IOStickyHeader_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-IOStickyHeader_Tests/Pods-IOStickyHeader_Tests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 607FACCD1AFB9204008FA782 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 2C7B937C6185C12607C0B712 /* Pods_IOStickyHeader_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 607FACE21AFB9204008FA782 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 3719931C920064821746A28C /* Pods_IOStickyHeader_Tests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 2F73049340A1BB20DE3837CD /* Frameworks */ = { isa = PBXGroup; children = ( D614FEE32B3E3B2A320BB785 /* Pods_IOStickyHeader_Example.framework */, B85A2E615546B1854FF2198E /* Pods_IOStickyHeader_Tests.framework */, ); name = Frameworks; sourceTree = ""; }; 607FACC71AFB9204008FA782 = { isa = PBXGroup; children = ( 607FACF51AFB993E008FA782 /* Podspec Metadata */, 607FACD21AFB9204008FA782 /* Example for IOStickyHeader */, 607FACE81AFB9204008FA782 /* Tests */, 607FACD11AFB9204008FA782 /* Products */, 9A7E878CAEC2CD5CF3192C5E /* Pods */, 2F73049340A1BB20DE3837CD /* Frameworks */, ); sourceTree = ""; }; 607FACD11AFB9204008FA782 /* Products */ = { isa = PBXGroup; children = ( 607FACD01AFB9204008FA782 /* IOStickyHeader_Example.app */, 607FACE51AFB9204008FA782 /* IOStickyHeader_Tests.xctest */, ); name = Products; sourceTree = ""; }; 607FACD21AFB9204008FA782 /* Example for IOStickyHeader */ = { isa = PBXGroup; children = ( 607FACD51AFB9204008FA782 /* AppDelegate.swift */, B5FDDAF21B41707C00FCE454 /* IOGrowVC.swift */, B5BBF3FA1B4533360036E522 /* IOParallaxVC.swift */, 607FACDC1AFB9204008FA782 /* Images.xcassets */, B5BBF3F31B4527120036E522 /* Cell */, 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 607FACD91AFB9204008FA782 /* Main.storyboard */, 607FACD31AFB9204008FA782 /* Supporting Files */, ); name = "Example for IOStickyHeader"; path = IOStickyHeader; sourceTree = ""; }; 607FACD31AFB9204008FA782 /* Supporting Files */ = { isa = PBXGroup; children = ( B5A103BF1DE4DAC7007A0543 /* IOStickyHeader.h */, 607FACD41AFB9204008FA782 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; 607FACE81AFB9204008FA782 /* Tests */ = { isa = PBXGroup; children = ( 607FACEB1AFB9204008FA782 /* Tests.swift */, 607FACE91AFB9204008FA782 /* Supporting Files */, ); path = Tests; sourceTree = ""; }; 607FACE91AFB9204008FA782 /* Supporting Files */ = { isa = PBXGroup; children = ( 607FACEA1AFB9204008FA782 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { isa = PBXGroup; children = ( 4DEE4639C9130DFBCA00CA7A /* IOStickyHeader.podspec */, 1CEE91C5D26F28AE3F1A72C1 /* README.md */, 87E7E66C0A7CA20296B918BA /* LICENSE */, ); name = "Podspec Metadata"; sourceTree = ""; }; 9A7E878CAEC2CD5CF3192C5E /* Pods */ = { isa = PBXGroup; children = ( 42CB45BE0D2D8AA9AF35EF4F /* Pods-IOStickyHeader_Example.debug.xcconfig */, 3A821C5AE99B2DA5F9DAE72D /* Pods-IOStickyHeader_Example.release.xcconfig */, ECFE5D69D3E485BE5D3550ED /* Pods-IOStickyHeader_Tests.debug.xcconfig */, 453879E8AAFF88C0851E23EC /* Pods-IOStickyHeader_Tests.release.xcconfig */, ); name = Pods; sourceTree = ""; }; B5BBF3F31B4527120036E522 /* Cell */ = { isa = PBXGroup; children = ( B5BBF3FE1B4539B00036E522 /* IOParallaxHeader */, B5BBF3F41B4527220036E522 /* IOGrowHeader */, B5BBF3F61B4527530036E522 /* IOCell.swift */, B5BBF3F81B45278A0036E522 /* IOSectionHeader.swift */, ); name = Cell; sourceTree = ""; }; B5BBF3F41B4527220036E522 /* IOGrowHeader */ = { isa = PBXGroup; children = ( B5FDDAF41B4171B400FCE454 /* IOGrowHeader.swift */, B5FDDAF51B4171B400FCE454 /* IOGrowHeader.xib */, ); name = IOGrowHeader; sourceTree = ""; }; B5BBF3FE1B4539B00036E522 /* IOParallaxHeader */ = { isa = PBXGroup; children = ( B5BBF3FF1B4539D70036E522 /* IOParallaxHeader.swift */, B5BBF3FC1B4534B40036E522 /* IOParallaxHeader.xib */, ); name = IOParallaxHeader; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 607FACCF1AFB9204008FA782 /* IOStickyHeader_Example */ = { isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IOStickyHeader_Example" */; buildPhases = ( 458576CB9494E3ADDF380322 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, E690F7EFDD9AB9147E6B7291 /* [CP] Embed Pods Frameworks */, B5A103C91DE4DAC8007A0543 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( ); name = IOStickyHeader_Example; productName = IOStickyHeader; productReference = 607FACD01AFB9204008FA782 /* IOStickyHeader_Example.app */; productType = "com.apple.product-type.application"; }; 607FACE41AFB9204008FA782 /* IOStickyHeader_Tests */ = { isa = PBXNativeTarget; buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IOStickyHeader_Tests" */; buildPhases = ( 7C6F527ACC59BC384EE6C554 /* [CP] Check Pods Manifest.lock */, 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, FC8B3611137FE200ADFC5906 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( 607FACE71AFB9204008FA782 /* PBXTargetDependency */, ); name = IOStickyHeader_Tests; productName = Tests; productReference = 607FACE51AFB9204008FA782 /* IOStickyHeader_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 607FACC81AFB9204008FA782 /* Project object */ = { isa = PBXProject; attributes = { CLASSPREFIX = IO; LastSwiftUpdateCheck = 0700; LastUpgradeCheck = 0700; ORGANIZATIONNAME = "Benjamin Prieur"; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = 59DC93254K; LastSwiftMigration = 0800; ProvisioningStyle = Automatic; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; LastSwiftMigration = 0800; TestTargetID = 607FACCF1AFB9204008FA782; }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "IOStickyHeader" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( English, en, Base, ); mainGroup = 607FACC71AFB9204008FA782; productRefGroup = 607FACD11AFB9204008FA782 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 607FACCF1AFB9204008FA782 /* IOStickyHeader_Example */, 607FACE41AFB9204008FA782 /* IOStickyHeader_Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 607FACCE1AFB9204008FA782 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, B5BBF3FD1B4534B40036E522 /* IOParallaxHeader.xib in Resources */, B5FDDAF71B4171B400FCE454 /* IOGrowHeader.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 607FACE31AFB9204008FA782 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 458576CB9494E3ADDF380322 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-IOStickyHeader_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 7C6F527ACC59BC384EE6C554 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-IOStickyHeader_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; E690F7EFDD9AB9147E6B7291 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-IOStickyHeader_Example/Pods-IOStickyHeader_Example-frameworks.sh", "${BUILT_PRODUCTS_DIR}/IOStickyHeader/IOStickyHeader.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IOStickyHeader.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IOStickyHeader_Example/Pods-IOStickyHeader_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; FC8B3611137FE200ADFC5906 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-IOStickyHeader_Tests/Pods-IOStickyHeader_Tests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/IOStickyHeader/IOStickyHeader.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IOStickyHeader.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IOStickyHeader_Tests/Pods-IOStickyHeader_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 607FACCC1AFB9204008FA782 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, B5BBF3FB1B4533360036E522 /* IOParallaxVC.swift in Sources */, B5FDDAF61B4171B400FCE454 /* IOGrowHeader.swift in Sources */, B5FDDAF31B41707C00FCE454 /* IOGrowVC.swift in Sources */, B5BBF4001B4539D70036E522 /* IOParallaxHeader.swift in Sources */, B5BBF3F91B45278A0036E522 /* IOSectionHeader.swift in Sources */, B5BBF3F71B4527530036E522 /* IOCell.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 607FACE11AFB9204008FA782 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 607FACCF1AFB9204008FA782 /* IOStickyHeader_Example */; targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 607FACD91AFB9204008FA782 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 607FACDA1AFB9204008FA782 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { isa = PBXVariantGroup; children = ( 607FACDF1AFB9204008FA782 /* Base */, ); name = LaunchScreen.xib; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 607FACED1AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; 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_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.2; }; name = Debug; }; 607FACEE1AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "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 = gnu99; 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_VERSION = 4.2; VALIDATE_PRODUCT = YES; }; name = Release; }; 607FACF01AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 42CB45BE0D2D8AA9AF35EF4F /* Pods-IOStickyHeader_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1.0; DEVELOPMENT_TEAM = 59DC93254K; DYLIB_CURRENT_VERSION = 1.0; INFOPLIST_FILE = IOStickyHeader/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE_SPECIFIER = ""; }; name = Debug; }; 607FACF11AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3A821C5AE99B2DA5F9DAE72D /* Pods-IOStickyHeader_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1.0; DEVELOPMENT_TEAM = 59DC93254K; DYLIB_CURRENT_VERSION = 1.0; INFOPLIST_FILE = IOStickyHeader/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 1.0.0; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; 607FACF31AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = ECFE5D69D3E485BE5D3550ED /* Pods-IOStickyHeader_Tests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IOStickyHeader_Example.app/IOStickyHeader_Example"; }; name = Debug; }; 607FACF41AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 453879E8AAFF88C0851E23EC /* Pods-IOStickyHeader_Tests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IOStickyHeader_Example.app/IOStickyHeader_Example"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "IOStickyHeader" */ = { isa = XCConfigurationList; buildConfigurations = ( 607FACED1AFB9204008FA782 /* Debug */, 607FACEE1AFB9204008FA782 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IOStickyHeader_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( 607FACF01AFB9204008FA782 /* Debug */, 607FACF11AFB9204008FA782 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "IOStickyHeader_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( 607FACF31AFB9204008FA782 /* Debug */, 607FACF41AFB9204008FA782 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 607FACC81AFB9204008FA782 /* Project object */; } ================================================ FILE: Example/IOStickyHeader.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Example/IOStickyHeader.xcodeproj/xcshareddata/xcschemes/IOStickyHeader-Example.xcscheme ================================================ ================================================ FILE: Example/IOStickyHeader.xcodeproj/xcshareddata/xcschemes/IOStickyHeader.xcscheme ================================================ ================================================ FILE: Example/IOStickyHeader.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Example/IOStickyHeader.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: Example/IOStickyHeader.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ BuildSystemType Original PreviewsEnabled ================================================ FILE: Example/Podfile ================================================ source 'https://github.com/CocoaPods/Specs.git' use_frameworks! target 'IOStickyHeader_Example' do pod "IOStickyHeader", :path => "../" end target 'IOStickyHeader_Tests' do pod "IOStickyHeader", :path => "../" end ================================================ FILE: Example/Tests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: Example/Tests/Tests.swift ================================================ import UIKit import XCTest import IOStickyHeader class Tests: 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. XCTAssert(true, "Pass") } 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: IOStickyHeader.podspec ================================================ # # Be sure to run `pod lib lint IOStickyHeader.podspec' to ensure this is a # valid spec and remove all comments before submitting the spec. # # Any lines starting with a # are optional, but encouraged # # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = "IOStickyHeader" s.version = "1.0.4" s.summary = "Parallax and Sticky header done right using UICollectionViewLayout" s.description = <<-DESC UICollectionView are flexible and you can use supplementary views to anything you wanted. DESC s.homepage = "https://github.com/BenjaminPrieur/IOStickyHeader.git" s.license = 'MIT' s.author = { "Benjamin Prieur" => "benjamin@prieur.org" } s.source = { :git => "https://github.com/BenjaminPrieur/IOStickyHeader.git", :tag => s.version.to_s } s.swift_version = '4.2' s.ios.deployment_target = '9.0' s.requires_arc = true s.source_files = 'Sources/**/*.{swift}' end ================================================ FILE: LICENSE ================================================ Copyright (c) 2015 Benjamin Prieur 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: Package.swift ================================================ // // Package.swift // Pods // // Created by Benjamin Prieur on 16/09/16. // // import PackageDescription let package = Package( name: "IOStickyHeader" ) ================================================ FILE: README.md ================================================ I migrated [CSStickyHeaderFlowLayout](https://github.com/jamztang/CSStickyHeaderFlowLayout) library (Obj-C) to swift3.0 # IOStickyHeader [![CI Status](http://img.shields.io/travis/BenjaminPrieur/IOStickyHeader.svg?style=flat)](https://travis-ci.org/BenjaminPrieur/IOStickyHeader) [![Version](https://img.shields.io/cocoapods/v/IOStickyHeader.svg?style=flat)](http://cocoapods.org/pods/IOStickyHeader) [![License](https://img.shields.io/cocoapods/l/IOStickyHeader.svg?style=flat)](http://cocoapods.org/pods/IOStickyHeader) [![Platform](https://img.shields.io/cocoapods/p/IOStickyHeader.svg?style=flat)](http://cocoapods.org/pods/IOStickyHeader) [![](https://img.shields.io/badge/Carthage-Compatible-green.svg)](http://cocoapods.org/pods/IOStickyHeader) Parallax, Sticky Headers, Growing image heading, done right in one UICollectionViewLayout. ## Usage To run the example project, clone the repo, and run `pod install` from the Example directory first. Don't forget to set your flow layout with IOStickyHeader in your storyboard Register that nib file to your collection view controller in code: ```Swift import IOStickyHeader let headerNib = UINib(nibName: "IOGrowHeader", bundle: NSBundle.mainBundle()) override func viewDidLoad() { super.viewDidLoad() self.collectionView.registerNib(self.headerNib, forSupplementaryViewOfKind: IOStickyHeaderParallaxHeader, withReuseIdentifier: "header") } ``` Implement `func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView` ```Swift func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView { switch kind { case IOStickyHeaderParallaxHeader: let cell = collectionView.dequeueReusableSupplementaryViewOfKind(kind, withReuseIdentifier: "header", forIndexPath: indexPath) as! IOGrowHeader return cell default: assert(false, "Unexpected element kind") } } ``` ## Requirements - Swift 4.2 - iOS 9 ## Installation ### CococaPods IOStickyHeader is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: ```ruby use_frameworks! pod "IOStickyHeader" ``` ### Carthage [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. You can install Carthage with [Homebrew](http://brew.sh/) using the following command: ```bash $ brew update $ brew install carthage ``` To integrate IOStickyHeader into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl github "BenjaminPrieur/IOStickyHeader" ``` Run `carthage update` to build the framework and drag the built `IOStickyHeader.framework` into your Xcode project. ## Author Benjamin Prieur ## License IOStickyHeader is available under the MIT license. See the LICENSE file for more info. ================================================ FILE: Sources/IOStickyHeaderFlowLayout.swift ================================================ // // IOStickyHeaderFlowLayout.swift // Smokio // // Created by ben on 25/06/2015. // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. // import Foundation #if os(iOS) import UIKit public let IOStickyHeaderParallaxHeader = "IOStickyHeaderParallexHeader" open class IOStickyHeaderFlowLayout: UICollectionViewFlowLayout { open var parallaxHeaderReferenceSize: CGSize? { didSet{ self.invalidateLayout() } } open var parallaxHeaderMinimumReferenceSize: CGSize = CGSize.zero open var parallaxHeaderAlwaysOnTop: Bool = false open var disableStickyHeaders: Bool = false open override func prepare() { super.prepare() } open override func initialLayoutAttributesForAppearingSupplementaryElement(ofKind elementKind: String, at elementIndexPath: IndexPath) -> UICollectionViewLayoutAttributes? { let attributes = super.initialLayoutAttributesForAppearingSupplementaryElement(ofKind: elementKind, at: elementIndexPath) var frame = attributes?.frame frame!.origin.y += (self.parallaxHeaderReferenceSize?.height)! attributes?.frame = frame! return attributes } open override func layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { var attributes = super.layoutAttributesForSupplementaryView(ofKind: elementKind, at: indexPath) if attributes != nil && elementKind == IOStickyHeaderParallaxHeader { attributes = IOStickyHeaderFlowLayoutAttributes(forSupplementaryViewOfKind: elementKind, with: indexPath) } return attributes } open override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { var adjustedRec = rect adjustedRec.origin.y -= (self.parallaxHeaderReferenceSize?.height)! let attributes = super.layoutAttributesForElements(in: adjustedRec) var allItems = [UICollectionViewLayoutAttributes]() attributes?.forEach { itemAttributes in let itemAttributesCopy = itemAttributes.copy() as! UICollectionViewLayoutAttributes allItems.append(itemAttributesCopy) } let headers: NSMutableDictionary = NSMutableDictionary() let lastCells: NSMutableDictionary = NSMutableDictionary() var visibleParallaxHeader: Bool = false allItems.forEach { attributes in // for attributes in allItems { var frame = attributes.frame frame.origin.y += (self.parallaxHeaderReferenceSize?.height)! attributes.frame = frame let indexPath = attributes.indexPath if attributes.representedElementKind == UICollectionView.elementKindSectionHeader { headers.setObject(attributes, forKey: (indexPath as NSIndexPath).section as NSCopying) } else { let currentAttribute = lastCells.object(forKey: (indexPath as IndexPath).section) if (currentAttribute == nil || ((currentAttribute as AnyObject).indexPath != nil && (indexPath as NSIndexPath).row > (currentAttribute as AnyObject).indexPath.row)) { lastCells.setObject(attributes, forKey: (indexPath as NSIndexPath).section as NSCopying) } if (indexPath as NSIndexPath).item == 0 && (indexPath as NSIndexPath).section == 0 { visibleParallaxHeader = true } } attributes.zIndex = 1 } if rect.minY <= 0 { visibleParallaxHeader = true } if self.parallaxHeaderAlwaysOnTop == true { visibleParallaxHeader = true } if visibleParallaxHeader && !CGSize.zero.equalTo(self.parallaxHeaderReferenceSize!) { let currentAttribute = IOStickyHeaderFlowLayoutAttributes(forSupplementaryViewOfKind: IOStickyHeaderParallaxHeader, with: IndexPath(index:0)) var frame = currentAttribute.frame frame.size.width = (self.parallaxHeaderReferenceSize?.width)! frame.size.height = (self.parallaxHeaderReferenceSize?.height)! let bounds = self.collectionView?.bounds let maxY = frame.maxY var y = min(maxY - self.parallaxHeaderMinimumReferenceSize.height, (bounds?.origin.y)! + (self.collectionView?.contentInset.top)!) let height = max(0, -y + maxY) let maxHeight = self.parallaxHeaderReferenceSize!.height let minHeight = self.parallaxHeaderMinimumReferenceSize.height let progressiveness = (height - minHeight)/(maxHeight-minHeight) currentAttribute.progressiveness = progressiveness currentAttribute.zIndex = 0 if self.parallaxHeaderAlwaysOnTop && height <= self.parallaxHeaderMinimumReferenceSize.height { let insertTop = self.collectionView?.contentInset.top y = (self.collectionView?.contentOffset.y)! + insertTop! currentAttribute.zIndex = 2000 } currentAttribute.frame = CGRect(x: frame.origin.x, y: y, width: frame.size.width, height: height) allItems.append(currentAttribute) } if !self.disableStickyHeaders { lastCells.keyEnumerator().forEach { obj in // for obj in lastCells.keyEnumerator() { if let indexPath = (obj as AnyObject).indexPath { let indexPAthKey = (indexPath as NSIndexPath).section var header = headers[indexPAthKey] if header == nil { header = self.layoutAttributesForSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, at: IndexPath(item: 0, section: (indexPath as NSIndexPath).section)) if let header:UICollectionViewLayoutAttributes = header as? UICollectionViewLayoutAttributes { allItems.append(header) } } self.updateHeaderAttributesForLastCellAttributes(attributes: header as! UICollectionViewLayoutAttributes, lastCellAttributes: lastCells[indexPAthKey] as! UICollectionViewLayoutAttributes) } } } return allItems } open override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? { if let attributes = super.layoutAttributesForItem(at: indexPath)?.copy() as? UICollectionViewLayoutAttributes { var frame = attributes.frame frame.origin.y += (self.parallaxHeaderReferenceSize?.height)! attributes.frame = frame return attributes } else { return nil } } open override var collectionViewContentSize : CGSize { if self.collectionView?.superview == nil { return CGSize.zero } var size = super.collectionViewContentSize size.height += (self.parallaxHeaderReferenceSize?.height)! return size } open override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool { return true } // ********************************************************************* // MARK: - Helper open func updateHeaderAttributesForLastCellAttributes(attributes: UICollectionViewLayoutAttributes, lastCellAttributes: UICollectionViewLayoutAttributes) { let currentBounds = self.collectionView?.bounds attributes.zIndex = 1024 attributes.isHidden = false var origin = attributes.frame.origin let sectionMaxY = lastCellAttributes.frame.maxY - attributes.frame.size.height var y = currentBounds!.maxY - (currentBounds?.size.height)! + (self.collectionView?.contentInset.top)! if self.parallaxHeaderAlwaysOnTop { y += self.parallaxHeaderMinimumReferenceSize.height } let maxY = min(max(y, attributes.frame.origin.y), sectionMaxY) origin.y = maxY attributes.frame = CGRect(x: origin.x, y: origin.y, width: attributes.frame.size.width, height: attributes.frame.size.width) } } #endif ================================================ FILE: Sources/IOStickyHeaderFlowLayoutAttributes.swift ================================================ // // IOStickyHeaderFlowLayoutAttributes.swift // Smokio // // Created by ben on 25/06/2015. // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. // import Foundation #if os(iOS) import UIKit open class IOStickyHeaderFlowLayoutAttributes: UICollectionViewLayoutAttributes { open var progressiveness: CGFloat = 1.0 open override var zIndex: Int{ didSet{ self.transform3D = CATransform3DMakeTranslation(0, 0, self.zIndex == 1 ? -1 :0) } } open override func copy(with zone: NSZone? = nil) -> Any { let copy = super.copy(with: zone) as! IOStickyHeaderFlowLayoutAttributes copy.progressiveness = self.progressiveness return copy } } #endif