2010-07-28 6 views
1

Je souhaite remplir des fichiers one.plist à partir d'un certain nombre de fichiers .plist selon la sélection de l'utilisateur. Comment remplir UIPickerView avec un fichier .plist?Comment remplir UIPickerView avec un fichier .plist?

+0

Je ne comprends pas votre question. Pourquoi ne pas simplement charger un fichier .plist dans un tableau et simplement remplir le UIPickerView avec ce tableau? – vodkhang

Répondre

1

Je ne comprends pas bien votre question mais voici ce que je suppose. Vous pouvez charger des données à partir d'un fichier .plist, puis remplir le UIPickerView.

Voici un exemple de code pour le chargement d'un fichier .plist:

NSString *path = [[NSBundle mainBundle] bundlePath]; 
NSString *finalPath = [path stringByAppendingPathComponent:@"money.plist"]; 
NSDictionary *plistDictionary = [[NSDictionary dictionaryWithContentsOfFile:finalPath] retain]; 
Questions connexes