This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// WeatherWidget | |
// | |
// Created by Chris Eidhof on 20.01.21. | |
// | |
import SwiftUI | |
struct MyGuide: AlignmentID { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
let items = ["Basic", "Advanced", "Ultra"] | |
struct ContentView: View { | |
@State var value: Int = 0 | |
var body: some View { | |
VStack { | |
Picker(selection: $value, label: Text("Mode:")) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// Effects | |
// | |
// Created by Chris Eidhof on 13.07.20. | |
// | |
import SwiftUI | |
struct MyModifier: AnimatableModifier { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// TabBar | |
// | |
// Created by Chris Eidhof on 13.07.20. | |
// | |
import SwiftUI | |
struct ContentView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// AddressBook | |
// | |
// Created by Chris Eidhof on 13.07.20. | |
// | |
import SwiftUI | |
final class Contact: ObservableObject, Identifiable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// Bug1 | |
// | |
// Created by Chris Eidhof on 03.07.20. | |
// | |
import SwiftUI | |
struct ContentView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// NotesClone | |
// | |
// Created by Chris Eidhof on 29.06.20. | |
// | |
import SwiftUI | |
@main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package org | |
:hook ((org-mode . org-display-inline-images)) | |
:config | |
(use-package ob | |
:bind (:map org-mode-map | |
("C-c C-c" . org-ctrl-c-ctrl-c)) | |
:config | |
(use-package ob-swift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
// Insipired by http://dcandi.com/post/cocoa-filesystem-browser/ | |
extension URL { | |
var isDirectory: Bool { | |
return (try? resourceValues(forKeys: [.isDirectoryKey]))?.isDirectory ?? false | |
} | |
var fileIcon : NSImage { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run any SwiftUI view as a Mac app. | |
import Cocoa | |
import SwiftUI | |
NSApplication.shared.run { | |
VStack { | |
Text("Hello, World") | |
.padding() | |
.background(Capsule().fill(Color.blue)) |