Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on integerValue #12

Open
pronebird opened this issue Dec 27, 2013 · 1 comment
Open

Crash on integerValue #12

pronebird opened this issue Dec 27, 2013 · 1 comment

Comments

@pronebird
Copy link

I see a crash on selectedRow = [[_pickerViewArray objectAtIndex:0] integerValue]; but I don't understand why pickerView tries to take an integerValue from objects array that I pass via +(void)showPickerViewInView:(UIView *)view withObjects:(NSArray *)objects withOptions:(NSDictionary *)options objectToStringConverter:(NSString *(^)(id))converter completion:(void (^)(id))completion

@ercancelik
Copy link

You must set selectedObject property as in the example.

NSArray *strings = @[@"This", @"is", @"just", @"an array", @"of strings."];
[MMPickerView showPickerViewInView:self.view
withStrings:strings
withOptions:@{selectedObject:_selectedString}
completion:^(NSString *selectedString) {

                        _label.text = selectedString;
                        _selectedString = selectedString;

}];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants