Everything built on top of the base OpenClaw platform. Canonical reference for what exists, where it lives, and how it works. Operational use cases and workflow playbooks live in
docs/USE-CASES-WORKFLOWS.md.
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
| // Option without self | |
| class Foo1 { | |
| private let controller: UIViewController = { | |
| return UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()! | |
| }() | |
| private lazy var window: UIWindow = { | |
| let window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
| window.backgroundColor = UIColor.whiteColor() | |
| window.makeKeyAndVisible() |
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
| // OBJC | |
| @property (nonatomic, copy) MyBlock myBlock; | |
| - (void)makeSomethingWithCompletionBlock:(MyBlock)completionBlock | |
| { | |
| self.myBlock = completionBlock; | |
| } | |
| // 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 SwiftUI | |
| import PlaygroundSupport | |
| class Presenter: ObservableObject { | |
| @Published var viewModel: ViewModel | |
| private var timer: Timer! | |
| private var memoryAddress: String! | |
| init(prefix: String) { |
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 UIKit | |
| import SwiftUI | |
| final class LoginViewController: UIHostingController<LoginView> { | |
| private let viewModel: LoginViewModel | |
| init(viewModel: LoginViewModel) { | |
| self.viewModel = viewModel | |
| super.init(rootView: LoginView(viewModel: viewModel)) | |
| } |
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
| let subject = PassthroughSubject<Int, Never>() | |
| let cancellable = subject | |
| .scan((nil, nil)) { previous, current in | |
| (previous.1, current) | |
| } | |
| .drop(while: { | |
| // Why does the `drop(while:)` never return true here when Optional(1) == Optional(1)? Is this a bug? | |
| if $0.0 == $0.1 { | |
| return true |
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 | |
| // Airdrop Demo | |
| // | |
| // Created by Daniel Kuntz on 7/30/23. | |
| // | |
| import SwiftUI | |
| struct ContentView: View { |
OlderNewer