I want objects located relative to the size of the supervisor, and not absolutely.
For example, I do not want to say that the element is "50px on top", I want to say that it is "1/3 of the way down."
Is there a way to do this using auto layout? If not, what is the best way?
Greetings
Add an exit to the restriction of the height of the superstructure and the restriction of access to the upper space. In the code, set the top-level constraint constant to a value equal to 0.3 * the superstructure height constraint.
If you are using IB, just place the element you want in and set it to maintain its upper space until Superview. This will keep the element at such a distance from the top for both 4 and 3.5-inch devices.
Source: https://habr.com/ru/post/1443414/More articles:Location of user data files in the iOS simulator for XCODE 4.5? - ios-simulatorScheme for getting the last item in the list - schemeUISearchBar lock on top of UITableView - iosSending html emails to Kindle Fire - androidRemove nearest empty siblings - jqueryHow to get the full path to the file from the file name? - c #Java usb independent input platform - javaHow to create a dialog created by the function Intent.createChooser () cancelable? - androidundefined method `tripphoto_changed? 'for ... Carrierwave - ruby-on-railsRemove changes from committing to a larger bazaar - rebaseAll Articles