This file contains 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
struct PortfolioList: View { | |
let symbols: [Symbol] | |
@EnvironmentObject private var coordinator: Coordinator | |
var body: some View { | |
List { | |
ForEach(symbols, id: \.id) { symbol in | |
NavigationLink(destination: coordinator.navigate(to: .shareView(symbol: symbol))) { |
This file contains 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 Foundation | |
import SwiftUI | |
final class Coordinator: ObservableObject { | |
enum Destination { | |
case loadingView | |
case rootView | |
case shareView(symbol: Symbol) | |
} |
This file contains 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
// | |
// MVVM.swift | |
// MVVM+SwiftUI+Combine | |
// | |
// Created by Paul Weichhart on 07.09.20. | |
// | |
import Combine | |
import Foundation | |
import SwiftUI |
This file contains 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 Foundation | |
import PlaygroundSupport | |
import SwiftUI | |
struct Content: View { | |
var body: some View { | |
Text("👋🏻, 🌍!") | |
} | |
} |
This file contains 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 Foundation | |
import PlaygroundSupport | |
import SwiftUI | |
// This View will be re-rendered because it's property value changed | |
struct Headline: View { | |
var headline: String | |
var body: some View { | |
Text(headline) |
This file contains 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 Foundation | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
final class ClosureSet<T> { | |
private var closure: ((T) -> Void)? | |
init () { } | |
This file contains 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
.yuma-hint { | |
line-height: normal; | |
font-family:Arial, Verdana, Sans; | |
font-size:11px; | |
color:#000; | |
background-color:#fff; | |
margin:0px; | |
padding:5px; | |
border-radius: 5px; | |
-moz-border-radius: 5px; |