diff --git a/MMPickerView/MMPickerView.m b/MMPickerView/MMPickerView.m old mode 100644 new mode 100755 index 0986641..ac99cd8 --- a/MMPickerView/MMPickerView.m +++ b/MMPickerView/MMPickerView.m @@ -180,7 +180,8 @@ -(void)initializePickerViewInView: (UIView *)view [self addSubview:_pickerViewContainerView]; //PickerView Container with top bar - _pickerContainerView = [[UIView alloc] initWithFrame:CGRectMake(0.0, _pickerViewContainerView.bounds.size.height - 260.0, 320.0, 260.0)]; + CGFloat winWidth = view.bounds.size.width; + _pickerContainerView = [[UIView alloc] initWithFrame:CGRectMake(0.0, _pickerViewContainerView.bounds.size.height - 260.0, winWidth, 260.0)]; //Default Color Values (if colors == nil) @@ -273,7 +274,7 @@ -(void)initializePickerViewInView: (UIView *)view */ //Add pickerView - _pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0, 44.0, 320.0, 216.0)]; + _pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0, 44.0, winWidth, 216.0)]; [_pickerView setDelegate:self]; [_pickerView setDataSource:self]; [_pickerView setShowsSelectionIndicator: _pickerViewShowsSelectionIndicator];//YES];