diff --git a/MMPickerView/MMPickerView.m b/MMPickerView/MMPickerView.m index 0986641..209ddcf 100644 --- a/MMPickerView/MMPickerView.m +++ b/MMPickerView/MMPickerView.m @@ -35,7 +35,7 @@ @interface MMPickerView () @property (nonatomic, strong) UIColor *pickerViewTextColor; @property (nonatomic, strong) UIFont *pickerViewFont; @property (nonatomic, assign) CGFloat yValueFromTop; -@property (nonatomic, assign) NSInteger pickerViewTextAlignment; +@property (nonatomic, assign) NSTextAlignment pickerViewTextAlignment; @property (nonatomic, assign) BOOL pickerViewShowsSelectionIndicator; @property (copy) void (^onDismissCompletion)(NSString *); @property (copy) NSString *(^objectToStringConverter)(id object); @@ -148,10 +148,10 @@ -(void)initializePickerViewInView: (UIView *)view NSNumber *textAlignment = [[NSNumber alloc] init]; textAlignment = options[MMtextAlignment]; //Default value is NSTextAlignmentCenter - _pickerViewTextAlignment = 1; + _pickerViewTextAlignment = NSTextAlignmentCenter; if (textAlignment != nil) { - _pickerViewTextAlignment = [options[MMtextAlignment] integerValue]; + _pickerViewTextAlignment = (NSTextAlignment)[options[MMtextAlignment] integerValue]; } BOOL showSelectionIndicator = [options[MMshowsSelectionIndicator] boolValue];