uicollectionview

Touch events on UICollectionView causing delegate methods to not be called

梦想的初衷 提交于 2020-01-14 04:05:52
问题 I have a UICollectionView set up in which I have cells. I want to tap these cells to play a sound, and also have the ability to drag these cells into a different view to drop those sounds in. To play sounds, I use the -collectionView:collectionView didSelectItemAtIndexPath method. And to implement the drag functionality, I used custom login in the touchesBegan, touchesMoved etc. methods. However, if I have the methods touchesBegan, touchesMoved, the UICollectionView delegate methods never get

Touch events on UICollectionView causing delegate methods to not be called

[亡魂溺海] 提交于 2020-01-14 04:05:35
问题 I have a UICollectionView set up in which I have cells. I want to tap these cells to play a sound, and also have the ability to drag these cells into a different view to drop those sounds in. To play sounds, I use the -collectionView:collectionView didSelectItemAtIndexPath method. And to implement the drag functionality, I used custom login in the touchesBegan, touchesMoved etc. methods. However, if I have the methods touchesBegan, touchesMoved, the UICollectionView delegate methods never get

Touch events on UICollectionView causing delegate methods to not be called

青春壹個敷衍的年華 提交于 2020-01-14 04:05:12
问题 I have a UICollectionView set up in which I have cells. I want to tap these cells to play a sound, and also have the ability to drag these cells into a different view to drop those sounds in. To play sounds, I use the -collectionView:collectionView didSelectItemAtIndexPath method. And to implement the drag functionality, I used custom login in the touchesBegan, touchesMoved etc. methods. However, if I have the methods touchesBegan, touchesMoved, the UICollectionView delegate methods never get

UICollectionView inside of UITableViewCell - AutoLayout

守給你的承諾、 提交于 2020-01-13 19:27:09
问题 I'm using a UICollectionView inside of a UITableViewCell . It's all working fine, but i have some issues with Auto Layout. The UICollectionView should just show the cells without horizontal or vertical scrolling.Because now I have a the scrollable UICollectionView inside my UITableViewCell the following code doesn't work for me to get the dynamic table cells' height for this cell, but for other cells. self.tableView.rowHeight = UITableViewAutomaticDimension self.tableView.estimatedRowHeight =

Scroll Multiple UICollectionView with one collectionview IOS

老子叫甜甜 提交于 2020-01-13 05:55:15
问题 I am working on an application in which, I have UITableView and in each cell of uitableview i have uicollectionview scrolling horizontally. Now, What I want is that: When I scroll one collectionview in any direction then all other collectionviews of my table should scroll accordingly in that direction. I have tried using scrollview delegates but it is not working properly. I am stuck in this issue. I have looked on internet but could not found anything yet. Help needed! Thanks 回答1: Ok I've

Scroll Multiple UICollectionView with one collectionview IOS

巧了我就是萌 提交于 2020-01-13 05:55:06
问题 I am working on an application in which, I have UITableView and in each cell of uitableview i have uicollectionview scrolling horizontally. Now, What I want is that: When I scroll one collectionview in any direction then all other collectionviews of my table should scroll accordingly in that direction. I have tried using scrollview delegates but it is not working properly. I am stuck in this issue. I have looked on internet but could not found anything yet. Help needed! Thanks 回答1: Ok I've

How Can I Animate the Size of A UICollectionViewCell on Scroll so the middle one is largest?

自闭症网瘾萝莉.ら 提交于 2020-01-13 04:55:09
问题 I have a UICollectionView that shows several rows with one, full-width column (looks like a UITableView) What I'd like to achieve is something similar to this: ... where the middle cell has a much greater height. As the user scrolls up and down, the cells before and after the middle cell animate back to the default height for the given cell. Can somebody outline how I should approach this problem? 回答1: I use this Swift 3 code in my horizontal UICollectionView . func scrollViewDidScroll(_

UICollectionView insertItemsAtIndexPaths: throws exception

大城市里の小女人 提交于 2020-01-13 03:48:54
问题 UICollectionView: I'm doing it wrong. I just don't know how. My Setup I'm running this on an iPhone 4S with iOS 6.0.1. My Goal I have a table view in which one section is devoted to images: When the user taps the "Add Image..." cell, they are prompted to either choose an image from their photo library or take a new one with the camera. That part of the app seems to be working fine. When the user first adds an image, the "No Images" label will be removed from the second table cell, and a

Custom Header in UICollectionView with Interface Builder without Storyboard

久未见 提交于 2020-01-13 01:57:22
问题 I'm trying to add a custom view to the header section of my UICollectionView . I have the xib file interface builder but I don't use storyboard. I have checked the Section Header in Interface Builder but doesn't appear any UICollectionReusableView, what can I do? 回答1: The easiest solution is to do is programatically (and keep your HeaderReusableView in another XIB file): [self.collectionView registerNib:[UINib nibWithNibName:@"ItemHeaderView" bundle:nil] forSupplementaryViewOfKind

Today Extension with UICollectionView different behaviour compared to Single View Application

半世苍凉 提交于 2020-01-13 01:40:22
问题 I try to add a collection view to a Today Extension with specifying the items per row of 3 items and also with setting the section insets for with 20 for top, left, bottom and right. When I do this in a Single View Application everything is like expected, but when I do the same programmatically for the Today Extension the collection view looks different, especially the space of the right and bottom seems not to be like in the Single View Application. What's the reason why there is this