skywinder/ActionSheetPicker-3.0 — pull request #113 by venj (2014-12-12 03:32:41+00:00)
Title: Fixed an issue when initial selections applied to dynamically generated picker titles.

### Scenario

For example, the titles for two pickerView components are like this:

```objc
self.titles = @[ @[ @"Component 0 Row 0", @"Component 0 Row 1"],
@[ @"Component 0 Row 1", @"Component 1 Row 1", @"Component 1 Row 2", @"Component 1 Row 3"]
];
```

If the initial selections for pickerview are `@[@(0), @(0)]`, there is no problem. But when initial selections are `@[@(1), @(2)]`, there will be an app crash.

### Reason

I'm not very sure of the actual reason, but likely the reason is: set selected index for picker will not automatically call this `UIPickerView` delegate `- pickerView:didSelectRow:inComponent:`. In our case, we have different number of rows in different components, and we have to update the second component when selection is changed in the first component, before we set the second selection. If not, we will crash the app if the selection is beyond the range of rows in first selection in our case.

### Solution

A manual call to `- pickerView:didSelectRow:inComponent:` delegate will fix the problem.