SwiftHashTags 0.1.2

SwiftHashTags 0.1.2

Maintained by anu119.



  • By
  • Anuradh Caldera

SwiftHashTags

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Demo

Requirements

iOS 9.0 or later

Installation

SwiftHashTags is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwiftHashTags','~>0.1.2'

How to use

import the library

import SwiftHashTags

Create SwiftHashTag View and Add Tags.

//MARK: Adding hashtags to SwiftHashTags
var hashtags: [SwiftHashTags] = []
let hashtag1 = SwiftHashTags(title: "hashtagone", id: 99) // you can add any amount of Tags
hashtags.append(hashtag1)

//MARK: Create SwiftHashTag View
let swifthashtags = SwiftHashTagsView()
swifthashtags.frame = CGRect(x: 10, y: 20, width: UIScreen.main.bounds.width - 20, height: UIScreen.main.bounds.height - 20) // you can give any size
swifthashtags.setHashTags(with: hashtags) // set your hash tags here
view.addSubview(swifthashtags)
swifthashtags.swifthashtagDelegate = self

SwiftHashTags Delegate methods

func selectedHashTag(title: String, id: Int) {
  // do your stuffs here
}

func unselectedHashTag(title: String, id: Int) {
  // do your stuffs here
}

Features

1.Hide or show Verticle Scroll Indicator

swifthashtags.showverticalScoller = true

Author

Anuradh caldera, [email protected]

License

SwiftHashTags is available under the MIT license. See the LICENSE file for more info.