This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@objc final class Review: NSObject { | |
struct Properties: Decodable { | |
let id: String | |
let author: String | |
let content: String | |
let url: String | |
} | |
let properties: Properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class MovieViewController: UIViewController { | |
private let dependencies: MovieViewControllerDependencyResolver | |
// weaver: movie <= Movie | |
// weaver: imageManager = ImageManager | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
private let dependencies: AppDelegateDependencyResolver = AppDelegateDependencyContainer() | |
// weaver: homeViewController = HomeViewController <- UIViewController | |
// weaver: urlSession = URLSession |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final class ImageManager { | |
// weaver: urlSession <- URLSession | |
private let dependencies: ImageManagerDependencyContainer | |
required init(dependencies: ImageManagerDependencyContainer) { | |
self.dependencies: dependencies | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class ImageManager { | |
// weaver: urlSession = URLSession | |
// weaver: urlSession.builder = URLSession.make | |
private let dependencies: ImageManagerDependencyContainer | |
required init(dependencies: ImageManagerDependencyContainer) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class ImageManager { | |
private let dependencies: ImageManagerDependencyResolver | |
// weaver: urlSession = URLSession | |
required init(injecting dependencies: ImageManagerDependencyResolver) { | |
self.dependencies = dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class ImageManager { | |
func getImage(with path: String, completion: @escaping (UIImage?) -> Void) { | |
let completionOnMainThread = { result in | |
DispatchQueue.main.async { | |
completion(result) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class MovieTableViewCell: UITableViewCell { | |
struct ViewModel { | |
let title: String | |
} | |
func bind(_ viewModel: ViewModel) { | |
textLabel?.text = viewModel.title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class MovieViewController: UIViewController { | |
private let dependencies: MovieViewControllerDependencyResolver | |
// weaver: movie <= Movie | |
private lazy var overviewLabel: UILabel = { | |
let label = UILabel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
final class MovieTableViewCell: UITableViewCell { | |
struct ViewModel { | |
let title: String | |
} | |
func bind(_ viewModel: ViewModel) { | |
textLabel?.text = viewModel.title |