Wraps your custom view and presents it on the screen in the way it fills visible area (not covered by navigation bar, keyboard etc.). If your custom view is too big, you will be able to scroll the content thanks to embedded
Starting from version
v1.1.0, ScrollViewController does no longer depends on KeyboardFrameChangeListener and ScrollViewKeyboardAvoider frameworks, which makes it more portable and easier to integrate. That change also makes those frameworks obsolete.
KeyboardFrameChangeListener is used to observe keyboard frame changes and then
adjust insets using
ScrollViewKeyboardAvoider so the keyboard does not cover the content. Supports "safe area layout" and makes the content fill visible area.
Designed to work on iPhone (including iPhone X) in portrait orientation (should also support other screen orientations as well as iPad screen).
Minimum deployment target: iOS 10.0 (on iOS >= 11 uses Safe Area Layout for iPhone X compatibility).
Last version developed using Swift 4.2 is
Swift Package Manager
ScrollViewController is compatible with Swift Package Manager. You can add it as a dependency to your Xcode project or swift package.
You can integrate
ScrollViewController with your project using CocoaPods. Just add this line to your
pod 'ScrollViewController', '~> 1.3'
You can also use Carthage if you prefer by adding following line to your
github "darrarski/ScrollViewController" ~> 1.3
Example can be found in DemoApp.
let yourContentView: UIView let scrollViewController = ScrollViewController() scrollViewController.contentView = yourContentView
To bootstrap the project run:
ScrollViewController.xcodeproj in Xcode.
DemoApp build scheme for building and runing demo app.
Tests build scheme for runing tests.
To lint the pod run:
bundle exec pod lib lint --allow-warnings
To deploy the pod run:
bundle exec pod trunk push --allow-warnings
☕️ Do you like the project?
Copyright © 2022 Dariusz Rybicki Darrarski