Skip to content

Instantly share code, notes, and snippets.

View technusm1's full-sized avatar
😁
Working from home

Maheep Kumar technusm1

😁
Working from home
  • SAS Nagar, Punjab, India
  • 08:08 (UTC +05:30)
View GitHub Profile
@wtsnz
wtsnz / ContentView.swift
Last active February 27, 2024 15:53
Playing around with hosting SwiftUI Views in an NSWindow from inside a View 🙃 (also works for the NSStatusBar item!)
import SwiftUI
struct ContentView: View {
@State var now = Date()
@State var showWindow = false
@State var text: String = ""
let timer = Timer.publish(every: 1, on: .current, in: .common).autoconnect()