Defining addToPasteboard StringExtension to only be usable in IOS
Reason : UIPasteboard is __TVOS_PROHIBITED
This commit is contained in:
parent
d67d2107e4
commit
cf7ecf1fd5
|
@ -450,11 +450,16 @@ extension String {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// UIPasteboard is __TVOS_PROHIBITED and hence only supported in iOS
|
||||||
|
#if os(iOS)
|
||||||
|
|
||||||
/// EZSE: copy string to pasteboard
|
/// EZSE: copy string to pasteboard
|
||||||
func addToPasteboard() {
|
func addToPasteboard() {
|
||||||
let pasteboard = UIPasteboard.generalPasteboard()
|
let pasteboard = UIPasteboard.generalPasteboard()
|
||||||
pasteboard.string = self
|
pasteboard.string = self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// EZSE: Pattern matching of strings via defined functions
|
/// EZSE: Pattern matching of strings via defined functions
|
||||||
|
|
Loading…
Reference in New Issue