https://github.com/tkgka/arrayflags
https://github.com/tkgka/arrayflags
cocoapods flag flags swift
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkgka/arrayflags
- Owner: tkgka
- License: mit
- Created: 2022-03-18T11:36:00.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-20T16:21:31.000Z (over 4 years ago)
- Last Synced: 2025-06-16T11:18:09.043Z (about 1 year ago)
- Topics: cocoapods, flag, flags, swift
- Language: Swift
- Homepage:
- Size: 47.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ArrayFlags
[](https://travis-ci.org/tkgka/ArrayFlags)
[](https://cocoapods.org/pods/ArrayFlags)
[](https://cocoapods.org/pods/ArrayFlags)
[](https://cocoapods.org/pods/ArrayFlags)
[](https://hits.seeyoufarm.com)
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
## Installation
ArrayFlags is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'ArrayFlags'
```
## Usage
First, add **import ArrayFlags** on every swift file you would like to use ArrayFlags.
Then, use functions to return arrayed flags!
**"GetDictFlags"** and **"GetDictFlagsString"** returns Dict type value and **"GetArrayFlags"** returns array value
Parameters:
Val: Uint value which convert to array type
```swift
print("GetDictFlags",GetDictFlags(Val: NSEvent.modifierFlags.rawValue)) // return Seperated Flag value by Dict type
print("GetArrayFlags",GetArrayFlags(Val: NSEvent.modifierFlags.rawValue)) //return arrayed Flag value
print("GetDictFlagsString",GetDictFlagsString(Val: NSEvent.modifierFlags.rawValue)) // return pressed key value by Dict type
```

**"GetDictFlagsString"** function returns **L**, **R** or **B** for shift, ctrl, option and command flags
**"L"** means Left key pressed
**"R"** means Right key pressed
**"B"** means Both key pressed
## Author
tkgka, ksh17171@gmail.com
## License
ArrayFlags is available under the MIT license. See the LICENSE file for more info.