TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Oct 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Igor Matyushkin.
Baggage
is a set of extensions for iOS SDK that simplify work with clipboard. Absolutely compatible with standard UIPasteboard
class.
Baggage
folder to your project.or
Baggage
cocoapodNote: For Swift 2.x use Baggage v1.0
. For Swift 3.0 use Baggage v3.0
.
Copy string to clipboard:
let str = "Some text"
str.bg_copyToClipboard()
Get string from clipboard:
let str = String.bg_stringFromClipboard()
NSLog(str) // Some text
Copy text to clipboard:
let textField = UITextField()
textField.text = "Some text"
textField.bg_copyTextToClipboard()
Paste text from clipboard:
textField.bg_pasteTextFromClipboard()
NSLog(textField.text!) // Some text
Copy text to clipboard:
let textView = UITextView()
textView.text = "Some text"
textView.bg_copyTextToClipboard()
Paste text from clipboard:
textView.bg_pasteTextFromClipboard()
NSLog(textView.text) // Some text
Baggage
is available under the MIT license. See the LICENSE
file for more info.