You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
This is only a half-baked idea, but it would be cool if a view's implementation of -instrinicContentSize could somehow use the same signal chain that the view uses for laying out its subviews.
It seems like this would involve some sort of redirection, so that:
Live inputs – like self.rcl_boundsSignal – are zeroed out or somehow mocked, to ensure that they don't factor into the size calculations.
Output bindings – e.g., RAC(self.subview.frame) – are disabled, so no layout is actually performed.
The text was updated successfully, but these errors were encountered:
Trying to imagine how this would work. I tend to use intrinsic size as a minimum size for some leaf views; for example, a button with a label has some minimum size. From there, superviews' intrinsic size may be defined in terms of the intrinsic sizes of its subviews, or it may have no intrinsic size and expand to fit the frame it is laid out at.
So in my workflow at least, I would want some way to make some views have no intrinsic size, regardless of the behavior of the subviews.
Hm. Need to play with RCL some more so some of this sinks in better.
Well, the semantics I'm talking about actually correspond to -fittingSize, but it seems like an override of -intrinsicContentSize would integrate better with Auto Layout.
In either case, this wouldn't be an automatic implementation of the method – just some way to easily grab the data you need.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is only a half-baked idea, but it would be cool if a view's implementation of
-instrinicContentSize
could somehow use the same signal chain that the view uses for laying out its subviews.It seems like this would involve some sort of redirection, so that:
self.rcl_boundsSignal
– are zeroed out or somehow mocked, to ensure that they don't factor into the size calculations.RAC(self.subview.frame)
– are disabled, so no layout is actually performed.The text was updated successfully, but these errors were encountered: