Wraps your custom view and presents it on the screen in the way it fills visible area


Platform Swift v5.5 test coverage 89% CocoaPods Carthage compatible

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 UIScrollView.

ScrollViewController Demo App

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 v1.0.12.

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 Podfile:

pod 'ScrollViewController', '~> 1.3'


You can also use Carthage if you prefer by adding following line to your Cartfile:

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:

bundle install

Then open ScrollViewController.xcodeproj in Xcode.

Use DemoApp build scheme for building and runing demo app.

Use 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?

Buy Me A Coffee


Copyright © 2022 Dariusz Rybicki Darrarski

MIT License


  • Swift Tools 5.5.0
View More Packages from this Author


  • None
Last updated: Mon Mar 13 2023 08:39:49 GMT-0500 (GMT-05:00)