Skip to content

LevitateView is a framework designed to enhance your iOS applications with an interactive view element at the bottom of the screen when you scroll down. This view allows users to quickly scroll back to the top of the view when tapped, improving navigation and user experience.

License

Notifications You must be signed in to change notification settings

Nomi-ngj/LevitateView

Repository files navigation

LevitateView

LevitateView is a framework designed to enhance your iOS applications with an interactive view element at the bottom of the screen when you scroll down. This view allows users to quickly scroll back to the top of the view when tapped, improving navigation and user experience.

Features

Scroll-to-Top Button: A view that appears when scrolling down, enabling users to quickly return to the top of the view with a single tap. Customizable Design: Easily customize the appearance of the scroll-to-top button, including colors, icons, and animations. Smooth Animations: Provides a smooth scrolling experience with customizable animation options.

Requirements

iOS 14.0+
Swift 5.0+

Example

Here's an example of how to use LevitateView in your project:

import SwiftUI
import LevitateView

struct ContentView: View {
    
    private let dataModel = LevitatingViewModel(image: Image(systemName: "arrow.up"),
                                             levitateBottomPadding:20,
                                             levitateScrollOffset:250,
                                             colorBackground: .red,
                                             colorForeground:.white)
    
    var body: some View {
        LevitatingView(content: MockVerticalListView(),
                       dataModel: dataModel)
    }
}

#Preview {
    ContentView()
}

Customization

You can customize the appearance and behavior of the scroll-to-top button by modifying the properties of the LevitatingViewModel:

image: The image/icon displayed on the button.
colorForeground: The color of the icon.
colorBackground: The background color of the button.
levitateBottomPadding: The padding from the bottom of the screen.
levitateScrollOffset: The offset threshold at which the button appears.

Video Demonstrations

Here are video demonstrations of LevitateView in action, showing both dark mode and light mode:

Light Mode

Light Mode

Dark Mode

Dark Mode

License

LevitateView is released under the MIT license. See LICENSE for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

Contact

For any questions or suggestions, feel free to contact me at [email protected].

About

LevitateView is a framework designed to enhance your iOS applications with an interactive view element at the bottom of the screen when you scroll down. This view allows users to quickly scroll back to the top of the view when tapped, improving navigation and user experience.

Resources

License

Stars

Watchers

Forks

Packages

No packages published