Created
January 14, 2021 16:09
-
-
Save thepearl/286cbc772ba552c16f41610be9cad0b1 to your computer and use it in GitHub Desktop.
Defining MoviesTableViewDiffableDataSource
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! | |
override func viewDidLoad() | |
{ | |
super.viewDidLoad() | |
registerCell() | |
} | |
} | |
// MARK: - Setup UI & Cells | |
extension MainView | |
{ | |
func registerCell() | |
{ | |
let movieCell = UINib(nibName: MovieCell.reuseIdentifier, bundle: nil) | |
tableView.register(movieCell, forCellReuseIdentifier: MovieCell.reuseIdentifier) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment