TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8k stars 1.29k forks source link

Adding Node to UIView example #1887

Open michael-chiu opened 4 years ago

michael-chiu commented 4 years ago

Is there any example on adding Texture node to a UIView? I want to wrap a ASDisplayNode inside a UIView, and the content of ASDisplayNode is auto sized with autolayout constraint from the UIView container.

I know there is an addSubnode() method, but how can I set the UIView frame according to the node size??

Thanks a lot.

michael-chiu commented 4 years ago

I can only find a way to set the node frame to its UIView container bounds? but not vice versa. My thought is:

Any help would be appreciated. Thanks.

ndemie commented 3 years ago

@michael-chiu did you ever figure this out? I'm running in to the same problem