国リストと対応するフラグを備えたカスタムピッカーがありますが、すべてが正常に機能しますが、国を選択したときに国名と背景画像としてのフラグを表示したいのですが、メソッドでテキストをテキストに設定できない理由がわかりません。私には意味がありません。これは私のコードです:私の「国」NSSTringがインターフェースで適切に宣言され、.mで合成され、namefieldTextIBOutletが接続されていることに注意してください。コード:
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
// report the selection to the UI label
country = [customPickerArray objectAtIndex:[pickerView selectedRowInComponent:0]];
nameFiled.text =country; // Nothing happens here
NSLog(@"%@",country); //NSLog show correctly selected country in a console
}