You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structPPasteButton:View{@Stateprivatevars="戴铭"varbody:someView{TextField("输入", text: $s).textFieldStyle(.roundedBorder)PasteButton(payloadType:String.self){ str in
guard let first = str.first else{return}
s = first
}}}
The text was updated successfully, but these errors were encountered:
Transferable 协议使数据可以用于剪切板、拖放和 Share Sheet。
可以在自己应用程序之间或你的应用和其他应用之间发送或接受可传输项目。
支持 SwiftUI 来使用。
官方文档 Core Transferable
session Meet Transferable
新增一个专门用来接受 Transferable 的按钮视图 PasteButton,使用示例如下:
The text was updated successfully, but these errors were encountered: