How to make a Scroll View Programmatically (Swift 2023, UIKit, Programmatic UI)

How to make a Scroll View Programmatically (Swift 2023, UIKit, Programmatic UI)

CodeBrah

1 год назад

5,529 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Peter Weyland
Peter Weyland - 23.06.2023 17:41

Thanks! Awesome tutorials)))

Ответить
Ryan Ashton
Ryan Ashton - 26.05.2023 10:12

Thanks. Great video. :)

I've been doing programmatic UIKit for a few months now and it's really strange to me why you have to set the width and height after already constraining all for sides.

Interestingly, you set `hConst = UILayoutPriority(50)` which is identical to `UILayoutPriority.fittingSizeLevel`.

Apple's documentation says this: " When you send a systemLayoutSizeFitting(_:) message to a view, the size fitting most closely to the target size is computed. This priority is quite low. It’s generally not appropriate to make a constraint at exactly this priority. You want to be higher or lower."

So I suppose it would be better to set it higher or lower. In any case, `priority` is a new concept for me, so thanks for teaching me this. It's already coming in handy as I came here trying to solve a particular problem.

Ответить
Ramar Parham
Ramar Parham - 02.05.2023 03:35

Can you do videos on programmatic CollectionViews?

Ответить