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 PostDetailsWorker | |
| { | |
| func fetchPosts(completion: @escaping ([PostDetails.Post.Response]?, Error?) -> ()) | |
| { | |
| guard let publicUrl = URL(string: APPURL.BaseURL + APPURL.UrlCollection.UserDetailUrl.UserPosts) else { return } | |
| URLSession.shared.dataTask(with: publicUrl) { (data, response | |
| , error) in | |
| guard let data = data else { return } |
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 | |
| @objc protocol PostDetailsRoutingLogic | |
| { | |
| func routeToSomewhere() | |
| } | |
| protocol PostDetailsDataPassing | |
| { | |
| var dataStore: PostDetailsDataStore? { get } |
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 | |
| protocol PostDetailsPresentationLogic | |
| { | |
| func presentPosts(response: [PostDetails.Post.Response]) | |
| } | |
| class PostDetailsPresenter: PostDetailsPresentationLogic | |
| { | |
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 | |
| enum PostDetails | |
| { | |
| // MARK: Use cases | |
| enum Post | |
| { | |
| struct Request | |
| { |
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 | |
| protocol PostDetailsBusinessLogic | |
| { | |
| func fetchPosts(request: PostDetails.Post.Request) | |
| } | |
| protocol PostDetailsDataStore | |
| { |
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 | |
| protocol PostDetailsDisplayLogic: class | |
| { | |
| func displayPosts(viewModel: [PostFieldsViewModel]) | |
| } | |
| class PostDetailsViewController: UITableViewController, PostDetailsDisplayLogic | |
| { | |
| var interactor: PostDetailsBusinessLogic? |
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
| // | |
| // indicator.swift | |
| // mTaxi | |
| // | |
| // Created by Saroj on 4/6/16. | |
| // Copyright © 2016 Saroj. All rights reserved. | |
| // | |
| import UIKit |