What kind of ways do you use?
Vfl? Or from the NSLayoutConstraint code without strings? Or in the storyboard? Or something else?
What options when it is more convenient, and what more often?
People, share your experience :)
What kind of ways do you use?
Vfl? Or from the NSLayoutConstraint code without strings? Or in the storyboard? Or something else?
What options when it is more convenient, and what more often?
People, share your experience :)
The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .
I studied the constraints completely far and wide, and my verdict is this.
NSLayoutConstraint as a method call, and VFL do not exclude each other, but complement. And there are rules that do not fit in either there or there, these are view methods, such as:
setContentCompressionResistancePriority:forAxis setContentHuggingPriority:forAxis:
The standard way to build costreys is the poorest, I have not seen anything worse. I asked this question and found the coolest libu that I use to this day. This is Masonry for objc, and Snappy for Swift. Found nothing better. Maximum layout speed. Layout debug speed is maximum. Already as a year, nothing better has been invented, although there are good ideas, but their advantages are not very clear yet.
for a start it is best to place all the objects starting from the center, then how everything is arranged make one object that was first added Add constraints, everything will automatically be placed on all objects, run, check if everything is sad, then take each object except the first one to make clean constraints then immediately add missing constraints and so on each object in turn, but in general it is a very universal thing and there are MANY ways to use them as well as control the location of objects dynamically, but at this very moment will have to come to, to be honest
Source: https://ru.stackoverflow.com/questions/361978/
All Articles