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

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 and I've decided to use it as in the code below: class UserList: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate { @IBOutlet weak var tview: UICollectionView! let reuseIdentifier = "cell"…
0
votes
1 answer

Custom CollectionViewCell With Different Subviews?

I'm creating a custom collectionViewCell called MessageCell. This message cell has three components, a headerLabel, messageContainerView, and footerLabel. The problem is that depending on the type of message (video, transaction, delivery…
0
votes
2 answers

Add UILabels programmatically to a Collection Cell, swift

I am trying to add UILabels in the subView of my Collection Cell. But when I scroll to the other cell and come back all the UIlabels appear on both cells and some are written under the other.. I tried with…
0
votes
1 answer

How to set the Header to the UICollectionView

I want to set the default section header to the UICollectionView.I used the below code,it crashed. In -viewDidLoad [feedcollectionview registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader…
0
votes
1 answer

Section header persists even after removing section data and reloading UICollectionView

After removing the last item in a section, the goal is to remove the entire section, including its header, from the UICollectionView. Unfortunately, the section header persists even though there is no section in the underlying data model. Refreshing…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
0
votes
1 answer

Selected cell not persisting in UICollectionView. Cannot save. *** Terminating app due to uncaught exception

I have a UICollectionView that populates with data from my DB. The user selects various cells and presses a button to save the info. I am unable to get the data to post. What am I doing wrong? #pragma mark -…
0
votes
1 answer

Custom UICollectionViewLayout With Equal Inter-Item Spacing

I'm having a difficult time figuring out how to designing what feels like it should be a fairly straightforward layout for my collection view. The heights of each cell are equal. The widths vary. The inter-item spacing should always be equal. The…
0
votes
1 answer

UICollectionView with header issue to change y position

I am using UICollectionView with header and UISerach bar also. Now i am getting issue my header is coming top of search bar. How to change the y position i want UISearch bar then my collectionview header. But header not moving down .
0
votes
1 answer

Create UICollectionReusableView programmatically overlapping issue

So seems -addSubview twice add UILabel to the UICollectionReusableView - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { if…
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
0
votes
0 answers

iOS 8 swift change parent content

i am new to iOS, so i am confronted with this problem: I wrote an UICollectionView in an UIViewController (parent) with an UICollectionResuableView as a header. class ParentViewController: UIViewController, SideBarDelegate { @IBOutlet weak var…
0
votes
1 answer

How to keep section header at the top even when we scroll: UICollectionView

I found this tutorial how to make section for collection view. I want to achieve the same effect like in table view when we see section every time on the top even if we scroll table.
Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
0
votes
2 answers

UICollectionView Footer not showing

I am trying show footer on collection view. In my story board i set accessory as footer in UICollectionView and i took collection reusable view. [self.cv registerClass:[ItemFooterView class]…
0
votes
1 answer

uicollectionview decoration broken frame?

I have a UICollectionView with custom layout and try to display a decoration view. The problem illustrated with some code: attributeDecorationTime.frame = CGRectMake(0.0f, 0.0f, …
0
votes
1 answer

How to change button borderColor in UICollectionReusableView when cell alloced

I have a UICollectionReusableView with buttons, when user taps on buttons I would like to change backgroundColor and borderColor. BackgroundColor changed but borderColor did not change. Code: @implementation…
Iraklii
  • 1,295
  • 13
  • 30
0
votes
1 answer

Java JPanel Reusable view

I have created a set of buttons that I want to be at the top of every page of my application. Rather than having to recreate the setup in every class, is it possible to create it once and include it in every class, similar to a reusable view in…
user3932611
1 2 3
12
13