mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 23:24:32 +00:00
29 lines
580 B
Swift
29 lines
580 B
Swift
//
|
|
// drop.swift
|
|
// DynamicIsland
|
|
//
|
|
// Created by Harsh Vardhan Goswami on 04/08/24.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
|
|
|
|
public class DynamicIslandAnimations {
|
|
@Published var notchStyle: Style = .notch
|
|
|
|
init() {
|
|
self.notchStyle = .notch
|
|
}
|
|
|
|
var animation: Animation {
|
|
if #available(macOS 14.0, *), notchStyle == .notch {
|
|
Animation.spring(.bouncy(duration: 0.4))
|
|
} else {
|
|
Animation.timingCurve(0.16, 1, 0.3, 1, duration: 0.7)
|
|
}
|
|
}
|
|
|
|
// TODO: Move all animations to this file
|
|
|
|
}
|