0

UIPicker で選択した行をタイトルごとに設定したいのですが、以下のコードを使用していますが、機能していません。

// data from sqlite db

test2 =[[NSString alloc]
                    initWithUTF8String:
                    (const char *) sqlite3_column_text(statement, 1)];


NSLog(@"%@", test2); // 400 (the value)
[self.myPickerView selectRow:[[[NSUserDefaults 
    standardUserDefaults]objectForKey:test2]intValue] inComponent:0 animated:YES];
4

0 に答える 0