How to Initialize CollectionView Cell?

Hi Apple Developer Community,

Swift noob here.

I was subclassing UICollectionViewCell when I realized I needed to initialize it in some way.

So far, I have found init(frame: CGRect), init?(coder aDecoder:NSCoder), and awakeFromNib( ).

Which is the preferred way to initialize a custom UICollectionViewCell (or a custom calss in general)?

Thanks in advance!
KC

Powered by WPeMatico

You may also like...

Comments are closed.