2009-10-29 29 views

回答

0

您希望如何将字符串的值组合起来?

如果你只是想他们在一个单一的字符串相结合,这里是你如何能做到这一个例子:

- (IBAction)submitPressed:(id)sender { 
    // Load the selected row for the first component in your picker view 
    // If you have more than one component you may need to look up more 
    // Also, you may need to translate this number into something more meaningful 
    // such as what the selected row represents 
    int selectedRow = [pickerView selectedRowInComponent:0]; 
    NSString *myString = [NSString stringWithFormat:@"%@ %d", 
     textView.text, selectedRow]; 
    // Do something with myString... 
} 
相关问题