Swiftpack.co - 623637646/EmbeddedScrollView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by 623637646.
623637646/EmbeddedScrollView 1.1.2
Embedded UIScrollView for iOS.
⭐️ 60
🕓 2 years ago
iOS
.package(url: "https://github.com/623637646/EmbeddedScrollView.git", from: "1.1.2")

EmbeddedScrollView

Add a vertical UIScrollView into another vertical UIScrollView on iOS. It makes users feel like it's a single UIScrollView. This tool resolve the gesture conflict between thw two UIScrollViews.

How it works: Hook the scrollViewDidScroll method of a UIScrollView by SwiftHook, calculate and reset the offset of the UIScrollView.

It supports Swift and Objective-C

ezgif com-gif-maker

How to use EmbeddedScrollView

Just one line code to do it!

outerScrollView.embeddedScrollView = embeddedScrollView

The API is in an extension.

extension UIScrollView {

    @objc public var embeddedScrollView: UIScrollView?
}

How to integrate EmbeddedScrollView?

EmbeddedScrollView can be integrated by cocoapods.

pod 'EmbeddedScrollView'

Or use Swift Package Manager. SPM is supported from 1.1.0.

Requirements

  • iOS 10.0+
  • Xcode 11+
  • Swift 5.0+

GitHub

link
Stars: 60
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

1.1.2
2 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics