This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ScrollViewRTL<Content: View>: View { | |
@ViewBuilder var content: Content | |
@Environment(\.layoutDirection) private var layoutDirection | |
var type: RowType | |
init(type: RowType, @ViewBuilder content: () -> Content) { | |
self.type = type | |
self.content = content() |
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
// | |
// RequestProvider.swift | |
// Requet Provider | |
// | |
// Created by Metin Atalay on 9.04.2022. | |
// | |
import Foundation | |
#if canImport(FoundationNetworking) | |
import FoundationNetworking |
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 Foundation | |
import UIKit | |
class WeatherListWireFrame: WeatherListWireFrameProtocol { | |
class func createWeatherListModule() -> UIViewController { | |
let navController = mainStoryboard.instantiateViewController(withIdentifier: "WeathersNavigationController") | |
if let view = navController.childViewControllers.first as? WeatherListViewController { | |
let presenter: WeatherListPresenterProtocol & WeatherListInteractorOutputProtocol = WeatherListPresenter() | |
let interactor: WeatherListInteractorInputProtocol & WeatherListRemoteDataManagerOutputProtocol = WeatherListInteractor() | |
let remoteDataManager: WeatherListRemoteDataManagerInputProtocol = WeatherListRemoteDataManager() |
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 Foundation | |
class WeatherListInteractor: WeatherListInteractorInputProtocol { | |
weak var presenter: WeatherListInteractorOutputProtocol? | |
var remoteDatamanager: WeatherListRemoteDataManagerInputProtocol? | |
func retrieveWeatherList(cityName: String) { | |
do { | |
remoteDatamanager?.retrieveWeatherList(cityName: cityName) | |
} catch { |
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 WeatherListPresenter: WeatherListPresenterProtocol { | |
weak var view: WeatherListViewProtocol? | |
var interactor: WeatherListInteractorInputProtocol? | |
var wireFrame: WeatherListWireFrameProtocol? | |
func viewDidLoad(cityName: String) { | |
view?.showLoading() | |
interactor?.retrieveWeatherList(cityName: cityName) | |
} | |
} |
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 PKHUD | |
class WeatherListViewController: UIViewController { | |
@IBOutlet weak var tableView: UITableView! | |
var presenter: WeatherListPresenterProtocol? | |
var weatherList: [WeatherModel] = [] | |
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 Foundation | |
import UIKit | |
protocol WeatherListViewProtocol: class { | |
var presenter: WeatherListPresenterProtocol? { get set } | |
// PRESENTER -> VIEW | |
func showWeatherInfo(weathers: WeatherModel) | |
func showError() |
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 Foundation | |
import ObjectMapper | |
struct WeatherModel : Mappable { | |
var coord : Coord? | |
var weather : [Weather]? | |
var base : String? | |
var main : Main? | |
var visibility : Int? | |
var wind : Wind? |