-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from danielblx/master
Update README
Showing
3 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |