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.
Topic: UI Frameworks SubTopic: UIKit Tags:
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jan ’22
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’22
Comment on "Content View" in a custom UIView, as in Cells
I'm hoping for Xcode to support contentView-feature for custom views, not only cells provided by SDK. It could be achieved by either simply having a contentView property, marking the component with @IBWhatever property, or by implementing a specific protocol. Looks like time for radar.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’22
Comment on "Content View" in a custom UIView, as in Cells
I want to create a reusable component, probably as an open-source module. The component can contain any subviews just like any other view, but these need to be wrapped in a content-view, as I need a way to temporarily reparent the content-view out of the component and back.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’22