i get data form JSON . Like this
-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
al=[NSJSONSerialization JSONObjectWithData:webData options:0 error:nil];
NSLog(@"String String %@",al);
for (array in al) {
NSLog(@"array is array %@",array);
}
}
PickerView Methods:-
- (NSInteger)numberOfComponentsInPickerView:
(UIPickerView *)pickerView
{
return 1;
}
- (NSInteger)pickerView:(UIPickerView *)pickerView
numberOfRowsInComponent:(NSInteger)component
{
return array.count;
}
- (NSString *)pickerView:(UIPickerView *)pickerView
titleForRow:(NSInteger)row
forComponent:(NSInteger)component
{
return array[row];
}
I tried like this but it's showing empty PickerView.So Please give me any idea.
My Json like this:
[[1,"Hyd"],[2,"viz"]]