You could try having the web service setup so it you pass "&output=total&postcode=?????" then it just prints to the page (no html or anything) the number of citys matching that postcode.
(an example would be something like this)
http://modmyi.com/cstats/index.php?p...ro&output=text
Then also
&output=text&postcode=????&city=1"
in the url like this would produce the of the first city with that postcode match.
This way you could do something like this.
(very simplified code)
Code:
//Setup
NSArray *options;
int total;
int requests;
requests = 1;
NSData *totalcities = [dataWithContentsOfURL:@"http://site.com/app/postcode.php?&output=total&postcode=%@", postcode];
total = totalcities;
for(int i = requests; i <= total; i++)
{
NSData *temp = [NSData dataWithContentOfURL:@"http://site.com/app/postcode.php?&output=text&postcode=%@&city=%@", postcode, requests];
NSString = *temp2;
tem2 = [NSString stringwithformat:temp];
[options addObject:temp2];
requests++
}
And i haven't used NSPickers before but you'd probably do something like.
UIPickerView *cities = [UIPicker withNumberOfOptions:total];
and then fill the options with the array created above.
Sorry it's a bit messy but i hope you get the idea.