mirror of
https://github.com/otaviocc/Triton.git
synced 2026-01-30 04:04:27 +00:00
26 lines
493 B
Swift
26 lines
493 B
Swift
#if os(iOS)
|
|
|
|
import UIKit
|
|
|
|
struct IOSClipboardService: ClipboardServiceProtocol {
|
|
|
|
func copy(_ string: String) {
|
|
UIPasteboard
|
|
.general
|
|
.string = string
|
|
}
|
|
|
|
func copy(
|
|
_ data: Data,
|
|
type: String
|
|
) {
|
|
UIPasteboard
|
|
.general
|
|
.setData(
|
|
data,
|
|
forPasteboardType: type
|
|
)
|
|
}
|
|
}
|
|
|
|
#endif
|