Adds support for Roxas’ refactored UITableView/UICollectionView data source logic
This commit is contained in:
parent
34f277e1ac
commit
882c6e74e6
@ -181,8 +181,7 @@ private extension GameCollectionViewController
|
||||
fetchRequest.sortDescriptors = [NSSortDescriptor(key: #keyPath(Game.name), ascending: true)]
|
||||
|
||||
self.dataSource = RSTFetchedResultsCollectionViewDataSource(fetchRequest: fetchRequest, managedObjectContext: DatabaseManager.shared.viewContext)
|
||||
self.dataSource.cellIdentifierHandler = { _ in RSTGenericCellIdentifier }
|
||||
self.dataSource.cellConfigurationHandler = { [unowned self] (cell, indexPath) in
|
||||
self.dataSource.cellConfigurationHandler = { [unowned self] (cell, item, indexPath) in
|
||||
self.configure(cell as! GridCollectionViewCell, for: indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ extension CheatsViewController
|
||||
|
||||
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
|
||||
{
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: RSTGenericCellIdentifier, for: indexPath)
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: RSTCellContentGenericCellIdentifier, for: indexPath)
|
||||
self.configure(cell, forIndexPath: indexPath)
|
||||
return cell
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ extension PauseMenuViewController
|
||||
|
||||
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
|
||||
{
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: RSTGenericCellIdentifier, for: indexPath) as! GridCollectionViewCell
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: RSTCellContentGenericCellIdentifier, for: indexPath) as! GridCollectionViewCell
|
||||
self.configureCollectionViewCell(cell, forIndexPath: indexPath)
|
||||
return cell
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ extension SaveStatesViewController
|
||||
|
||||
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
|
||||
{
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: RSTGenericCellIdentifier, for: indexPath) as! GridCollectionViewCell
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: RSTCellContentGenericCellIdentifier, for: indexPath) as! GridCollectionViewCell
|
||||
self.configureCollectionViewCell(cell, forIndexPath: indexPath)
|
||||
return cell
|
||||
}
|
||||
|
||||
@ -79,8 +79,7 @@ private extension ControllerSkinsViewController
|
||||
let fetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: DatabaseManager.shared.viewContext, sectionNameKeyPath: #keyPath(ControllerSkin.name), cacheName: nil)
|
||||
|
||||
self.dataSource = RSTFetchedResultsTableViewDataSource(fetchedResultsController: fetchedResultsController)
|
||||
self.dataSource.cellIdentifierHandler = { _ in RSTGenericCellIdentifier }
|
||||
self.dataSource.cellConfigurationHandler = { [unowned self] (cell, indexPath) in
|
||||
self.dataSource.cellConfigurationHandler = { [unowned self] (cell, item, indexPath) in
|
||||
self.configure(cell as! ControllerSkinTableViewCell, for: indexPath)
|
||||
}
|
||||
}
|
||||
|
||||
2
External/Roxas
vendored
2
External/Roxas
vendored
@ -1 +1 @@
|
||||
Subproject commit 784b06e1249fae83d42d4bf62bc8350616c1059b
|
||||
Subproject commit ecb29e0050fe9335845698c896c4cd8ce60df0da
|
||||
Loading…
Reference in New Issue
Block a user