Skip to content

Instantly share code, notes, and snippets.

View technocidal's full-sized avatar
🌍
Working remote

Johannes Ebeling technocidal

🌍
Working remote
View GitHub Profile
import SwiftUI
import Combine
import PlaygroundSupport
class SomeOtherObject: ObservableObject {
var cancellable: AnyCancellable? = nil
@Published var someValue = ""
init() {
self.cancellable = Timer.publish(every: 1, on: RunLoop.main, in: .default)
@technocidal
technocidal / Selection.swift
Created February 7, 2024 12:07
Optional selection
//: A UIKit based Playground for presenting user interface
import UIKit
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
@State var selected: Int? = 1