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 SwiftUI | |
import PlaygroundSupport | |
struct ContainerView: View { | |
var body: some View { | |
BubbleContainer() | |
} | |
} | |
struct BubbleContainer: View { |
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
protocol BakendService { | |
func sum(first: Int, second: Int) -> Int | |
func someNumber() -> Int | |
} | |
class BakendServiceProxy: BakendService { | |
// lazy building function provided from DI | |
private let instanceBuilder: () -> BakendService | |
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 os.log | |
// Example adds logging for specific opertaion which can be traced and analyzed | |
// later by Xcode Profile Instruments | |
let log = OSLog(subsystem: "com.yourapp.subsystem", category: "performance") | |
let signpostID = OSSignpostID(log: log) | |
func performOperation() { | |
os_signpost(.begin, log: log, name: "Perform Operation", signpostID: signpostID) |
NewerOlder