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
// MARK: Wireframe | |
protocol HomeWireframeProtocol: class { | |
func showContactDetail(contact: Contact) | |
} | |
// MARK: Presenter | |
protocol HomePresenterProtocol: class { | |
var interactor: HomeInteractorInputProtocol! { get set } | |
func getContact() |
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
class HomeTableController: UITableViewController { | |
var presenter: HomePresenterProtocol! | |
var contactList: [Contact] = [] | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
presenter.getContact() | |
} |
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
class HomeTableController: UITableViewController { | |
var presenter: HomePresenterProtocol! | |
var contactList: [Contact] = [] | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
presenter.getContact() | |
} |
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
class HomeTableController: UITableViewController { | |
var presenter: HomePresenterProtocol! | |
var contactList: [Contact] = [] | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
presenter.getContact() | |
} |
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
// MARK: Wireframe | |
protocol HomeWireframeProtocol: class {} | |
// MARK: Presenter | |
protocol HomePresenterProtocol: class { | |
var interactor: HomeInteractorInputProtocol! { get set } | |
func getContact() | |
} |
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
class HomePresenter { | |
var view: HomeViewProtocol! | |
var interactor: HomeInteractorInputProtocol! | |
var router: HomeWireframeProtocol! | |
} | |
extension HomePresenter: HomePresenterProtocol { | |
func getContact() { | |
interactor.getContactFromService() | |
} |
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
// MARK: Wireframe | |
protocol HomeWireframeProtocol: class {} | |
// MARK: Presenter | |
protocol HomePresenterProtocol: class { | |
var interactor: HomeInteractorInputProtocol! { get set } | |
func getContact() | |
} |
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
class HomeInteractor { | |
var presenter: HomeInteractorOutputProtocol! | |
} | |
extension HomeInteractor: HomeInteractorInputProtocol { | |
func getContactFromService() { | |
var contacts = [Contact]() | |
var yusuf = Contact(fullname: "Yusuf", gsm: "05311111111") | |
contacts.append(yusuf) |
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
class Contact { | |
var fullname: String | |
var gsm: String | |
init(fullname: String, gsm: String) { | |
self.fullname = fullname | |
self.gsm = gsm | |
} | |
} |
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
class HomeInteractor { | |
var presenter: HomeInteractorOutputProtocol! | |
} | |
extension HomeInteractor: HomeInteractorInputProtocol { | |
func getContactFromService() { | |
} | |
} |