https://github.com/hkalexling/awscrollview
:rocket: A subclass of UIScrollView
https://github.com/hkalexling/awscrollview
Last synced: 2 months ago
JSON representation
:rocket: A subclass of UIScrollView
- Host: GitHub
- URL: https://github.com/hkalexling/awscrollview
- Owner: hkalexling
- License: wtfpl
- Created: 2015-11-08T00:06:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-29T19:52:12.000Z (over 9 years ago)
- Last Synced: 2024-05-23T01:06:04.411Z (about 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 60 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWScrollView
A modified UIScrollViewThe design was inspired by the app [Flat Tomato](https://itunes.apple.com/us/app/flat-tomato-time-management/id719462746?mt=8)
Both Swift 2 and Objective-C version are provided.
Note: I am not very farmilar with Objective-C so the OC code might not be very elegant. I would appreciate if you could send me a pull request to improve it : )
###Demo GIF:

###Installation:
Simplily drag and drog the [AWScrollView.swift](https://github.com/hkalexling/AWScrollView/blob/master/AWScrollView/AWScrollView.swift) or [AWScrollView.h/m](https://github.com/hkalexling/AWScrollView/tree/master/Objective-C/AWScrollView-OC) file into your project
###Usage:
- In storyboard, drag and drog a `UIScrollView` into a viewController
- Set the class of the `UIScrollView` to be `AWScrollView`
- Connect the IBOutlet of `AWScrollView` to your view controller class file
- In your `viewDidLoad`, do something like this:```swift
override func viewDidLoad() {
super.viewDidLoad()
//Customize the duration of transition animation if you want
self.awScrollView.transitionTime = 0.8
//Customize the content size of AWScrollView if you want
self.awScrollView.xExtension = 300 //The x value of contentSize is now 600 + screen width
self.awScrollView.yExtension = 500 //The y value of contentSize if now 1000 + screen height
//Set the backgroud color to whatever you want
self.awScrollView.backgroundColor = UIColor.blackColor()
//Set up AWScrollView
self.awScrollView.setUp()
//Add other UIView to AWScrollView and its mainView here
//eg:
self.awScrollView.addSubview(self.yourImageView)
self.awScrollView.mainView.addSubview(self.yourLabel)
}
```- The set up process for Objective-C is exactly the same. Just do the same thing above in Objective-C syntax.
###Todo:
- [X] Create a reusable `AWScrollView` class
- [X] Clean the code
- [X] Customisable content size
- [X] Make the demo app looks better
- [X] Objective-C version###One More Thing
Just FYI, `AW` simplily means "awesome" xD