Post

Replies

Boosts

Views

Activity

Reply to iOS 15 broke UIViewRepresentable. updateUIView is called before bounds are updated.
I've been looking for this answer for a long time. Patrick's comments finally help me solve this. Override layoutSubviews() in the hosted UIView:     override func layoutSubviews() {         setNeedsDisplay()     } It's still not ideal because iOS redraws the view initially by stretching a cached copy of the rendered view to match the new bounds, and then its gets redrawn correctly after layoutSubviews() is called.
Feb ’23