Post

Replies

Boosts

Views

Activity

UIViewControllerRepresentable inside a UIScrollView (List, ScrollView and etc) not working
Hi, I have a UIViewController that contains a UITextField I am presenting that view controller inside SwiftUI using a UIViewControllerRepresentable and I am able to interact with the text field fine and the view controller lifecycle executes normally if the representable is not presented on any SwiftUI container that internally uses a scroll view on the other hand if I put the representable view inside a SwiftUI view that has a scroll view internally (when the UIKit hierarchy is generated) the text field does not respond to interaction anymore and the only view controller lifecycle method invoked is the viewDidLoad from my view controller the other methods are not executed. Anyone knows if this is a bug on SwiftUI or if there is any additional setup necessary for UIViewControllerRepresentables? Thanks in advance.
3
1
813
Nov ’22