madjid / MMPickerView

An easy to use and customizable PickerView for your iOS app.
MIT License
237 stars 59 forks source link

Selector not displayed on iOS6 #8

Closed jtomasrl closed 10 years ago

jtomasrl commented 10 years ago

The blue current selector image is not being displayed on iOS6, on iOS7 everything works

    UIColor *colorbg = bgColor;
    NSDictionary *options;
    // iOS7
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
        options = @{MMbackgroundColor: colorbg,
                    MMtextColor: [UIColor whiteColor],
                    MMtoolbarColor: [UIColor grayColor],
                    MMbuttonColor: [UIColor blackColor],
                    MMselectedObject: categoriaActual
                    };
    // iOS6
    } else {
        options = @{MMbackgroundColor: colorbg,
                    MMtextColor: [UIColor blackColor],
                    MMtoolbarColor: [UIColor blackColor],
                    MMbuttonColor: [UIColor blackColor],
                    MMselectedObject: categoriaActual
                    };
    }

    [MMPickerView showPickerViewInView:self.view
                           withStrings:self.categorias
                           withOptions:options
                            completion:^(NSString *selectedString){
                                self.categoriaActual = selectedString;}
                   doneCompletionBlock:^{
                       //NSLog(@"doneCompletion");
                       [self actualizarCategoria:self.categoriaActual];
                   }];

SCREENSHOT

jtomasrl commented 10 years ago

I just fixed it, documentation need a serious update

MMshowsSelectionIndicator: @true