tags:

views:

97

answers:

1

In My Application pressing the submit button i wanted to perform submit operation but i don't know how combine the textview's value with pickerview's value.if it is possible then show me code with example.

A: 

How would you like to combine the values, as a string?

If you simply want to combine them in a single string, here's an example of how you can do it:

- (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...
}
Ray Wenderlich