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 MoviesTableViewDiffableDataSource: UITableViewDiffableDataSource<String?, Result> {} | |
class MainView: UIViewController | |
{ | |
@IBOutlet weak var searchBar: UISearchBar! | |
@IBOutlet weak var tableView: UITableView! | |
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 MoviesTableViewDiffableDataSource: UITableViewDiffableDataSource<String?, Result> {} | |
class MainView: UIViewController | |
{ | |
@IBOutlet weak var searchBar: UISearchBar! | |
@IBOutlet weak var tableView: UITableView! | |
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 SDWebImage | |
class MovieCell: UITableViewCell | |
{ | |
@IBOutlet weak var movieImageView: UIImageView! | |
@IBOutlet weak var movieNameLabel: UILabel! | |
@IBOutlet weak var movieDetailsLabel: UILabel! | |
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
func hash(into hasher: inout Hasher) { | |
hasher.combine(id) | |
} | |
public static func == (lhs: Result, rhs: Result) -> Bool { | |
return lhs.id == rhs.id | |
} |
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
// MARK: - Response | |
struct Response: Decodable, Hashable { | |
let searchType, expression: String? | |
let results: [Result]? | |
let errorMessage: String? | |
} | |
// MARK: - Result |
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 MainView: UIViewController | |
{ | |
@IBOutlet weak var searchBar: UISearchBar! | |
@IBOutlet weak var tableView: UITableView! | |
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 SwiftUIstruct | |
LottieView: UIViewRepresentable{} |
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
[ | |
{ | |
"id" : 1, | |
"name_ar": "أريانة", | |
"name_fr" : "Ariana" | |
}, | |
{ | |
"id" : 2, | |
"name_ar": "باجة", | |
"name_fr" : "Béja" |
NewerOlder