0
arrayNo = [[NSMutableArray alloc] init]; //pickerview radius array
//[arrayNo addObject:@" Radius "];
[arrayNo addObject:@" 10 "];
[arrayNo addObject:@" 15000 "];
[arrayNo addObject:@" 20000 "];
[pickerView selectRow:1 inComponent:0 animated:NO];
[addressField resignFirstResponder];
radius.text= [arrayNo objectAtIndex:[pickerView selectedRowInComponent:0]];
我想通過上面的半徑選擇器在以下網址在半徑如何通過PickerValue在URL中的iphone
NSString *url = [NSString stringWithFormat:@"http://.............../phpsqlsearch_genxml.php?lat=%f&lng=%f&radius=%f",lati,longi,radius];
我用下面的按鈕單擊事件代碼,但不工作嘗試。
NSString * radius = [[[NSString alloc] initWithFormat:@"%f",[arrayNo objectAtIndex:[pickerView selectedRowInComponent:0]]]autorelease];
我應該寫什麼代碼一樣的...在此先感謝
感謝您的代碼。但上面的代碼是通過「lng」參數而不是半徑傳遞值。我怎樣才能設置? –