将新的数据放入临时数组
NSMutableArray *tmp=[[NSMutableArray alloc] init];
[tmp addObject:[[NSString alloc] initWithCString:pigNames.c_str() encoding:NSUTF8StringEncoding]];
pickerData=tmp;
[picker reloadAllComponents];//重新加载数据
[tmp release];
将新的数据放入临时数组
NSMutableArray *tmp=[[NSMutableArray alloc] init];
[tmp addObject:[[NSString alloc] initWithCString:pigNames.c_str() encoding:NSUTF8StringEncoding]];
pickerData=tmp;
[picker reloadAllComponents];//重新加载数据
[tmp release];