Questions tagged [uicollectionreusableview]

The UICollectionReusableView class defines the behavior for all cells and supplementary views presented by a collection view.Available in iOS 6.0 and later. It should be tag only issues related with [tag:uicollectionreusableview].

UICollectionReusableView : Reusable views are so named because the collection view places them on a reuse queue rather than deleting them when they are scrolled out of the visible bounds. Such a view can then be retrieved and repurposed for a different set of content.This is declared in Apple's UIKit framework and available in iOS 6.0 and later

This class is intended to be subclassed. Most methods defined by this class have minimal or no implementations. You are not required to override any of the methods but can do so in cases where you want to respond to changes in the view’s usage or layout.

Source: UICollectionReusableView Class Reference

Related tags:

Related Stack Overflow questions:

  1. Removing empty space, if the section header is hidden in the UICollectionView

  2. How to detect scrolling to a new section in a UICollectionView?

191 questions
0
votes
1 answer

add UICollectionView as subview of UICollectionReusableView reloadData not work, what I miss?

I'm try to add UICollectionView to my custom UICollectionReusableView in runtime, in main form I have a UICollectionView(named mainView) to show first-level menus to user, when user did select cell in mainView it will expand second-level menus in…
0
votes
1 answer

UICollectionView's Header's height dependent on its content in Swift

Inside a UICollectionView I have a HeaderView within a UILabel. numberOfLines is set to zero to change label's height based on its text. I want the header's height to depend on the label's frame. PS. HeaderView in UICollectionView is not as simple…
0
votes
1 answer

How to trigger refresh in Supplementary view of UICollectionView

We are using UICollectionView to draw a calendar. The supplementary view is used for the date at the top of a column that represents a day in the calendar. Each calendar is a section in the UICollectionView. We want the current day highlighted. …
Jason Hocker
  • 6,879
  • 9
  • 46
  • 79
0
votes
2 answers

Callback to sectionHeadersPinToVisibleBounds

I have a requirement in my project that I have to add shadow to UICollectionView headers when they become sticky. I am using the property on UICollectionViewFlowLayout sectionHeadersPinToVisibleBounds, which when set to YES makes the headers…
0
votes
1 answer

swift UICollectionView showing empty sometimes bug even header

I have a UIcollectionView that has a header and Footer and sometimes a weird bug just shows the screen empty. It is strange because even on the View Debugger it shows as empty but the Header is a static image that is on the app not something is…
0
votes
1 answer

Header section in the uicollectionview controller. out of range

I am using the viewForSupplementaryElementOfKind function to apply the header section from the uicollectionview controller. However, before the asynchronous parsing of the viewDidAppear API, the row index is loaded into the…
0
votes
2 answers

tapGestureRecognizer.location brings nil in UICollectionView

In my swift app I created class that delegates UICollectionViewController. Additionally, I have other class responsible for handling 'UICollectionReusableView`. So in the first class I have a method: override func collectionView(_ collectionView:…
user3766930
  • 5,629
  • 10
  • 51
  • 104
0
votes
2 answers

Reusable UICollectionViewCell doesn't refreshing

My UICollectionViewCell has a button in storyboard and setting the background image of number of buttons dynamically from document directory creating issues like some buttons background image doesn't refreshing, they hold old image even when i…
0
votes
0 answers

iOS collection view dequeueReusableSupplementaryViewOfKind give different class

I have custom UICollectionReusableView (with nib). As a result, I need to register nib. - (void)setUpInterface { CGRect screenBounds = [UIScreen mainScreen].bounds; [self.view setW:CGRectGetWidth(screenBounds)]; [self.cvMain…
Khant Thu Linn
  • 5,905
  • 7
  • 52
  • 120
0
votes
1 answer

UICollectionView crash on cell insertion

I have a UICollectionView with a footer supplementary view. The way the collectionView works, it is possible to push the supplementary view offscreen when a new cell is inserted. The cells can have different horizontal sizing. If two large cells…
eugarps
  • 11
  • 3
0
votes
1 answer

CollectionView "Header" Sticked to the top when scrolling like instagram

I am wondering how is this achievable? Perhaps it is best to use an image to explain Can anyone guide me on this please?
0
votes
1 answer

How to have multiple UICollectionView with header and make it horizontally swiped

Am a very newbie to swift and IOS. I would like to implement a view like below and also make each section able to swipe horizontally. a prototype I have several design questions: Should I have one UICollectionView or three? If I further want to…
0
votes
0 answers

Segue from a UICollectionReusableView to ImagePicker

I have a class for my UICollectionReusableView, but I need a button in that view to perform a segue from the UICollectionView to an imagePicker. I have tried to use a delegate, but I keep on getting nil for the delegate. protocol…
0
votes
1 answer

Swift CollectionView stopped displaying after adding section header

I have created a simple collectionView and set the cells to show a preview of the screen each cell goes to when clicked. This all worked fine and so I am moving forward to adding headers to each of the sections. However, here is the problem... When…
0
votes
1 answer

fetching data asynchronously and putting it in UICollectionView fails - collection loads before the data and does not update

My problem is partially related to my other question here Strange behavior when user scrolls the list of UIViewCollectionCells in my app (the data in each cell changes randomly) In my app I'm using UICollectionView. Each cell contains a photo and…