Skip to content
Swift - Swift Controlling UIScrollViews Demo - Demo 16 of 30
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
UIScollViews Demo.xcodeproj
UIScollViews Demo


Swift - Swift Controlling UIScrollViews Demo - Demo 16 of 30

App created in Xcode 10.3 (10G8) using Swift 4.2, iOS Deployment Target 12.4 and tested on a iPhone Xr Emulator

In this demo app we demonstrate how to code a swift Controlling UIScrollView Demo app.

There are so many interesting things within swift. This demo shows one way to use UIScrollViews in an app.

As the user gets into the app. They see a series of colored views within a main view that is set within a Scroll View. It shows us how to create a scrollable view with a variety of colored views. The colors rangs from Yellow to Green to Red to Blue. In the images below you can see the scrolling demo.

Although a number of different options are available in scrolling we are only using the bottom option (300) in this demo. The UIScrollView is setup as an IBOutlet in this example. Followed below by the settings we used in the viewDidLoad. scrollView.contentInset = UIEdgeInsets.init(top: 0, left: 0, bottom: 300, right: 0)

Coming soon:
Details and the screen cap images of the app in use can be found on Digital Mirko.

Screen Cap on a iPhone Xr device:(shown below)
(Left image) App started.
(Middle Image) Scrolled down view to display more colored views
(Right image) Scrolled down view to the last displayed colored box.

You can’t perform that action at this time.