Skip to content

Commit

Permalink
Merge pull request #1 from danielblx/master
Browse files Browse the repository at this point in the history
Update README
danielblx committed Feb 19, 2015

Verified

This commit was signed with the committer’s verified signature.
edalzell Erin Dalzell
2 parents aabbaba + dc0af38 commit 9ae5761
Showing 3 changed files with 64 additions and 14 deletions.
Binary file added ISScrollViewPage/horizontalExample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ISScrollViewPage/verticalExample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 64 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,76 @@
# ISScrollViewPageSwift

This is a easy implementation if you need put yours UIViewControllers inside an UIScrollView navigation style.
Easy scrollView page viewer implementation written in Swift.

You can choice Horizontally navigation or Vertically navigation.
<p align="center">
<img align="center" src="ISScrollViewPage/horizontalExample.gif" alt="...">
<img align="center" src="ISScrollViewPage/verticalExample.gif" alt="...">
</p>

- How to set my view controllers?
## Current Version

var controllers = [FirstViewController(nibName:"FirstViewController",bundle:nil),
SecondViewController(nibName:"SecondViewController",bundle:nil),
ThirdViewController(nibName:"ThirdViewController",bundle:nil)]
self.scrollViewPage.setViewControllers(controllers)
Version: 0.0.1

## How to use it?

Firts of all, you need to know:

- You don't need to create a NIB file to use ISScrollViewPageSwift.
- You need to choose the orientation of ISScrollViewPageSwift (Horizontally or Vertically)

### NIB implementation

Only override viewDidLoad() func:

```swift
class MainViewController: UIViewController , ISScrollViewPageDelegate{

@IBOutlet weak var scrollViewPage:ISScrollViewPage!

override func viewDidLoad() {
super.viewDidLoad()
self.scrollViewPage.scrollViewPageDelegate = self;
self.scrollViewPage.scrollViewPageType = ISScrollViewPageType.ISScrollViewPageVertically
self.scrollViewPage.setViewControllers(controllers)
}
}
```

### No NIB implementation

Only override loadView() func and set self.view:

```swift
override func loadView() {
self.scrollViewPage = ISScrollViewPage(frame: UIScreen.mainScreen().applicationFrame)
self.scrollViewPage!.scrollViewPageType = ISScrollViewPageType.ISScrollViewPageVertically
self.scrollViewPage!.setViewControllers(controllers)
self.view = self.scrollViewPage
}
```
### Customization

```
scrollViewPageType (ISScrollViewPageVertically or ISScrollViewPageType.ISScrollViewPageHorizontally)
bounces (true or false)
```

## Requirements

* iOS 8.0+
* Xcode 6.0

- Set Navigation Type
## TODO
- [ ] Add More Customizations
- [ ] Some refactorings

self.scrollViewPage.scrollViewPageType = ISScrollViewPageType.ISScrollViewPageHorizontally
## Contact

![alt tag](http://media.giphy.com/media/3xz2BMFd73WBt7YhiM/giphy.gif)
If you have any questions comments or suggestions, send me a message. If you find a bug, or want to submit a pull request, let me know.

or
* daniel@ilhasoft.com.br
* https://twitter.com/danielamarall

self.scrollViewPage.scrollViewPageType = ISScrollViewPageType.ISScrollViewPageVertically
## Copyright and license

![alt tag](http://i.giphy.com/lXiRrhjp7gsq9hdBe.gif)
Copyright (c) 2015 Daniel Amaral (https://twitter.com/danielamarall). Code released under [the MIT license](LICENSE).

0 comments on commit 9ae5761

Please sign in to comment.