https://github.com/iamshezad/shselectionindicator
Selection Indicator using an imageView.
https://github.com/iamshezad/shselectionindicator
indicator selection swift4
Last synced: about 1 year ago
JSON representation
Selection Indicator using an imageView.
- Host: GitHub
- URL: https://github.com/iamshezad/shselectionindicator
- Owner: iamshezad
- License: mit
- Created: 2018-09-03T07:17:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-06T11:07:31.000Z (over 7 years ago)
- Last Synced: 2023-10-19T23:08:44.109Z (over 2 years ago)
- Topics: indicator, selection, swift4
- Language: Swift
- Size: 1.58 MB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SHSelectionIndicator
Selection Indicator using an imageView.
[](https://developer.apple.com/swift/)
[](LICENSE)
[]()
## Demo

## Installation
Just drag and drop the SHSelectionIcon.swift file from SHSelectionIndicator folder to your project.
#### Cocoapods - updating soon
## Usage
1. a- You can use by drag and drop an imageView in storyboard and set image class to SHSelectionIcon and set an outlet for the imageView
b- Or you can initialize using a variable like below:
```swift
var selection = SHSelectionIcon()
```
2. a- You can set selection indicator icon height and width.
for example:
```swift
selection.selectionIconHeight = 30 //By default 30 for both height and width
selection.selectionIconWidth = 30
```
b- You can set selection indicator icon direction.
for example:
```swift
selection.pointerDirection = .vertical //.vertical and .horizontal are available
```
c- You can set selection indicator icon Image.
for example:
```swift
selection.image = UIImage(named: "icon")
```
d- You can set selection indicator icon initial selected button
for example:
```swift
selection.initialButton(object: sampleButtons[0]) //Here sample buttons is a collection of buttons
```
3. Change the selection indicator icon to selected button
call a method setSelection(object: buttonObject) inside button action with its buttonObject
for example:
```swift
selection.setSelection(object: sender) //this method is called inside action of selected button
```
try using sample projeect to know the working.
## Requirements
* iOS 10.0+
## Example
Download the Sample project.
## Contact
Mail me @: shezadahamed95@gmail.com