This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
// Created by Thiago Holanda on 22.06.19. | |
// twitter.com/tholanda | |
import SwiftUI | |
struct ContainerView: View { | |
@State var decimal = "" | |
@State var twitter = "" | |
@State var url = "" | |
@State var search = "" |
var body: some View { | |
Group { | |
Text(language.name) | |
.font(.body) | |
.padding([.leading, .trailing], 10) | |
.padding([.top, .bottom], 5) | |
.background(Color.gray) | |
.overlay( | |
Rectangle() | |
.frame(height: 4) |
/** | |
* MacEditorTextView | |
* Copyright (c) Thiago Holanda 2020-2021 | |
* https://bsky.app/profile/tholanda.com | |
* | |
* (the twitter account is now deleted, please, do not try to reach me there) | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
*/ |
import Foundation | |
class MyService: NSObject, MyServiceProtocol { | |
func upperCaseString(_ string: String, withReply reply: @escaping (String) -> Void) { | |
let response = string.uppercased() | |
reply(response) | |
} | |
} |
// | |
// UIView+Tooltips.h | |
// Crossword | |
// | |
// Created by Steven Troughton-Smith on 13/09/2019. | |
// Copyright © 2019 Steven Troughton-Smith. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
// The SwiftUI Lab | |
// Website: https://swiftui-lab.com | |
// Article: https://swiftui-lab.com/alignment-guides | |
import SwiftUI | |
class Model: ObservableObject { | |
@Published var minimumContainer = true | |
@Published var extendedTouchBar = false | |
@Published var twoPhases = true |
protocol KeyPathUpdatable {} | |
extension KeyPathUpdatable { | |
func updating<LeafType>(_ keyPath: WritableKeyPath<Self, LeafType>, to value: LeafType) -> Self { | |
var copy = self | |
copy[keyPath: keyPath] = value | |
return copy | |
} | |
} |