Post

Replies

Boosts

Views

Activity

Reply to The PKCanvasView Created by PDFPageOverlayViewProvider cannot work normally
There seems to be a bug here. I am using PDFPageView as a subview of documentView, and I need to set isUserInteractionEnabled = true on each PDFPageView for it to work properly. Without this setting, the interaction does not function as expected. for subView in view.documentView?.subviews ?? [] { if subView.theClassName == "PDFPageView" { subView.isUserInteractionEnabled = true } } extension NSObject { var theClassName: String { return NSStringFromClass(type(of: self)) } }
Topic: UI Frameworks SubTopic: General Tags:
Aug ’25
Reply to The PKCanvasView Created by PDFPageOverlayViewProvider cannot work normally
There seems to be a bug here. I am using PDFPageView as a subview of documentView, and I need to set isUserInteractionEnabled = true on each PDFPageView for it to work properly. Without this setting, the interaction does not function as expected. for subView in view.documentView?.subviews ?? [] { if subView.theClassName == "PDFPageView" { subView.isUserInteractionEnabled = true } } extension NSObject { var theClassName: String { return NSStringFromClass(type(of: self)) } }
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to When using index in a ForEach loop in SwiftUI, you might encounter an "index out of range" error.
@Claude31 , @jlilest Thank you for your interest. I've tried various "id" values, but couldn't resolve the issue. Whether it's through indices, enumerate, or direct indexing, the problem persists when accessing the array. I don't want to remove the index, but should I eventually make the choice to do so?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24