|ReleasedLast Release||Apr 2017|
Maintained by Evgenii Neumerzhitckii.
|LOCLines of Code||80|
This an an iOS library that helps scrolling screen content vertically, similar how the content is scrolled in the web browser. The code is written in Swift 2.0.
There are three ways you can add Scrollable to your Xcode project.
Add source (iOS 7+)
Simply add ScrollableDistrib.swift file into your Xcode project.
Setup with Carthage (iOS 8+)
github "marketplacer/Scrollable" ~> 2.0 to your Cartfile and run
Setup with CocoaPods (iOS 8+)
If you are using CocoaPods add this text to your Podfile and run
use_frameworks! target 'Your target name' pod 'Scrollable', '~> 2.0'
import Scrollableto your code if you used Carthage or CocoaPods setup methods.
scrollViewoutlet for the scroll view in your view controller.
Scrollable.createContentView function creates a content view and embeds all scroll view subviews in it. Then it goes through all scroll view constraints and moves them into the content view.
Constantfield. When I left it empty (
Standard) it threw an exception:
Assertion failure in -[NSLayoutConstraint constant], /SourceCache/Foundation/Foundation-1047.25/Layout.subproj/NSLayoutConstraint.m:601 2014-11-28 11:53:27.816 scrolled-content[2821:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '(null)'
Scrollable is released under the MIT License.