<commit_before>MMPickerView
============

An easy to use and customizable PickerView for your iOS app.


## Installation

### From CocoaPods

Add `pod 'MMPickerView'` to your Podfile.

### Manually

_**Important note if your project doesn't use ARC**: you must add the `-fobjc-arc` compiler flag to `MMPickerView.m` in Target Settings > Build Phases > Compile Sources._

* Drag the `MMPickerView/MMPickerView` folder into your project.
* Add the **CoreGraphics** framework to your project.

## Usage

(see sample Xcode project in `/Demo`)

MMPickerView is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call `[MMPickerView method]`).

### Showing the PickerView

You can show the PickerView:

```objective-c
+(void)showPickerViewInView: (UIView *)view
                withStrings: (NSArray *)strings
                withOptions: (NSDictionary *)options
                 completion: (void(^)(NSString *selectedString))completion;

+(void)showPickerViewInView: (UIView *)view
                withObjetcs: (NSArray *)objects
                withOptions: (NSDictionary *)options
    objectToStringConverter: (NSString *(^)(id object))converter
       completion: (void(^)(id selectedObject))completion;
```<commit_msg>Added changes to Readme<commit_after>MMPickerView
============

An easy to use and customizable PickerView for your iOS app.


## Installation

### From CocoaPods

Add `pod 'MMPickerView'` to your Podfile.

### Manually

_**Important note if your project doesn't use ARC**: you must add the `-fobjc-arc` compiler flag to `MMPickerView.m` in Target Settings > Build Phases > Compile Sources._

* Drag the `MMPickerView/MMPickerView` folder into your project.
* Add the **CoreGraphics** framework to your project.

## Usage

(see sample Xcode project in `/Demo`)

MMPickerView is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call `[MMPickerView method]`).

### Showing the PickerView

You can show the PickerView:

```objective-c
+(void)showPickerViewInView: (UIView *)view
                withStrings: (NSArray *)strings
                withOptions: (NSDictionary *)options
                 completion: (void(^)(NSString *selectedString))completion;

+(void)showPickerViewInView: (UIView *)view
                withObjetcs: (NSArray *)objects
                withOptions: (NSDictionary *)options
    objectToStringConverter: (NSString *(^)(id object))converter
       completion: (void(^)(id selectedObject))completion;
```

### Examples

```objective-c

- (IBAction)showPickerViewButtonPressed:(id)sender {

 NSArray *strings = @[@"This", @"is", @"just", @"an array", @"of strings."];

[MMPickerView showPickerViewInView:self.view
   withStrings:strings
   withOptions:nil
   completion:^(NSString *selectedString) {
   
   self.label.text = selectedString;
   
   }];
}
```

### Customizing the PickerView
Both show methods use a NSDictionary to set the options of the PickerView. If you want a native looking PickerView, just set it to nil. In case of customization, use any of the different properties to customize the PickerView. All of the properties are optional.

**Options**

- pickerViewBackgroundColor - UIColor
- pickerViewTextColor - UIColor
- toolbarBackgroundColor - UIColor
- buttonColor - UIColor
- font - UIFont 
- yValueFromTop - NSInteger
- selectedObject - An Object
- toolbarBackgroundImage - UIImage

```objective-c
NSDictionary *options = @{backgroundColor: [UIColor whiteColor],
   textColor: [UIColor blackColor],
   toolbarColor: [UIColor whiteColor],
   buttonColor : [UIColor blueColor],
   font : [UIFont systemFontOfSize:18],
   yValue:@3};
```


### Customizing the PickerView
Both show methods use a NSDictionary to set the options of the PickerView. If you want a native looking PickerView, just set it to nil. In case of customization, use any of the different properties to customize the PickerView. All of the properties are optional.

**Options**

- pickerViewBackgroundColor - UIColor
- pickerViewTextColor - UIColor
- toolbarBackgroundColor - UIColor
- buttonColor - UIColor
- font - UIFont 
- yValueFromTop - NSInteger
- selectedObject - An Object
- toolbarBackgroundImage - UIImage

```objective-c
NSDictionary *options = @{backgroundColor: [UIColor whiteColor],
   textColor: [UIColor blackColor],
   toolbarColor: [UIColor whiteColor],
   buttonColor : [UIColor blueColor],
   font : [UIFont systemFontOfSize:18],
   yValue:@3};
```
{'fraction_non_alphanumeric': 0.10615145458583167, 'fraction_numerical': 0.0013324450366422385, 'mean_word_length': 4.147428571428572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6357273', 'n_tokens_mistral': 1355, 'n_tokens_neox': 1297, 'n_words': 443}