Welcome to the documentation for the AMWaveTransition library!
Introduction
The AMWaveTransition library is a lightweight and easy-to-use Swift library that provides smooth and elegant wave-like transitions between view controllers. It allows you to enhance the user experience by adding beautiful animations during screen transitions in your iOS apps.
This documentation will guide you through various aspects of using AMWaveTransition in your projects, from getting started with installation and configuration, to understanding the available customization options and integrating it into your existing codebase.
Features
- Simple and lightweight library
- Provides smooth wave-like transitions
- Customizable transition properties
- Supports different transition directions
- Compatible with UIKit-based projects
Installation
In order to include AMWaveTransition in your project, you can follow these steps:
- Install the library via CocoaPods by adding the following line to your Podfile:
pod 'AMWaveTransition'
- Run
pod install
on your terminal - Import the library in your project:
import AMWaveTransition
Getting Started
Once you have included the AMWaveTransition library in your project, you can start using it by following these steps:
- Ensure that you are working with a UIKit-based project
- Choose the desired view controller(s) where you want to apply the wave transition effect
- Create an instance of
AMWaveTransition
- Set the transition properties as needed
- Assign the delegate of the transition object
- Execute the wave transition using the
startInteractiveTransition
method
Customization
AMWaveTransition provides various customization options to tailor the wave transition to your specific requirements. Here are some important properties you can adjust:
waveColor
: Specifies the color of the wave (default: light gray)waveSpeed
: Adjusts the speed of the wave animation (default: 0.6)waveHeight
: Sets the height of the wave (default: 50)wavePosition
: Determines the position of the wave on the screen (default: top)waveStyle
: Defines the visual style of the wave (default: continuous)duration
: Specifies the duration of the whole transition (default: 0.6)
Examples
Let’s take a look at a basic example to demonstrate how to use AMWaveTransition in your project:
import UIKit
import AMWaveTransition
class ViewController: UIViewController {
let waveTransition = AMWaveTransition()
override func viewDidLoad() {
super.viewDidLoad()
waveTransition.transitionDuration = 0.8 // Customizing transition duration
waveTransition.transitionStyle = .continuous // Setting the wave style
waveTransition.waveHeight = 70 // Adjusting the wave height
waveTransition.waveColor = .systemBlue // Customizing the wave color
waveTransition.startInteractiveTransition() // Execute the wave transition
}
}
For more advanced usage and integrating the wave transition in larger projects, please refer to the official documentation.
That’s it! You are now ready to incorporate beautiful wave transitions into your iOS app using the AMWaveTransition library. Enjoy!