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
| class AnimatingFramedView: UIView { | |
| var isPaused = false | |
| private var timer: Timer? | |
| private lazy var viewFrameUpdater = RealTimeViewUpdator(delegate: self) | |
| var tick = 0 | |
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
| enum EdgeAction { | |
| case add(EdgeList.EdgeSpec) | |
| case select(EdgeList.EdgeSpec) | |
| case deleteSelected(EdgeList.EdgeSpec.Node, NodeType) | |
| } | |
| enum NodeType { | |
| case workspace | |
| case project |
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 | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { |
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 | |
| final class Store<Value, Action>: ObservableObject { | |
| let reducer: (inout Value, Action) -> Void | |
| @Published private(set) var value: Value | |
| init(initialValue: Value, reducer: @escaping (inout Value, Action) -> Void) { | |
| self.reducer = reducer | |
| self.value = initialValue |
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 | |
| final class Store<Value, Action>: ObservableObject { | |
| let reducer: (inout Value, Action) -> Void | |
| @Published private(set) var value: Value | |
| init(initialValue: Value, reducer: @escaping (inout Value, Action) -> Void) { | |
| self.reducer = reducer | |
| self.value = initialValue |
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
| struct Test: View { | |
| let binding: Binding<String> | |
| let store: Store<AppState, AppAction> | |
| init(store: Store<AppState, AppAction>) { | |
| self.store = store | |
| self.binding = .init( | |
| get: { store.value.testVal }, | |
| set: { store.send(.setTestVal($0)) } |
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
| init<ItemType: ListItemDisplayable>( | |
| menuItems: Observable<[ContextMenuItem]> = .just([]), | |
| getTitle: @escaping () -> Single<String> = { .just("") }, | |
| getItems: @escaping ItemsFetcher<ItemType>, | |
| externalReload: Observable<Void> = env.reload.asObservable(), | |
| filteringEnabled: Bool = false, | |
| emptyListMessage: String = "There are no items to show", | |
| filterFunc: @escaping ListItemFilterFunction<ItemType> = { (items, _) in items } | |
| ) { |
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
| class SettingsControllerFacade { | |
| private let bag = DisposeBag() | |
| private let controller: SettingsControllerType | |
| private let _settingGroups = PublishSubject<[SettingGroup]>() | |
| init( | |
| controller: SettingsControllerType | |
| ) { |
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
| class ViewController: UIViewController { | |
| class TestVC: UIViewController { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| view.backgroundColor = .green | |
| } | |
| } | |
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
| class MenuView: NodeSubscriber<String> { | |
| override func getSlice(_ state: AppState) -> SliceResult<String> { | |
| return .stateSlice("") | |
| } | |
| override func makeNode(from slice: String) -> Node { | |
| func setRoute(route: WorkspaceRoute) { | |
| store.dispatch(SetRouteAction([route.rawValue])) |