Questions tagged uicollectionview

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

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
Published
Categorized 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
Published
Categorized 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
Published
Categorized 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
Published
Categorized 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
Published
Categorized 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 self.day = […]

UICollectionView for non-grid or semi-grid layout

I am trying to implement a multi-row sequence of items (like Video editing sequence in Final Cut Pro or Adobe Premiere pro shown below). While I one can always implement it using UIScrollView and placing custom views manually, it would be tedious particularly in reordering items and animating changes and also zooming across the timeline […]

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
faq