Skip to content

Instantly share code, notes, and snippets.

@pallavtrivedi03
Created March 12, 2018 20:19
Show Gist options
  • Save pallavtrivedi03/758f52d8828fa019394886b4704599e5 to your computer and use it in GitHub Desktop.
Save pallavtrivedi03/758f52d8828fa019394886b4704599e5 to your computer and use it in GitHub Desktop.
@IBAction func didClickOnExploreButton(_ sender: NSButtonCell)
{
toggleViewStates(state: false)
files = [String:Media]()
switch sender.tag {
case 101:
getFilesFromDoucmentDir(type: .image)
case 102:
getFilesFromDoucmentDir(type: .video)
case 103:
getFilesFromDoucmentDir(type: .audio)
case 104:
getFilesFromDoucmentDir(type: .document)
default:
break
}
}
@IBAction func didClickOnAddFileButton(_ sender: NSButton)
{
toggleViewStates(state: true)
nothingFoundLabel.isHidden = true
files = [String: Media]()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment