So I am wanting to create a Scrollview with a list of labels. I am having a super hard time with the constraints and what not. It is obviously nothing like adding labels to a simple UIView.
What i need is one label in the top left corner, about 40% width from parent view with a top and left border of 10. Then i need a second label right next to it also with a 40% width and a top and right border of 10. After doing this i will continue creating labels under each other in the same sequence. All with borders of 10.
(P.S. I know labels have a set height value but i have been giving them values of 0.05% height of parent view just for organizing reasons.)
Now, normally when adding to a normal view i would match the parent width and height then go to the identity inspector and under the sizes-equalwidthsconstraint-multiplier set it to 0.4 and height etc. Then I would go to the pin and add the constraints top: 10 and left: 10. By that time i would be golden with the first label! However it doesnt work that way with scrollviews. I keep getting red lines every where and a caution alert saying "Scrollable content size is ambiguous for "Scroll View"".
(P.S. I have however been able to successfully create the first label, with red lines though, but when creating the second label i can never get it to line up right.)
If you dont know how to do it through storyboard and should do it programmatically then how would i do that? Swift please, always.
for example:
make: Chevrolet model: Silverado year: 2016 color: Pearl White
so on and so forth....
its basically a list of non editable text..
i was wanting to go for that look.
Please help, thank you!