To run the example project, clone the repo, and run pod install
from the Example directory first.
ArrayFlags is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'ArrayFlags'
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
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
tkgka, ksh17171@gmail.com
ArrayFlags is available under the MIT license. See the LICENSE file for more info.