An iOS text field that represents tags, hashtags, tokens in general.
tagsField.acceptTagOption = .space
.onDidEndEditing
and onDidBeginEditing
events were removed in favor of UITextFieldDelegate
methods (textFieldDidBeginEditing(textField:)
and textFieldDidEndEditing(textField:)
). The delegate should be assigned to the textDelegate
property and it's related with the input text field. It's also a nice way to have access to textFieldShouldReturn(textField:)
where it's possible to change the first responder when the return
key is free (i.e.: tagsField.acceptTagOption = .comma
is set).Please use the swift2.3
branch for now.
CocoaPods
pod 'WSTagsField', :git => 'https://github.com/whitesmith/WSTagsField.git', :branch => 'swift2.3'
or just add swift_version = '2.3'
to your Podfile
:
target 'AmazingProject' do
swift_version = '2.3'
pod 'WSTagsField', '~>1.2.0'
end
Carthage
github "whitesmith/WSTagsField" "swift2.3"
or just run carthage
with Swift 2.3 toolchain:
carthage update WSTagsField --no-use-binaries --platform iOS --toolchain
com.apple.dt.toolchain.Swift_2_3
padding
property is now using the standard contentInset
property of UIView. So, padding
has been deprecated.displayDelimiter
has been renamed to isDelimiterVisible
.tagCornerRadius
has been renamed to cornerRadius
.placeholderAlwayVisible
has been renamed to placeholderAlwaysVisible
.UIEdgeInsets
to layoutMargins
property.numberOfLines
property.spaceBetweenLines
property.UITableView
.@billzhou0223, @griffinmacias, @matsune, @nicol3a and @CharlesAbouYakzan for the amazing API improvements and fixes. @krezzoid for the conversion and improvements for Swift 4.0.
⚠️ This release has an invalid podspec
. Please update to 1.2.5
.
fieldTextColor
(ty @canaksoy)textField
(ty @brnunes)inputFieldAccessoryView
propertyonDidSelectTagView
and onDidUnselectTagView
eventselectNextTag
and selectPrevTag
methods⚠️ Missed CocoaPod update.
inputFieldAccessoryView
propertyonDidSelectTagView
and onDidUnselectTagView
eventselectNextTag
and selectPrevTag
methods