skip to Main Content

Ios swift – How to set correct tintColor with selected but not focused UICellAccessory.customView

In a UICollectionView within a UISplitViewController layout, I have a UICollectionView.CellRegistration that shows under certain conditions a warning badge as UICellAccessory. This warning badge accessory is based on the following code: func warningBadge(cell: UICollectionViewListCell) -> UICellAccessory { return UICellAccessory.customView(configuration: .init(customView:…

VIEW QUESTION

How to display JSON image on CollectionViewCell using Swift

I am successfully fetching images from the API, but I don't know how to display it in the CollectionViewCell. In the JSON result, the 'image' objects have URLs like these: https://sgp1.vultrobjects.com/kaushal-meme-api/meme_api_prod/memes/1111.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=31MV23N3G46Q2UG2RT1V%2F20230927%2Fsgp1%2Fs3%2Faws4_request&X-Amz-Date=20230927T141906Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=153c918fc506968d7e6a40b47a9f5edf0a37a2571636e7799618b692ed0f6839` https://sgp1.vultrobjects.com/kaushal-meme-api/meme_api_prod/memes/1152.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=31MV23N3G46Q2UG2RT1V%2F20230927%2Fsgp1%2Fs3%2Faws4_request&X-Amz-Date=20230927T141906Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=0c72145271d0edf6dcb1c0c79bcda46cc1c21ec7643a6baa0b98a6824bbeb36c` I wrote the URL in my code exactly…

VIEW QUESTION

Ios swift – Collectionview Card Layout

Here is a screenshot of what I want to achieve: I need this type of collection view layout for card cells (with leading and trailing edging displays). import UIKit class ViewController: UIViewController { @IBOutlet weak var colList : UICollectionView! var…

VIEW QUESTION
Back To Top
Search