Swiftpack.co - dkk/ScrollViewIfNeeded as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by dkk.
dkk/ScrollViewIfNeeded 1.0.1
A SwiftUI ScrollView that only scrolls if the content doesn't fit in the View
⭐️ 38
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/dkk/ScrollViewIfNeeded.git", from: "1.0.1")

ScrollViewIfNeeded

A SwiftUI ScrollView that only scrolls if the content doesn't fit in the View

Installation

Requirements iOS 13+

Swift Package Manager

  1. In Xcode, open your project and navigate to File → Swift Packages → Add Package Dependency.
  2. Paste the repository URL (https://github.com/dkk/ScrollViewIfNeeded) and click Next.
  3. For Rules, select version.
  4. Click Finish.

Add as dependency to another package

.package(url: "https://github.com/dkk/ScrollViewIfNeeded", .upToNextMajor(from: "1.0.0"))

Manual installation

Copy /Sources/ScrollViewIfNeeded/ScrollViewIfNeeded.swift into your project

Usage

Import the ScrollViewIfNeeded package to your view:

import ScrollViewIfNeeded

use it like you would use ScrollView:

ScrollViewIfNeeded {
    /* your content */
}

or configure it the same way you would configure ScrollView:

ScrollViewIfNeeded(.horizontal, showsIndicators: false) {
    /* your content */
}

Contribute

You can contribute to this project by helping me solve any reported issues or feature requests and creating a pull request.

Support

If you just want to say thanks, you could buy me a coffee ☕️.

License

ScrollViewIfNeeded is released under the MIT License.

GitHub

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

Release Notes

1.0.1
2 years ago

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