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
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8121.17" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 CocoaPods. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="IOStickyHeader" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
================================================
FILE: Example/IOStickyHeader/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="zS2-Eb-M21">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<scenes>
<!--Item-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="IOGrowVC" customModule="IOStickyHeader_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="y2i-bv-BUt">
<rect key="frame" x="0.0" y="0.0" width="600" height="551"/>
<animations/>
<color key="backgroundColor" red="0.42352941179999998" green="0.51764705879999995" blue="0.76470588240000004" alpha="1" colorSpace="calibratedRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="zto-VZ-E0x" customClass="IOStickyHeaderFlowLayout" customModule="IOStickyHeader">
<size key="itemSize" width="160" height="50"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<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" reuseIdentifier="cell" id="0eh-kb-OPv" customClass="IOCell" customModule="IOStickyHeader_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="160" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="160" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xAd-gG-IvO">
<rect key="frame" x="8" y="14" width="144" height="21"/>
<animations/>
<constraints>
<constraint firstAttribute="height" constant="21" id="Duo-0e-DL8"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<animations/>
<constraints>
<constraint firstAttribute="trailing" secondItem="xAd-gG-IvO" secondAttribute="trailing" constant="8" id="LFm-ZB-gm8"/>
<constraint firstItem="xAd-gG-IvO" firstAttribute="centerX" secondItem="0eh-kb-OPv" secondAttribute="centerX" id="N9a-zg-gIm"/>
<constraint firstItem="xAd-gG-IvO" firstAttribute="leading" secondItem="0eh-kb-OPv" secondAttribute="leading" constant="8" id="blX-Od-UTQ"/>
<constraint firstItem="xAd-gG-IvO" firstAttribute="centerY" secondItem="0eh-kb-OPv" secondAttribute="centerY" id="vIx-cb-Mdi"/>
</constraints>
<connections>
<outlet property="lblTitle" destination="xAd-gG-IvO" id="MMy-Ld-IG3"/>
</connections>
</collectionViewCell>
</cells>
</collectionView>
</subviews>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="y2i-bv-BUt" secondAttribute="trailing" id="0fr-67-Vpo"/>
<constraint firstItem="2fi-mo-0CV" firstAttribute="top" secondItem="y2i-bv-BUt" secondAttribute="bottom" id="UWm-c6-uf9"/>
<constraint firstItem="y2i-bv-BUt" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="VQa-Ao-Gqh"/>
<constraint firstItem="y2i-bv-BUt" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" id="eCt-te-h6K"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="ie6-zb-TUn"/>
<connections>
<outlet property="collectionView" destination="y2i-bv-BUt" id="xQt-1W-i8Z"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1257" y="439"/>
</scene>
<!--Item-->
<scene sceneID="8s1-94-vVl">
<objects>
<viewController id="Wra-rY-qw8" customClass="IOParallaxVC" customModule="IOStickyHeader_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="tNv-DY-yir"/>
<viewControllerLayoutGuide type="bottom" id="lIX-d0-03g"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="i20-98-eKf">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="7fV-Mg-QWN">
<rect key="frame" x="0.0" y="0.0" width="600" height="551"/>
<animations/>
<color key="backgroundColor" red="0.97254901960784312" green="0.95294117647058818" blue="0.90980392156862744" alpha="1" colorSpace="calibratedRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="3tC-8k-pLb" customClass="IOStickyHeaderFlowLayout" customModule="IOStickyHeader">
<size key="itemSize" width="306" height="101"/>
<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" reuseIdentifier="cell" id="8Ff-z7-J1c" customClass="IOCell" customModule="IOStickyHeader_Example" customModuleProvider="target">
<rect key="frame" x="147" y="50" width="306" height="101"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="306" height="101"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nli-Mt-TvJ">
<rect key="frame" x="8" y="40" width="290" height="21"/>
<animations/>
<constraints>
<constraint firstAttribute="height" constant="21" id="8Z9-bn-7Sh"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<animations/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Nli-Mt-TvJ" secondAttribute="trailing" constant="8" id="IZh-eP-sNG"/>
<constraint firstItem="Nli-Mt-TvJ" firstAttribute="centerX" secondItem="8Ff-z7-J1c" secondAttribute="centerX" id="UkP-d5-baz"/>
<constraint firstItem="Nli-Mt-TvJ" firstAttribute="centerY" secondItem="8Ff-z7-J1c" secondAttribute="centerY" id="a2P-6N-82z"/>
<constraint firstItem="Nli-Mt-TvJ" firstAttribute="leading" secondItem="8Ff-z7-J1c" secondAttribute="leading" constant="8" id="he1-yq-Jut"/>
</constraints>
<connections>
<outlet property="lblTitle" destination="Nli-Mt-TvJ" id="id5-0V-kTk"/>
</connections>
</collectionViewCell>
</cells>
<collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="sectionHeader" id="Acf-HA-E2I" customClass="IOSectionHeader" customModule="IOStickyHeader_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="600" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Header" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JGa-I4-snB">
<rect key="frame" x="8" y="14" width="584" height="21"/>
<animations/>
<constraints>
<constraint firstAttribute="height" constant="21" id="tq4-Eg-afY"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<animations/>
<constraints>
<constraint firstItem="JGa-I4-snB" firstAttribute="centerY" secondItem="Acf-HA-E2I" secondAttribute="centerY" id="Smw-yU-1yS"/>
<constraint firstAttribute="trailing" secondItem="JGa-I4-snB" secondAttribute="trailing" constant="8" id="hya-Bp-A4c"/>
<constraint firstItem="JGa-I4-snB" firstAttribute="leading" secondItem="Acf-HA-E2I" secondAttribute="leading" constant="8" id="k4E-7T-6Py"/>
</constraints>
<connections>
<outlet property="lblText" destination="JGa-I4-snB" id="idH-cW-jwF"/>
</connections>
</collectionReusableView>
</collectionView>
</subviews>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="7fV-Mg-QWN" firstAttribute="leading" secondItem="i20-98-eKf" secondAttribute="leading" id="Ah6-Fr-7oP"/>
<constraint firstItem="7fV-Mg-QWN" firstAttribute="top" secondItem="i20-98-eKf" secondAttribute="top" id="I53-tU-YaQ"/>
<constraint firstItem="lIX-d0-03g" firstAttribute="top" secondItem="7fV-Mg-QWN" secondAttribute="bottom" id="Rhs-oC-X6s"/>
<constraint firstAttribute="trailing" secondItem="7fV-Mg-QWN" secondAttribute="trailing" id="tq7-zN-2B9"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="Mu3-ex-dDf"/>
<connections>
<outlet property="collectionView" destination="7fV-Mg-QWN" id="YkZ-0l-fP3"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="OVm-ut-mrq" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1257" y="1186"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="5Jm-eo-nkH">
<objects>
<tabBarController automaticallyAdjustsScrollViewInsets="NO" id="zS2-Eb-M21" sceneMemberID="viewController">
<toolbarItems/>
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="DTe-DQ-orN">
<autoresizingMask key="autoresizingMask"/>
<animations/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="vXZ-lx-hvc" kind="relationship" relationship="viewControllers" id="SGx-Po-8od"/>
<segue destination="Wra-rY-qw8" kind="relationship" relationship="viewControllers" id="J3B-PB-Chh"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Wds-yr-aBU" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="445" y="439"/>
</scene>
</scenes>
</document>
================================================
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
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8121.17" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="IOGrowHeader" customModule="IOStickyHeader_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="220"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="320" height="220"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fGl-td-xIl">
<rect key="frame" x="0.0" y="0.0" width="320" height="205"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="photo1" translatesAutoresizingMaskIntoConstraints="NO" id="JvZ-mc-R2Y">
<rect key="frame" x="95" y="38" width="130" height="130"/>
<constraints>
<constraint firstAttribute="width" constant="130" id="51k-Om-BGX"/>
<constraint firstAttribute="width" secondItem="JvZ-mc-R2Y" secondAttribute="height" multiplier="1:1" id="HYV-Eh-CJu"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.72216424069999996" green="0.90814059300000005" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="JvZ-mc-R2Y" firstAttribute="centerX" secondItem="fGl-td-xIl" secondAttribute="centerX" id="QaQ-pL-Bqb"/>
<constraint firstItem="JvZ-mc-R2Y" firstAttribute="centerY" secondItem="fGl-td-xIl" secondAttribute="centerY" id="cxb-q8-1hT"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="paB-Ue-TBV">
<rect key="frame" x="110" y="190" width="100" height="30"/>
<color key="backgroundColor" red="0.23529413339999999" green="0.34509804840000002" blue="0.59607845540000004" alpha="1" colorSpace="deviceRGB"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="fdZ-SS-Mbf"/>
<constraint firstAttribute="width" constant="100" id="mug-m8-Cv8"/>
</constraints>
<state key="normal" title="Button">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="paB-Ue-TBV" secondAttribute="bottom" id="Jkz-SM-lOk"/>
<constraint firstItem="paB-Ue-TBV" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="MMa-oU-mZo"/>
<constraint firstItem="fGl-td-xIl" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="Of0-5q-ly6"/>
<constraint firstAttribute="trailing" secondItem="fGl-td-xIl" secondAttribute="trailing" id="brL-XJ-Y9O"/>
<constraint firstItem="fGl-td-xIl" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="gfB-0g-x5B"/>
<constraint firstAttribute="bottom" secondItem="fGl-td-xIl" secondAttribute="bottom" constant="15" id="obl-Tt-pZp"/>
</constraints>
<size key="customSize" width="320" height="220"/>
<connections>
<outlet property="btnBot" destination="paB-Ue-TBV" id="ICr-va-sLc"/>
<outlet property="constraintImgSize" destination="51k-Om-BGX" id="s4G-p4-Nhe"/>
<outlet property="imgPhoto" destination="JvZ-mc-R2Y" id="QHh-hg-lic"/>
</connections>
<point key="canvasLocation" x="454" y="361"/>
</collectionViewCell>
</objects>
<resources>
<image name="photo1" width="828" height="828"/>
</resources>
</document>
================================================
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<Array<String>> = [[]]
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
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8121.17" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="Vau-7a-MjQ" customClass="IOParallaxHeader" customModule="IOStickyHeader_Example" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="200"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="320" height="200"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="wEY-Vz-PUT">
<rect key="frame" x="0.0" y="-150" width="320" height="500"/>
<constraints>
<constraint firstAttribute="height" constant="500" id="Wcr-GV-FQp"/>
</constraints>
</mapView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<constraints>
<constraint firstItem="wEY-Vz-PUT" firstAttribute="centerY" secondItem="Vau-7a-MjQ" secondAttribute="centerY" id="4tk-EJ-bD1"/>
<constraint firstAttribute="trailing" secondItem="wEY-Vz-PUT" secondAttribute="trailing" id="efU-gy-uX4"/>
<constraint firstItem="wEY-Vz-PUT" firstAttribute="leading" secondItem="Vau-7a-MjQ" secondAttribute="leading" id="lys-db-btE"/>
</constraints>
<size key="customSize" width="320" height="200"/>
<connections>
<outlet property="mapView" destination="wEY-Vz-PUT" id="7Cx-1t-MFX"/>
</connections>
<point key="canvasLocation" x="365" y="325"/>
</collectionViewCell>
</objects>
</document>
================================================
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<String> = []
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 <UIKit/UIKit.h>
//! 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 <IOStickyHeader/PublicHeader.h>
================================================
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
================================================
<?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>en</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>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>NSPrincipalClass</key>
<string></string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
</dict>
</plist>
================================================
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 = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
4DEE4639C9130DFBCA00CA7A /* IOStickyHeader.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = IOStickyHeader.podspec; path = ../IOStickyHeader.podspec; sourceTree = "<group>"; 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 = "<group>"; };
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
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 = "<group>"; };
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
87E7E66C0A7CA20296B918BA /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
B5A103BF1DE4DAC7007A0543 /* IOStickyHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IOStickyHeader.h; sourceTree = "<group>"; };
B5BBF3F61B4527530036E522 /* IOCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOCell.swift; sourceTree = "<group>"; };
B5BBF3F81B45278A0036E522 /* IOSectionHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOSectionHeader.swift; sourceTree = "<group>"; };
B5BBF3FA1B4533360036E522 /* IOParallaxVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOParallaxVC.swift; sourceTree = "<group>"; };
B5BBF3FC1B4534B40036E522 /* IOParallaxHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IOParallaxHeader.xib; sourceTree = "<group>"; };
B5BBF3FF1B4539D70036E522 /* IOParallaxHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOParallaxHeader.swift; sourceTree = "<group>"; };
B5FDDAF21B41707C00FCE454 /* IOGrowVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOGrowVC.swift; sourceTree = "<group>"; };
B5FDDAF41B4171B400FCE454 /* IOGrowHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IOGrowHeader.swift; sourceTree = "<group>"; };
B5FDDAF51B4171B400FCE454 /* IOGrowHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IOGrowHeader.xib; sourceTree = "<group>"; };
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 = "<group>"; };
/* 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 = "<group>";
};
607FACC71AFB9204008FA782 = {
isa = PBXGroup;
children = (
607FACF51AFB993E008FA782 /* Podspec Metadata */,
607FACD21AFB9204008FA782 /* Example for IOStickyHeader */,
607FACE81AFB9204008FA782 /* Tests */,
607FACD11AFB9204008FA782 /* Products */,
9A7E878CAEC2CD5CF3192C5E /* Pods */,
2F73049340A1BB20DE3837CD /* Frameworks */,
);
sourceTree = "<group>";
};
607FACD11AFB9204008FA782 /* Products */ = {
isa = PBXGroup;
children = (
607FACD01AFB9204008FA782 /* IOStickyHeader_Example.app */,
607FACE51AFB9204008FA782 /* IOStickyHeader_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
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 = "<group>";
};
607FACD31AFB9204008FA782 /* Supporting Files */ = {
isa = PBXGroup;
children = (
B5A103BF1DE4DAC7007A0543 /* IOStickyHeader.h */,
607FACD41AFB9204008FA782 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
607FACE81AFB9204008FA782 /* Tests */ = {
isa = PBXGroup;
children = (
607FACEB1AFB9204008FA782 /* Tests.swift */,
607FACE91AFB9204008FA782 /* Supporting Files */,
);
path = Tests;
sourceTree = "<group>";
};
607FACE91AFB9204008FA782 /* Supporting Files */ = {
isa = PBXGroup;
children = (
607FACEA1AFB9204008FA782 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
607FACF51AFB993E008FA782 /* Podspec Metadata */ = {
isa = PBXGroup;
children = (
4DEE4639C9130DFBCA00CA7A /* IOStickyHeader.podspec */,
1CEE91C5D26F28AE3F1A72C1 /* README.md */,
87E7E66C0A7CA20296B918BA /* LICENSE */,
);
name = "Podspec Metadata";
sourceTree = "<group>";
};
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 = "<group>";
};
B5BBF3F31B4527120036E522 /* Cell */ = {
isa = PBXGroup;
children = (
B5BBF3FE1B4539B00036E522 /* IOParallaxHeader */,
B5BBF3F41B4527220036E522 /* IOGrowHeader */,
B5BBF3F61B4527530036E522 /* IOCell.swift */,
B5BBF3F81B45278A0036E522 /* IOSectionHeader.swift */,
);
name = Cell;
sourceTree = "<group>";
};
B5BBF3F41B4527220036E522 /* IOGrowHeader */ = {
isa = PBXGroup;
children = (
B5FDDAF41B4171B400FCE454 /* IOGrowHeader.swift */,
B5FDDAF51B4171B400FCE454 /* IOGrowHeader.xib */,
);
name = IOGrowHeader;
sourceTree = "<group>";
};
B5BBF3FE1B4539B00036E522 /* IOParallaxHeader */ = {
isa = PBXGroup;
children = (
B5BBF3FF1B4539D70036E522 /* IOParallaxHeader.swift */,
B5BBF3FC1B4534B40036E522 /* IOParallaxHeader.xib */,
);
name = IOParallaxHeader;
sourceTree = "<group>";
};
/* 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 = "<group>";
};
607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
607FACDF1AFB9204008FA782 /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* 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
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:IOStickyHeader.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Example/IOStickyHeader.xcodeproj/xcshareddata/xcschemes/IOStickyHeader-Example.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "IOStickyHeader_Example.app"
BlueprintName = "IOStickyHeader_Example"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "IOStickyHeader_Tests.xctest"
BlueprintName = "IOStickyHeader_Tests"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "IOStickyHeader_Tests.xctest"
BlueprintName = "IOStickyHeader_Tests"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "IOStickyHeader_Example.app"
BlueprintName = "IOStickyHeader_Example"
ReferencedContainer = "container:IOStickyHeader.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 = "607FACCF1AFB9204008FA782"
BuildableName = "IOStickyHeader_Example.app"
BlueprintName = "IOStickyHeader_Example"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "IOStickyHeader_Example.app"
BlueprintName = "IOStickyHeader_Example"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: Example/IOStickyHeader.xcodeproj/xcshareddata/xcschemes/IOStickyHeader.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5A103BC1DE4DAC7007A0543"
BuildableName = "IOStickyHeader.framework"
BlueprintName = "IOStickyHeader"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<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 = "B5A103BC1DE4DAC7007A0543"
BuildableName = "IOStickyHeader.framework"
BlueprintName = "IOStickyHeader"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5A103BC1DE4DAC7007A0543"
BuildableName = "IOStickyHeader.framework"
BlueprintName = "IOStickyHeader"
ReferencedContainer = "container:IOStickyHeader.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: Example/IOStickyHeader.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:IOStickyHeader.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Example/IOStickyHeader.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/IOStickyHeader.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>
<key>BuildSystemType</key>
<string>Original</string>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
================================================
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
================================================
<?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>en</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>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
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 <benjamin@smok.io>
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
[](https://travis-ci.org/BenjaminPrieur/IOStickyHeader)
[](http://cocoapods.org/pods/IOStickyHeader)
[](http://cocoapods.org/pods/IOStickyHeader)
[](http://cocoapods.org/pods/IOStickyHeader)
[](http://cocoapods.org/pods/IOStickyHeader)
<img src="https://github.com/BenjaminPrieur/IOStickyHeader/blob/master/Example/exemple.png" width="320"/>
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
<img src="https://github.com/BenjaminPrieur/IOStickyHeader/blob/master/Example/tuto1.png"/>
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
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
Condensed preview — 35 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (107K chars).
[
{
"path": ".gitignore",
"chars": 665,
"preview": "# OS X\n.DS_Store\n\n.gitmodules\n\n# Xcode\nbuild/\n.build/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!d"
},
{
"path": ".swift-version",
"chars": 4,
"preview": "4.2\n"
},
{
"path": ".travis.yml",
"chars": 585,
"preview": "# references:\n# * http://www.objc.io/issue-6/travis-ci.html\n# * https://github.com/supermarin/xcpretty#usage\n\nlanguage: "
},
{
"path": "Example/IOStickyHeader/AppDelegate.swift",
"chars": 538,
"preview": "//\n// AppDelegate.swift\n// IOStickyHeader\n//\n// Created by Benjamin Prieur on 06/29/2015.\n// For the full copyright "
},
{
"path": "Example/IOStickyHeader/Base.lproj/LaunchScreen.xib",
"chars": 3815,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/IOStickyHeader/Base.lproj/Main.storyboard",
"chars": 18241,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "Example/IOStickyHeader/IOCell.swift",
"chars": 304,
"preview": "//\n// IOCell.swift\n// IOStickyHeader\n//\n// Created by ben on 02/07/2015.\n// For the full copyright and license infor"
},
{
"path": "Example/IOStickyHeader/IOGrowHeader.swift",
"chars": 1184,
"preview": "//\n// IOParallaxHeader.swift\n// IOStickyHeader\n//\n// Created by ben on 29/06/2015.\n// For the full copyright and lic"
},
{
"path": "Example/IOStickyHeader/IOGrowHeader.xib",
"chars": 5598,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/IOStickyHeader/IOGrowVC.swift",
"chars": 3976,
"preview": "//\n// IOParallaxVC.swift\n// IOStickyHeader\n//\n// Created by ben on 29/06/2015.\n// For the full copyright and license"
},
{
"path": "Example/IOStickyHeader/IOParallaxHeader.swift",
"chars": 279,
"preview": "//\n// IOParallaxHeader.swift\n// IOStickyHeader\n//\n// Created by ben on 02/07/2015.\n// Copyright © 2015 Benjamin Prie"
},
{
"path": "Example/IOStickyHeader/IOParallaxHeader.xib",
"chars": 2733,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Example/IOStickyHeader/IOParallaxVC.swift",
"chars": 3969,
"preview": "//\n// IOParallaxVC.swift\n// IOStickyHeader\n//\n// Created by ben on 02/07/2015.\n// Copyright © 2015 Benjamin Prieur. "
},
{
"path": "Example/IOStickyHeader/IOSectionHeader.swift",
"chars": 321,
"preview": "//\n// IOSectionHeader.swift\n// IOStickyHeader\n//\n// Created by ben on 02/07/2015.\n// For the full copyright and lice"
},
{
"path": "Example/IOStickyHeader/IOStickyHeader.h",
"chars": 541,
"preview": "//\n// IOStickyHeader.h\n// IOStickyHeader\n//\n// Created by Benjamin Prieur on 22/11/2016.\n// Copyright © 2016 Benjami"
},
{
"path": "Example/IOStickyHeader/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 586,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "Example/IOStickyHeader/Images.xcassets/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "Example/IOStickyHeader/Images.xcassets/photo1.imageset/Contents.json",
"chars": 303,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"photo1.png\",\n \"scale\" : \"1x\"\n },\n {\n "
},
{
"path": "Example/IOStickyHeader/Info.plist",
"chars": 928,
"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/IOStickyHeader.xcodeproj/project.pbxproj",
"chars": 29503,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Example/IOStickyHeader.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:IOStickyHeader."
},
{
"path": "Example/IOStickyHeader.xcodeproj/xcshareddata/xcschemes/IOStickyHeader-Example.xcscheme",
"chars": 4512,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0700\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "Example/IOStickyHeader.xcodeproj/xcshareddata/xcschemes/IOStickyHeader.xcscheme",
"chars": 2913,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0810\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "Example/IOStickyHeader.xcworkspace/contents.xcworkspacedata",
"chars": 232,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:IOStickyHeader"
},
{
"path": "Example/IOStickyHeader.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/IOStickyHeader.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 281,
"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/Podfile",
"chars": 220,
"preview": "source 'https://github.com/CocoaPods/Specs.git'\nuse_frameworks!\n\ntarget 'IOStickyHeader_Example' do\n pod \"IOStickyHeade"
},
{
"path": "Example/Tests/Info.plist",
"chars": 733,
"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/Tests/Tests.swift",
"chars": 764,
"preview": "import UIKit\nimport XCTest\nimport IOStickyHeader\n\nclass Tests: XCTestCase {\n \n override func setUp() {\n sup"
},
{
"path": "IOStickyHeader.podspec",
"chars": 1107,
"preview": "#\n# Be sure to run `pod lib lint IOStickyHeader.podspec' to ensure this is a\n# valid spec and remove all comments before"
},
{
"path": "LICENSE",
"chars": 1078,
"preview": "Copyright (c) 2015 Benjamin Prieur <benjamin@smok.io>\n\nPermission is hereby granted, free of charge, to any person obtai"
},
{
"path": "Package.swift",
"chars": 161,
"preview": "//\n// Package.swift\n// Pods\n//\n// Created by Benjamin Prieur on 16/09/16.\n//\n//\n\nimport PackageDescription\n\nlet packa"
},
{
"path": "README.md",
"chars": 3256,
"preview": "I migrated [CSStickyHeaderFlowLayout](https://github.com/jamztang/CSStickyHeaderFlowLayout) library (Obj-C) to swift3.0\n"
},
{
"path": "Sources/IOStickyHeaderFlowLayout.swift",
"chars": 7745,
"preview": "//\n// IOStickyHeaderFlowLayout.swift\n// Smokio\n//\n// Created by ben on 25/06/2015.\n// For the full copyright and lic"
},
{
"path": "Sources/IOStickyHeaderFlowLayoutAttributes.swift",
"chars": 754,
"preview": "//\n// IOStickyHeaderFlowLayoutAttributes.swift\n// Smokio\n//\n// Created by ben on 25/06/2015.\n// For the full copyrig"
}
]
About this extraction
This page contains the full source code of the BenjaminPrieur/IOStickyHeader GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 35 files (96.0 KB), approximately 26.9k 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.