Questions tagged uicollectionview

Explore the latest questions and answers asked by our top developers.

MessageKit Collection View doesn’t display any cells after adding support for a custom cell`

I’ve read through the guide for creating a custom cell in MessageKit here, and SO questions like this I’m trying to create a custom cell; here’s my code for a cell that inherits from a UICollectionViewCell: import UIKit import MessageKit open class ChatReferenceCell: UICollectionViewCell { @IBOutlet weak var authorLabel: UILabel! @IBOutlet weak var referenceText: UITextView! […]

CollectionView width is not correct in Xamarin forms iOS Portrait/Landscape mode

I have a Xamarin app and I am using a collection view for displaying items. The Width of items are correct for the first time then switch back to Landscape mode then switch back to portrait mode and the width of items list taking the previous landscape mode width. I am also receiving the exception […]

Self Sizing CollectionView cell not work properly after reload data

I am creating a collectionView that can have multiple sections with a self-sizing cell. it works nicely on the initial layout. but after reload, I encounter three problem Scrolling become choppy cell size changed and cell overlap with each other content offset changed after reload data here is ViewController code class ViewController: UIViewController { @IBOutlet […]

collectionview global header does not push cells down and stays on top instead

I have a collection view header (blue) and cells (red). I want to be able to show/hide header programmatically, however when I show the header programatically it appears on top of the cell (or makes scrollview go down a bit). I would like the header to push the whole scrollview down, so I wouldn’t have […]

Collection View Layout Problems

I’m working with CollectionViews and currently have the problem that everytime I implement a UICollectionViewFlowLayout my original layout gets "destroyed". If I dont implement a FlowLayout, my CollectionView is just one row that has the length of all items in it and everything works fine. But the elements in the CollectionView are spaced really far […]

By Ben
Categorised as Uncategorised Tagged ,

Xamarin Forms CollectionView not showing on iPhone but on Android and Android simulator

I have a problem and a question regarding Xamarin.Forms and CollectionView. I implemented a CollectionView as a Main Menu and on Android it is working fine. But on my iPhone it is not showing the CollectionView. The ScrollView is showing I think because the LightBlue background is visible on my iPhone. It is build for […]

By Az0th
Categorised as Uncategorised Tagged , , , ,

Getting Error "No Ad To Show" When Implementing AdMob into Swift App

I am trying to do the (seemingly) simple task of integrating Native AdMob ads into my iOS app running on Swift. Let me first show you my storyboards and code for integration and then we’ll move on to things I’ve tried to fix it. Set-Up: Storyboards and Code In my App Delegate, I configure Firebase […]

By Jacob Cavin
Categorised as admob, firebase, swift, uicollectionview Tagged , , ,

Xamarin iOS Application suspended in Monitor when UICollectionViewFlowLayout.PrepareLayout()

Xamarin iOS application infinitely suspended when CollectionView.IsVisible = false on start up. on Android, It works. However, on iOS, setting CollectionView.IsVisible = false resulted in application freezed. <StackLayout Margin="0,20,0,0"> <Button HorizontalOptions="CenterAndExpand" WidthRequest="100" Clicked="Button_Clicked" Text="Click Me"/> <CollectionView x:Name="Collection" VerticalOptions="FillAndExpand" ItemsSource="{Binding Items}" SelectionMode="Single" IsVisible="False"> <CollectionView.ItemsLayout> <GridItemsLayout Orientation="Vertical" Span="4"/> </CollectionView.ItemsLayout> <CollectionView.ItemTemplate> <DataTemplate> <StackLayout Margin="10,10,10,10"> <Image WidthRequest="50" HeightRequest="50" Source="{local:ImageResource […]

By ibocon
Categorised as Uncategorised Tagged , ,

Using UICollectionLayoutListConfiguration with storyboards

Can you use the new UICollectionLayoutListConfiguration API in iOS 14 with collection views in storyboards? I have a UICollectionViewController in a storyboard, which I configure with a custom list layout below: var config = UICollectionLayoutListConfiguration(appearance: .plain) let layout = UICollectionViewCompositionalLayout.list(using: config) collectionView.setCollectionViewLayout(layout, animated: false) collectionView.dataSource = dataSource (In storyboards collection views can only be set […]

By weiran
Categorised as ios, swift, uicollectionview Tagged , ,

UICollectionViewDiffableDataSource: Request for number of items in section 0 when there are only 0 sections in the collection view

I am trying to make a timeline where each section is a day and each day has many items (records). Here is my section (day) class: class YearMonthDay: Comparable, Hashable { let year: Int let month: Int let day: Int init(year: Int, month: Int, day: Int) { self.year = year self.month = month = […]

1 2

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us