Skip to content

Commit d70a795

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 90dcdaa + dd45d3f commit d70a795

File tree

17 files changed

+944
-1
lines changed

17 files changed

+944
-1
lines changed

.swiftlint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
included:
2+
- StickyHeader
3+
disabled_rules:
4+
- line_length
5+
- variable_name
6+
opt_in_rules:
7+
- empty_count

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Yannick Heinrich
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
3+
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
4+
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/TPGSwift.svg)](https://img.shields.io/cocoapods/v/StickyHeader.svg)
5+
[![Platform](https://img.shields.io/cocoapods/p/TPGSwift.svg?style=flat)](http://cocoadocs.org/docsets/StickyHeader)
6+
7+
# StickyHeader
8+
9+
Simple library based on work done on [MXParallaxHeader](https://github.com/maxep/MXParallaxHeader) helping to
10+
create a sticky header for an UIScrollView.
11+
12+
## Installation
13+
14+
### CocoaPods
15+
16+
```
17+
pod "StickyHeader"
18+
```
19+
20+
### Carthage
21+
```
22+
github "yageek/StickyHeader"
23+
```
24+
25+
## Usage
26+
27+
To add a sticky header:
28+
29+
```swift
30+
31+
// Create the header
32+
let view = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 100))
33+
view.backgroundColor = UIColor.blueColor()
34+
view.translatesAutoresizingMaskIntoConstraints = false
35+
36+
// Add the header to the table view
37+
self.tableView.stickyHeader.view = self.headerView
38+
self.tableView.stickyHeader.height = 200
39+
self.tableView.stickyHeader.minimumHeight = 100
40+
```
41+
42+
## Changelog
43+
44+
- 1.0.0: First release.
45+
46+
## License
47+
48+
TPGSwift is released under the MIT license. See LICENSE for details.

StickyHeader.podspec

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Pod::Spec.new do |s|
2+
3+
s.name = "StickyHeader"
4+
s.version = "1.0.0"
5+
s.summary = "Library helping to add a sticky header to an UIScrollView."
6+
s.description = <<-DESC
7+
Library helping to add a sticky header to an UIScrollView.
8+
The code is based on https://github.com/maxep/MXParallaxHeader.
9+
DESC
10+
s.homepage = "https://github.com/yageek/StickyHeader"
11+
s.license = "MIT"
12+
s.author = { "Yannick Heinrich" => "[email protected]" }
13+
s.source = { :git => "http://github.com/yageek//StickyHeader.git", :tag => "#{s.version}" }
14+
s.source_files = "StickyHeader"
15+
end

0 commit comments

Comments
 (0)