Custom UICollectionViewCell question.

T.J. Usiyan griotspeak at gmail.com
Wed Aug 28 15:24:26 EDT 2013


Hello Susan,
What layout are you using and are you returning any attributes for the
cells? Have you set the identifier in the nib?

TJ


On Wed, Aug 28, 2013 at 2:20 PM, Susan Cudmore <susan.cudmore at gmail.com>wrote:

> Hi All,
>
> I'm trying to use a custom UICollectionViewCell that has a top level view
> with subviews including an imageview, and several labels that I need to set
> when the cell is loaded. I am using storyboards and creating the
> aforementioned views in the cell that shows up when I drag in a
> UICollectionView. I believe the identifiers are set correctly and I am
> registering the cell with the UICollectionView obj in viewDidLoad. I have
> also hooked up Outlets (at least it appears so to me) in my
> UICollectionViewCell for each of the properties that I wish to set at run
> time.
>
> I'm trying to dequeue my custom cell using its identifier in
> cellForIndexPath. I see that the initWithFrame method gets called on my
> custom UICollectionViewCell. It seems that unless I set the frame on all of
> the views and programmatically add them to the contentView of the
> UICollectionViewCell, the views don't show up. At that point, why am I
> bothering to put any of these views in IB?
>
> Any idea what I might be missing? Would I be better off creating a nib and
> loading the cell from a nib rather than have it embedded in the
> UICollectionView in the storyboard?
>
> Thanks for any pointers!
>
> /Sue
>
> _______________________________________________
> MacTechGroup-discuss mailing list
> MacTechGroup-discuss at lists.mactechgroup.org
> http://lists.mactechgroup.org/mailman/listinfo/mactechgroup-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mactechgroup.org/pipermail/mactechgroup-discuss/attachments/20130828/895aed75/attachment.html>


More information about the MacTechGroup-discuss mailing list