This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| custom alert controller - https://github.com/dillidon/Alerts-Pickers | |
| text masks - https://github.com/RedMadRobot/input-mask-ios |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Links: | |
| - https://refactoring.guru (site) | |
| - https://github.com/Atimca/RefactoringExample (repo with an Example) | |
| Literature: | |
| - “Refactoring: Improving the Design of Existing Code” by Martin Fowler | |
| - “Growing Object-Oriented Software, Guided by Tests” by Steve Freeman, Nat Pryce | |
| - “Test-Driven Development By Example” by Kent Beck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import AuthenticationServices | |
| import RxCocoa | |
| import RxSwift | |
| @available(iOS 13.0, *) | |
| private class RxAppleSignInDelegateProxy: DelegateProxy<ASAuthorizationController, ASAuthorizationControllerDelegate> { | |
| private(set) var controller: ASAuthorizationController? | |
| fileprivate var signInSubject = PublishSubject<ASAuthorization>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import PlaygroundSupport | |
| import Foundation | |
| class WeakRef<T> where T: AnyObject { | |
| private(set) weak var value: T? | |
| init(value: T?) { | |
| self.value = value | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Question set for interviews | |
| Developer | |
| Tech | |
| - [ ] How many projects do you have | |
| - [ ] Which architectures approaches do you use | |
| - [ ] Which swift version / legacy objc, c what are you going to do with it. | |
| - [ ] Do you do layout in xibs or in code? | |
| - [ ] What do you think about reactive programming (RxSwift) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func reduce<Result>(_ initialResult: Result, _ nextPartialResult: (Result, Element) -> Result) -> Result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Store { | |
| func accept(event: Event) { | |
| state = reduce(state: state, event: event) | |
| } | |
| func reduce(state: State, event: Event) -> State { | |
| var state = state | |
| switch event { | |
| case .changeValue(let newValue): | |
| state.value = newValue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protocol Observer { | |
| func stateWasChanged(with newState: State) | |
| } | |
| struct State { | |
| var value: Int? | |
| static func reduce(state: State, event: Event) -> State { | |
| var state = state | |
| switch event { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Twitter(.atimca) | |
| .subscribe(onNext: { newArcticle in | |
| you.read(newArticle) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Combine | |
| import Foundation | |
| func loadNewsTitles() -> AnyPublisher<[String], Never> { | |
| ["title1", "title2"] | |
| .publisher | |
| .delay(for: .microseconds(500), scheduler: DispatchQueue.main) | |
| .collect() | |
| .eraseToAnyPublisher() | |
| } |
OlderNewer