Complete the code to set the main axis direction in Auto Layout.
frame.layoutMode = '[1]'
Setting layoutMode to HORIZONTAL arranges child elements side by side, which is essential for responsive horizontal layouts.
Complete the code to make the frame resize based on its contents.
frame.primaryAxisSizingMode = '[1]'
Setting primaryAxisSizingMode to AUTO allows the frame to resize automatically based on its child elements, enabling responsiveness.
Fix the error in setting padding for Auto Layout frame.
frame.padding[1] = 16
To set padding on the left side, use paddingLeft. The code uses paddingLeft property correctly.
Fill both blanks to set spacing and alignment in Auto Layout.
frame.itemSpacing = [1] frame.counterAxisAlignItems = '[2]'
Setting itemSpacing to 12 adds space between items. Setting counterAxisAlignItems to CENTER aligns items centrally on the cross axis.
Fill all three blanks to create a responsive Auto Layout frame with padding, spacing, and vertical direction.
frame.layoutMode = '[1]' frame.paddingTop = [2] frame.itemSpacing = [3]
Setting layoutMode to VERTICAL stacks items top to bottom. Padding top of 16 adds space inside the top edge. Item spacing of 8 adds space between items vertically.