Re: Put UICollectionView within UITableViewCell

2018-03-10 Thread Glen Huang
I’ll give it a shot, thank you very much > On 10 Mar 2018, at 10:27 AM, Cosmo Birch wrote: > > But you presumably know the width (i.e. the CollectionView width minus any > insets), and you can calculate the height based on that with NSString or > NSAttributedString

Re: Put UICollectionView within UITableViewCell

2018-03-09 Thread Cosmo Birch
But you presumably know the width (i.e. the CollectionView width minus any insets), and you can calculate the height based on that with NSString or NSAttributedString boundingRect functions. Assuming you have a subclass for your CollectionViewCell, you can add a method to return your cell

Re: Put UICollectionView within UITableViewCell

2018-03-09 Thread Glen Huang
problem. Sorry if the name of the method is slightly off. I can’t > look it up at the moment. > >> On Mar 9, 2018, at 8:00 AM, Glen Huang <hey...@gmail.com> wrote: >> >> Hi, >> >> I asked a question about putting UICollectionView within UITableViewCell on

Re: Put UICollectionView within UITableViewCell

2018-03-09 Thread Gary L. Wade
uestion about putting UICollectionView within UITableViewCell on > Apple Developer Forums (https://forums.developer.apple.com/thread/98176), but > it doesn’t get many replies. I’m not sure if it’s ok to repost the question > here. I apologize if it’s not. > > Here is the que

Re: Put UICollectionView within UITableViewCell

2018-03-09 Thread Cosmo Birch
if that solves your problem. Sorry if the name of the method is slightly off. I can’t look it up at the moment. > On Mar 9, 2018, at 8:00 AM, Glen Huang <hey...@gmail.com> wrote: > > Hi, > > I asked a question about putting UICollectionView within UITableViewCell on >

Put UICollectionView within UITableViewCell

2018-03-09 Thread Glen Huang
Hi, I asked a question about putting UICollectionView within UITableViewCell on Apple Developer Forums (https://forums.developer.apple.com/thread/98176), but it doesn’t get many replies. I’m not sure if it’s ok to repost the question here. I apologize if it’s not. Here is the question: Hi

UICollectionView cells sometimes drawn on top of section header

2017-01-06 Thread Steve Christensen
iOS 10. I'm seeing some odd behavior where occasionally collection view cells are drawn on top of their section header view instead of behind it. When I use the view inspector in Xcode then I do, in fact, see the cells in front of the section header. These are pretty generic cells that

Re: UICollectionView Moving

2016-03-15 Thread Luke Hiesterman
UICollectionView doesn’t know that your layout is conceptually columns, so when a section is empty, it has no concept of what space is appropriate to drop items into an empty section. You need to help it out by overriding the following method on your layout: - (NSIndexPath

Re: UICollectionView Moving

2016-03-10 Thread Luther Baker
That was it. Thanks Luke! Really digging this control ... On Wed, Mar 9, 2016 at 10:36 AM, Luke Hiesterman <luket...@apple.com> wrote: > UICollectionView doesn’t know that your layout is conceptually columns, so > when a section is empty, it has no concept of what space is appropria

Re: UICollectionView Moving

2016-03-09 Thread Luther Baker
lect the cell >>> for moving ... so I'm not sure how to change the background color to "red" >>> for instance. >>> >>> Would I have to add my own view to the superview and manually move it >>> around in the dragging callbacks? >>

Re: UICollectionView Moving

2016-03-07 Thread Luther Baker
nks! >> -Luther >> >> >> On Mon, Mar 7, 2016 at 11:59 AM, Luke Hiesterman <luket...@apple.com> >> wrote: >> >>> I’d check your return value for this method in your layout: >>> >>> - (UICollectionViewLayoutAttributes >>&

Re: UICollectionView Moving

2016-03-07 Thread Luke Hiesterman
xPath withTargetPosition:(CGPoint)position NS_AVAILABLE_IOS(9_0); Luke On Mar 7, 2016, at 9:55 AM, Luther Baker <lutherba...@gmail.com<mailto:lutherba...@gmail.com>> wrote: I followed the directions here, http://nshint.io/blog/2015/07/16/uicollectionviews-now-have-easy-reorderi

Re: UICollectionView Moving

2016-03-07 Thread Luther Baker
SIndexPath >> *)indexPath withTargetPosition:(CGPoint)position NS_AVAILABLE_IOS(9_0); >> >> Luke >> >> On Mar 7, 2016, at 9:55 AM, Luther Baker <lutherba...@gmail.com> wrote: >> >> I followed the directions here, >> >> http://nshint.io/blo

Re: UICollectionView Moving

2016-03-07 Thread Luke Hiesterman
VAILABLE_IOS(9_0); Luke On Mar 7, 2016, at 9:55 AM, Luther Baker <lutherba...@gmail.com<mailto:lutherba...@gmail.com>> wrote: I followed the directions here, http://nshint.io/blog/2015/07/16/uicollectionviews-now-have-easy-reordering/ - to add iOS9 style dragging to my UICollec

Re: UICollectionView Moving

2016-03-07 Thread Luther Baker
7, 2016, at 9:55 AM, Luther Baker <lutherba...@gmail.com> wrote: > > I followed the directions here, > > http://nshint.io/blog/2015/07/16/uicollectionviews-now-have-easy-reordering/ > - to add iOS9 style dragging to my UICollectionView - and it sort of works. > > As describ

Re: UICollectionView Moving

2016-03-07 Thread Luke Hiesterman
rba...@gmail.com<mailto:lutherba...@gmail.com>> wrote: I followed the directions here, http://nshint.io/blog/2015/07/16/uicollectionviews-now-have-easy-reordering/ - to add iOS9 style dragging to my UICollectionView - and it sort of works. As described in the article, I added a long p

UICollectionView Moving

2016-03-07 Thread Luther Baker
I followed the directions here, http://nshint.io/blog/2015/07/16/uicollectionviews-now-have-easy-reordering/ - to add iOS9 style dragging to my UICollectionView - and it sort of works. As described in the article, I added a long press gesture recognizer and wired it in to make calls

Setting the contentOffset of a UICollectionView during update

2015-10-18 Thread Colas B
the animation, the cells that were not visible and become visible don't appear. They stay as "blank space" and only at the end of the animation they appear, all of a sudden. So my question is, how to change the contentOffset of a UICollectionView during layo

Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes

2015-08-07 Thread Ted Bradley
is that the UICollectionView seems to always ignore the `zIndex` ┌──┐ │ │ │ Cell 0 │ │┌─┴┐ └┤ │ │ Cell 4 │ │ │ └──┘ ┌──┐ │ │ │ Cell 5 │ │ │ └──┘ ┌──┐ │ │ │ Cell 6

UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes

2015-08-06 Thread Ted Bradley
is that the UICollectionView seems to always ignore the `zIndex` ┌──┐ │ │ │ Cell 0 │ │┌─┴┐ └┤ │ │ Cell 4 │ │ │ └──┘ ┌──┐ │ │ │ Cell 5

Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes

2015-08-06 Thread Luke Hiesterman
implementation, determine which cell I need to add in and then construct the UICollectionViewLayoutAttributes(forCellWithIndexPath:). I then set the zIndex for it to 1 (default is `0`). The problem I'm getting is that the UICollectionView seems to always ignore the `zIndex

Serious bug for UICollectionView

2014-11-07 Thread Colas B
Dear cocoa-dev, I am facing the following bug with `UICollectionView` in the **horizontal scrolling mode** (`iOS 8`, `iOS 7`, the only ones I have tested). I would like to have your views on this bug and on how I could elegantly fix it (and possibly fix it so that when Apple fixes it, my fix

Set UICollectionView UIScrollViewDelegate delegate

2014-10-18 Thread Mazzaroth M.
. However when I set the delegate, the compiler assumes I'm trying to assign it as the UICollectionViewDelegate. UICollectionView is a subclass of UIScrollView.. how do refer to its scrollview delegate pointer? Xcode 6.0.1 iOS8. self.bodyCollectionViewController.collectionView.backgroundColor

Re: Set UICollectionView UIScrollViewDelegate delegate

2014-10-18 Thread Kyle Sluder
and Subclass2CollectionViewControllers' .colllectionView UIScrollView delegate. However when I set the delegate, the compiler assumes I'm trying to assign it as the UICollectionViewDelegate. UICollectionView is a subclass of UIScrollView.. how do refer to its scrollview delegate pointer? There is only

Re: UICollectionView parallax-like horizontal scrolling

2014-10-16 Thread Luke Hiesterman
, at 10:01 PM, Mazzaroth M. taomaili...@gmail.com wrote: In the running apps view(double-tap Home button) there are two rows each which contain two different types of cells. How would one implement this using UICollectionView? I more or less want to do this where the lower row cells

Re: UICollectionView parallax-like horizontal scrolling

2014-10-16 Thread Mazzaroth M.
of cells. How would one implement this using UICollectionView? I more or less want to do this where the lower row cells are slightly narrower than the upper row such that when you swipe to scroll, the items in both rows are centred on the screen at the same time but because the items in row 1

UICollectionView parallax-like horizontal scrolling

2014-10-15 Thread Mazzaroth M.
In the running apps view(double-tap Home button) there are two rows each which contain two different types of cells. How would one implement this using UICollectionView? I more or less want to do this where the lower row cells are slightly narrower than the upper row such that when you swipe

How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread David Hoerl
Becoming increasingly adept at autolayout but currently stumped. What I am trying to do is design a UICollectionView header that using constraints is suitable for portrait and landscape. I have a bunch of views in it, each grouped into a container view. What I'd like to do is when the view

Re: How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread David Duncan
On Oct 4, 2013, at 11:35 AM, David Hoerl dho...@mac.com wrote: Becoming increasingly adept at autolayout but currently stumped. What I am trying to do is design a UICollectionView header that using constraints is suitable for portrait and landscape. I have a bunch of views in it, each

Re: How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread David Hoerl
: - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section The Flow Layout object asks for the sizes first, then the header (or footer if used). I tried returning one size in the above

Re: How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread Steve Christensen
On Oct 4, 2013, at 1:52 PM, David Hoerl dho...@mac.com wrote: But its really odd - and I'm thinking about a bug report on this - that the delegate has to provide the size before the view is even created. It make sense if you think about it: it's asking for sizes so that scroll view

Re: How to get variably sized header in a UICollectionView supporting both orientations

2013-10-04 Thread David Hoerl
On 10/4/13 5:09 PM, Steve Christensen wrote: On Oct 4, 2013, at 1:52 PM, David Hoerl dho...@mac.com wrote: But its really odd - and I'm thinking about a bug report on this - that the delegate has to provide the size before the view is even created. It make sense if you think about it: it's

UICollectionView with NSFetchedResultsController; compatible?

2013-06-09 Thread Michael Crawford
is to queue the updates made through the NSFetchedResultsControllerDelegate until the controller finishes its updates. UICollectionView doesn't have the same beginUpdates and endUpdates that UITableView has to let it work easily with NSFetchedResultsController, so you have to queue them or you

UICollectionView

2013-05-08 Thread koko
Given an array of UIImages as a data source I want to populate a UICollection with these images. If I call -reloadData I see nothing in the view until the data source is exhausted then the view is displayed will all images. How can the UICollectionView be told to display each cell / image

Re: UICollectionView

2013-05-08 Thread David Duncan
. How can the UICollectionView be told to display each cell / image as it is created? I want the user to see that something is happening. Is the data source actually updating with new information? From the symptoms it sounds like that is not the case, and that it doesn't update until you've