Post

Replies

Boosts

Views

Activity

Comment on "Content View" in a custom UIView, as in Cells
Connecting other view using outlet, instead of simply adding to contentView, is ugly, not straightforward, not suitable for a public module. Layout constraints are what I'm concerned with the most. When views are added directly to my custom view in Xcode/Storyboard, it's tough to recreate the constraints when moving views out and back. I even plan to offer an API where application can animate subviews as transitioning between these two states - recreating constraints makes that impossible.
Jan ’22
Comment on "Content View" in a custom UIView, as in Cells
Cells require subviews to be added to contentView to be able to support features like accessoryViews or swipe-for-menu. In my case it is moving the contentView out of my component and back. Without a contentView, using my component in Storyboard/XIB would be very inconvenient. Imagine the horror if that would be the case for cells. Honestly, in that case I'm not going to make that module public.
Jan ’22