Closed 0si43 closed 2 years ago
Transfer in SwiftUI Canvas → List is good choice
I plagiarized PKCanvasViewWrapper from below……
https://www.hackingwithswift.com/forums/swiftui/pencilkit-with-swiftui/59
Will I need this?
https://stackoverflow.com/questions/59430099/pencilkit-in-swiftui
I could get tap gesture below↓
https://developer.apple.com/documentation/swiftui/tapgesture
UIMenu in SwiftUI is Menu
https://developer.apple.com/documentation/swiftui/menu?changes=latest_beta
But it's not what I thought
Okay, I need to use UIActivityViewController in SwiftUI I should wrap UIActivityViewController……😩
UI got a bit of changed. I think it's OK... It's better callout-like UI, but I cannot find easy way now
And I want to introduce LPLinkMetadata for improving preview!
I realized needs to conform UIActivityItemSource protocol, but I didn't know how to.
↑I referred this stackOverFlow question, implement like this
extension DelegateBridgeObject: UIActivityItemSource {
func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any {
return ""
}
func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any? {
return nil
}
func activityViewControllerLinkMetadata(_ activityViewController: UIActivityViewController) -> LPLinkMetadata? {
let metadata = LPLinkMetadata()
metadata.title = "Share your note"
return metadata
}
}
Ideally, its image must be shared note, but now, it's difficult for structural problem. Later, I will introduce an architecture.
Ideally, its image must be shared note, but now, it's difficult for structural problem. Later, I will introduce an architecture.
Maybe, this is hard because I should resize note image.
LPLinkMetadata is seemed to expect url interface. How to use local image?
現状の設計