UIPickerVier DataSource manipulieren

M

Malcom X

Aktives Mitglied
Thread Starter
Dabei seit
16.02.2005
Beiträge
190
Reaktionspunkte
2
Hallo,

ich habe ein kleines Problem und zwar möchte ich gerne die DataSource von UIPickerVier manipulieren.

so sieht das Array im Moment aus.

pickerViewData = [[NSMutableArray alloc] init];
[pickerViewData addObject:mad:"Ja"];
[pickerViewData addObject:mad:"Nein"];

Im weiteren Programmverlauf soll dann ein Objekt entfernt werden.
Das habe ich auf diese Art versucht zu lösen.

[pickerViewData removeObject:mad:"Ja"];
[pickerView reloadAllComponents];
[pickerView release];

Leider klappt das aber nicht.

Vielen Dank für eure Hilfe.
 
You can dynamically change the rows of a component by calling the reloadComponent: method, or dynamically change the rows of all components by calling the reloadAllComponents method. When you call either of these methods, the picker view asks the delegate for new component and row data, and asks the data source for new component and row counts.

an sich sollte das also reichen, wenn du das UIPickerViewDataSource protocol implementiert hast.

warum machst du denn einen release auf pickerView? brauchst das objekt nicht mehr?
 
Zurück
Oben Unten