Questions tagged [uicollectionview]

1

votes
3

answer
416

Views

Create a UICollectionView with a reversed flow layout

I want to create a view that resembles a chat view, where the newest message appears at the bottom of the screen. I would like the UICollectionViewCells to be 'pinned' to the bottom of the screen - the opposite of what the default flow layout does. How can I do this? I've got this code from another...
Tometoyou
1

votes
1

answer
38

Views

Self-sizing UICollectionView cells with async image loading

I have a horizontal UICollectionView in which I display images that are loaded asynchronously. The cells are supposed to have their width fit the image. In viewDidLoad of my view controller, I set the estimated cell size: (collectionView.collectionViewLayout as? UICollectionViewFlowLayout)?.estimate...
LinusGeffarth
1

votes
3

answer
82

Views

Display popup below selected UICollectionViewCell

I'm working to display popup which should be display below to selected cell. I have two view controller, both contains UICollectionView. So when I select cell from first view controller I want to display popup with animation exactly below selected cell. I have tried following code to display it. fun...
Mayur Karmur
-1

votes
1

answer
13

Views

how to make button placed on top of UICollectionView react to the tap?

UICollectionView which behaves as a gallery gallery.showsHorizontalScrollIndicator = false gallery.isPagingEnabled = true is placed inside UIView container and on this container, custom button (favorite image button) is added: galleryContainer.addSubview(gallery) galleryContainer.addSubview(pageC...
Ilja
0

votes
0

answer
18

Views

iPhone X Collection View Cell glitch

I have a collection view which cells are 1/2 of screen width. The problem is that ONLY on iPhone X and Xs I have a line, that shows content beneath collection view. Why can it be so ? import UIKit import SnapKit class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDele...
Alexey K
0

votes
2

answer
11

Views

How to save the status of a cell so when I scroll or leave the page it doesn't refresh the cells?

I'm trying to make a store for a game where you can buy different colors of balls. I'm using a UICollectionView with all white balls to begin with, when I click a cell, it changes the white ball image to a colored ball image. when I scroll down and scroll back up, the cells I selected are reset to t...
Jperk
0

votes
0

answer
6

Views

How to move more than one collection view cell when scroll

I have a collection view that has 3 views 'per page'. When I scroll, I need that those 3 cells be moved and it goes to the next 'page'. For example, if I have 4 cells and scroll the collection view, I need that the collection move to a configuration where I can see only the next 3 itens, in this cas...
chr0x
1

votes
2

answer
377

Views

How edit/delete UICollectionView cells using MVVM and RxSwift

I am trying to understand how to implement MVVM with a list of objects and an UICollectionView. I am not understanding how to implement the User iteration -> Model flow. I have setup a test application, the Model is just a class with an Int, and the View is an UICollectionViewCell which shows a text...
Rui Rodrigues
1

votes
2

answer
90

Views

How to detect button tap in a UITableViewCell which is in a UICollectionViewCell?

I'm trying to detect button tap in a UITableViewCell which is in a UICollectionViewCell. UICollectionView's delegate and dataSource is my ViewController. There is one UITableView in every UICollectionViewCell. And the UITableViewCell's delegate and dataSource is the UICollectionViewCell. I need to d...
Sercan
1

votes
4

answer
70

Views

I have a UIButton inside a CollectionViewCell which is again inside the TableViewCell.How do i navigate to next view contoller by clicking UIButton?

I have UIButton inside UICollectionViewCell which is inside UITableViewCell, I need to navigate another UIViewController on tapping that UIButton. But UINavigationController is not working inside the UICollectionViewCell. Can anybody please help? I do not find any navigationController in my code. im...
rashmi shrestha
1

votes
2

answer
33

Views

Videos are placed on top of images in collection view?

I have a collection view which is populated with videos or images, based on what is fetched from firebase. I am having this problem where when I fetch the data and add to the cells, some cells get a video added on top [of the image]. I have looked through the code found bellow and cant seem to . f...
NCT 127
-1

votes
0

answer
5

Views

UICollectionViewのセルが表示されない。

UICollectionViewをソースコードのみ(Storyboard,Xibは使用しない)で実装していますが、セルが表示されません。 ※UICollectionView自体は表示されていますが、「UICollectionViewDelegate」「UICollectionViewDataSource」が呼び出されてないよう...
なっかん
1

votes
2

answer
401

Views

Determine UICollectionView cell height only by autolayout

I need a collection view which displays cells in a grid. So a standard flow layout is fine for me. However, I want to tell how many cells to show per row, while the cell height should be determined by the autolayout constraints that I put on the cell. Here is my cell layout: It is quite simple - an...
frangulyan
1

votes
1

answer
95

Views

Scroll from bottom to top

Is there a way to scroll from bottom up in a collectionview so basically the first cell will be at the bottom of the screen and you scroll up to view the remaining cells
Sagaya Abdul
1

votes
0

answer
29

Views

UICollectionViewController F#

I'm trying to implement the following in F#: public class SimpleCollectionViewController : UICollectionViewController { static NSString animalCellId = new NSString ('AnimalCell'); public override void ViewDidLoad () { base.ViewDidLoad (); CollectionView.RegisterClassForCell (typeof(AnimalCell), ani...
Alk
1

votes
0

answer
49

Views

How to make CollectionView cell height depend on total of all element height in the cell?

I know this question may asked so many time,but I still cant be understand on this.I very new in iOS developement,I come from Android. I have a CollectionViewCell look something like this: I set all the autoLayout for each element in StoryBoard. But the problem is the height of each element in each...
ken
1

votes
0

answer
99

Views

iOS Cell TextField Text Size Not Resizing When Scrolling Swift 3

I am having an issue when scrolling in a collection view cell. The text isn't resizing to fit based on the populated value and space available. In the image that isn't working as expected, I have scrolled down a 'page' or 2. In the set-up below, extraDetail1 seems to scales based on the first sca...
Jacksonsox
1

votes
1

answer
538

Views

How to implement content view above UICollectionView

I am trying to get the UICollectionView, and UIView above it, to scroll together. I've done a couple of diagrams (before and after scrolling) to show what I'm trying to achieve. Before scrolling After scrolling Currently, I have only been able to get the UICollectionView to scroll within its own sec...
F.Brown
1

votes
0

answer
453

Views

UICollectionView Drag and Drop cell between collectionView

Hi I am using KDDragAndDropCollectionView for drag and drop feature between two three different collectionView. Everything is working fine, but I am not able to restrict the movement for particular case. I have three collectionView. The user can drop from A to B and B to C. But He cannot drah and dr...
User
1

votes
0

answer
46

Views

Transferring Data from CollectionView inside TableView to a New ViewController

So I have a main ViewController that has Horizontal Scrolling CollectionViews inside a TableView. When you click on an Item in the CollectionView it transfers all the data from the Item to a new ViewController to display it properly. The problem I am facing is when you click on the item in the Coll...
Aman Chawla
1

votes
0

answer
660

Views

How to do Parallax scrolling in collectionview swift

I have a Collectionview and a search bar on the top.There is a view on the top of my search bar.When I scroll up my view should hide and my search bar should come to the top.
1

votes
0

answer
752

Views

How can I make a horizontal pickerView with collectionView?

How can I make a horizontal UICollectionView with pickerView effect? I have already created the horizontal UICollectionView. Now I want to apply the UIPickerView effect on it. Here is the image where i wanted to make that effect(UIPickerView effect): Here is my ViewControllerCode - import UIKit clas...
Md Rashed Pervez
1

votes
0

answer
134

Views

[_NSConcreteObservation center]: unrecognized selector sent to class ' Getting random errors like this when updating my collectionView?

Actually I'm building a download manager for different categories. And I'm stuck here. I'm getting this errors in this line self.videoListCollectionView.setCollectionViewLayout(flowLayout, animated: false) func layoutCollectionView() { if categoryFilter == 'video' { self.getData() self.videoListColl...
Arjun D
1

votes
1

answer
292

Views

UICollectionView's contentOffset changed on reload

I'm working UICollectionView and facing issue with contentOffset while reloading the data. I already read multiple posts regarding this, but couldn't find any solution. Issue: UINavigationController -> ViewController1 (rootViewController) ViewController1 contains a vertical UICollectionView that con...
PGDev
1

votes
0

answer
129

Views

Call viewWillTransition in didSelectItemAt indexpath

I have center of collectionview cell in viewWIllTransition function as follows var center = CGPoint() override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { super.viewWillTransition(to: size, with: coordinator) coordinator.animate(alongsideTransi...
Coder221
1

votes
1

answer
89

Views

SizeforItematIndexPath in F# Xamarin

I'm trying to override the following method of the UICollectionViewFlowLayout in order to specify the size of my UICollectionViewCell : [MonoTouch.Foundation.Export('collectionView:layout:sizeForItemAtIndexPath:')] public virtual SizeF GetSizeForItem (UICollectionView collectionView, UICollectionVi...
Alk
1

votes
0

answer
361

Views

NSFetchedResultsController CoreData UICollectionView insert Issue

I am trying to update using a NSFetchedResultsController/NSFetchedResultsControllerDelegate a UICollectionView. UPDATE The UICollectionView has 21 cells and it has 3 cell in each Row. The idea is that I am downloading some image Data,I am saving them on CoreData on BackgroundContext (backgroundCont...
P S
1

votes
0

answer
111

Views

Custom UICollectionViewDelegateFlowLayout - Xamarin IOS

I'm trying to create a custom UICollectionViewDelegateFlowLayout in F#, similar to the one below in C#: public class CityViewDelegate : UICollectionViewDelegateFlowLayout { #region Application Access public static AppDelegate App { get { return (AppDelegate)UIApplication.SharedApplication.Delegate;...
Alk
1

votes
0

answer
157

Views

Collection view cells overlap animation in Bottomsheet

I need to apply animation like the bottom sheet where Collection View cells overlap each other when closed, and wide opened when bottom sheet is opened. I have achieved the bottom sheet with Collection View with pagination, but need to apply animation that shows only current cell and other cells beh...
Nasir Khan
1

votes
1

answer
461

Views

Banner ads in collectionview admob ios

I have successfully been able to add an admob banner ad to a collection view cell I have 2 question First one is : -Are we allowed to use multiple banner ads in a collectionview Second one is: - are we allowed to use banner ads in collectionview cell Becuase when the user scroll the ad stay at the...
Abdull
1

votes
0

answer
43

Views

How can I apply a CGAffineTransform to a UICollectionViewCell while the UICollectionView is scrolling

I am creating a kind of horizontally scrolling menu with multiple items that the user can scroll through.(see picture at the bottom for a preview of what I mean) The UICollectionView offset already always centers on one of its items. What I want to do is that when an item is the next one to approac...
Yannis P.
1

votes
0

answer
62

Views

Calculating the height of the content

I bring out several blocks of text, information for which is taken from the json document. Next, I calculate the height of these blocks, which would specify the height of the cell in UICollectionview. Here is the code: if(indexPath.item == 0){ var heightContent: CGFloat = 0 for number in content...
Евгений
1

votes
0

answer
709

Views

How to implement sticky section header in collection view in swift 4?

Here I am having sort and filter buttons which I need to make it as a header in collection view that to I need it like as sticky header view can any one help me how to implement this for this type of layout and below is my image for the grid layout and I tried by using this link but unable to implem...
User
1

votes
1

answer
705

Views

How to remove fade animation of UICollectionView during rotation time?

I am just trying to adapt animation of CollectionView during rotation time , so that there wouldn't be any fade effects like this Just simple move of the view. So after a small search i found out that I accomplish that effect by just overriding two methods of UICollectionViewFlowLayout override f...
Ninja
1

votes
1

answer
63

Views

Cell size not changed in collection view IOS (Implemented in Xamarin)

I have a collection view that needs to have the cells fitting size to content. I use sizeForItemAtIndexPath: to set size for each cell. It's fired and works great. Here is the problem what I am facing. The data list for collection view is changed dynamically. collection view has only 1 item to show...
Passionate.C
1

votes
2

answer
1.8k

Views

Constraints ambiguously suggest a height of zero for tableview cell's content view

This warning is driving me crazy: [Warning] Warning once only: Detected a case where constraints ambiguously suggest a height of zero for a tableview cell's content view. We're considering the collapse unintentional and using standard height instead. I have a UICollectionView inside a UITableViewCel...
Bassel
1

votes
0

answer
190

Views

Weird behavior with UICollectionView when reusing cells

===EDIT=== Ok! Finally I think I've made it working. When I was reading this article (http://matteomanferdini.com/the-correct-way-to-display-lists-in-ios-and-what-many-developers-do-wrong/#reuse), I wanted to apply best practice so I made some refactoring and created a new class for my data source....
Omar Jbara
1

votes
0

answer
62

Views

Unscrollable Multiple Collection Views

I am trying to develop an iOS application that has 03 UICollectionViews handled by the same ViewController. (The reason why I am opting for 03 UICollectionViews rather than one with sections and different prototype cells is because I may need to add additional content not relevant to collection view...
jms
1

votes
0

answer
52

Views

UICollectionView embedded in UICollectionViewCell acting weird with UINavigationController

I have a UINavigationController that has a UIViewController at its root. I have a UICollectionView that fills the UIViewController. My look that I'm trying to go for is a navigation bar that hovers over this collection view. For this I have pinned the UICollectionView to the top of the superview ins...
Tometoyou
1

votes
1

answer
260

Views

How to update the CollectionView cell that selected before and now Swift 4?

I have a horizontal collection view.When user click on a photo,a UIView appear to cover the photo.Only 1 photo will can be selected in 1 time.Means that,if a photo is selected,if I click on another photo,the previous photo will back to normal. I implement this code below: var previousSelectedIndexP...
ken

View additional questions