mardi 3 février 2015

How to assign audio files array to phrases array in Swift?

I am building an audio phrasebook app. The aim is to store phrases into Core Data database with corresponding audio pronunciation. I know I'd better to store the phrases with the paths of audio files. The only thing that I can do is to extract audio files paths from application directory:



let mp3sPaths = NSBundle.mainBundle().pathsForResourcesOfType("mp3", inDirectory: nil)


The thing I'd like to know is how to connect in Core Data the phrases and related audios automatically, because there will be more than thousand phrases.


Aucun commentaire:

Enregistrer un commentaire