Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions MMPickerView/MMPickerView.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ +(void)showPickerViewInView:(UIView *)view
withOptions:(NSDictionary *)options
completion:(void (^)(NSString *))completion{

if ([[view subviews] containsObject:[self sharedView]]) {
// The picker is already showing.
return;
}

[[self sharedView] initializePickerViewInView:view
withArray:strings
withOptions:options];
Expand All @@ -77,6 +82,11 @@ +(void)showPickerViewInView:(UIView *)view
objectToStringConverter:(NSString *(^)(id))converter
completion:(void (^)(id))completion {

if ([[view subviews] containsObject:[self sharedView]]) {
// The picker is already showing.
return;
}

[self sharedView].objectToStringConverter = converter;
[self sharedView].onDismissCompletion = completion;
[[self sharedView] initializePickerViewInView:view
Expand Down