Floating Bubbles
FloatingBubbles is a customizable views that float like zero gravity animation.
$ pod try FloatingBubbles
Features
- [x] Create Multiple Views
- [x] Customization
- [x] Different size for every view.
- [x] ------- More Features Coming Soon -------------
Requirements
- iOS 13.0+
- Xcode 11.0+
- Swift 5 (FloatingBubbles)
Logic
Circle, find intersection point of two moving circles :-
Distance between centres C1 and C2 is calculated as
C1C2 = sqrt((x1 - x2)2 + (y1 - y2)2).
There are three condition arises.
1. If C1C2 == R1 + R2
Circle A and B are touch to each other.
2. If C1C2 > R1 + R2
Circle A and B are not touch to each other.
3. If C1C2 < R1 + R2
Circle intersects each other.
Usage
A FloatingBubbles
object is an [UIView]
To display, you present it from an [UIView] object.
Properties
Delegation
The BouncyFloatingPresenable
protocol provides a customizations to our views.
Customization
Return View for customization.
For example,
Installation
CocoaPods
To install with CocoaPods, simply add this in your Podfile
:
Manually
- Drop FloatingBubbles Files into your project.
Communication
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
Author
Chandan Sharda, chandan.sharda98@gmail.com
License
FlotaingBubbles is available under the MIT license. See the LICENSE file for more info.