Skip to content

Commit da527d6

Browse files
authored
Merge pull request #2 from muukii/muukii/cleanup
Clean up
2 parents 9c35bf7 + a904795 commit da527d6

35 files changed

+1044
-649
lines changed

Cartfile

Whitespace-only changes.

Cartfile.private

Lines changed: 0 additions & 2 deletions
This file was deleted.

Cartfile.resolved

Lines changed: 0 additions & 2 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 2 deletions
This file was deleted.

Podfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Uncomment the next line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
target 'StackScrollView-Demo' do
5+
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
6+
use_frameworks!
7+
pod "Reveal-SDK"
8+
pod "EasyPeasy"
9+
#pod "Then"
10+
11+
# Pods for StackScrollView-Demo
12+
13+
end

Podfile.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
PODS:
2+
- EasyPeasy (1.4.2)
3+
- Reveal-SDK (8)
4+
5+
DEPENDENCIES:
6+
- EasyPeasy
7+
- Reveal-SDK
8+
9+
SPEC CHECKSUMS:
10+
EasyPeasy: 50e7130b61f495ce105796e438d4136e2c8d2cc0
11+
Reveal-SDK: 43be4e662864e937960d0d04d005135e29c4e53b
12+
13+
PODFILE CHECKSUM: 801a5623355ad33f423fde4c805d2477d85eadb4
14+
15+
COCOAPODS: 1.2.1

README.md

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,72 @@
66
[![Platform](https://img.shields.io/cocoapods/p/StackScrollView.svg?style=flat)](http://cocoapods.org/pods/StackScrollView)
77
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
88

9+
<img width=320 src="Resources/shot.png">
10+
11+
<img width=320 src="Resources/sample.gif">
12+
913
## What is this?
1014

1115
StackScrollView builds form UI easily.
1216

13-
StackScrollView has internal UICollectionView.
14-
Internal CollectionView calculates size of view by AutoLayout, then that display.
17+
StackScrollView includes UICollectionView.
18+
UICollectionView calculates size of view by AutoLayout, then that display.
19+
(Use `systemLayoutSizeFitting`)
20+
21+
- We call `StackCell` instead of `Cell` on StackScrollView.
22+
- We no longer need to consider reusing Cells.
23+
- `StackCell` requires constraint based layout.
24+
25+
## Usage
26+
27+
### Basic usage
28+
29+
```swift
30+
let stack = StackScrollView()
31+
stack.append(view: UIView())
32+
```
33+
34+
### Create CustomCell from Code
35+
36+
*We have to set constraints completely.*
37+
38+
```swift
39+
final class LabelStackCell: UIView {
40+
41+
private let label = UILabel()
42+
43+
init(title: String) {
44+
super.init(frame: .zero)
45+
46+
addSubview(label)
47+
label.translatesAutoresizingMaskIntoConstraints = false
48+
49+
label.topAnchor.constraint(greaterThanOrEqualTo: topAnchor, constant: 8).isActive = true
50+
label.bottomAnchor.constraint(lessThanOrEqualTo: bottomAnchor, constant: 8).isActive = true
51+
label.rightAnchor.constraint(equalTo: rightAnchor, constant: 8).isActive = true
52+
label.leftAnchor.constraint(equalTo: leftAnchor, constant: 8).isActive = true
53+
label.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true
54+
heightAnchor.constraint(greaterThanOrEqualToConstant: 40).isActive = true
55+
56+
label.font = UIFont.preferredFont(forTextStyle: .body)
57+
label.text = title
58+
}
59+
}
60+
```
61+
62+
```swift
63+
let stack = StackScrollView()
64+
stack.append(view: LabelStackCell(title: "Label"))
65+
```
66+
67+
### Create CustomCell from XIB
68+
69+
// TODO:
70+
71+
### Create everything
72+
73+
You can create any Cell.
74+
Please, check `StackScrollView-Demo`
1575

1676
## Author
1777

Resources/sample.gif

1.34 MB
Loading

Resources/shot.png

73.9 KB
Loading

RevealServer.framework/Headers/RevealServer.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)