There is a black bar at the top of my Widget and I can't seem to figure out how to get rid of it.
struct A1EntryView : View {
var entry: Provider.Entry
var body: some View {
Text("Temp")
.frame(maxHeight: .infinity)
.background(Color(.red))
.ignoresSafeArea(.all)
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I can't seem to get UICollectionViewDataSourcePrefetching working with DiffableDatasource, my delegate methods are not being called. Do these work together?
		func viewDidLoad()
				....
collectionView.prefetchDataSource = self
collectionView.isPrefetchingEnabled = true
		}
extension ViewController: UICollectionViewDataSourcePrefetching {
func collectionView(_ collectionView: UICollectionView, prefetchItemsAt indexPaths: [IndexPath]) {
let urls: [URL] = indexPaths.compactMap { indexPath in
guard let displayableItem = dataSource.itemIdentifier(for: indexPath),
let itemViewModel = displayableItem.item as? ViewModel,
let image = itemViewModel.firstImageURL else {
return nil
}
return image
}
ATHLogging.log.critical("prefetching: \(urls)")
preheater.startPreheating(with: urls)
}
Why does returning nil from
UICollectionViewDiffableDataSource<FeedElement, Entity>(collectionView: collectionView) {
(collectionView: UICollectionView, indexPath: IndexPath, entity: Entity) -> UICollectionViewCell? in
result n "the collection view's data source did not return a valid cell from"
Isn't the UICollectionViewCell optional?