├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── error.yml
│ └── feedback.yml
└── workflows
│ └── CI.yml
├── .gitignore
├── CleanArchitecture
├── DIP.md
├── ISP.md
├── LSP.md
├── OCP.md
├── SRP.md
├── 두 가지 가치에 대한 이야기.md
├── 상속에 대해서.md
├── 소개.md
└── 패러다임의 개요.md
├── CoordinatorPattern
├── CoordinatorTheory-junha.md
├── CoordinatorUse-junha.md
└── ExCoordinator
│ ├── ExCoordinator.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
│ ├── ExCoordinator.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ ├── ExCoordinator
│ ├── App
│ │ └── AppCoordinator.swift
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Bye
│ │ ├── ByeCoordinator.swift
│ │ └── ByeViewController.swift
│ ├── Coordinator
│ │ └── Coordiantor.swift
│ ├── Hello
│ │ ├── HelloCoordinator.swift
│ │ └── HelloViewController.swift
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ └── ViewController.swift
│ ├── Podfile
│ ├── Podfile.lock
│ └── Pods
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ ├── Pods-ExCoordinator.xcscheme
│ │ ├── RxCocoa.xcscheme
│ │ ├── RxRelay.xcscheme
│ │ ├── RxSwift.xcscheme
│ │ ├── SnapKit.xcscheme
│ │ ├── Then.xcscheme
│ │ └── xcschememanagement.plist
│ ├── RxCocoa
│ ├── LICENSE.md
│ ├── Platform
│ │ ├── DataStructures
│ │ │ ├── Bag.swift
│ │ │ ├── InfiniteSequence.swift
│ │ │ ├── PriorityQueue.swift
│ │ │ └── Queue.swift
│ │ ├── DispatchQueue+Extensions.swift
│ │ ├── Platform.Darwin.swift
│ │ ├── Platform.Linux.swift
│ │ └── RecursiveLock.swift
│ ├── README.md
│ └── RxCocoa
│ │ ├── Common
│ │ ├── ControlTarget.swift
│ │ ├── DelegateProxy.swift
│ │ ├── DelegateProxyType.swift
│ │ ├── Infallible+Bind.swift
│ │ ├── Observable+Bind.swift
│ │ ├── RxCocoaObjCRuntimeError+Extensions.swift
│ │ ├── RxTarget.swift
│ │ ├── SectionedViewDataSourceType.swift
│ │ └── TextInput.swift
│ │ ├── Foundation
│ │ ├── KVORepresentable+CoreGraphics.swift
│ │ ├── KVORepresentable+Swift.swift
│ │ ├── KVORepresentable.swift
│ │ ├── NSObject+Rx+KVORepresentable.swift
│ │ ├── NSObject+Rx+RawRepresentable.swift
│ │ ├── NSObject+Rx.swift
│ │ ├── NotificationCenter+Rx.swift
│ │ └── URLSession+Rx.swift
│ │ ├── Runtime
│ │ ├── _RX.m
│ │ ├── _RXDelegateProxy.m
│ │ ├── _RXKVOObserver.m
│ │ ├── _RXObjCRuntime.m
│ │ └── include
│ │ │ ├── RxCocoaRuntime.h
│ │ │ ├── _RX.h
│ │ │ ├── _RXDelegateProxy.h
│ │ │ ├── _RXKVOObserver.h
│ │ │ └── _RXObjCRuntime.h
│ │ ├── RxCocoa.h
│ │ ├── RxCocoa.swift
│ │ ├── Traits
│ │ ├── ControlEvent.swift
│ │ ├── ControlProperty.swift
│ │ ├── Driver
│ │ │ ├── BehaviorRelay+Driver.swift
│ │ │ ├── ControlEvent+Driver.swift
│ │ │ ├── ControlProperty+Driver.swift
│ │ │ ├── Driver+Subscription.swift
│ │ │ ├── Driver.swift
│ │ │ └── ObservableConvertibleType+Driver.swift
│ │ ├── SharedSequence
│ │ │ ├── ObservableConvertibleType+SharedSequence.swift
│ │ │ ├── SchedulerType+SharedSequence.swift
│ │ │ ├── SharedSequence+Concurrency.swift
│ │ │ ├── SharedSequence+Operators+arity.swift
│ │ │ ├── SharedSequence+Operators.swift
│ │ │ └── SharedSequence.swift
│ │ └── Signal
│ │ │ ├── ControlEvent+Signal.swift
│ │ │ ├── ObservableConvertibleType+Signal.swift
│ │ │ ├── PublishRelay+Signal.swift
│ │ │ ├── Signal+Subscription.swift
│ │ │ └── Signal.swift
│ │ ├── iOS
│ │ ├── DataSources
│ │ │ ├── RxCollectionViewReactiveArrayDataSource.swift
│ │ │ ├── RxPickerViewAdapter.swift
│ │ │ └── RxTableViewReactiveArrayDataSource.swift
│ │ ├── Events
│ │ │ └── ItemEvents.swift
│ │ ├── NSTextStorage+Rx.swift
│ │ ├── Protocols
│ │ │ ├── RxCollectionViewDataSourceType.swift
│ │ │ ├── RxPickerViewDataSourceType.swift
│ │ │ └── RxTableViewDataSourceType.swift
│ │ ├── Proxies
│ │ │ ├── RxCollectionViewDataSourcePrefetchingProxy.swift
│ │ │ ├── RxCollectionViewDataSourceProxy.swift
│ │ │ ├── RxCollectionViewDelegateProxy.swift
│ │ │ ├── RxNavigationControllerDelegateProxy.swift
│ │ │ ├── RxPickerViewDataSourceProxy.swift
│ │ │ ├── RxPickerViewDelegateProxy.swift
│ │ │ ├── RxScrollViewDelegateProxy.swift
│ │ │ ├── RxSearchBarDelegateProxy.swift
│ │ │ ├── RxSearchControllerDelegateProxy.swift
│ │ │ ├── RxTabBarControllerDelegateProxy.swift
│ │ │ ├── RxTabBarDelegateProxy.swift
│ │ │ ├── RxTableViewDataSourcePrefetchingProxy.swift
│ │ │ ├── RxTableViewDataSourceProxy.swift
│ │ │ ├── RxTableViewDelegateProxy.swift
│ │ │ ├── RxTextStorageDelegateProxy.swift
│ │ │ ├── RxTextViewDelegateProxy.swift
│ │ │ └── RxWKNavigationDelegateProxy.swift
│ │ ├── UIActivityIndicatorView+Rx.swift
│ │ ├── UIApplication+Rx.swift
│ │ ├── UIBarButtonItem+Rx.swift
│ │ ├── UIButton+Rx.swift
│ │ ├── UICollectionView+Rx.swift
│ │ ├── UIControl+Rx.swift
│ │ ├── UIDatePicker+Rx.swift
│ │ ├── UIGestureRecognizer+Rx.swift
│ │ ├── UINavigationController+Rx.swift
│ │ ├── UIPickerView+Rx.swift
│ │ ├── UIRefreshControl+Rx.swift
│ │ ├── UIScrollView+Rx.swift
│ │ ├── UISearchBar+Rx.swift
│ │ ├── UISearchController+Rx.swift
│ │ ├── UISegmentedControl+Rx.swift
│ │ ├── UISlider+Rx.swift
│ │ ├── UIStepper+Rx.swift
│ │ ├── UISwitch+Rx.swift
│ │ ├── UITabBar+Rx.swift
│ │ ├── UITabBarController+Rx.swift
│ │ ├── UITableView+Rx.swift
│ │ ├── UITextField+Rx.swift
│ │ ├── UITextView+Rx.swift
│ │ └── WKWebView+Rx.swift
│ │ └── macOS
│ │ ├── NSButton+Rx.swift
│ │ ├── NSControl+Rx.swift
│ │ ├── NSSlider+Rx.swift
│ │ ├── NSTextField+Rx.swift
│ │ ├── NSTextView+Rx.swift
│ │ └── NSView+Rx.swift
│ ├── RxRelay
│ ├── LICENSE.md
│ ├── README.md
│ └── RxRelay
│ │ ├── BehaviorRelay.swift
│ │ ├── Observable+Bind.swift
│ │ ├── PublishRelay.swift
│ │ ├── ReplayRelay.swift
│ │ └── Utils.swift
│ ├── RxSwift
│ ├── LICENSE.md
│ ├── Platform
│ │ ├── AtomicInt.swift
│ │ ├── DataStructures
│ │ │ ├── Bag.swift
│ │ │ ├── InfiniteSequence.swift
│ │ │ ├── PriorityQueue.swift
│ │ │ └── Queue.swift
│ │ ├── DispatchQueue+Extensions.swift
│ │ ├── Platform.Darwin.swift
│ │ ├── Platform.Linux.swift
│ │ └── RecursiveLock.swift
│ ├── README.md
│ └── RxSwift
│ │ ├── AnyObserver.swift
│ │ ├── Binder.swift
│ │ ├── Cancelable.swift
│ │ ├── Concurrency
│ │ ├── AsyncLock.swift
│ │ ├── Lock.swift
│ │ ├── LockOwnerType.swift
│ │ ├── SynchronizedDisposeType.swift
│ │ ├── SynchronizedOnType.swift
│ │ └── SynchronizedUnsubscribeType.swift
│ │ ├── ConnectableObservableType.swift
│ │ ├── Date+Dispatch.swift
│ │ ├── Disposable.swift
│ │ ├── Disposables
│ │ ├── AnonymousDisposable.swift
│ │ ├── BinaryDisposable.swift
│ │ ├── BooleanDisposable.swift
│ │ ├── CompositeDisposable.swift
│ │ ├── Disposables.swift
│ │ ├── DisposeBag.swift
│ │ ├── DisposeBase.swift
│ │ ├── NopDisposable.swift
│ │ ├── RefCountDisposable.swift
│ │ ├── ScheduledDisposable.swift
│ │ ├── SerialDisposable.swift
│ │ ├── SingleAssignmentDisposable.swift
│ │ └── SubscriptionDisposable.swift
│ │ ├── Errors.swift
│ │ ├── Event.swift
│ │ ├── Extensions
│ │ └── Bag+Rx.swift
│ │ ├── GroupedObservable.swift
│ │ ├── ImmediateSchedulerType.swift
│ │ ├── Observable+Concurrency.swift
│ │ ├── Observable.swift
│ │ ├── ObservableConvertibleType.swift
│ │ ├── ObservableType+Extensions.swift
│ │ ├── ObservableType.swift
│ │ ├── Observables
│ │ ├── AddRef.swift
│ │ ├── Amb.swift
│ │ ├── AsMaybe.swift
│ │ ├── AsSingle.swift
│ │ ├── Buffer.swift
│ │ ├── Catch.swift
│ │ ├── CombineLatest+Collection.swift
│ │ ├── CombineLatest+arity.swift
│ │ ├── CombineLatest.swift
│ │ ├── CompactMap.swift
│ │ ├── Concat.swift
│ │ ├── Create.swift
│ │ ├── Debounce.swift
│ │ ├── Debug.swift
│ │ ├── Decode.swift
│ │ ├── DefaultIfEmpty.swift
│ │ ├── Deferred.swift
│ │ ├── Delay.swift
│ │ ├── DelaySubscription.swift
│ │ ├── Dematerialize.swift
│ │ ├── DistinctUntilChanged.swift
│ │ ├── Do.swift
│ │ ├── ElementAt.swift
│ │ ├── Empty.swift
│ │ ├── Enumerated.swift
│ │ ├── Error.swift
│ │ ├── Filter.swift
│ │ ├── First.swift
│ │ ├── Generate.swift
│ │ ├── GroupBy.swift
│ │ ├── Just.swift
│ │ ├── Map.swift
│ │ ├── Materialize.swift
│ │ ├── Merge.swift
│ │ ├── Multicast.swift
│ │ ├── Never.swift
│ │ ├── ObserveOn.swift
│ │ ├── Optional.swift
│ │ ├── Producer.swift
│ │ ├── Range.swift
│ │ ├── Reduce.swift
│ │ ├── Repeat.swift
│ │ ├── RetryWhen.swift
│ │ ├── Sample.swift
│ │ ├── Scan.swift
│ │ ├── Sequence.swift
│ │ ├── ShareReplayScope.swift
│ │ ├── SingleAsync.swift
│ │ ├── Sink.swift
│ │ ├── Skip.swift
│ │ ├── SkipUntil.swift
│ │ ├── SkipWhile.swift
│ │ ├── StartWith.swift
│ │ ├── SubscribeOn.swift
│ │ ├── Switch.swift
│ │ ├── SwitchIfEmpty.swift
│ │ ├── Take.swift
│ │ ├── TakeLast.swift
│ │ ├── TakeWithPredicate.swift
│ │ ├── Throttle.swift
│ │ ├── Timeout.swift
│ │ ├── Timer.swift
│ │ ├── ToArray.swift
│ │ ├── Using.swift
│ │ ├── Window.swift
│ │ ├── WithLatestFrom.swift
│ │ ├── WithUnretained.swift
│ │ ├── Zip+Collection.swift
│ │ ├── Zip+arity.swift
│ │ └── Zip.swift
│ │ ├── ObserverType.swift
│ │ ├── Observers
│ │ ├── AnonymousObserver.swift
│ │ ├── ObserverBase.swift
│ │ └── TailRecursiveSink.swift
│ │ ├── Reactive.swift
│ │ ├── Rx.swift
│ │ ├── RxMutableBox.swift
│ │ ├── SchedulerType.swift
│ │ ├── Schedulers
│ │ ├── ConcurrentDispatchQueueScheduler.swift
│ │ ├── ConcurrentMainScheduler.swift
│ │ ├── CurrentThreadScheduler.swift
│ │ ├── HistoricalScheduler.swift
│ │ ├── HistoricalSchedulerTimeConverter.swift
│ │ ├── Internal
│ │ │ ├── DispatchQueueConfiguration.swift
│ │ │ ├── InvocableScheduledItem.swift
│ │ │ ├── InvocableType.swift
│ │ │ ├── ScheduledItem.swift
│ │ │ └── ScheduledItemType.swift
│ │ ├── MainScheduler.swift
│ │ ├── OperationQueueScheduler.swift
│ │ ├── RecursiveScheduler.swift
│ │ ├── SchedulerServices+Emulation.swift
│ │ ├── SerialDispatchQueueScheduler.swift
│ │ ├── VirtualTimeConverterType.swift
│ │ └── VirtualTimeScheduler.swift
│ │ ├── Subjects
│ │ ├── AsyncSubject.swift
│ │ ├── BehaviorSubject.swift
│ │ ├── PublishSubject.swift
│ │ ├── ReplaySubject.swift
│ │ └── SubjectType.swift
│ │ ├── SwiftSupport
│ │ └── SwiftSupport.swift
│ │ └── Traits
│ │ ├── Infallible
│ │ ├── Infallible+CombineLatest+arity.swift
│ │ ├── Infallible+Concurrency.swift
│ │ ├── Infallible+Create.swift
│ │ ├── Infallible+Operators.swift
│ │ ├── Infallible+Zip+arity.swift
│ │ ├── Infallible.swift
│ │ └── ObservableConvertibleType+Infallible.swift
│ │ └── PrimitiveSequence
│ │ ├── Completable+AndThen.swift
│ │ ├── Completable.swift
│ │ ├── Maybe.swift
│ │ ├── ObservableType+PrimitiveSequence.swift
│ │ ├── PrimitiveSequence+Concurrency.swift
│ │ ├── PrimitiveSequence+Zip+arity.swift
│ │ ├── PrimitiveSequence.swift
│ │ └── Single.swift
│ ├── SnapKit
│ ├── LICENSE
│ ├── README.md
│ └── Sources
│ │ ├── Constraint.swift
│ │ ├── ConstraintAttributes.swift
│ │ ├── ConstraintConfig.swift
│ │ ├── ConstraintConstantTarget.swift
│ │ ├── ConstraintDSL.swift
│ │ ├── ConstraintDescription.swift
│ │ ├── ConstraintDirectionalInsetTarget.swift
│ │ ├── ConstraintDirectionalInsets.swift
│ │ ├── ConstraintInsetTarget.swift
│ │ ├── ConstraintInsets.swift
│ │ ├── ConstraintItem.swift
│ │ ├── ConstraintLayoutGuide+Extensions.swift
│ │ ├── ConstraintLayoutGuide.swift
│ │ ├── ConstraintLayoutGuideDSL.swift
│ │ ├── ConstraintLayoutSupport.swift
│ │ ├── ConstraintLayoutSupportDSL.swift
│ │ ├── ConstraintMaker.swift
│ │ ├── ConstraintMakerEditable.swift
│ │ ├── ConstraintMakerExtendable.swift
│ │ ├── ConstraintMakerFinalizable.swift
│ │ ├── ConstraintMakerPrioritizable.swift
│ │ ├── ConstraintMakerRelatable+Extensions.swift
│ │ ├── ConstraintMakerRelatable.swift
│ │ ├── ConstraintMultiplierTarget.swift
│ │ ├── ConstraintOffsetTarget.swift
│ │ ├── ConstraintPriority.swift
│ │ ├── ConstraintPriorityTarget.swift
│ │ ├── ConstraintRelatableTarget.swift
│ │ ├── ConstraintRelation.swift
│ │ ├── ConstraintView+Extensions.swift
│ │ ├── ConstraintView.swift
│ │ ├── ConstraintViewDSL.swift
│ │ ├── Debugging.swift
│ │ ├── LayoutConstraint.swift
│ │ ├── LayoutConstraintItem.swift
│ │ ├── Typealiases.swift
│ │ └── UILayoutSupport+Extensions.swift
│ ├── Target Support Files
│ ├── Pods-ExCoordinator
│ │ ├── Pods-ExCoordinator-Info.plist
│ │ ├── Pods-ExCoordinator-acknowledgements.markdown
│ │ ├── Pods-ExCoordinator-acknowledgements.plist
│ │ ├── Pods-ExCoordinator-dummy.m
│ │ ├── Pods-ExCoordinator-frameworks-Debug-input-files.xcfilelist
│ │ ├── Pods-ExCoordinator-frameworks-Debug-output-files.xcfilelist
│ │ ├── Pods-ExCoordinator-frameworks-Release-input-files.xcfilelist
│ │ ├── Pods-ExCoordinator-frameworks-Release-output-files.xcfilelist
│ │ ├── Pods-ExCoordinator-frameworks.sh
│ │ ├── Pods-ExCoordinator-umbrella.h
│ │ ├── Pods-ExCoordinator.debug.xcconfig
│ │ ├── Pods-ExCoordinator.modulemap
│ │ └── Pods-ExCoordinator.release.xcconfig
│ ├── RxCocoa
│ │ ├── RxCocoa-Info.plist
│ │ ├── RxCocoa-dummy.m
│ │ ├── RxCocoa-prefix.pch
│ │ ├── RxCocoa-umbrella.h
│ │ ├── RxCocoa.debug.xcconfig
│ │ ├── RxCocoa.modulemap
│ │ └── RxCocoa.release.xcconfig
│ ├── RxRelay
│ │ ├── RxRelay-Info.plist
│ │ ├── RxRelay-dummy.m
│ │ ├── RxRelay-prefix.pch
│ │ ├── RxRelay-umbrella.h
│ │ ├── RxRelay.debug.xcconfig
│ │ ├── RxRelay.modulemap
│ │ └── RxRelay.release.xcconfig
│ ├── RxSwift
│ │ ├── RxSwift-Info.plist
│ │ ├── RxSwift-dummy.m
│ │ ├── RxSwift-prefix.pch
│ │ ├── RxSwift-umbrella.h
│ │ ├── RxSwift.debug.xcconfig
│ │ ├── RxSwift.modulemap
│ │ └── RxSwift.release.xcconfig
│ ├── SnapKit
│ │ ├── SnapKit-Info.plist
│ │ ├── SnapKit-dummy.m
│ │ ├── SnapKit-prefix.pch
│ │ ├── SnapKit-umbrella.h
│ │ ├── SnapKit.debug.xcconfig
│ │ ├── SnapKit.modulemap
│ │ └── SnapKit.release.xcconfig
│ └── Then
│ │ ├── Then-Info.plist
│ │ ├── Then-dummy.m
│ │ ├── Then-prefix.pch
│ │ ├── Then-umbrella.h
│ │ ├── Then.debug.xcconfig
│ │ ├── Then.modulemap
│ │ └── Then.release.xcconfig
│ └── Then
│ ├── LICENSE
│ ├── README.md
│ └── Sources
│ └── Then
│ └── Then.swift
├── Flux
└── Flux.md
├── GoF-AbstractFactoryMethodPattern
├── GoF-AbstractFactoryMethodPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── swiftpm
│ │ │ │ └── Package.resolved
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-AbstractFactoryMethodPattern
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── ButtonProduct.swift
│ ├── Factory.swift
│ ├── Info.plist
│ ├── LabelProduct.swift
│ ├── Product.swift
│ ├── SceneDelegate.swift
│ ├── UIContent.swift
│ └── ViewController.swift
├── GoF-BridgePattern
├── GoF-BridgePattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-BridgePattern
│ ├── AdvancedRemoteControl.swift
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Device.swift
│ ├── DevicesVO.swift
│ ├── Info.plist
│ ├── RemoteControl.swift
│ ├── SceneDelegate.swift
│ └── ViewController.swift
├── GoF-BuilderPattern
├── GoF-BuilderPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-BuilderPattern
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ ├── ViewController.swift
│ └── iPhoneBuilder.swift
├── GoF-CompositPattern
├── GoF-CompositPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-CompositPattern
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ ├── ViewController.swift
│ └── iceCreamComponent.swift
├── GoF-DecoratorPattern
├── GoF-DecoratorPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-DecoratorPattern
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Clothes
│ └── Clothes.swift
│ ├── ConcreteDecorator
│ └── GetDressedDecorator.swift
│ ├── Decorator
│ ├── PattingDecorator.swift
│ └── SweaterDecorator.swift
│ ├── GetDressedComponent
│ └── GetDressedComponent.swift
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ └── ViewController.swift
├── GoF-FacadePattern
├── GoF-FacadePattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-FacadePattern
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Facade.swift
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ ├── Subsystems.swift
│ └── ViewController.swift
├── GoF-FactoryMethodPattern
├── GoF-FactoryMethodPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-FactoryMethodPattern
│ ├── AppDelegate.swift
│ ├── AppleFactory.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Client.swift
│ ├── Info.plist
│ ├── MacFactory.swift
│ ├── Product.swift
│ ├── SceneDelegate.swift
│ ├── ViewController.swift
│ └── iPhoneFactory.swift
├── GoF-FlyweightPattern
├── GoF-FlyweightPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── GoF-FlyweightPattern
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Client.swift
│ ├── Flyweight.swift
│ ├── FlyweightFactory.swift
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ └── ViewController.swift
├── GoF-FlyweightPatternTests
│ └── GoF_FlyweightPatternTests.swift
└── GoF-FlyweightPatternUITests
│ ├── GoF_FlyweightPatternUITests.swift
│ └── GoF_FlyweightPatternUITestsLaunchTests.swift
├── GoF-PrototypePattern
├── GoF-PrototypePattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-PrototypePattern
│ ├── AppDelegate.swift
│ ├── Apple.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── Prototype.swift
│ ├── SceneDelegate.swift
│ └── ViewController.swift
├── GoF-ProxyPattern
├── GoF-ProxyPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
├── GoF-ProxyPattern
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ └── ViewController.swift
├── GoF-ProxyPatternTests
│ └── GoF_ProxyPatternTests.swift
└── GoF-ProxyPatternUITests
│ ├── GoF_ProxyPatternUITests.swift
│ └── GoF_ProxyPatternUITestsLaunchTests.swift
├── GoF-SingletonPattern
├── GoF-SingletonPattern.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── GoF-SingletonPattern
│ ├── 1VC.swift
│ ├── 2VC.swift
│ ├── 3VC.swift
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── SceneDelegate.swift
│ ├── UserInFo.swift
│ └── ViewController.swift
├── GoF-Theorys
├── AbstractFactoryMethodPattern-junha.md
├── BridgePattern-junha.md
├── BuilderPattern-junha.md
├── CompositePattern-junha.md
├── DecoratorPattern-junha.md
├── FacadePattern-junha.md
├── FactoryMethodPattern-junha.md
├── FlyweightPattern-junha.md
├── Gof디자인패턴-junha.md
├── PrototypePattern-junha.md
├── ProxyPattern-junha.md
└── SingletonPattern-junha.md
├── KVO
└── KVO.md
├── License
├── MFA
└── Features Architecturemd.md
├── MVC
└── MVC-junha.md
├── MVP
├── JNBoard_MVP
│ ├── .gitignore
│ ├── JNBoard_MVP.xcodeproj
│ │ └── project.pbxproj
│ ├── JNBoard_MVP
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AccentColor.colorset
│ │ │ │ └── Contents.json
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ └── LaunchScreen.storyboard
│ │ ├── Info.plist
│ │ ├── Managers
│ │ │ └── UserDefaultsManager.swift
│ │ ├── SceneDelegate.swift
│ │ ├── Scenes
│ │ │ ├── Feed
│ │ │ │ ├── FeedPresenter.swift
│ │ │ │ ├── FeedTableViewCell.swift
│ │ │ │ └── FeedViewController.swift
│ │ │ ├── Icon.swift
│ │ │ ├── Profile
│ │ │ │ ├── ProfilePresenter.swift
│ │ │ │ └── ProfileViewController.swift
│ │ │ ├── TabBar
│ │ │ │ ├── TabBarItem.swift
│ │ │ │ └── TabBarViewController.swift
│ │ │ ├── Tweet
│ │ │ │ ├── ThreadPresenter.swift
│ │ │ │ └── ThreadViewController.swift
│ │ │ └── Write
│ │ │ │ ├── WritePresenter.swift
│ │ │ │ └── WriteViewController.swift
│ │ ├── Thread.swift
│ │ └── User.swift
│ ├── JNBoard_MVPTests
│ │ └── JNBoard_MVPTests.swift
│ └── JNBoard_MVPUITests
│ │ ├── JNBoard_MVPUITests.swift
│ │ └── JNBoard_MVPUITestsLaunchTests.swift
├── JNBoard_MVP_TEST
│ ├── .gitignore
│ ├── JNBoard_MVP_TEST.xcodeproj
│ │ └── project.pbxproj
│ ├── JNBoard_MVP_TEST
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AccentColor.colorset
│ │ │ │ └── Contents.json
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ │ └── LaunchScreen.storyboard
│ │ ├── Info.plist
│ │ ├── Managers
│ │ │ └── UserDefaultsManager.swift
│ │ ├── SceneDelegate.swift
│ │ ├── Scenes
│ │ │ ├── Feed
│ │ │ │ ├── FeedPresenter.swift
│ │ │ │ ├── FeedTableViewCell.swift
│ │ │ │ └── FeedViewController.swift
│ │ │ ├── Icon.swift
│ │ │ ├── Profile
│ │ │ │ ├── ProfilePresenter.swift
│ │ │ │ └── ProfileViewController.swift
│ │ │ ├── TabBar
│ │ │ │ ├── TabBarItem.swift
│ │ │ │ └── TabBarViewController.swift
│ │ │ ├── Tweet
│ │ │ │ ├── ThreadPresenter.swift
│ │ │ │ └── ThreadViewController.swift
│ │ │ └── Write
│ │ │ │ ├── WritePresenter.swift
│ │ │ │ └── WriteViewController.swift
│ │ ├── Thread.swift
│ │ └── User.swift
│ ├── JNBoard_MVP_TEST_Tests
│ │ ├── JNBoard_MVPTests.swift
│ │ ├── Mocks
│ │ │ ├── MockFeedViewController.swift
│ │ │ ├── MockProfileViewController.swift
│ │ │ ├── MockTheardViewController.swift
│ │ │ ├── MockUserDefaultsManager.swift
│ │ │ └── MockWriteViewController.swift
│ │ └── Tests
│ │ │ ├── FeedPresenterTests.swift
│ │ │ ├── ProfilePresenterTests.swift
│ │ │ ├── TheardPresenterTests.swift
│ │ │ └── WritePresenterTests.swift
│ └── JNBoard_MVP_TEST_UITests
│ │ ├── JNBoard_MVPUITests.swift
│ │ └── JNBoard_MVPUITestsLaunchTests.swift
├── MVP-junha.md
└── MVP-심화-junha.md
├── MVVM
├── BasicMVVM
│ ├── .gitignore
│ └── BasicMVVM
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Clothes
│ │ ├── Model
│ │ │ └── Clothes.swift
│ │ ├── View
│ │ │ └── ClothesView.swift
│ │ ├── ViewController
│ │ │ └── ViewController.swift
│ │ └── ViewModel
│ │ │ └── ClothesViewModel.swift
│ │ ├── Info.plist
│ │ └── SceneDelegate.swift
├── MVVM 사용이유.md
├── MVVM+RxSwift.md
└── RxSwift+MVVM
│ ├── .gitignore
│ └── RxSwift+MVVM
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── LoginViewModel.swift
│ ├── SceneDelegate.swift
│ ├── ViewController.swift
│ └── ViewModelType.swift
├── README.md
├── RIBs
├── RIBs 공식 문서 정리.md
├── RIBsProject
│ ├── RIBsProject.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── swiftpm
│ │ │ │ │ └── Package.resolved
│ │ │ └── xcuserdata
│ │ │ │ └── junhabag.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ └── RIBsProject
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── SceneDelegate.swift
│ │ └── ViewController.swift
└── RIBs란?.md
├── Swinject
├── SwinjectTest
│ ├── SwinjectTest.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ ├── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── swiftpm
│ │ │ │ │ └── Package.resolved
│ │ │ └── xcuserdata
│ │ │ │ └── junhabag.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── junhabag.xcuserdatad
│ │ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ └── SwinjectTest
│ │ ├── Animal.swift
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── DIViewController.swift
│ │ ├── Info.plist
│ │ ├── SceneDelegate.swift
│ │ └── ViewController.swift
└── Swinject란?.md
├── TCA
└── TCA.md
└── Viper
└── ViperPattern
├── ViperPattern.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── swiftpm
│ │ │ └── Package.resolved
│ └── xcuserdata
│ │ └── junhabag.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── junhabag.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ └── xcschememanagement.plist
└── ViperPattern
├── AppDelegate.swift
├── Assets.xcassets
├── AccentColor.colorset
│ └── Contents.json
├── AppIcon.appiconset
│ └── Contents.json
└── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
├── Modules
├── Interactor
│ ├── LoginInteractor.swift
│ └── LoginInteractorInputOutput.swift
├── Presenter
│ ├── LoginPresenter.swift
│ └── LoginPresenterInterface.swift
├── Router
│ ├── LoginRouter.swift
│ └── LoginRouterInterface.swift
└── View
│ ├── LoginView.swift
│ ├── LoginViewController.swift
│ └── LoginViewInterface.swift
├── RedViewController.swift
└── SceneDelegate.swift
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @jjunhaa0211
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/error.yml:
--------------------------------------------------------------------------------
1 | name: "Erorr"
2 | description: "There is a problem with your code 😅"
3 | labels: error
4 | body:
5 |
6 | - type: textarea
7 | attributes:
8 | label: explanation
9 | description: |
10 | Where do you think the error is coming from?
11 | placeholder: |
12 | I think there is an error in the XCamare part
13 | - type: textarea
14 | attributes:
15 | label: More details
16 | description: |
17 | Any more problems?
18 |
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feedback.yml:
--------------------------------------------------------------------------------
1 | name: "feedback"
2 | description: "I thought of a more efficient way! 😎"
3 | body:
4 |
5 | - type: textarea
6 | attributes:
7 | label: feedback
8 | description: |
9 | What changes could make the code better?
10 | placeholder: |
11 | recommend using ? to be safer than using !
12 | - type: textarea
13 | attributes:
14 | label: More details
15 | description: |
16 | Any more problems?
17 |
--------------------------------------------------------------------------------
/.github/workflows/CI.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Swift project
2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
3 |
4 | name: CI
5 |
6 | on:
7 | push:
8 | branches: [ main ]
9 | pull_request:
10 | branches: [ main ]
11 |
12 | jobs:
13 | build:
14 |
15 | runs-on: macos-latest
16 |
17 | steps:
18 | - uses: actions/checkout@v2
19 | - name: Build
20 | run: echo 🌱 It works decently!!🌱
21 | - name: Run tests
22 | run: |
23 | echo Add other actions to build,
24 | echo test, and edploy your project
25 |
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/CleanArchitecture/DIP.md:
--------------------------------------------------------------------------------
1 | ### **DIP**
2 |
3 | ## DIP란?
4 | - 인터페이스 분리 원칙
5 |
6 | ## DIP의 특징
7 | - 상위 모듈은 하위 모듈에 의존해서는 안된다
8 | - 추상화는 세부사항에 존재하면 안된다
9 | - 변하기 쉬운 것에 의존하기 보다는, 변화하지 않는 것에 의존하자
10 | - 추상화에 의존해야지, 구체화에 의존하면 안된다.
11 | - 역활에 의존해야하지 구현에 의존하면 안된다.
12 |
13 | **DIP 원칙은 Tuist 할 때 많이 볼 수 있습니다.**
14 |
--------------------------------------------------------------------------------
/CleanArchitecture/ISP.md:
--------------------------------------------------------------------------------
1 | ### **ISP**
2 |
3 | ## ISP란?
4 | - 인터페이스 분리 원칙
5 |
6 | ## ISP의 특징
7 | - 특정 클라이언트를 위한 인터페이스 여러 개가 범용 인터페이스 하나보다 낫다
8 | - 자동차에서 운전, 정비를 분리해서 부분적으로 바꿀 수 있게 한다. (딱 거기에 맞게 쪼개는 것이 목표)
9 |
--------------------------------------------------------------------------------
/CleanArchitecture/LSP.md:
--------------------------------------------------------------------------------
1 | ### **LSP**
2 |
3 | ## LSP란?
4 | - 리스코프 치환 원칙
5 | - Liskov Subtitution Principle
6 | - 상위 타입(슈퍼클래스)을 하위타입(서브클래스)의 인스턴스로 바꿔도 프로그램의 동작을 해치지 않아야한다.
7 |
8 | 위 말이 생각보다 어렵죠...
9 | 쉽게 말해서 부모의 동작을 제한해서는 안된다. 입니다.
10 | 예를 들어서 직사각형을 상속받아서 정사각형을 만들면 이것이 LSP 위반입니다.
11 | 자식이 부모의 동작을 제한하면 안되기 때문이죠~
12 |
13 | 이럴 때에는 반대로 직사각형이 정사각형을 상속 받거나 너비와 높이를 받는 것을 그냥 let으로 박아버리면 값을 바꿀 수 조차 없어서 LSP를 준수하게 됩니다.
14 | LSP를 어기지 않고 프로그래밍하는 것은 어렵습니다.
15 | 너무 많은 곳에서 LSP를 어긴다면 상위 클래스를 기준으로 코딩할 수 없고 상속 자체가 의미가 없어지고 OCP 조차 할 수 없어집니다.
16 |
17 | 그리고 LSP의 특징으로는 부모 객체를 호출하는 동작에서 자식 객체가 부모 객체를 완전히 대체할 수 있습니다.
18 | 프로그램의 객체는 프로그램의 정확성을 깨트리지 않고 아위 타입의 인스터스로 바꿀 수 있어야한다는 것이 LSP의 특징이라고 할 수 있죠
19 | 또 하나의 예시를 들자면 자동차의 엑설을 누르면 앞으로 가야하지만 이걸 뒤로 가게 하면 안되겠죠? ^^
20 |
21 | 정리해서 당연한 것은 당연해야지 변수가 있어서는 안된다가 LSP입니다.
22 | 마지막 예시를 들자면 총을 쏘면 쏜 방향으로 나가야지 쏜 나를 향에 총구가 날라오면 안됩니다.
23 |
--------------------------------------------------------------------------------
/CleanArchitecture/OCP.md:
--------------------------------------------------------------------------------
1 | ### **OCP**
2 |
3 | ## OCP란?
4 | - 개방 폐쇄 원칙
5 |
6 | ## OCP의 특징
7 | - 소프트웨어 요소는 확장에 열려 있으나 변경에는 닫혀있어야한다.
8 | - 기존의 코드를 변경하지 않으면서, 기능을 추가할 수 있어야한다.
9 | - 열려있다는 것은 기능 추가나 변경이 가능하다는 것이고 닫혀있다는 것은 기능추가를 할 때 그 모듈을 쓰고 있는 코드들을 줄지어 수정하지 않아야한다는 것
10 | - 다형성을 활용하자
11 | - 확장에 대해서는 개방적이고 수정에 대해서는 폐쇄적이어야한다.
12 | - 인터페이스를 구현한 새로운 클래스를 하나 만들어서 새로운 기능을 구현
13 |
14 | ## OCP 위반 예제
15 | - 어떤 타입에 대한 반복적인 분기문
16 | - 하나의 enum에 대해 여러군데에서 반복적으로 if/switch문을 쓰고있다면 다시 생각해보아야한다.
17 | - 기능추가는 case를 한줄 추가하는것 만큼이나 쉬울 수 있지만 그러면 enum을 사용하는 모든 코드를 찾아가서 수정해주어야한다.
18 | - OCP는 if/switch를 최대한 안쓰는 것으로 연습할 수 있습니다.
19 | - 아예 사용하지 말라는 것은 아니고 enum 같은 타입을 분기하는 지점에 대해서
20 | - 분기문을 없애는 것만으로도 함수와 클래스의 길이를 줄여서 SRP도 준수할 수 있습니다.
21 |
22 | ## OCP를 지키는 방법
23 | - Protocol 사용해서 상속 받기
24 | - 딕셔너리 사용하기 // OCP를 지키는 원칙은 아님
25 | - 제한적으로 사용하는 것이 좋음
26 |
27 | ## OCP의 단점
28 | - 구현 객체를 변경하려면 클라이언트 코드 변경을 해야한다.
29 | - 분명 다형성을 사용하고 있지만 OCP 원칙일 지킬 수 없다.
30 |
31 | ## OCP의 단점 해결 방법
32 | - 객체를 생성하고, 연관 관계를 맺어주는 별도의 조립, 설정자가 필요하다.
33 |
--------------------------------------------------------------------------------
/CleanArchitecture/두 가지 가치에 대한 이야기.md:
--------------------------------------------------------------------------------
1 | ### **2장. 두 가지 가치에 대한 이야기**
2 |
3 | - 행위
4 | - 많은 개발자들은 요구사항을 주면 기계처럼 버그 수정하는 일이 자기의 직업이라고 믿는다.
5 | - 아키텍처
6 | - 소프트웨어는 부드러운 제품이라는 뜻이다.
7 | - 아키텍처의 형태는 독립적이여야 한다.
8 | - 더 높은 가치
9 | - 완벽하지만 수정이 불가능한 프로그램보다는 동작하지 않지만 수정가능한 것이 더 좋다.
10 | - 변경을 하더라도 동작하도록 유지보수할 수 있기 때문에
11 | - 아이젠하워 매트릭스
12 | - 긴급하고 중요한
13 | - 긴급하지만 중요하지 않음
14 | - 긴급하지 않지만 중요함
15 | - 긴급하지 않지만 중요하지 않음
16 | - (3번째가 1번째가 되면 안된다.)
17 | - 아키텍처가 후순위가 되면 비용이 많이든다.
18 |
--------------------------------------------------------------------------------
/CleanArchitecture/상속에 대해서.md:
--------------------------------------------------------------------------------
1 | ### **상속을 다시 생각해보자**
2 |
3 | 상속은 객체 지향 프로그래밍의 중요한 부분이고 잘 쓰면 유용하지만 잘못된 상속을 만들면 문제가 발생합니다. LSP를 위반함으로써 편리함과 단순함을 얻을 수 있습니다.
4 |
5 |
6 |
7 | 저 같은 경우 처음으로 상속을 알았을 때 혁명이라고 생각했습니다. 그렇게 상속을 잘 활용된 코드가 좋은 코드라고 생각하며 살아왔죠.
8 |
9 |
10 |
11 | 하지만 Gong Of Four를 공부하면서 상속을 잘쓰는 방법은 상속을 쓰지 않는 것이라는 말을 듣고 깜짝돌랐습니다.
12 |
13 |
14 |
15 | 듣고 보니 그랬습니다. 상속이 잘되어있다는 것은 너무 강하게 결합되어 있다는 것이고 저희가 위에서 배운 LSP를 위배할 수 밖에 없습니다. 왜냐하면 상속을 쓰다보면 정말 어쩔 수 없이 보모에 행위를 위해하면 리크코프 원칙을 위배하게되기 때문입니다.
16 |
17 |
18 |
19 | 물론 LSP를 모두 지키려고 한다면 비효율적이고 너무 자주 위반하게 된다면 예상치 못한 안정성을 해치게됩니다. 때문에 저는 상속을 사용할 때 제가 LSP를 위반하는 것이 아닌지 생각해보아야한다고 생각합니다.
20 |
21 |
--------------------------------------------------------------------------------
/CleanArchitecture/소개.md:
--------------------------------------------------------------------------------
1 | ### **1장. 설계와 아키텍처란?**
2 |
3 | - 설계와 아키텍처 간에는 아무런 차이가 없다.
4 | - 소프트웨어 아키텍처의 목표는 필요한 시스템을 만들고 유지보수 하는데 투입되는 인력을 최소화 하는데 있다.
5 | - 엉망으로 만들면 깔끔하게 유지될 때 보다 매우 많이 느리다.
6 | - 빨리가는 유일한 방법은 제대로 가는 것이다.
7 | - 자신을 과신하지 말아라.
8 |
--------------------------------------------------------------------------------
/CleanArchitecture/패러다임의 개요.md:
--------------------------------------------------------------------------------
1 | ### 3**장. 패러다임의 개요**
2 |
3 | - 구조적 프로그래밍
4 | - 제어 흐름이 직접적으로 전환에 대해 규칙을 부과하는 것
5 | - goto는 해롭다
6 | - 객체 지향 프로그래밍
7 | - 제어 흐름이 간접적인 전환에 대해 규칙을 부과한다.
8 | - 함수형 프로그래밍
9 | - 할당문에 대해 규칙을 부여
10 | - 가장 먼저 만들어진 패러다임이다.
11 | - 패러다임이란 프로그램의 권한을 박탈하고 추가 적인 규칙을 부과한다. ****
12 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/CoordinatorPattern/ExCoordinator/ExCoordinator.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ExCoordinator.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 6
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/CoordinatorPattern/ExCoordinator/ExCoordinator.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/Bye/ByeCoordinator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BayCoordinator.swift
3 | // ExCoordinator
4 | //
5 | // Created by 박준하 on 2023/02/09.
6 | //
7 |
8 | import UIKit
9 |
10 | protocol ByeCoordinatorDelegate {
11 | func tapBye(_ coordinator: ByeCoordinator)
12 | }
13 |
14 | class ByeCoordinator: Coordinator, ByeViewControllerDelegate {
15 |
16 | var childCoordinators: [Coordinator] = []
17 | var delegate: ByeCoordinatorDelegate?
18 |
19 | private var navigationController: UINavigationController!
20 |
21 | init(navigationController: UINavigationController) {
22 | self.navigationController = navigationController
23 | }
24 |
25 | func start() {
26 | let viewController = ByeViewController()
27 | viewController.view.backgroundColor = .white
28 | viewController.delegate = self
29 |
30 | self.navigationController.viewControllers = [viewController]
31 | }
32 |
33 | func bye() {
34 | self.delegate?.tapBye(self)
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/Coordinator/Coordiantor.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Coordiantor.swift
3 | // ExCoordinator
4 | //
5 | // Created by 박준하 on 2023/02/09.
6 | //
7 |
8 | import Foundation
9 |
10 | protocol Coordinator : class {
11 | var childCoordinators : [Coordinator] { get set }
12 | func start()
13 | }
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/Hello/HelloCoordinator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HelloCoordinator.swift
3 | // ExCoordinator
4 | //
5 | // Created by 박준하 on 2023/02/09.
6 | //
7 |
8 | import UIKit
9 |
10 | protocol HelloCoordinatorDelegate {
11 | func tapHello(_ coordinator: HelloCoordinator)
12 | }
13 |
14 | class HelloCoordinator: Coordinator, HelloViewControllerDelegate {
15 |
16 | var childCoordinators: [Coordinator] = []
17 | var delegate: HelloCoordinatorDelegate?
18 |
19 | private var navigationController: UINavigationController!
20 |
21 | init(navigationController: UINavigationController) {
22 | self.navigationController = navigationController
23 | }
24 |
25 | func start() {
26 | let viewController = HelloViewController()
27 | viewController.view.backgroundColor = .black
28 | viewController.delegate = self
29 | self.navigationController.viewControllers = [viewController]
30 | }
31 |
32 | func hello() {
33 | self.delegate?.tapHello(self)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // ExCoordinator
4 | //
5 | // Created by 박준하 on 2023/02/09.
6 | //
7 |
8 | import UIKit
9 |
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
15 | if let windowScene = scene as? UIWindowScene {
16 | let window = UIWindow(windowScene: windowScene)
17 | self.window = window
18 |
19 | let navigationController = UINavigationController()
20 | self.window?.rootViewController = navigationController
21 |
22 | let coordinator = AppCoordinator(navigationController: navigationController)
23 | coordinator.start()
24 |
25 | self.window?.makeKeyAndVisible()
26 | }
27 | }
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/ExCoordinator/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // ExCoordinator
4 | //
5 | // Created by 박준하 on 2023/02/09.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 |
16 | view.backgroundColor = .red
17 | }
18 |
19 |
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | target 'ExCoordinator' do
5 | # Comment the next line if you don't want to use dynamic frameworks
6 | use_frameworks!
7 |
8 | pod 'SnapKit', '~> 5.6.0'
9 | pod 'Then'
10 | pod 'RxSwift', '6.5.0'
11 | pod 'RxCocoa', '6.5.0'
12 |
13 | # Pods for ExCoordinator
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - RxCocoa (6.5.0):
3 | - RxRelay (= 6.5.0)
4 | - RxSwift (= 6.5.0)
5 | - RxRelay (6.5.0):
6 | - RxSwift (= 6.5.0)
7 | - RxSwift (6.5.0)
8 | - SnapKit (5.6.0)
9 | - Then (3.0.0)
10 |
11 | DEPENDENCIES:
12 | - RxCocoa (= 6.5.0)
13 | - RxSwift (= 6.5.0)
14 | - SnapKit (~> 5.6.0)
15 | - Then
16 |
17 | SPEC REPOS:
18 | trunk:
19 | - RxCocoa
20 | - RxRelay
21 | - RxSwift
22 | - SnapKit
23 | - Then
24 |
25 | SPEC CHECKSUMS:
26 | RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b
27 | RxRelay: 1de1523e604c72b6c68feadedd1af3b1b4d0ecbd
28 | RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8
29 | SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
30 | Then: 844265ae87834bbe1147d91d5d41a404da2ec27d
31 |
32 | PODFILE CHECKSUM: 7fcca7eb727cc56d93d0524adacc79a60cc49c47
33 |
34 | COCOAPODS: 1.11.3
35 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - RxCocoa (6.5.0):
3 | - RxRelay (= 6.5.0)
4 | - RxSwift (= 6.5.0)
5 | - RxRelay (6.5.0):
6 | - RxSwift (= 6.5.0)
7 | - RxSwift (6.5.0)
8 | - SnapKit (5.6.0)
9 | - Then (3.0.0)
10 |
11 | DEPENDENCIES:
12 | - RxCocoa (= 6.5.0)
13 | - RxSwift (= 6.5.0)
14 | - SnapKit (~> 5.6.0)
15 | - Then
16 |
17 | SPEC REPOS:
18 | trunk:
19 | - RxCocoa
20 | - RxRelay
21 | - RxSwift
22 | - SnapKit
23 | - Then
24 |
25 | SPEC CHECKSUMS:
26 | RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b
27 | RxRelay: 1de1523e604c72b6c68feadedd1af3b1b4d0ecbd
28 | RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8
29 | SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
30 | Then: 844265ae87834bbe1147d91d5d41a404da2ec27d
31 |
32 | PODFILE CHECKSUM: 7fcca7eb727cc56d93d0524adacc79a60cc49c47
33 |
34 | COCOAPODS: 1.11.3
35 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/Platform/DataStructures/InfiniteSequence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InfiniteSequence.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 6/13/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Sequence that repeats `repeatedValue` infinite number of times.
10 | struct InfiniteSequence : Sequence {
11 | typealias Iterator = AnyIterator
12 |
13 | private let repeatedValue: Element
14 |
15 | init(repeatedValue: Element) {
16 | self.repeatedValue = repeatedValue
17 | }
18 |
19 | func makeIterator() -> Iterator {
20 | let repeatedValue = self.repeatedValue
21 | return AnyIterator { repeatedValue }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/Platform/DispatchQueue+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DispatchQueue+Extensions.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 10/22/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Dispatch
10 |
11 | extension DispatchQueue {
12 | private static var token: DispatchSpecificKey<()> = {
13 | let key = DispatchSpecificKey<()>()
14 | DispatchQueue.main.setSpecific(key: key, value: ())
15 | return key
16 | }()
17 |
18 | static var isMain: Bool {
19 | DispatchQueue.getSpecific(key: token) != nil
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/Platform/Platform.Linux.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Platform.Linux.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 12/29/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(Linux)
10 |
11 | import Foundation
12 |
13 | extension Thread {
14 |
15 | static func setThreadLocalStorageValue(_ value: T?, forKey key: String) {
16 | if let newValue = value {
17 | Thread.current.threadDictionary[key] = newValue
18 | }
19 | else {
20 | Thread.current.threadDictionary[key] = nil
21 | }
22 | }
23 |
24 | static func getThreadLocalStorageValueForKey(_ key: String) -> T? {
25 | let currentThread = Thread.current
26 | let threadDictionary = currentThread.threadDictionary
27 |
28 | return threadDictionary[key] as? T
29 | }
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/Platform/RecursiveLock.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecursiveLock.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 12/18/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | #if TRACE_RESOURCES
12 | class RecursiveLock: NSRecursiveLock {
13 | override init() {
14 | _ = Resources.incrementTotal()
15 | super.init()
16 | }
17 |
18 | override func lock() {
19 | super.lock()
20 | _ = Resources.incrementTotal()
21 | }
22 |
23 | override func unlock() {
24 | super.unlock()
25 | _ = Resources.decrementTotal()
26 | }
27 |
28 | deinit {
29 | _ = Resources.decrementTotal()
30 | }
31 | }
32 | #else
33 | typealias RecursiveLock = NSRecursiveLock
34 | #endif
35 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Common/RxTarget.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTarget.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | import RxSwift
12 |
13 | class RxTarget : NSObject
14 | , Disposable {
15 |
16 | private var retainSelf: RxTarget?
17 |
18 | override init() {
19 | super.init()
20 | self.retainSelf = self
21 |
22 | #if TRACE_RESOURCES
23 | _ = Resources.incrementTotal()
24 | #endif
25 |
26 | #if DEBUG
27 | MainScheduler.ensureRunningOnMainThread()
28 | #endif
29 | }
30 |
31 | func dispose() {
32 | #if DEBUG
33 | MainScheduler.ensureRunningOnMainThread()
34 | #endif
35 | self.retainSelf = nil
36 | }
37 |
38 | #if TRACE_RESOURCES
39 | deinit {
40 | _ = Resources.decrementTotal()
41 | }
42 | #endif
43 | }
44 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Common/SectionedViewDataSourceType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SectionedViewDataSourceType.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 1/10/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Data source with access to underlying sectioned model.
12 | public protocol SectionedViewDataSourceType {
13 | /// Returns model at index path.
14 | ///
15 | /// In case data source doesn't contain any sections when this method is being called, `RxCocoaError.ItemsNotYetBound(object: self)` is thrown.
16 |
17 | /// - parameter indexPath: Model index path
18 | /// - returns: Model at index path.
19 | func model(at indexPath: IndexPath) throws -> Any
20 | }
21 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Foundation/KVORepresentable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // KVORepresentable.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 11/14/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Type that is KVO representable (KVO mechanism can be used to observe it).
10 | public protocol KVORepresentable {
11 | /// Associated KVO type.
12 | associatedtype KVOType
13 |
14 | /// Constructs `Self` using KVO value.
15 | init?(KVOValue: KVOType)
16 | }
17 |
18 | extension KVORepresentable {
19 | /// Initializes `KVORepresentable` with optional value.
20 | init?(KVOValue: KVOType?) {
21 | guard let KVOValue = KVOValue else {
22 | return nil
23 | }
24 |
25 | self.init(KVOValue: KVOValue)
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Runtime/_RX.m:
--------------------------------------------------------------------------------
1 | //
2 | // _RX.m
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import "include/_RX.h"
10 |
11 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Runtime/include/RxCocoaRuntime.h:
--------------------------------------------------------------------------------
1 | //
2 | // RxCocoaRuntime.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 2/21/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "_RX.h"
11 | #import "_RXDelegateProxy.h"
12 | #import "_RXKVOObserver.h"
13 | #import "_RXObjCRuntime.h"
14 |
15 | //! Project version number for RxCocoa.
16 | FOUNDATION_EXPORT double RxCocoaVersionNumber;
17 |
18 | //! Project version string for RxCocoa.
19 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[];
20 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Runtime/include/_RXDelegateProxy.h:
--------------------------------------------------------------------------------
1 | //
2 | // _RXDelegateProxy.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/4/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | NS_ASSUME_NONNULL_BEGIN
12 |
13 | @interface _RXDelegateProxy : NSObject
14 |
15 | @property (nonatomic, weak, readonly) id _forwardToDelegate;
16 |
17 | -(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate NS_SWIFT_NAME(_setForwardToDelegate(_:retainDelegate:)) ;
18 |
19 | -(BOOL)hasWiredImplementationForSelector:(SEL)selector;
20 | -(BOOL)voidDelegateMethodsContain:(SEL)selector;
21 |
22 | -(void)_sentMessage:(SEL)selector withArguments:(NSArray*)arguments;
23 | -(void)_methodInvoked:(SEL)selector withArguments:(NSArray*)arguments;
24 |
25 | @end
26 |
27 | NS_ASSUME_NONNULL_END
28 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Runtime/include/_RXKVOObserver.h:
--------------------------------------------------------------------------------
1 | //
2 | // _RXKVOObserver.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 7/11/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | ################################################################################
13 | This file is part of RX private API
14 | ################################################################################
15 | */
16 |
17 | // Exists because if written in Swift, reading unowned is disabled during dealloc process
18 | @interface _RXKVOObserver : NSObject
19 |
20 | -(instancetype)initWithTarget:(id)target
21 | retainTarget:(BOOL)retainTarget
22 | keyPath:(NSString*)keyPath
23 | options:(NSKeyValueObservingOptions)options
24 | callback:(void (^)(id))callback;
25 |
26 | -(void)dispose;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/RxCocoa.h:
--------------------------------------------------------------------------------
1 | //
2 | // RxCocoa.h
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 2/21/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import
14 |
15 | //! Project version number for RxCocoa.
16 | FOUNDATION_EXPORT double RxCocoaVersionNumber;
17 |
18 | //! Project version string for RxCocoa.
19 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[];
20 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Traits/Driver/BehaviorRelay+Driver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BehaviorRelay+Driver.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 10/7/17.
6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import RxSwift
10 | import RxRelay
11 |
12 | extension BehaviorRelay {
13 | /// Converts `BehaviorRelay` to `Driver`.
14 | ///
15 | /// - returns: Observable sequence.
16 | public func asDriver() -> Driver {
17 | let source = self.asObservable()
18 | .observe(on:DriverSharingStrategy.scheduler)
19 | return SharedSequence(source)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlEvent+Driver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ControlEvent+Driver.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 9/19/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import RxSwift
10 |
11 | extension ControlEvent {
12 | /// Converts `ControlEvent` to `Driver` trait.
13 | ///
14 | /// `ControlEvent` already can't fail, so no special case needs to be handled.
15 | public func asDriver() -> Driver {
16 | return self.asDriver { _ -> Driver in
17 | #if DEBUG
18 | rxFatalError("Somehow driver received error from a source that shouldn't fail.")
19 | #else
20 | return Driver.empty()
21 | #endif
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Traits/Driver/ControlProperty+Driver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ControlProperty+Driver.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 9/19/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import RxSwift
10 |
11 | extension ControlProperty {
12 | /// Converts `ControlProperty` to `Driver` trait.
13 | ///
14 | /// `ControlProperty` already can't fail, so no special case needs to be handled.
15 | public func asDriver() -> Driver {
16 | return self.asDriver { _ -> Driver in
17 | #if DEBUG
18 | rxFatalError("Somehow driver received error from a source that shouldn't fail.")
19 | #else
20 | return Driver.empty()
21 | #endif
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Traits/Signal/ControlEvent+Signal.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ControlEvent+Signal.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 11/1/17.
6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import RxSwift
10 |
11 | extension ControlEvent {
12 | /// Converts `ControlEvent` to `Signal` trait.
13 | ///
14 | /// `ControlEvent` already can't fail, so no special case needs to be handled.
15 | public func asSignal() -> Signal {
16 | return self.asSignal { _ -> Signal in
17 | #if DEBUG
18 | rxFatalError("Somehow signal received error from a source that shouldn't fail.")
19 | #else
20 | return Signal.empty()
21 | #endif
22 | }
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/Traits/Signal/PublishRelay+Signal.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PublishRelay+Signal.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 12/28/15.
6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import RxSwift
10 | import RxRelay
11 |
12 | extension PublishRelay {
13 | /// Converts `PublishRelay` to `Signal`.
14 | ///
15 | /// - returns: Observable sequence.
16 | public func asSignal() -> Signal {
17 | let source = self.asObservable()
18 | .observe(on:SignalSharingStrategy.scheduler)
19 | return SharedSequence(source)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/Events/ItemEvents.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ItemEvents.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/20/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 |
12 | public typealias ItemMovedEvent = (sourceIndex: IndexPath, destinationIndex: IndexPath)
13 | public typealias WillDisplayCellEvent = (cell: UITableViewCell, indexPath: IndexPath)
14 | public typealias DidEndDisplayingCellEvent = (cell: UITableViewCell, indexPath: IndexPath)
15 | #endif
16 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxCollectionViewDataSourceType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxCollectionViewDataSourceType.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/29/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | /// Marks data source as `UICollectionView` reactive data source enabling it to be used with one of the `bindTo` methods.
15 | public protocol RxCollectionViewDataSourceType /*: UICollectionViewDataSource*/ {
16 |
17 | /// Type of elements that can be bound to collection view.
18 | associatedtype Element
19 |
20 | /// New observable sequence event observed.
21 | ///
22 | /// - parameter collectionView: Bound collection view.
23 | /// - parameter observedEvent: Event
24 | func collectionView(_ collectionView: UICollectionView, observedEvent: Event)
25 | }
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxPickerViewDataSourceType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxPickerViewDataSourceType.swift
3 | // RxCocoa
4 | //
5 | // Created by Sergey Shulga on 05/07/2017.
6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | /// Marks data source as `UIPickerView` reactive data source enabling it to be used with one of the `bindTo` methods.
15 | public protocol RxPickerViewDataSourceType {
16 | /// Type of elements that can be bound to picker view.
17 | associatedtype Element
18 |
19 | /// New observable sequence event observed.
20 | ///
21 | /// - parameter pickerView: Bound picker view.
22 | /// - parameter observedEvent: Event
23 | func pickerView(_ pickerView: UIPickerView, observedEvent: Event)
24 | }
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/Protocols/RxTableViewDataSourceType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTableViewDataSourceType.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/26/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | /// Marks data source as `UITableView` reactive data source enabling it to be used with one of the `bindTo` methods.
15 | public protocol RxTableViewDataSourceType /*: UITableViewDataSource*/ {
16 |
17 | /// Type of elements that can be bound to table view.
18 | associatedtype Element
19 |
20 | /// New observable sequence event observed.
21 | ///
22 | /// - parameter tableView: Bound table view.
23 | /// - parameter observedEvent: Event
24 | func tableView(_ tableView: UITableView, observedEvent: Event)
25 | }
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxCollectionViewDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxCollectionViewDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/29/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | /// For more information take a look at `DelegateProxyType`.
15 | open class RxCollectionViewDelegateProxy
16 | : RxScrollViewDelegateProxy {
17 |
18 | /// Typed parent object.
19 | public weak private(set) var collectionView: UICollectionView?
20 |
21 | /// Initializes `RxCollectionViewDelegateProxy`
22 | ///
23 | /// - parameter collectionView: Parent object for delegate proxy.
24 | public init(collectionView: UICollectionView) {
25 | self.collectionView = collectionView
26 | super.init(scrollView: collectionView)
27 | }
28 | }
29 |
30 | extension RxCollectionViewDelegateProxy: UICollectionViewDelegateFlowLayout {}
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/Proxies/RxTableViewDelegateProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RxTableViewDelegateProxy.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 6/15/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | /// For more information take a look at `DelegateProxyType`.
15 | open class RxTableViewDelegateProxy
16 | : RxScrollViewDelegateProxy {
17 |
18 | /// Typed parent object.
19 | public weak private(set) var tableView: UITableView?
20 |
21 | /// - parameter tableView: Parent object for delegate proxy.
22 | public init(tableView: UITableView) {
23 | self.tableView = tableView
24 | super.init(scrollView: tableView)
25 | }
26 |
27 | }
28 |
29 | extension RxTableViewDelegateProxy: UITableViewDelegate {}
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/UIActivityIndicatorView+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIActivityIndicatorView+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Ivan Persidskiy on 02/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | extension Reactive where Base: UIActivityIndicatorView {
15 | /// Bindable sink for `startAnimating()`, `stopAnimating()` methods.
16 | public var isAnimating: Binder {
17 | Binder(self.base) { activityIndicator, active in
18 | if active {
19 | activityIndicator.startAnimating()
20 | } else {
21 | activityIndicator.stopAnimating()
22 | }
23 | }
24 | }
25 | }
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/UIRefreshControl+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIRefreshControl+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Yosuke Ishikawa on 1/31/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | extension Reactive where Base: UIRefreshControl {
15 | /// Bindable sink for `beginRefreshing()`, `endRefreshing()` methods.
16 | public var isRefreshing: Binder {
17 | return Binder(self.base) { refreshControl, refresh in
18 | if refresh {
19 | refreshControl.beginRefreshing()
20 | } else {
21 | refreshControl.endRefreshing()
22 | }
23 | }
24 | }
25 |
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/UISlider+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UISlider+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Alexander van der Werff on 28/05/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | import RxSwift
12 | import UIKit
13 |
14 | extension Reactive where Base: UISlider {
15 |
16 | /// Reactive wrapper for `value` property.
17 | public var value: ControlProperty {
18 | return base.rx.controlPropertyWithDefaultEvents(
19 | getter: { slider in
20 | slider.value
21 | }, setter: { slider, value in
22 | slider.value = value
23 | }
24 | )
25 | }
26 |
27 | }
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/iOS/UIStepper+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIStepper+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Yuta ToKoRo on 9/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(iOS)
10 |
11 | import UIKit
12 | import RxSwift
13 |
14 | extension Reactive where Base: UIStepper {
15 |
16 | /// Reactive wrapper for `value` property.
17 | public var value: ControlProperty {
18 | return base.rx.controlPropertyWithDefaultEvents(
19 | getter: { stepper in
20 | stepper.value
21 | }, setter: { stepper, value in
22 | stepper.value = value
23 | }
24 | )
25 | }
26 | }
27 |
28 | #endif
29 |
30 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/macOS/NSButton+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSButton+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 5/17/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(macOS)
10 |
11 | import RxSwift
12 | import Cocoa
13 |
14 | extension Reactive where Base: NSButton {
15 |
16 | /// Reactive wrapper for control event.
17 | public var tap: ControlEvent {
18 | self.controlEvent
19 | }
20 |
21 | /// Reactive wrapper for `state` property`.
22 | public var state: ControlProperty {
23 | return self.base.rx.controlProperty(
24 | getter: { control in
25 | return control.state
26 | }, setter: { (control: NSButton, state: NSControl.StateValue) in
27 | control.state = state
28 | }
29 | )
30 | }
31 | }
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/macOS/NSSlider+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSSlider+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Junior B. on 24/05/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(macOS)
10 |
11 | import RxSwift
12 | import Cocoa
13 |
14 | extension Reactive where Base: NSSlider {
15 |
16 | /// Reactive wrapper for `value` property.
17 | public var value: ControlProperty {
18 | return self.base.rx.controlProperty(
19 | getter: { control -> Double in
20 | return control.doubleValue
21 | },
22 | setter: { control, value in
23 | control.doubleValue = value
24 | }
25 | )
26 | }
27 |
28 | }
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxCocoa/RxCocoa/macOS/NSView+Rx.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSView+Rx.swift
3 | // RxCocoa
4 | //
5 | // Created by Krunoslav Zaher on 12/6/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(macOS)
10 | import Cocoa
11 | import RxSwift
12 |
13 | extension Reactive where Base: NSView {
14 | /// Bindable sink for `alphaValue` property.
15 | public var alpha: Binder {
16 | return Binder(self.base) { view, value in
17 | view.alphaValue = value
18 | }
19 | }
20 | }
21 | #endif
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxRelay/RxRelay/Utils.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Utils.swift
3 | // RxRelay
4 | //
5 | // Created by Shai Mishali on 09/04/2019.
6 | // Copyright © 2019 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | func rxFatalErrorInDebug(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) {
12 | #if DEBUG
13 | fatalError(lastMessage(), file: file, line: line)
14 | #else
15 | print("\(file):\(line): \(lastMessage())")
16 | #endif
17 | }
18 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InfiniteSequence.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 6/13/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Sequence that repeats `repeatedValue` infinite number of times.
10 | struct InfiniteSequence : Sequence {
11 | typealias Iterator = AnyIterator
12 |
13 | private let repeatedValue: Element
14 |
15 | init(repeatedValue: Element) {
16 | self.repeatedValue = repeatedValue
17 | }
18 |
19 | func makeIterator() -> Iterator {
20 | let repeatedValue = self.repeatedValue
21 | return AnyIterator { repeatedValue }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DispatchQueue+Extensions.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 10/22/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Dispatch
10 |
11 | extension DispatchQueue {
12 | private static var token: DispatchSpecificKey<()> = {
13 | let key = DispatchSpecificKey<()>()
14 | DispatchQueue.main.setSpecific(key: key, value: ())
15 | return key
16 | }()
17 |
18 | static var isMain: Bool {
19 | DispatchQueue.getSpecific(key: token) != nil
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/Platform/Platform.Linux.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Platform.Linux.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 12/29/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | #if os(Linux)
10 |
11 | import Foundation
12 |
13 | extension Thread {
14 |
15 | static func setThreadLocalStorageValue(_ value: T?, forKey key: String) {
16 | if let newValue = value {
17 | Thread.current.threadDictionary[key] = newValue
18 | }
19 | else {
20 | Thread.current.threadDictionary[key] = nil
21 | }
22 | }
23 |
24 | static func getThreadLocalStorageValueForKey(_ key: String) -> T? {
25 | let currentThread = Thread.current
26 | let threadDictionary = currentThread.threadDictionary
27 |
28 | return threadDictionary[key] as? T
29 | }
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/Platform/RecursiveLock.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RecursiveLock.swift
3 | // Platform
4 | //
5 | // Created by Krunoslav Zaher on 12/18/16.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | #if TRACE_RESOURCES
12 | class RecursiveLock: NSRecursiveLock {
13 | override init() {
14 | _ = Resources.incrementTotal()
15 | super.init()
16 | }
17 |
18 | override func lock() {
19 | super.lock()
20 | _ = Resources.incrementTotal()
21 | }
22 |
23 | override func unlock() {
24 | super.unlock()
25 | _ = Resources.decrementTotal()
26 | }
27 |
28 | deinit {
29 | _ = Resources.decrementTotal()
30 | }
31 | }
32 | #else
33 | typealias RecursiveLock = NSRecursiveLock
34 | #endif
35 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Cancelable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Cancelable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/12/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents disposable resource with state tracking.
10 | public protocol Cancelable : Disposable {
11 | /// Was resource disposed.
12 | var isDisposed: Bool { get }
13 | }
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Concurrency/Lock.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Lock.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/31/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol Lock {
10 | func lock()
11 | func unlock()
12 | }
13 |
14 | // https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html
15 | typealias SpinLock = RecursiveLock
16 |
17 | extension RecursiveLock : Lock {
18 | @inline(__always)
19 | final func performLocked(_ action: () -> T) -> T {
20 | self.lock(); defer { self.unlock() }
21 | return action()
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LockOwnerType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol LockOwnerType: AnyObject, Lock {
10 | var lock: RecursiveLock { get }
11 | }
12 |
13 | extension LockOwnerType {
14 | func lock() { self.lock.lock() }
15 | func unlock() { self.lock.unlock() }
16 | }
17 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SynchronizedDisposeType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol SynchronizedDisposeType: AnyObject, Disposable, Lock {
10 | func synchronized_dispose()
11 | }
12 |
13 | extension SynchronizedDisposeType {
14 | func synchronizedDispose() {
15 | self.lock(); defer { self.unlock() }
16 | self.synchronized_dispose()
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SynchronizedOnType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol SynchronizedOnType: AnyObject, ObserverType, Lock {
10 | func synchronized_on(_ event: Event)
11 | }
12 |
13 | extension SynchronizedOnType {
14 | func synchronizedOn(_ event: Event) {
15 | self.lock(); defer { self.unlock() }
16 | self.synchronized_on(event)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SynchronizedUnsubscribeType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol SynchronizedUnsubscribeType: AnyObject {
10 | associatedtype DisposeKey
11 |
12 | func synchronizedUnsubscribe(_ disposeKey: DisposeKey)
13 | }
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/ConnectableObservableType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ConnectableObservableType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /**
10 | Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence.
11 | */
12 | public protocol ConnectableObservableType : ObservableType {
13 | /**
14 | Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established.
15 |
16 | - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence.
17 | */
18 | func connect() -> Disposable
19 | }
20 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Disposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Disposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/8/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents a disposable resource.
10 | public protocol Disposable {
11 | /// Dispose resource.
12 | func dispose()
13 | }
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Disposables/Disposables.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Disposables.swift
3 | // RxSwift
4 | //
5 | // Created by Mohsen Ramezanpoor on 01/08/2016.
6 | // Copyright © 2016 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// A collection of utility methods for common disposable operations.
10 | public struct Disposables {
11 | private init() {}
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DisposeBase.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 4/4/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Base class for all disposables.
10 | public class DisposeBase {
11 | init() {
12 | #if TRACE_RESOURCES
13 | _ = Resources.incrementTotal()
14 | #endif
15 | }
16 |
17 | deinit {
18 | #if TRACE_RESOURCES
19 | _ = Resources.decrementTotal()
20 | #endif
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NopDisposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/15/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents a disposable that does nothing on disposal.
10 | ///
11 | /// Nop = No Operation
12 | private struct NopDisposable : Disposable {
13 |
14 | fileprivate static let noOp: Disposable = NopDisposable()
15 |
16 | private init() {
17 |
18 | }
19 |
20 | /// Does nothing.
21 | public func dispose() {
22 | }
23 | }
24 |
25 | extension Disposables {
26 | /**
27 | Creates a disposable that does nothing on disposal.
28 | */
29 | static public func create() -> Disposable { NopDisposable.noOp }
30 | }
31 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SubscriptionDisposable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 10/25/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | struct SubscriptionDisposable : Disposable {
10 | private let key: T.DisposeKey
11 | private weak var owner: T?
12 |
13 | init(owner: T, key: T.DisposeKey) {
14 | self.owner = owner
15 | self.key = key
16 | }
17 |
18 | func dispose() {
19 | self.owner?.synchronizedUnsubscribe(self.key)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Observable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Observable.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/8/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// A type-erased `ObservableType`.
10 | ///
11 | /// It represents a push style sequence.
12 | public class Observable : ObservableType {
13 | init() {
14 | #if TRACE_RESOURCES
15 | _ = Resources.incrementTotal()
16 | #endif
17 | }
18 |
19 | public func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element {
20 | rxAbstractMethod()
21 | }
22 |
23 | public func asObservable() -> Observable { self }
24 |
25 | deinit {
26 | #if TRACE_RESOURCES
27 | _ = Resources.decrementTotal()
28 | #endif
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ObservableConvertibleType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 9/17/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Type that can be converted to observable sequence (`Observable`).
10 | public protocol ObservableConvertibleType {
11 | /// Type of elements in sequence.
12 | associatedtype Element
13 |
14 | /// Converts `self` to `Observable` sequence.
15 | ///
16 | /// - returns: Observable sequence that represents `self`.
17 | func asObservable() -> Observable
18 | }
19 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Observables/Empty.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Empty.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 8/30/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | extension ObservableType {
10 | /**
11 | Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message.
12 |
13 | - seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html)
14 |
15 | - returns: An observable sequence with no elements.
16 | */
17 | public static func empty() -> Observable {
18 | EmptyProducer()
19 | }
20 | }
21 |
22 | final private class EmptyProducer: Producer {
23 | override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element {
24 | observer.on(.completed)
25 | return Disposables.create()
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Observables/Never.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Never.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 8/30/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | extension ObservableType {
10 |
11 | /**
12 | Returns a non-terminating observable sequence, which can be used to denote an infinite duration.
13 |
14 | - seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html)
15 |
16 | - returns: An observable sequence whose observers will never get called.
17 | */
18 | public static func never() -> Observable {
19 | NeverProducer()
20 | }
21 | }
22 |
23 | final private class NeverProducer: Producer {
24 | override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element {
25 | Disposables.create()
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AnonymousObserver.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/8/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | final class AnonymousObserver: ObserverBase {
10 | typealias EventHandler = (Event) -> Void
11 |
12 | private let eventHandler : EventHandler
13 |
14 | init(_ eventHandler: @escaping EventHandler) {
15 | #if TRACE_RESOURCES
16 | _ = Resources.incrementTotal()
17 | #endif
18 | self.eventHandler = eventHandler
19 | }
20 |
21 | override func onCore(_ event: Event) {
22 | self.eventHandler(event)
23 | }
24 |
25 | #if TRACE_RESOURCES
26 | deinit {
27 | _ = Resources.decrementTotal()
28 | }
29 | #endif
30 | }
31 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ObserverBase.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 2/15/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | class ObserverBase : Disposable, ObserverType {
10 | private let isStopped = AtomicInt(0)
11 |
12 | func on(_ event: Event) {
13 | switch event {
14 | case .next:
15 | if load(self.isStopped) == 0 {
16 | self.onCore(event)
17 | }
18 | case .error, .completed:
19 | if fetchOr(self.isStopped, 1) == 0 {
20 | self.onCore(event)
21 | }
22 | }
23 | }
24 |
25 | func onCore(_ event: Event) {
26 | rxAbstractMethod()
27 | }
28 |
29 | func dispose() {
30 | fetchOr(self.isStopped, 1)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HistoricalScheduler.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 12/27/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time.
12 | public class HistoricalScheduler : VirtualTimeScheduler {
13 |
14 | /**
15 | Creates a new historical scheduler with initial clock value.
16 |
17 | - parameter initialClock: Initial value for virtual clock.
18 | */
19 | public init(initialClock: RxTime = Date(timeIntervalSince1970: 0)) {
20 | super.init(initialClock: initialClock, converter: HistoricalSchedulerTimeConverter())
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InvocableScheduledItem.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | struct InvocableScheduledItem : InvocableType {
10 |
11 | let invocable: I
12 | let state: I.Value
13 |
14 | init(invocable: I, state: I.Value) {
15 | self.invocable = invocable
16 | self.state = state
17 | }
18 |
19 | func invoke() {
20 | self.invocable.invoke(self.state)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InvocableType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol InvocableType {
10 | func invoke()
11 | }
12 |
13 | protocol InvocableWithValueType {
14 | associatedtype Value
15 |
16 | func invoke(_ value: Value)
17 | }
18 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScheduledItem.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 9/2/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | struct ScheduledItem
10 | : ScheduledItemType
11 | , InvocableType {
12 | typealias Action = (T) -> Disposable
13 |
14 | private let action: Action
15 | private let state: T
16 |
17 | private let disposable = SingleAssignmentDisposable()
18 |
19 | var isDisposed: Bool {
20 | self.disposable.isDisposed
21 | }
22 |
23 | init(action: @escaping Action, state: T) {
24 | self.action = action
25 | self.state = state
26 | }
27 |
28 | func invoke() {
29 | self.disposable.setDisposable(self.action(self.state))
30 | }
31 |
32 | func dispose() {
33 | self.disposable.dispose()
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ScheduledItemType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 11/7/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | protocol ScheduledItemType
10 | : Cancelable
11 | , InvocableType {
12 | func invoke()
13 | }
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SubjectType.swift
3 | // RxSwift
4 | //
5 | // Created by Krunoslav Zaher on 3/1/15.
6 | // Copyright © 2015 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | /// Represents an object that is both an observable sequence as well as an observer.
10 | public protocol SubjectType : ObservableType {
11 | /// The type of the observer that represents this subject.
12 | ///
13 | /// Usually this type is type of subject itself, but it doesn't have to be.
14 | associatedtype Observer: ObserverType
15 |
16 | /// Returns observer interface for subject.
17 | ///
18 | /// - returns: Observer interface for subject.
19 | func asObserver() -> Observer
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftSupport.swift
3 | // RxSwift
4 | //
5 | // Created by Volodymyr Gorbenko on 3/6/17.
6 | // Copyright © 2017 Krunoslav Zaher. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | typealias IntMax = Int64
12 | public typealias RxAbstractInteger = FixedWidthInteger
13 |
14 | extension SignedInteger {
15 | func toIntMax() -> IntMax {
16 | IntMax(self)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ExCoordinator : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ExCoordinator
5 | @end
6 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-frameworks-Debug-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-frameworks.sh
2 | ${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework
3 | ${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework
4 | ${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework
5 | ${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework
6 | ${BUILT_PRODUCTS_DIR}/Then/Then.framework
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-frameworks-Debug-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework
3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework
4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework
5 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Then.framework
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-frameworks-Release-input-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${PODS_ROOT}/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-frameworks.sh
2 | ${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework
3 | ${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework
4 | ${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework
5 | ${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework
6 | ${BUILT_PRODUCTS_DIR}/Then/Then.framework
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-frameworks-Release-output-files.xcfilelist:
--------------------------------------------------------------------------------
1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework
2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework
3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework
4 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework
5 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Then.framework
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_ExCoordinatorVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ExCoordinatorVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Pods-ExCoordinator/Pods-ExCoordinator.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ExCoordinator {
2 | umbrella header "Pods-ExCoordinator-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxCocoa/RxCocoa-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 6.5.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxCocoa/RxCocoa-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_RxCocoa : NSObject
3 | @end
4 | @implementation PodsDummy_RxCocoa
5 | @end
6 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxCocoa/RxCocoa-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxCocoa/RxCocoa-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "RxCocoaRuntime.h"
14 | #import "_RX.h"
15 | #import "_RXDelegateProxy.h"
16 | #import "_RXKVOObserver.h"
17 | #import "_RXObjCRuntime.h"
18 | #import "RxCocoa.h"
19 |
20 | FOUNDATION_EXPORT double RxCocoaVersionNumber;
21 | FOUNDATION_EXPORT const unsigned char RxCocoaVersionString[];
22 |
23 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxCocoa/RxCocoa.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
6 | OTHER_LDFLAGS = $(inherited) -framework "RxRelay" -framework "RxSwift"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxCocoa
12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
14 | SKIP_INSTALL = YES
15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
16 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxCocoa/RxCocoa.modulemap:
--------------------------------------------------------------------------------
1 | framework module RxCocoa {
2 | umbrella header "RxCocoa-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxCocoa/RxCocoa.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
6 | OTHER_LDFLAGS = $(inherited) -framework "RxRelay" -framework "RxSwift"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxCocoa
12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
14 | SKIP_INSTALL = YES
15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
16 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxRelay/RxRelay-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 6.5.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxRelay/RxRelay-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_RxRelay : NSObject
3 | @end
4 | @implementation PodsDummy_RxRelay
5 | @end
6 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxRelay/RxRelay-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxRelay/RxRelay-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double RxRelayVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char RxRelayVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxRelay/RxRelay.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxRelay
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
6 | OTHER_LDFLAGS = $(inherited) -framework "RxSwift"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxRelay
12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
14 | SKIP_INSTALL = YES
15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
16 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxRelay/RxRelay.modulemap:
--------------------------------------------------------------------------------
1 | framework module RxRelay {
2 | umbrella header "RxRelay-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxRelay/RxRelay.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxRelay
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
6 | OTHER_LDFLAGS = $(inherited) -framework "RxSwift"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxRelay
12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
13 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
14 | SKIP_INSTALL = YES
15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
16 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxSwift/RxSwift-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 6.5.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxSwift/RxSwift-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_RxSwift : NSObject
3 | @end
4 | @implementation PodsDummy_RxSwift
5 | @end
6 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double RxSwiftVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char RxSwiftVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxSwift/RxSwift.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxSwift
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxSwift
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxSwift/RxSwift.modulemap:
--------------------------------------------------------------------------------
1 | framework module RxSwift {
2 | umbrella header "RxSwift-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/RxSwift/RxSwift.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxSwift
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/RxSwift
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/SnapKit/SnapKit-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 5.6.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/SnapKit/SnapKit-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SnapKit : NSObject
3 | @end
4 | @implementation PodsDummy_SnapKit
5 | @end
6 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/SnapKit/SnapKit-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/SnapKit/SnapKit-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double SnapKitVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char SnapKitVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/SnapKit/SnapKit.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/SnapKit/SnapKit.modulemap:
--------------------------------------------------------------------------------
1 | framework module SnapKit {
2 | umbrella header "SnapKit-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/SnapKit/SnapKit.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SnapKit
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Then/Then-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 3.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Then/Then-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Then : NSObject
3 | @end
4 | @implementation PodsDummy_Then
5 | @end
6 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Then/Then-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Then/Then-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double ThenVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char ThenVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Then/Then.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Then
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Then
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Then/Then.modulemap:
--------------------------------------------------------------------------------
1 | framework module Then {
2 | umbrella header "Then-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/CoordinatorPattern/ExCoordinator/Pods/Target Support Files/Then/Then.release.xcconfig:
--------------------------------------------------------------------------------
1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Then
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Then
10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
12 | SKIP_INSTALL = YES
13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
14 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "pins" : [
3 | {
4 | "identity" : "rxswift",
5 | "kind" : "remoteSourceControl",
6 | "location" : "https://github.com/ReactiveX/RxSwift",
7 | "state" : {
8 | "branch" : "main",
9 | "revision" : "91a36920b1ec069004fef9dc41b7c5dbcaa5fffe"
10 | }
11 | },
12 | {
13 | "identity" : "snapkit",
14 | "kind" : "remoteSourceControl",
15 | "location" : "https://github.com/SnapKit/SnapKit",
16 | "state" : {
17 | "branch" : "develop",
18 | "revision" : "58320fe80522414bf3a7e24c88123581dc586752"
19 | }
20 | },
21 | {
22 | "identity" : "then",
23 | "kind" : "remoteSourceControl",
24 | "location" : "https://github.com/devxoul/Then.git",
25 | "state" : {
26 | "branch" : "master",
27 | "revision" : "d41ef523faef0f911369f79c0b96815d9dbb6d7a"
28 | }
29 | }
30 | ],
31 | "version" : 2
32 | }
33 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/ButtonProduct.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ButtonProduct.swift
3 | // GoF-AbstractFactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | // Product를 구현하고 안에 들어가는 함수 구현하는 곳
11 | final class IPhoneButton: CButton {
12 | func touchUP() {
13 | print("iPhoneButton")
14 | }
15 | }
16 |
17 | final class IPadButton: CButton {
18 | func touchUP() {
19 | print("iPadButton")
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/Factory.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Factory.swift
3 | // GoF-AbstractFactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | // 추상화된 Factory
11 | protocol AbstractFactory {
12 | func customButton() -> CButton
13 | func customLabel() -> CLable
14 | }
15 |
16 | final class iPadUIFactoy: AbstractFactory {
17 | func customButton() -> CButton {
18 | return IPadButton()
19 | }
20 |
21 | func customLabel() -> CLable {
22 | return IPadLabel()
23 | }
24 | }
25 |
26 | final class iPhoneUIFactory: AbstractFactory {
27 | func customButton() -> CButton {
28 | return IPhoneButton()
29 | }
30 |
31 | func customLabel() -> CLable {
32 | return IPhoneLabel()
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/LabelProduct.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LabelProduct.swift
3 | // GoF-AbstractFactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | //출력되는 라벨설정
11 | final class IPhoneLabel: CLable {
12 | var title: String = "iPhoneLabel"
13 | }
14 |
15 | final class IPadLabel: CLable {
16 | var title: String = "iPadLabel"
17 | }
18 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/Product.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Product.swift
3 | // GoF-AbstractFactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | // 추상화된 Product
11 | protocol CButton {
12 | func touchUP()
13 | }
14 |
15 | protocol CLable {
16 | var title: String { get }
17 | }
18 |
--------------------------------------------------------------------------------
/GoF-AbstractFactoryMethodPattern/GoF-AbstractFactoryMethodPattern/UIContent.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIContent.swift
3 | // GoF-AbstractFactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | //Factory를 통해 가지고 오는 UIContent 설정
11 | class UIContent {
12 | var abstractFactory: AbstractFactory
13 | var label: CLable?
14 | var button: CButton?
15 |
16 | //Default 값은 iPhone
17 | init(a: AbstractFactory = iPhoneUIFactory()) {
18 | self.abstractFactory = a
19 | setup()
20 | }
21 |
22 | func setup() {
23 | label = abstractFactory.customLabel()
24 | button = abstractFactory.customButton()
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-BridgePattern/GoF-BridgePattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-BridgePattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/AdvancedRemoteControl.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AdvancedRemoteControl.swift
3 | // GoF-BridgePattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | // AdvancedRemoteControl -> RemoteControl -> Device <- TV, Radio
9 | class AdvancedRemoteControl: RemoteControl {
10 | func mute() {
11 | device.setVolume(to: 0)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/Device.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Device.swift
3 | // GoF-BridgePattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import Foundation
9 |
10 | // RemteControl로 인해서 추상화 당함
11 | // Abstraction의 기능을 구현하는 인터페이스
12 | // Device를 상속받은 TV와 Radio 구체 타입이 존재함
13 | protocol Device {
14 | func turnOn()
15 | func setVolume(to: Int)
16 | }
17 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/DevicesVO.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Devices.swift
3 | // GoF-BridgePattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import Foundation
9 |
10 | struct TV: Device {
11 | func turnOn() {
12 | print("티비 켜짐")
13 | }
14 | func setVolume(to percent: Int) {
15 | print("TV \(percent)")
16 | }
17 | }
18 |
19 | struct Radio: Device {
20 | func turnOn() {
21 | print("라디오 켜짐")
22 | }
23 | func setVolume(to percent: Int) {
24 | print("라디오 \(percent)")
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/RemoteControl.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RemoteControl.swift
3 | // GoF-BridgePattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import Foundation
9 |
10 | // client가 사용하는 최상위 타입
11 | // Implementation을 참조하고 위임
12 | // RemoteControl을 상속한 AdvancedRemoteControl mute()를 가짐
13 | class RemoteControl {
14 | var device: Device
15 | init(device: Device) {
16 | self.device = device
17 | }
18 | func togglePower() {
19 | device.turnOn()
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/GoF-BridgePattern/GoF-BridgePattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-BridgePattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 | }
16 |
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-BuilderPattern/GoF-BuilderPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-BuilderPattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-BuilderPattern/GoF-BuilderPattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-BuilderPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 | }
16 |
17 | let iphoen12 = iPhoneBuilder(builder: {
18 | $0.setPlus(false).setMemory(200).setColor("red").setSpecification("128GB").build()
19 | })
20 |
21 | let custemiPhone = iPhoneBuilder(builder: {
22 | $0.build()
23 | })
24 |
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-CompositPattern/GoF-CompositPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-CompositPattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-CompositPattern/GoF-CompositPattern/iceCreamComponent.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iceCreamComponent.swift
3 | // GoF-CompositPattern
4 | //
5 | // Created by 박준하 on 2023/04/07.
6 | //
7 |
8 | import UIKit
9 |
10 | protocol iceCreamComponent {
11 | var name: String { get }
12 | var price: Int { get }
13 | func getInfo() -> String
14 | }
15 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-DecoratorPattern/GoF-DecoratorPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-DecoratorPattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/Clothes/Clothes.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Clothes.swift
3 | // GoF-DecoratorPattern
4 | //
5 | // Created by 박준하 on 2023/03/01.
6 | //
7 |
8 | import Foundation
9 |
10 | // Concrete Component
11 | class Clothes: GetDressedComponent {
12 | func notify(message: String) {
13 | print("\(message) 입기")
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/ConcreteDecorator/GetDressedDecorator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GetDressedDecorator.swift
3 | // GoF-DecoratorPattern
4 | //
5 | // Created by 박준하 on 2023/03/01.
6 | //
7 |
8 | import Foundation
9 |
10 | // Decorator
11 | //GetDressedDecorator -> Clothes
12 | protocol GetDressedDecorator: GetDressedComponent {
13 | var wrappee: GetDressedComponent { get set }
14 | init(notifier: GetDressedComponent)
15 | }
16 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/Decorator/PattingDecorator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PattingDecorator.swift
3 | // GoF-DecoratorPattern
4 | //
5 | // Created by 박준하 on 2023/03/01.
6 | //
7 |
8 | import Foundation
9 |
10 | // Concrete Decorator
11 | // PattingDecorator -> GetDressedDecorator -> Clothes
12 | class PattingDecorator: GetDressedDecorator {
13 | var wrappee: GetDressedComponent
14 |
15 | required init(notifier: GetDressedComponent) {
16 | self.wrappee = notifier
17 | }
18 |
19 | func notify(message: String) {
20 | print("\(message) 패딩 입기 완료")
21 | wrappee.notify(message: message)
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/Decorator/SweaterDecorator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SweaterDecorator.swift
3 | // GoF-DecoratorPattern
4 | //
5 | // Created by 박준하 on 2023/03/01.
6 | //
7 |
8 | import Foundation
9 |
10 | // Concrete Decorator
11 | // SweaterDecorator -> GetDressedDecorator -> Clothes
12 | class SweaterDecorator: GetDressedDecorator {
13 | var wrappee: GetDressedComponent
14 |
15 | required init(notifier: GetDressedComponent) {
16 | self.wrappee = notifier
17 | }
18 |
19 | func notify(message: String) {
20 | print("\(message) 스웨터 입기 완료")
21 | self.wrappee.notify(message: message)
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/GetDressedComponent/GetDressedComponent.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GetDressedComponent.swift
3 | // GoF-DecoratorPattern
4 | //
5 | // Created by 박준하 on 2023/03/01.
6 | //
7 |
8 | import Foundation
9 |
10 | // Component
11 | // GetDressedComponent -> Decorator
12 | //
13 | protocol GetDressedComponent {
14 | func notify(message: String)
15 | }
16 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-DecoratorPattern/GoF-DecoratorPattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-DecoratorPattern
4 | //
5 | // Created by 박준하 on 2023/03/01.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 |
16 | let c = Clothes()
17 | let s = SweaterDecorator(notifier: c)
18 | let p = PattingDecorator(notifier: c)
19 | s.notify(message: "아디다스")
20 | p.notify(message: "나이키")
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-FacadePattern/GoF-FacadePattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-FacadePattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern/Subsystems.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Subsystems.swift
3 | // GoF-FacadePattern
4 | //
5 | // Created by 박준하 on 2023/03/23.
6 | //
7 |
8 | import Foundation
9 |
10 | //1
11 | class Subsystem1 {
12 |
13 | func operation1() -> String {
14 | return "subSystem1: 준비 \n"
15 | }
16 | func operationN() -> String {
17 | return "subSystem1: 시작 \n"
18 | }
19 | }
20 |
21 | //2
22 | class Subsystem2 {
23 | func operation2() -> String {
24 | return "subSystem2: 준비 \n"
25 | }
26 | func operationZ() -> String {
27 | return "subSystem2: 시작 \n"
28 | }
29 | }
30 |
31 | class Subsystem3 {
32 | func operation3() -> String {
33 | return "suvSystem3: 준비 \n"
34 | }
35 |
36 | func operationX() -> String {
37 | return "subSystem2: 시작 \n"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/GoF-FacadePattern/GoF-FacadePattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-FacadePattern
4 | //
5 | // Created by 박준하 on 2023/03/23.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 |
16 | let facade = Facade(subsystem1: Subsystem1(), subsystem2: Subsystem2(), subsystem3: Subsystem3())
17 | print(facade.operation())
18 | }
19 |
20 |
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-FactoryMethodPattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/AppleFactory.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppleFactory.swift
3 | // GoF-FactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | protocol AppleFactory {
11 | func createElectronics() -> Product
12 | }
13 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/Client.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Client.swift
3 | // GoF-FactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | class Client {
11 | func order(f: AppleFactory) {
12 | let ep = f.createElectronics()
13 | ep.produceProduct()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/MacFactory.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MacFactory.swift
3 | // GoF-FactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | class Mac: Product {
11 | func produceProduct() {
12 | print("mac 기능이 추가되었습니다.")
13 | }
14 | }
15 |
16 | class MacFactory: AppleFactory {
17 | func createElectronics() -> Product {
18 | return Mac()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/Product.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Product.swift
3 | // GoF-FactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | protocol Product {
11 | func produceProduct()
12 | }
13 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-FactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | var client = Client()
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | client.order(f: iPhoneFactory())
18 | client.order(f: MacFactory())
19 | }
20 |
21 |
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/GoF-FactoryMethodPattern/GoF-FactoryMethodPattern/iPhoneFactory.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iPhoneFactory.swift
3 | // GoF-FactoryMethodPattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | class iPhone: Product {
11 | func produceProduct() {
12 | print("아이폰 기능이 추가되었습니다.")
13 | }
14 | }
15 |
16 | class iPhoneFactory: AppleFactory {
17 | func createElectronics() -> Product {
18 | return iPhone()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-FlyweightPattern/GoF-FlyweightPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-FlyweightPattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/Client.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import UIKit
3 |
4 | class Client {
5 | private var flyweightFactory = FlyweightFactory()
6 |
7 | func operation(text: String) {
8 | for char in text {
9 | let flyweight = flyweightFactory.getFlyweight(key: String(char))
10 | print(flyweight.value)
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/Flyweight.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Flyweight.swift
3 | // GoF-FlyweightPattern
4 | //
5 | // Created by 박준하 on 2023/04/05.
6 | //
7 |
8 | import Foundation
9 |
10 | protocol Flyweight {
11 | var value: String { get }
12 | }
13 |
14 | class ConcreteFlyweight: Flyweight {
15 | var value: String
16 |
17 | init(value: String) {
18 | self.value = value
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/FlyweightFactory.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import UIKit
3 |
4 | class FlyweightFactory {
5 | private var flyweights: [String: Flyweight] = [:]
6 |
7 | func getFlyweight(key: String) -> Flyweight {
8 | if let flyweight = flyweights[key] {
9 | return flyweight
10 | } else {
11 | let newFlyweight = ConcreteFlyweight(value: key)
12 | flyweights[key] = newFlyweight
13 | return newFlyweight
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-FlyweightPattern
4 | //
5 | // Created by 박준하 on 2023/04/05.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | let client = Client()
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 | // Do any additional setup after loading the view.
17 |
18 | view.backgroundColor = .white
19 |
20 | client.operation(text: "Hello, World!")
21 | }
22 |
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/GoF-FlyweightPattern/GoF-FlyweightPatternUITests/GoF_FlyweightPatternUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GoF_FlyweightPatternUITestsLaunchTests.swift
3 | // GoF-FlyweightPatternUITests
4 | //
5 | // Created by 박준하 on 2023/04/05.
6 | //
7 |
8 | import XCTest
9 |
10 | final class GoF_FlyweightPatternUITestsLaunchTests: XCTestCase {
11 |
12 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
13 | true
14 | }
15 |
16 | override func setUpWithError() throws {
17 | continueAfterFailure = false
18 | }
19 |
20 | func testLaunch() throws {
21 | let app = XCUIApplication()
22 | app.launch()
23 |
24 | // Insert steps here to perform after app launch but before taking a screenshot,
25 | // such as logging into a test account or navigating somewhere in the app
26 |
27 | let attachment = XCTAttachment(screenshot: app.screenshot())
28 | attachment.name = "Launch Screen"
29 | attachment.lifetime = .keepAlways
30 | add(attachment)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-PrototypePattern/GoF-PrototypePattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-PrototypePattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern/Apple.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Apple.swift
3 | // GoF-PrototypePattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import UIKit
9 |
10 | class Apple: Prototype {
11 | var user: Int
12 |
13 | init(user: Int) {
14 | self.user = user
15 | }
16 |
17 | func clone() -> Self {
18 | return (Apple(user: self.user) as? Self)!
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern/Prototype.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Prototype.swift
3 | // GoF-PrototypePattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import Foundation
9 |
10 | protocol Prototype: AnyObject {
11 | func clone() -> Self
12 | }
13 |
--------------------------------------------------------------------------------
/GoF-PrototypePattern/GoF-PrototypePattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-PrototypePattern
4 | //
5 | // Created by 박준하 on 2023/02/27.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 |
16 | let apple1 = Apple(user: 10)
17 | apple1.user = (apple1.user + 100)
18 | print(apple1.user) // 110
19 |
20 | let apple2 = apple1.clone()
21 | apple2.user = (apple2.user + 90)
22 | print(apple2.user) // 슉! 자가복제!
23 | }
24 |
25 |
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-ProxyPattern/GoF-ProxyPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-ProxyPattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-ProxyPattern/GoF-ProxyPatternUITests/GoF_ProxyPatternUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // GoF_ProxyPatternUITestsLaunchTests.swift
3 | // GoF-ProxyPatternUITests
4 | //
5 | // Created by 박준하 on 2023/04/06.
6 | //
7 |
8 | import XCTest
9 |
10 | final class GoF_ProxyPatternUITestsLaunchTests: XCTestCase {
11 |
12 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
13 | true
14 | }
15 |
16 | override func setUpWithError() throws {
17 | continueAfterFailure = false
18 | }
19 |
20 | func testLaunch() throws {
21 | let app = XCUIApplication()
22 | app.launch()
23 |
24 | // Insert steps here to perform after app launch but before taking a screenshot,
25 | // such as logging into a test account or navigating somewhere in the app
26 |
27 | let attachment = XCTAttachment(screenshot: app.screenshot())
28 | attachment.name = "Launch Screen"
29 | attachment.lifetime = .keepAlways
30 | add(attachment)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/GoF-SingletonPattern/GoF-SingletonPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | GoF-SingletonPattern.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/1VC.swift:
--------------------------------------------------------------------------------
1 | //
2 | // 1ViewController.swift
3 | // GoF-SingletonPattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController1: UIViewController {
11 |
12 | let u = UserInFo.shared
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | u.name = "박준하"
18 | print(u.name)
19 | print(u.password)
20 | print(u.age)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/2VC.swift:
--------------------------------------------------------------------------------
1 | //
2 | // 2ViewController.swift
3 | // GoF-SingletonPattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController2: UIViewController {
11 |
12 | let u = UserInFo.shared
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | u.password = "12345678"
18 | print(u.name)
19 | print(u.password)
20 | print(u.age)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/3VC.swift:
--------------------------------------------------------------------------------
1 | //
2 | // 3ViewController.swift
3 | // GoF-SingletonPattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController3: UIViewController {
11 |
12 | let u = UserInFo.shared
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | u.age = 123
18 | print(u.name)
19 | print(u.password)
20 | print(u.age)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/UserInFo.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UserInFo.swift
3 | // GoF-SingletonPattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import Foundation
9 |
10 | class UserInFo {
11 | //static let 프로퍼티가 추가
12 | // let 으로 선언되었기 때문에 인스턴스 자체를 변경 할수도 없습니다.
13 | static let shared = UserInFo()
14 |
15 | var name: String?
16 | var password: String?
17 | var age: Int?
18 |
19 | // Instance를 또 생생하는 것을 막기 위해 private 추가
20 | private init() { }
21 | }
22 |
--------------------------------------------------------------------------------
/GoF-SingletonPattern/GoF-SingletonPattern/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GoF-SingletonPattern
4 | //
5 | // Created by 박준하 on 2023/02/28.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 | }
16 |
17 |
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | return true
15 | }
16 |
17 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
18 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
19 | }
20 |
21 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
15 | guard let windowScene = (scene as? UIWindowScene) else { return }
16 |
17 | window = UIWindow(windowScene: windowScene)
18 | window?.backgroundColor = .systemBackground
19 | window?.rootViewController = TabBarViewController()
20 | window?.makeKeyAndVisible()
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Scenes/Icon.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Icon.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | enum Icon {
11 | case message
12 | case share
13 | case like
14 | case write
15 | case swift
16 |
17 | var image: UIImage? {
18 | let systemName: String
19 |
20 | switch self {
21 | case .message: systemName = "message"
22 | case .share: systemName = "square.and.arrow.up"
23 | case .like: systemName = "heart"
24 | case .write: systemName = "square.and.pencil"
25 | case .swift: systemName = "swiftdata"
26 | }
27 |
28 | return UIImage(systemName: systemName)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Scenes/TabBar/TabBarViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarViewController.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | final class TabBarViewController: UITabBarController {
11 | override func viewDidLoad() {
12 | super.viewDidLoad()
13 |
14 | let tabBarViewControllers: [UIViewController] = TabBarItem.allCases
15 | .map { tabCase in
16 | let viewController = tabCase.viewController
17 | viewController.tabBarItem = UITabBarItem(
18 | title: tabCase.title,
19 | image: tabCase.icon.default,
20 | selectedImage: tabCase.icon.selected?.withTintColor(.systemIndigo)
21 | )
22 |
23 | return viewController
24 | }
25 |
26 | self.viewControllers = tabBarViewControllers
27 | self.tabBar.tintColor = .systemIndigo
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Scenes/Tweet/ThreadPresenter.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ThreadPresenter.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import Foundation
9 |
10 | protocol ThreadProtocol: AnyObject {
11 | func setViews(thread: Thread)
12 | func setupViews()
13 | func likeButtonTap()
14 | }
15 |
16 | final class ThreadPresenter {
17 | private weak var viewController: ThreadProtocol?
18 | private let thread: Thread
19 |
20 | init(
21 | viewController: ThreadProtocol,
22 | thread: Thread
23 | ) {
24 | self.viewController = viewController
25 | self.thread = thread
26 | }
27 |
28 | func viewDidLoad() {
29 | viewController?.setViews(thread: thread)
30 | viewController?.setupViews()
31 | }
32 |
33 | func likeButtonTap() {
34 | print("하트버튼이 클릭됨")
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/Thread.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Thread.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import Foundation
9 |
10 | struct Thread: Codable {
11 | let user: User
12 | let contents: String
13 | }
14 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVP/User.swift:
--------------------------------------------------------------------------------
1 | //
2 | // User.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import Foundation
9 |
10 | struct User: Codable {
11 | var name: String
12 | var account: String
13 |
14 | static var shared = User(name: "Junha", account: "ioio_dev")
15 | }
16 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVPTests/JNBoard_MVPTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JNBoard_MVPTests.swift
3 | // JNBoard_MVPTests
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import XCTest
9 | @testable import JNBoard_MVP
10 |
11 | final class JNBoard_MVPTests: XCTestCase { }
12 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP/JNBoard_MVPUITests/JNBoard_MVPUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JNBoard_MVPUITestsLaunchTests.swift
3 | // JNBoard_MVPUITests
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import XCTest
9 |
10 | final class JNBoard_MVPUITestsLaunchTests: XCTestCase {
11 |
12 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
13 | true
14 | }
15 |
16 | override func setUpWithError() throws {
17 | continueAfterFailure = false
18 | }
19 |
20 | func testLaunch() throws {
21 | let app = XCUIApplication()
22 | app.launch()
23 |
24 | // Insert steps here to perform after app launch but before taking a screenshot,
25 | // such as logging into a test account or navigating somewhere in the app
26 |
27 | let attachment = XCTAttachment(screenshot: app.screenshot())
28 | attachment.name = "Launch Screen"
29 | attachment.lifetime = .keepAlways
30 | add(attachment)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 | return true
15 | }
16 |
17 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
18 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
19 | }
20 |
21 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
15 | guard let windowScene = (scene as? UIWindowScene) else { return }
16 |
17 | window = UIWindow(windowScene: windowScene)
18 | window?.backgroundColor = .systemBackground
19 | window?.rootViewController = TabBarViewController()
20 | window?.makeKeyAndVisible()
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Scenes/Icon.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Icon.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | enum Icon {
11 | case message
12 | case share
13 | case like
14 | case write
15 | case swift
16 |
17 | var image: UIImage? {
18 | let systemName: String
19 |
20 | switch self {
21 | case .message: systemName = "message"
22 | case .share: systemName = "square.and.arrow.up"
23 | case .like: systemName = "heart"
24 | case .write: systemName = "square.and.pencil"
25 | case .swift: systemName = "swiftdata"
26 | }
27 |
28 | return UIImage(systemName: systemName)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Scenes/TabBar/TabBarViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarViewController.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import UIKit
9 |
10 | final class TabBarViewController: UITabBarController {
11 | override func viewDidLoad() {
12 | super.viewDidLoad()
13 |
14 | let tabBarViewControllers: [UIViewController] = TabBarItem.allCases
15 | .map { tabCase in
16 | let viewController = tabCase.viewController
17 | viewController.tabBarItem = UITabBarItem(
18 | title: tabCase.title,
19 | image: tabCase.icon.default,
20 | selectedImage: tabCase.icon.selected?.withTintColor(.systemIndigo)
21 | )
22 |
23 | return viewController
24 | }
25 |
26 | self.viewControllers = tabBarViewControllers
27 | self.tabBar.tintColor = .systemIndigo
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Scenes/Tweet/ThreadPresenter.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ThreadPresenter.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import Foundation
9 |
10 | protocol ThreadProtocol: AnyObject {
11 | func setViews(thread: Thread)
12 | func setupViews()
13 | func likeButtonTap()
14 | }
15 |
16 | final class ThreadPresenter {
17 | private weak var viewController: ThreadProtocol?
18 | private let thread: Thread
19 |
20 | init(
21 | viewController: ThreadProtocol,
22 | thread: Thread
23 | ) {
24 | self.viewController = viewController
25 | self.thread = thread
26 | }
27 |
28 | func viewDidLoad() {
29 | viewController?.setViews(thread: thread)
30 | viewController?.setupViews()
31 | }
32 |
33 | func likeButtonTap() {
34 | print("하트버튼이 클릭됨")
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/Thread.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Thread.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import Foundation
9 |
10 | struct Thread: Codable {
11 | let user: User
12 | let contents: String
13 | }
14 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST/User.swift:
--------------------------------------------------------------------------------
1 | //
2 | // User.swift
3 | // JNBoard_MVP
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import Foundation
9 |
10 | struct User: Codable {
11 | var name: String
12 | var account: String
13 |
14 | static var shared = User(name: "Junha", account: "ioio_dev")
15 | }
16 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST_Tests/JNBoard_MVPTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JNBoard_MVPTests.swift
3 | // JNBoard_MVPTests
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import XCTest
9 | @testable import JNBoard_MVP_TEST
10 |
11 | final class JNBoard_MVPTests: XCTestCase { }
12 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST_Tests/Mocks/MockFeedViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MockFeedViewController.swift
3 | // JNBoard_MVP_TESTTests
4 | //
5 | // Created by 박준하 on 3/14/24.
6 | //
7 |
8 | import Foundation
9 | @testable import JNBoard_MVP_TEST
10 |
11 | final class MockFeedViewController: FeedProtocol {
12 | var isCalledSetupView = false
13 | var isCalledReloadTableView = false
14 | var isCalledMoveToTheardViewController = false
15 | var isCalledMoveToWriteViewController = false
16 |
17 | func setupView() {
18 | isCalledSetupView = true
19 | }
20 |
21 | func reloadTableView() {
22 | isCalledReloadTableView = true
23 | }
24 |
25 | func moveToThreadViewController(with thread: JNBoard_MVP_TEST.Thread) {
26 | isCalledMoveToTheardViewController = true
27 | }
28 |
29 | func moveToWriteViewController() {
30 | isCalledMoveToWriteViewController = true
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST_Tests/Mocks/MockProfileViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MockProfileViewController.swift
3 | // JNBoard_MVP_TESTTests
4 | //
5 | // Created by 박준하 on 3/14/24.
6 | //
7 |
8 | import Foundation
9 | @testable import JNBoard_MVP_TEST
10 |
11 | final class MockProfileViewController: ProfileProtocol {
12 | var isCalledSetupViews = false
13 | var isCalledSetViews = false
14 | var isCalledEndEditing = false
15 | var isCalledShowToast = false
16 |
17 | func setupViews() {
18 | isCalledSetupViews = true
19 | }
20 |
21 | func setViews(with name: String, account: String) {
22 | isCalledSetViews = true
23 | }
24 |
25 | func endEditing() {
26 | isCalledEndEditing = true
27 | }
28 |
29 | func showToast() {
30 | isCalledShowToast = true
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST_Tests/Mocks/MockTheardViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JNBoard_MVP_TESTTests
3 | //
4 | // Created by 박준하 on 3/14/24.
5 | //
6 |
7 | import Foundation
8 | @testable import JNBoard_MVP_TEST
9 |
10 | final class MockTheardViewController: ThreadProtocol {
11 |
12 | var isCalledSetViews = false
13 | var isCalledSetupViews = false
14 |
15 | func setViews(thread: JNBoard_MVP_TEST.Thread) {
16 | isCalledSetViews = true
17 | }
18 |
19 | func likeButtonTap() {
20 | print("asdf")
21 | }
22 |
23 | func setupViews() {
24 | isCalledSetupViews = true
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST_Tests/Mocks/MockUserDefaultsManager.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MockUserDefaultsManager.swift
3 | // JNBoard_MVP_TESTTests
4 | //
5 | // Created by 박준하 on 3/14/24.
6 | //
7 |
8 | import Foundation
9 | @testable import JNBoard_MVP_TEST
10 |
11 | final class MockUserDefaultsManager: UserDefaultsManagerProtcol {
12 |
13 | var theards: [JNBoard_MVP_TEST.Thread] = []
14 | var newTheard: JNBoard_MVP_TEST.Thread!
15 |
16 | var isCalledGetTheard = false
17 | var isCalledSetTheard = false
18 |
19 | func getThread() -> [JNBoard_MVP_TEST.Thread] {
20 | isCalledGetTheard = true
21 | return theards
22 | }
23 |
24 | func setThread(_ newValue: JNBoard_MVP_TEST.Thread) {
25 | isCalledSetTheard = true
26 | self.newTheard = newValue
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST_Tests/Mocks/MockWriteViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MockWriteViewController.swift
3 | // JNBoard_MVP_TESTTests
4 | //
5 | // Created by 박준하 on 3/14/24.
6 | //
7 |
8 | import Foundation
9 | @testable import JNBoard_MVP_TEST
10 |
11 | final class MockWriteViewController: WriteProtocol {
12 | var isCalledSetupViews = false
13 | var isCalledDismiss = false
14 |
15 | func setupViews() {
16 | isCalledSetupViews = true
17 | }
18 |
19 | func dismiss() {
20 | isCalledDismiss = true
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/MVP/JNBoard_MVP_TEST/JNBoard_MVP_TEST_UITests/JNBoard_MVPUITestsLaunchTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JNBoard_MVPUITestsLaunchTests.swift
3 | // JNBoard_MVPUITests
4 | //
5 | // Created by 박준하 on 3/12/24.
6 | //
7 |
8 | import XCTest
9 |
10 | final class JNBoard_MVPUITestsLaunchTests: XCTestCase {
11 |
12 | override class var runsForEachTargetApplicationUIConfiguration: Bool {
13 | true
14 | }
15 |
16 | override func setUpWithError() throws {
17 | continueAfterFailure = false
18 | }
19 |
20 | func testLaunch() throws {
21 | let app = XCUIApplication()
22 | app.launch()
23 |
24 | // Insert steps here to perform after app launch but before taking a screenshot,
25 | // such as logging into a test account or navigating somewhere in the app
26 |
27 | let attachment = XCTAttachment(screenshot: app.screenshot())
28 | attachment.name = "Launch Screen"
29 | attachment.lifetime = .keepAlways
30 | add(attachment)
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/MVVM/BasicMVVM/BasicMVVM/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MVVM/BasicMVVM/BasicMVVM/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MVVM/BasicMVVM/BasicMVVM/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/MVVM/BasicMVVM/BasicMVVM/Clothes/Model/Clothes.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | struct Clothes {
4 | enum Size {
5 | case small
6 | case medium
7 | case large
8 | }
9 |
10 | var name: String
11 | var size: Size
12 |
13 | // init(name: String, size: Size) {
14 | // self.name = name
15 | // self.size = size
16 | // }
17 | }
18 |
19 | extension Clothes {
20 | static func getData() -> Clothes {
21 | return Clothes(name: "NIKE", size: .small)
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/MVVM/BasicMVVM/BasicMVVM/Clothes/ViewModel/ClothesViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ClothesViewModel.swift
3 | // BasicMVVM
4 | //
5 | // Created by 박준하 on 10/12/23.
6 | //
7 |
8 | import UIKit
9 |
10 | class ClothesViewModel {
11 | private let clothes: Clothes
12 |
13 | init(clothes: Clothes) {
14 | self.clothes = clothes
15 | }
16 |
17 | var name: String {
18 | return self.clothes.name
19 | }
20 |
21 | private func getPrice(size: Clothes.Size) -> String {
22 | switch size {
23 | case .small:
24 | return "10만원"
25 | case .medium:
26 | return "20만원"
27 | case .large:
28 | return "30만원"
29 | }
30 | }
31 |
32 | func getProductInfo() -> String {
33 | return "상품명: \(clothes.name) 가격: \(getPrice(size: clothes.size))"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/MVVM/BasicMVVM/BasicMVVM/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/MVVM/RxSwift+MVVM/RxSwift+MVVM/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/MVVM/RxSwift+MVVM/RxSwift+MVVM/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/MVVM/RxSwift+MVVM/RxSwift+MVVM/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/MVVM/RxSwift+MVVM/RxSwift+MVVM/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/MVVM/RxSwift+MVVM/RxSwift+MVVM/LoginViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LoginViewModel.swift
3 | // RxSwift+MVVM
4 | //
5 | // Created by 박준하 on 10/16/23.
6 | //
7 |
8 | import Foundation
9 | import RxSwift
10 | import RxCocoa
11 |
12 | struct LoginViewModel: ViewModelType {
13 | struct Input {
14 | let email: Observable
15 | let password: Observable
16 | }
17 |
18 | struct Output {
19 | let isValid: Observable
20 | }
21 |
22 | func transform(input: Input) -> Output {
23 | let isValid = Observable.combineLatest(input.email, input.password)
24 | .map { email, password in
25 | return email.count > 3 && password.count > 3
26 | }
27 | .startWith(false)
28 |
29 | return Output(isValid: isValid)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/MVVM/RxSwift+MVVM/RxSwift+MVVM/ViewModelType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewModelType.swift
3 | // RxSwift+MVVM
4 | //
5 | // Created by 박준하 on 10/16/23.
6 | //
7 |
8 | protocol ViewModelType {
9 | associatedtype Input
10 | associatedtype Output
11 |
12 | func transform(input: Input) -> Output
13 | }
14 |
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/RIBs/RIBsProject/RIBsProject.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/RIBs/RIBsProject/RIBsProject/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // RIBsProject
4 | //
5 | // Created by 박준하 on 2023/08/09.
6 | //
7 |
8 | import UIKit
9 |
10 | class ViewController: UIViewController {
11 |
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 | // Do any additional setup after loading the view.
15 | }
16 |
17 |
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "pins" : [
3 | {
4 | "identity" : "swinject",
5 | "kind" : "remoteSourceControl",
6 | "location" : "https://github.com/Swinject/Swinject.git",
7 | "state" : {
8 | "revision" : "8bc503e60965298984fb58cf47b71c541449fe2a",
9 | "version" : "2.8.3"
10 | }
11 | },
12 | {
13 | "identity" : "then",
14 | "kind" : "remoteSourceControl",
15 | "location" : "https://github.com/devxoul/Then.git",
16 | "state" : {
17 | "revision" : "d41ef523faef0f911369f79c0b96815d9dbb6d7a",
18 | "version" : "3.0.0"
19 | }
20 | }
21 | ],
22 | "version" : 2
23 | }
24 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/Swinject/SwinjectTest/SwinjectTest.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Sample-iOS (Playground) 1.xcscheme
8 |
9 | isShown
10 |
11 | orderHint
12 | 2
13 |
14 | Sample-iOS (Playground) 2.xcscheme
15 |
16 | isShown
17 |
18 | orderHint
19 | 3
20 |
21 | Sample-iOS (Playground).xcscheme
22 |
23 | isShown
24 |
25 | orderHint
26 | 1
27 |
28 | SwinjectTest.xcscheme_^#shared#^_
29 |
30 | orderHint
31 | 0
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest/Animal.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Animal.swift
3 | // SwinjectTest
4 | //
5 | // Created by 박준하 on 2023/09/06.
6 | //
7 |
8 | import Foundation
9 | import UIKit
10 |
11 | protocol Animal {
12 | var name: String? { get }
13 | }
14 |
15 | class Cat: Animal {
16 | let name: String?
17 |
18 | init(name: String?) {
19 | self.name = name
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest/DIViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DIViewController.swift
3 | // SwinjectTest
4 | //
5 | // Created by 박준하 on 2023/09/06.
6 | //
7 |
8 | import UIKit
9 | import Swinject
10 |
11 | class DIViewController: UIViewController {
12 | var animal: Animal?
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | print("동물 - \(animal!.name!)")
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Swinject/SwinjectTest/SwinjectTest/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SwinjectTest
4 | //
5 | // Created by 박준하 on 2023/09/06.
6 | //
7 |
8 | import UIKit
9 |
10 | //Swinject를 사용하지 않은 평소의 코드
11 | class ViewController: UIViewController {
12 | let cat = Cat(name: "Mimi")
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 | // Do any additional setup after loading the view.
17 |
18 | print("동물 - \(cat.name!)")
19 | }
20 |
21 |
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/Swinject/Swinject란?.md:
--------------------------------------------------------------------------------
1 | # Swinject란?
2 |
3 | - 의존성 주입 프레임워크
4 |
5 | ## 의존성 주입이 뭔데?
6 |
7 | - DI 라고도 하면 객체 지향 프로그램을 할 때는 빼 놓을 수 없는 중요한 부분입니다.
8 | - 복잡한 개발을 하면 할 수록 의존성이 생길 수 있습니다.
9 |
10 | ```swift
11 | class User {
12 | var game = Game()
13 |
14 | func startGame() {
15 | self.game.start()
16 | }
17 | }
18 | ```
19 |
20 | 위 코드에서 User와 Game 사이 결합도가 증가하고 의존성이 생깁니다.
21 |
22 | ## 의존성은 왜 생기면 안될까?
23 |
24 | - Game을 바꾸면 Game과 startGame의 결합된 모든 것을 바꾸어야함
25 | - 코드의 재사용성이 떨어짐
26 | - 이게 DIP 의존성 역전 법칙의 위배됩니다.
27 | - DIP를 위배하지 않으려면 의존 시 클래스 보다는 인터페이스 혹은 추상 클래스와 관계를 맺어야합니다.
28 |
29 | ## 의존성 주입을 하면 이점이 무엇일까?
30 |
31 | - 코드의 재사용성이 높아집니다
32 | - 테스트가 편리해집니다.
33 | - 코드의 유연성이 크게 증가합니다.
34 | - 코드 분성 및 파악 용이
35 |
36 | ## 그래서 Swinject가 뭔데?
37 |
38 | > Swinject는 Swift용 경량 종속성 주입 프레임워크입니다.
39 | >
40 |
41 | - Swinject는 의존성 주입을 위한 DIContainer를 제공하며 클래스나 객체의 인스턴스를 생성하고 의존성을 주입하는 기능을 제공합니다.
42 | - Swinject의 핵심 개념은 Container입니다.
43 | - 컨테이너는 객체의 생성과 의존성을 해결관리하는 역활을 합니다.
44 | - 스토리보드를 지원
45 |
46 |
47 | **위가 이해가 어려우면 아래 코드를 보는 것을 추천드립니다!**
48 |
49 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "pins" : [
3 | {
4 | "identity" : "snapkit",
5 | "kind" : "remoteSourceControl",
6 | "location" : "https://github.com/SnapKit/SnapKit",
7 | "state" : {
8 | "revision" : "f222cbdf325885926566172f6f5f06af95473158",
9 | "version" : "5.6.0"
10 | }
11 | },
12 | {
13 | "identity" : "then",
14 | "kind" : "remoteSourceControl",
15 | "location" : "https://github.com/devxoul/Then.git",
16 | "state" : {
17 | "revision" : "d41ef523faef0f911369f79c0b96815d9dbb6d7a",
18 | "version" : "3.0.0"
19 | }
20 | }
21 | ],
22 | "version" : 2
23 | }
24 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jjunhaa0211/ADPattern-Swift/09c86a5fcb95bf4098d22d9070efb3ca7ed80ce4/Viper/ViperPattern/ViperPattern.xcodeproj/project.xcworkspace/xcuserdata/junhabag.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern.xcodeproj/xcuserdata/junhabag.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SnapKitPlayground (Playground) 1.xcscheme
8 |
9 | isShown
10 |
11 | orderHint
12 | 2
13 |
14 | SnapKitPlayground (Playground) 2.xcscheme
15 |
16 | isShown
17 |
18 | orderHint
19 | 3
20 |
21 | SnapKitPlayground (Playground).xcscheme
22 |
23 | isShown
24 |
25 | orderHint
26 | 1
27 |
28 | ViperPattern.xcscheme_^#shared#^_
29 |
30 | orderHint
31 | 0
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Modules/Interactor/LoginInteractor.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class LoginInteractor: LoginInteractorInput {
4 | weak var output: LoginInteractorOutput!
5 |
6 | func login(username: String, password: String) {
7 | let success = (username == "user" && password == "password")
8 | output.loginResult(status: success)
9 | }
10 |
11 |
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Modules/Interactor/LoginInteractorInputOutput.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LoginInteractorInputOutput.swift
3 | // ViperPattern
4 | //
5 | // Created by 박준하 on 2023/06/27.
6 | //
7 |
8 | import UIKit
9 |
10 | protocol LoginInteractorInput: AnyObject {
11 | func login(username: String, password: String)
12 | }
13 |
14 | protocol LoginInteractorOutput: AnyObject {
15 | func loginResult(status: Bool)
16 | }
17 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Modules/Presenter/LoginPresenter.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | class LoginPresenter: LoginPresenterInterface {
4 | var view: LoginViewInterface!
5 | var interactor: LoginInteractorInput!
6 | var router: LoginRouterInterface!
7 |
8 | func viewDidLoad() {
9 |
10 | }
11 |
12 | func handleLogin(username: String, password: String) {
13 | interactor.login(username: username, password: password)
14 | }
15 |
16 | func navigateToRedViewController() {
17 | router.navigateToRedViewController()
18 | }
19 | }
20 |
21 |
22 | extension LoginPresenter: LoginInteractorOutput {
23 | func loginResult(status: Bool) {
24 | DispatchQueue.main.async {
25 | self.view.updateLoginStatus(status: status)
26 | if status {
27 | self.router.navigateToRedViewController()
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Modules/Presenter/LoginPresenterInterface.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | protocol LoginPresenterInterface: AnyObject {
4 | func viewDidLoad()
5 | func handleLogin(username: String, password: String)
6 | func navigateToRedViewController()
7 | }
8 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Modules/Router/LoginRouter.swift:
--------------------------------------------------------------------------------
1 | //
2 | // LoginRouter.swift
3 | // ViperPattern
4 | //
5 | // Created by 박준하 on 2023/06/27.
6 | //
7 |
8 | import UIKit
9 | import SnapKit
10 | import Then
11 |
12 | class LoginRouter: LoginRouterInterface {
13 | weak var viewController: UIViewController!
14 |
15 | func navigateToMainScreen() {
16 | }
17 |
18 | func navigateToRedViewController() {
19 | let redViewController = RedViewController()
20 | viewController.navigationController?.pushViewController(redViewController, animated: true)
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Modules/Router/LoginRouterInterface.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol LoginRouterInterface: AnyObject {
4 | func navigateToMainScreen()
5 | func navigateToRedViewController()
6 | }
7 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/Modules/View/LoginViewInterface.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | protocol LoginViewInterface: AnyObject {
4 | func updateLoginStatus(status: Bool)
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/Viper/ViperPattern/ViperPattern/RedViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RedViewController.swift
3 | // ViperPattern
4 | //
5 | // Created by 박준하 on 2023/06/27.
6 | //
7 |
8 | import UIKit
9 | import SnapKit
10 | import Then
11 |
12 | class RedViewController: UIViewController {
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | view.backgroundColor = .red
18 | }
19 | }
20 |
--------------------------------------------------------------------------------