Closed oleksii-demedetskyi closed 11 years ago
Also we need think about registerMetrics()
block. This can be useful for constant fixing.
@DAlOG Not sure how registerViews()
and registerMetrics()
could be implemented - will we need to parse VFL?
@AndreyMoskvin we have next syntax in native imll
NSArray* constraints = f(vfl, options, metrics, views);
metrics and views are more stable.So we can reuse it from vfl to vfl. \
Due to syntax change we need support next type of call:
NSArray* array = PVVFL(@"[view]-[view2]").#options#.withViews(#default dictionary macros#).metrics(#Dictionary#).asArray;
Or add asVFL
property to NSString
class. Method should return PVVFL(string)
call result.
@DAlOG @xNekOIx Do you any VFL constraints that could be used without views specified?
I don't :)
@AndreyMoskvin Me too. So far they shouldn't be optional, I think.
Current VFL order: vfl -> alignment(optional) -> direction(optional) -> withViews(required) -> metrics(optional)
Why withViews()
is required? We can use vfl without any options inside a group. withViews()
is required only for asArray
finisher.
I've mentioned case when we need to create single VFL and return it as array of constraints - that's why it is required.
In case of group we will specify views and metrics later, am I right?
yes.
I think this feature is done.
Next chains are allowed:
if
views
not stetted, thanregisterViews()
should be used.