Skip to content

Instantly share code, notes, and snippets.

@alexanderkhitev
Created October 21, 2015 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanderkhitev/1883bbadec198ed3f9ea to your computer and use it in GitHub Desktop.
Save alexanderkhitev/1883bbadec198ed3f9ea to your computer and use it in GitHub Desktop.
func checkSpotlightResult() {
print("checkSpotlightResult")
boolCheckSpot = userDefault.boolForKey("spotlightBool")
if boolCheckSpot != nil {
if boolCheckSpot == true {
identifierCheckSpot = userDefault.valueForKey("spotlightIdentifier") as! String
if arrayForCheckSpot.contains(identifierCheckSpot) {
// print("Array title contains \(identifierCheckSpot)")
let index = arrayForCheckSpot.indexOf(identifierCheckSpot)!
let myIndexPath = NSIndexPath(forRow: index, inSection: 0)
print(myIndexPath)
self.tableView.selectRowAtIndexPath(myIndexPath, animated: true, scrollPosition: .None)
self.performSegueWithIdentifier("listenMusic", sender: self)
userDefault.setBool(false, forKey: "spotlightBool")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment