私はiphoneを初めて使用します。ピッカービューに少し疑問があります。ピッカービューで行を選択すると、ピッカービューを取り、そこにデータを保存します。その行のテキストは、配置したuibuttonに表示する必要がありますが、問題テキストの最初の 3 文字のみが表示されます。なぜこれが私が書いた以下のコードなのかわかりません
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
if([pickerView isEqual:selectBookPickerView]){
NSString *booksTitle = [[NSString alloc] initWithFormat:@"%@",[booksArray objectAtIndex:row]];
selectBook.titleLabel.text = booksTitle;
}
else
{
NSString *chapterTitle = [[NSString alloc] initWithFormat:@"%@",[chaptersArray objectAtIndex:row]];
startChapter.titleLabel.text = chapterTitle;
}
}