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
| name: SimpsonsQuotes | |
| options: | |
| bundleIdPrefix: com.zafar.simpsons-quotes | |
| createIntermediateGroups: true | |
| deploymentTarget: | |
| iOS: 15.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *.xcodeproj | |
| *.xcworkspace | |
| *.DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
| var window: UIWindow? | |
| func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
| guard let windowScene = (scene as? UIWindowScene) else { return } | |
| let window = UIWindow(windowScene: windowScene) | |
| self.window = window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| @main | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
| return true | |
| } | |
| // MARK: UISceneSession Lifecycle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| @IBDesignable class CircularProgressView: UIView { | |
| // MARK: - Initialization | |
| public override init(frame: CGRect) { | |
| super.init(frame: frame) | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| public final class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate { | |
| // 1 | |
| public weak var tableView: UITableView? | |
| // 2 | |
| public init(tableView: UITableView) { | |
| self.tableView = tableView |
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
| private func bindAvatarToImageView() { | |
| getAvatarFromTheServer() | |
| .handleEvents(receiveSubscription: { [weak self] in | |
| print("Subscribed", $0) | |
| self?.state = .loading | |
| }, receiveOutput: { | |
| print("Got image", $0) | |
| }, receiveCompletion: { | |
| print("Completion", $0) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import Combine | |
| ... | |
| class ViewController: UIViewController { | |
| ... | |
| override func viewDidLoad() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import Combine | |
| ... | |
| class ViewController: UIViewController { | |
| ... | |
| private func bindStateToTitle() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import Combine | |
| ... | |
| enum State: String { | |
| case initial = "Initial" | |
| case loading = "Loading" | |
| case loadedSuccessfully = "Success" | |
| case loadingFailed = "Failure" |
NewerOlder