Our app displays complex, data-driven layouts that can display grids of items in addition to full width rows (essentially, nested lists). We'd like to be able to preserve cell/item portability (i.e., display in any content strip) and allow them to carry capabilities like swipe actions. In UIKit we have features in compositional layout that allow for this. However, in SwiftUI the only support seems to be at the List level.
Nesting a List within a ScrollView to get swipe actions feels like a dark road. We've rolled our own swipe actions system, but we'd much rather use a native solution. Any other options here?
Improvement ticket here FB17994843.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The "What's new in UIKit" session introduces new observation tracking features and mentions that they are "on by default" in 26. Is it possible to disable this feature?
We have our own system built on ObservableObject that keeps our UIKit models/views in sync and triggers updates. We want to make sure there isn't contention between the new feature and our own.
We've had some success nesting Manual Layout (ML) (i.e., views that implement layoutSubviews() and sizeThatFits(...)) within Auto Layout (AL) views. This seems to work fine if the AL parent defines the size for the ML child. The ML child doesn't seem to participate in defining its size at all. In fact, sizeThatFits(...) is not called at all during the layout pass.
This isn't surprising given the differences in the two systems. Ideally the sizeThatFits: method would get called with whatever the AL solver decided was appropriate, but I understand that this is complicated by chicken and egg problems - it's not this simple.
For the case in which the ML child wants to define its own size without constraints (i.e., using CGFloat.greatestFiniteMagnitude size for sizeThatFits) I was hoping to leverage the intrinsicContentSize along with content hugging and compression resistance priorities to communicate size information up to the AL parent.
This...almost works. I'm getting frames that seem to be taking the intrinsic size into account, but aren't exactly what I'd expect.
Are there any other techniques I should be exploring here?