Skip to content

Instantly share code, notes, and snippets.

View kazuhiro4949's full-sized avatar

Kazuhiro Hayashi kazuhiro4949

View GitHub Profile
import SwiftUI
struct Data: Identifiable, Equatable {
let id: UUID = .init()
let value: String
}
struct ContentView: View {
@Namespace var namespace
import SwiftUI
import Combine
// MARK: - Data
class CurrentTime: ObservableObject {
@Published var seconds = Double.zero
private let timer = Timer.publish(every: 0.16, on: .main, in: .common).autoconnect()
private var cancellableSet = Set<AnyCancellable>()
import SwiftUI
private var menus: [String] = [
"cat",
"car",
"human",
"robot",
"coffee"
]