Skip to content

Commit 2b65eb8

Browse files
author
Gürhan Yerlikaya
committed
added sample code to README
1 parent 89c5406 commit 2b65eb8

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,28 @@ Scroll your stack view with a smile up on your face. Written in Swift 3. Used Ap
1919
## Example
2020

2121
Cocoapods
22-
To run the example project, clone the repo, and run `pod install` from the Example directory first.
22+
To run the example project, clone the repo, and run `pod install` from the Example directory first.
23+
24+
## Usage
25+
### Sample Code (Swift)
26+
27+
```swift
28+
var scrollable = ScrollableStackView(frame: view.frame)
29+
view.addSubview(scrollable)
30+
31+
// add your views with addArrangedSubview(your_view)
32+
let rectangle = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 55))
33+
rectangle.backgroundColor = UIColor.red
34+
scrollable.stackView.addArrangedSubview(rectangle)
35+
}
36+
```
37+
38+
### Sample Code (Objective-C)
39+
40+
```objective-c
41+
42+
```
43+
2344

2445
## Wish List
2546

0 commit comments

Comments
 (0)