/SSCTaglistView

Customizable iOS tag list view, in Swift.

Primary LanguageSwiftMIT LicenseMIT

SSCTaglistView

Simple customizable iOS tag list view, in Swift.

Swift Version Build Status License CocoaPods Compatible Platform PRs Welcome

Alt text

Features

  • Simple and highly customizable iOS tag list view, in Swift.
  • Supports @IBDesignable.
  • Adds array of tags to view.
  • Add single tag to list.
  • Add single tag to specific index.
  • Remove all tags from taglist view.
  • Remove tags from specific index.
  • Directly copy available tags from taglist view
  • Directly copy selected tags from taglist view.
  • Directly copy unselected tags from taglist view.

Requirements

  • iOS 10.0+
  • Xcode 9.0

Installation

CocoaPods

You can use CocoaPods to install SSCTaglistView by adding it to your Podfile:

platform :ios, '10.0'
use_frameworks!
pod 'SSCTaglistView'

To get the full benefits import YourLibrary wherever you import UIKit

import UIKit
import SSCTaglistView

Manually

  1. Download and drop TaglistCollection.swift TagCollectionCell.swift Theme.swift CloseButton.swift TagCollectionCell.xib in your project.
  2. Congratulations!

Usage example

Add view in storyboard and apply class TaglistCollection. Here tagListView is outlet from storyboard

import SSCTaglistView

Create outlet of that view.

Add single tags to view using

    tagListView.appendTag(tagName: #Stringtagname)

Add single tags to specific index

    self.appendTag(tagName: #stringTagName, atIndex: #Index)

Add array of tags to view using

    tagListView.appendTag(tagNamelist: #arrayOfString)

Remove all tags from view

    tagListView.removeAllTags()

Remove all tag from specific index

    tagListView.removeTagAt(indexPath: #IndexOfTag)

Copy all tags from taglistView

    tagListView.copyAllTags() will return array of tags.

Copy selected tags from taglistView.

    tagListView.copySelectedTags() will return array of tags.

Copy unselected tags from taglistView.

    tagListView.copyUnselectedTags() will return array of tags.

Contribute

We would love you for the contribution to SSCTaglistView, check the LICENSE file for more info.

Meta

Distributed under the MIT license. See LICENSE for more information.

https://github.com/sanjaysinh-Chauhan/SSCTaglistView