I'm trying to achieve a hard coded layout where two text views should be stacked on top of each other and centered in a parent UICollectionViewCell:
----------------------
| |
| This is text |
| Also text |
| |
----------------------
Due to various legacy/business reasons, I should be doing this using constraints hard coded in a subclass of UICollectionViewCell. The two text views can vary in length, but should be centered vertically in the parent view, while being on top of one another.
Is there an easy way to express this in constraints? I'm a bit new to this type of layout system, so any help is appreciated!
The app I am working with uses the Masonry (https://github.com/SnapKit/Masonry) library as well, if that makes things easier.