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
struct Point { | |
let x: Double | |
let y: Double | |
} | |
var point1 = Point(x: 10, y: 20) | |
var point2 = point1 // Creates a copy of point1 | |
point2.x = 30 // Modifying point2 doesn't affect point1 | |
print(point1.x) // Output: 10 |
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 MockMoviePresenter:MoviePresenter { | |
var listMovie:[FilmModel] = [] | |
var isCompleted = false | |
func didGetListMovie(listMovie: [FilmModel]) { | |
self.listMovie = listMovie | |
} | |
func success(){ | |
self.isCompleted = true | |
} | |
func fail() { |
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 MockMovieInteractor:MovieInteractor { | |
var success = false | |
func performGetStatusRequest() { | |
if success { | |
self.viewModel.delegate?.success() | |
} else { | |
self.viewModel.delegate?.fail() | |
} | |
} | |
override func performGetListMovie() { |
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 Foundation | |
import Alamofire | |
class MoviveService { | |
static let instance = MoviveService() | |
func getListMovie(completion:@escaping(_ sucess:Bool, _ film:FilmData?)->Void) { | |
let url = "https://codedeman.github.io/ssd_api/fakeCinema.json" | |
AF.request(url).validate().responseJSON { response in | |
print("response +++++ --- \(response.result)") | |
do { |
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
extension ViewController:CinemaCellDelegate { | |
func loadImageCompleted(index: Int) { | |
self.tableView.reloadRows(at: [IndexPath.init(row: index, section: 0)], with: .fade) | |
} | |
} |
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
override func awakeFromNib() { | |
super.awakeFromNib() | |
self.vMain.backgroundColor = .white | |
self.vBoard.layer.cornerRadius = 10 | |
self.vBoard.clipsToBounds = true | |
self.vMain.layer.cornerRadius = 10 | |
self.vMain.clipsToBounds = true | |
self.vMain.layer.borderColor = UIColor(red: 242/255, green: 242/255, blue: 242/255, alpha: 1).cgColor | |
self.vMain.layer.borderWidth = 1 | |
self.lblTitle.textColor = .black |
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
// | |
// CinemaListCell.swift | |
// AppLab | |
// | |
// Created by Pham Kien on 11.06.22. | |
// | |
import UIKit | |
import SDWebImage |
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
{ | |
"listFilms":[ | |
{ | |
"id":"12345", | |
"filmUrl":"https://www.cgv.vn/media/catalog/product/cache/1/image/1800x/71252117777b696995f01934522c402d/d/r/dr-strange-payoff-poster_1_.jpg", | |
"name":"Multiverse of madness", | |
"price":"100000", | |
"filmDes":"Doctor Strange teams up with a mysterious teenage girl from his dreams who can travel across multiverses, to battle multiple threats, including other-" | |
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
// | |
// HomeVC.swift | |
// Animation-Research | |
// | |
// Created by Ominext on 3/18/20. | |
// Copyright © 2020 Ominext. All rights reserved. | |
// | |
import UIKit | |
import SnapKit |
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
{ | |
"name": "Back-endAppTracking", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"start": "node src/index.js", | |
"dev": "nodemon src/index.js" | |
}, | |
"keywords": [], |
NewerOlder