uicollectionview

How can I get a CollectionView to only load images on the bottom half, while still allow static content at the top

妖精的绣舞 提交于 2020-01-16 19:31:13
问题 I basically want to copy Instagrams and Twitters profile pages. If I add a CollectionView to the bottom half, the CollectionView only scrolls on the bottom half of the page. The cells do not go all the way to the top and consume the profile statistics in the process. How can I make it so the profile statistics are consumed while scrolling, and the collection view takes up the whole screen? I can't seem to figure out how to make it so the cell only takes up the bottom half while the collection

Swift - create different instances of custom Views

风格不统一 提交于 2020-01-16 11:59:20
问题 I am working on an app in which the user has access to different lists. I will show some pictures for a better understanding. This is my "Main-Menue" where the user can add custom cells ("Main Wishlist", "List1", List2",..) to a UICollectionView . Each cell should in the end "contain" its own View with a TableView inside of it. The View appears by clicking on the cell : This is how I let the View appear: @IBAction func createListButtonTapped(_ sender: Any) { // "Liste erstellen" button was

RxDataSources collection view cell always uses fade for insert cell animation, can't change to a different animation

依然范特西╮ 提交于 2020-01-16 08:35:15
问题 I am having an issue with cell animations using RxSwift on a UICollectionView , my simple setup is as follows: collectionView.register(UINib(nibName: "CustomCollectionCell", bundle: nil), forCellWithReuseIdentifier: "cell") let dataSource = RxCollectionViewSectionedAnimatedDataSource<SectionOfCustomDataAnimated>( animationConfiguration: AnimationConfiguration(insertAnimation: .bottom, reloadAnimation: .bottom, deleteAnimation: .bottom), configureCell: { dataSource, cv, indexPath, element in

How to set dark and light random color in UICollectionViewCell?

て烟熏妆下的殇ゞ 提交于 2020-01-16 02:16:06
问题 I want to generate same Random color for selected cell and background cell. I have successfully implemented it with flowing code . but with this i am getting cell.background color correctly but i want to set light color on each indexpath of selected cell. so, how can i do it ? suppose , if (indexpath.row ==1) { // lightcolor } if (indexpath.row == 2) { // More light color as compare to indexpath.row ==1 } @interface DisplayViewController () { DisplayCollectionViewCell *cell; float randomRed

Creating a swiping card stack with UICollectionView and UICollectionViewCells?

感情迁移 提交于 2020-01-16 02:05:27
问题 So far, I made my collection views which scroll horizontally in either left or right.I added UICollectionViewCells into one UICollectionView. My problem that I'm having is trying to find the right settings to make the cards stack on top of the first card, as demonstrated in the photo below. Here are the settings for my collectionView and how it displays its cells. lazy var collectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() layout.scrollDirection = .Horizontal

Creating a swiping card stack with UICollectionView and UICollectionViewCells?

被刻印的时光 ゝ 提交于 2020-01-16 02:05:10
问题 So far, I made my collection views which scroll horizontally in either left or right.I added UICollectionViewCells into one UICollectionView. My problem that I'm having is trying to find the right settings to make the cards stack on top of the first card, as demonstrated in the photo below. Here are the settings for my collectionView and how it displays its cells. lazy var collectionView: UICollectionView = { let layout = UICollectionViewFlowLayout() layout.scrollDirection = .Horizontal

Preventing UICollectionView From Redrawing

有些话、适合烂在心里 提交于 2020-01-16 00:54:23
问题 My aim is to display a row of lazy loaded thumbnails (number not known) using a UICollectionView , the user can then scroll the thumbnails horizontally. I am using the code below to achieve close to what I am after but I am getting an error. The first 4 thumbnails load okay but as you scroll the thumbnails start to get drawn on top of each other and in random orders. I am trying to get it so that it achieves the following: Item 1 ----- Item 2 ----- Item 3 ---- Item 4 I would like it so that

UICollectionView cell overlapping with Header

与世无争的帅哥 提交于 2020-01-15 10:27:25
问题 func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let collectionViewWidth = collectionView.bounds.width let keys = Array(indoordataDictionary.keys) let keyString:String = keys[indexPath.section] let objFacilityUserList:FacilityUserList = indoordataDictionary[keyString]! as! FacilityUserList if objFacilityUserList.facilityUserList.count == 1 { return CGSize(width: collectionViewWidth,

UICollectionView Tap Selects More Than One Cell

蹲街弑〆低调 提交于 2020-01-14 15:01:29
问题 I have a strange problem when tapping a single UICell in UICollectionView and then scrolling down or up in the UICollectionView I see that more one cell is selected. The other cells that are selected that were not tapped seem to be randomly selected throughout the UICollectionView layout. I have 3 columns of cells and many rows in the UICollectionView. In my code I have the following: - (void)collectionView:(UICollectionView *)myCV didSelectItemAtIndexPath:(NSIndexPath *)indexPath { LogInfo(@

Populating Collection View from Array in Document Directory

寵の児 提交于 2020-01-14 06:23:29
问题 This is a follow-up from this question. Thanks so much to @rmaddy and @LeoDabus for your help thus far! The Good : my addImage button gets me the correct image in collectionView the first time I pick an image. The Bad : the second time I select an image, it changes both cells to the 2nd image. By the third/fourth/etc times I try to addImage, the image is always the same across each cell no matter what image I choose (i.e. 1st try: image1, 2nd try: image 2, image 2, 3rd try: image 2, image 2,