I know that with UIDatePicker you can use something like:
NSDate *myDate = picker.date;
But I use UIPickerView in my opinion. How can I choose a value in the same way? Or do I need to configure the didSelectRow method for this?
Update: This code works for a collector with 1 component:
NSInteger row; NSString *weightSelected; row = [repPicker selectedRowInComponent:0]; weightSelected = [pickerArray objectAtIndex:row];
I am tired of this code for my assembler with two components, but it freezes:
NSInteger row1, row2; NSString *weightSelected1; NSString *weightSelected2; row1 = [repPicker selectedRowInComponent:0]; row2 = [repPicker selectedRowInComponent:1]; weightSelected1 = [pickerArray objectAtIndex:row1]; weightSelected2 = [pickerArray objectAtIndex:row2]; NSString *weightSelected = [NSString stringWithFormat:@"%@.%@", weightSelected1, weightSelected2];
ios objective-c cocoa-touch
user594161 Apr 20 2018-11-11T00: 00Z
source share