dimanche 21 décembre 2014

If segue was performed with identifier "segueHappened" run this function else run this function? is this possible?


if NSUserDefaults.standardUserDefaults().objectForKey("segueHappened")! as Bool == true {
selectedFromFavouritesQuote()
} else {
showFunFact()
}


I tired putting the segue in a NSuserdefault but no luck. Any ideas on how to get my selectedFromFavouritesQuote()to run if a segue was performed else run my showFunFact() function.


Aucun commentaire:

Enregistrer un commentaire