LuisEspinoza
LuisEspinoza

Reputation: 8538

Is possible to share a xib between a UITableViewCell and a UICollectionViewCell?

I am looking to factorize some code and xib for a view design shared between a UITableViewCell and UICollectionViewCell. Is it possible share the same xib between a UITableViewCell and UICollectionViewCell? or Is it possible to share the same xib for a subview?.

Upvotes: 2

Views: 143

Answers (1)

jacob bullock
jacob bullock

Reputation: 651

you could do something like this by just using a UIView super view. Then each of those cells would just need to load the shared view into the cells. I think you may lose the ability for auto layout to work with UIAutomaticDimension for autosizing cells.

Upvotes: 3

Related Questions