StickyFooterScrollView is developed for quick creation of UIScrollView to implement.

Overview

LOGO

StickyFooterScrollView

StickyFooterScrollView is developed for quick creation of UIScrollView to implement. Usually when creating UIScrollView, developers have to declare and adjust many complex UI constraints to use, StickyFooterScrollView was developed to solve the above problem. StickyFooterScrollView focuses on quick initialization of UIScrollView and its ease of use with a few declared simple functions

Swift 5.0 Version License Platform Email

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

StickyFooterScrollView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'StickyFooterScrollView'

Usage

import StickyFooterScrollView
  1. Initiate StickyFooterScrollView
let scrollView = StickyFooterScrollView(minimumFooterTopOffset: 24)
  1. Add StickyFooterScrollView into parent
view.addSubview(scrollView)
  1. Setup constraints for StickyFooterScrollView
scrollView.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([
    scrollView.topAnchor.constraint(equalTo: view.topAnchor),
    scrollView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
    scrollView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
    scrollView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor)
])
  1. Setup content view and add into StickyFooterScrollView to display the main content
let mainContentView = UIStackView()
mainContentView.axis = .vertical

let imageView = UIImageView(image: UIImage(named: "Image"))
mainContentView.addArrangedSubview(imageView)

let titleLabel = UILabel()
titleLabel.text = "Hello"
titleLabel.textColor = .red
mainContentView.addArrangedSubview(titleLabel)

let descriptionLabel = UILabel()
descriptionLabel.text = "Sticky Footer Scroll View"
descriptionLabel.textColor = .blue
mainContentView.addArrangedSubview(descriptionLabel)
        
scrollView.applyContentView(mainContentView, with: .init(top: 24, left: 24, bottom: 24, right: 24))
  1. Setup the footer view and add into StickyFooterScrollView to display the footer content
let confirmButton = UIButton()
confirmButton.setTitle("OK", for: .normal)

scrollView.applyFooterView(confirmButton, with: .init(top: 24, left: 24, bottom: 24, right: 24))
  1. On function viewDidAppear, call the function updateLayout for constraint UI
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

contentView.scrollView.updateLayout()
}

alt text

Author

fanta1ty, [email protected]

License

StickyFooterScrollView is available under the MIT license. See the LICENSE file for more info.

You might also like...
Magical Data Modeling Framework for JSON - allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS and tvOS apps.

JSONModel - Magical Data Modeling Framework for JSON JSONModel allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS

Programmatic creation of NSAttributedString doesn't have to be a pain
Programmatic creation of NSAttributedString doesn't have to be a pain

Tribute let string = NSMutableAttributedString().add("Hello ") { $0.font = .systemFontOfSize(20) $0.color = .redColor() $0.underline = .St

Creation of data model easily, with no headache.

DataFixture Create data models easily, with no headache. DataFixture is a convenient way to generate new data for testing / seeding your Realm Databas

PdfBuilder: a swift library made to make creation of the Pdf file from code simpler
PdfBuilder: a swift library made to make creation of the Pdf file from code simpler

PdfBuilder PdfBuilder is a swift library made to make creation of the Pdf file f

Blog post on medium about the creation of a marvel app from ground up
Blog post on medium about the creation of a marvel app from ground up

Marvel App Appearance • Motivation • Posts • Installation ------- Appearance Motivation This repository supports a series of posts that will show how

SmartString - A powerful and small library that will allow the creation of complex String Styles
SmartString - A powerful and small library that will allow the creation of complex String Styles

SmartString A powerful and small library that will allow the creation of complex

SDWebImageMockPlugin makes possible the creation of snapshot testing with views using SDWebImage to configure images
SDWebImageMockPlugin makes possible the creation of snapshot testing with views using SDWebImage to configure images

SDWebImageMockPlugin makes possible the creation of snapshot testing with views using SDWebImage to configure images.

A CocoaPod that simplifies creation of the particle effects.
A CocoaPod that simplifies creation of the particle effects.

CRParticleEffect A CocoaPod that simplifies creation of particle effects. Supplied with UIPanGestureRecognizer subclass. We know how to add some visua

IHKeyboardAvoiding is an elegant solution for keeping any UIView visible when the keyboard is being shown - no UIScrollView required!
IHKeyboardAvoiding is an elegant solution for keeping any UIView visible when the keyboard is being shown - no UIScrollView required!

IHKeyboardAvoiding An elegant solution for keeping any UIView visible when the keyboard is being shown Requirements IHKeyboardAvoiding Version Objecti

Scrollable UINavigationBar that follows the scrolling of a UIScrollView
Scrollable UINavigationBar that follows the scrolling of a UIScrollView

A custom UINavigationController that enables the scrolling of the navigation bar alongside the scrolling of an observed content view Versioning notes

A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

A container view that responds to scrolling of UIScrollView
A container view that responds to scrolling of UIScrollView

FlexibleHeader A container view that responds to scrolling of UIScrollView. normal threshold FlexibleHeaderExecutantType Getting Started Progressive I

Simple parallax header for UIScrollView
Simple parallax header for UIScrollView

MXParallaxHeader ⚠️ This project is no longer maintained, see #124 ⚠️ MXParallaxHeader is a simple header class for UIScrollView. In addition, MXScrol

HPParallaxHeader is a simple parallax header class for UIScrollView.
HPParallaxHeader is a simple parallax header class for UIScrollView.

HPParallaxHeader is a simple parallax header class for UIScrollView.

Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift

Persei Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift! Made in Yalantis. Check this project on Dribbble Check th

iOS library - UIScrollView driven expandable menu.
iOS library - UIScrollView driven expandable menu.

UIScrollView driven expandable menu. Description AirBar is a library for creating cool expandable menus. Library observes UIScrollView scroll and prov

Animated
Animated "Pull To Refresh" Library for UIScrollView.

PullToBounce Animated "Pull To Refresh" Library for UIScrollView. You can add animated "pull to refresh" action to your UIScrollView, UITableView and

Give pull-to-refresh & infinite scrolling to any UIScrollView with 1 line of code.

SVPullToRefresh + SVInfiniteScrolling These UIScrollView categories makes it super easy to add pull-to-refresh and infinite scrolling fonctionalities

PullToRefresh extension for all UIScrollView type classes with animated text drawing style
PullToRefresh extension for all UIScrollView type classes with animated text drawing style

PullToRefreshCoreText PullToRefresh extension for all UIScrollView type classes with animated text drawing style Demo Install Manual Copy the files in

Owner
Nguyen Duc Thinh
iOS Developer
Nguyen Duc Thinh
URLScheme router than supports auto creation of UIViewControllers for associated url parameters to allow creation of navigation stacks

IKRouter What does it do? Once you have made your UIViewControllers conform to Routable you can register them with the parameters that they represent

Ian Keen 94 Feb 28, 2022
Quick Symlink - a Finder extension which provides a contextual menu item for the symbolic links creation on macOS

Quick Symlink The Quick Symlink is a Finder extension which provides a contextual menu item for the symbolic links (and other links) creation on macOS

Alexander Kropotin 29 Dec 20, 2022
Currency Converter - Free and Quick Converter calculates money quick and easy way to see live foreign exchange rates.

Currency Converter - Free and Quick Converter calculates money quick and easy way to see live foreign exchange rates. This app is available in the App

Tirupati Balan 212 Dec 30, 2022
LottieUI - A library developed to make Lottie easy to implement. It supports iOS and macOS

LottieUI It is a library developed to make Lottie easy to implement. It supports

jasu 51 Dec 24, 2022
nef💊a toolset to ease the creation of documentation in the form of Xcode Playgrounds

nef, short for Nefertiti, mother of Ankhesenamun, is a toolset to ease the creation of documentation in the form of Xcode Playgrounds. It provides com

Bow 257 Dec 6, 2022
CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.

CompositionalLayoutDSL CompositionalLayoutDSL is a Swift library. It makes easier to create compositional layout for collection view. Requirements Doc

FABERNOVEL 44 Dec 27, 2022
iOS On-Device Game Cheat Creation/Sharing Platform and Software

CheatManager CheatManager is a mobile platform, used for installation/distribution/creation of mobile game cheats/hacks. This platform is completely d

Project Manticore 49 Jan 2, 2023
A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.

WatchShop_UI A simple SwiftUI Application to demonstrate creation of UI using SwiftUI. How to run the project ? Fork the project. Run the project usin

Shubham Kr. Singh 12 Apr 15, 2022
It is a music and podcast creation system that enables users to create multiple tracks using AR(Augmented Reality).

AR-Studio It is a music creation system enables users to create multiple tracks using AR(Augmented Reality). Introduction AR Studio turns your iPad, a

Ayush Singh 5 Dec 3, 2022
Magical Data Modeling Framework for JSON - allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS and tvOS apps.

JSONModel - Magical Data Modeling Framework for JSON JSONModel allows rapid creation of smart data models. You can use it in your iOS, macOS, watchOS

JSONModel 6.9k Dec 8, 2022