Skip to content

[Question] dynamic sizing for wrapped UIView #593

Open
@RaymondBakker

Description

@RaymondBakker

I have a custom UIView element that I can't convert to use typical ASDK subclasses and that requires a dynamic height.

From what I gather the best course of action is to wrap the custom view in ASDisplayNode as seen on http://texturegroup.org/docs/display-node.html:

let node = ASDisplayNode { () -> UIView in
	let view = SomeView()
	return view
}

How exactly would one go about defining the size of the node in layoutSpecThatFits in such a way that it will resize the actual view to fit its subviews?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions