From eaa704e0cd1b102b5d5ac8e6b703ff820c7dcf17 Mon Sep 17 00:00:00 2001 From: Paulo Mendes Date: Thu, 31 Oct 2013 14:50:09 -0200 Subject: [PATCH 1/3] Make the property toolbar style public for design porpose --- BSModalPickerView/BSModalPickerBase.h | 3 +++ BSModalPickerView/BSModalPickerBase.m | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/BSModalPickerView/BSModalPickerBase.h b/BSModalPickerView/BSModalPickerBase.h index acefac1..0b70532 100644 --- a/BSModalPickerView/BSModalPickerBase.h +++ b/BSModalPickerView/BSModalPickerBase.h @@ -23,6 +23,9 @@ typedef void (^BSModalPickerViewCallback)(BOOL madeChoice); /* Determines whether to display the opaque backdrop view. By default, this is YES. */ @property (nonatomic) BOOL presentBackdropView; +/* Determine the style of toolbar of PickerView, UIBarStyleDefault is default */ +@property (nonatomic) NSInteger toolBarStyle; + /* Presents the control embedded in the provided view. Arguments: view - The view that will contain the control. diff --git a/BSModalPickerView/BSModalPickerBase.m b/BSModalPickerView/BSModalPickerBase.m index 453008e..5fcf0dd 100644 --- a/BSModalPickerView/BSModalPickerBase.m +++ b/BSModalPickerView/BSModalPickerBase.m @@ -27,6 +27,7 @@ - (id)init { self.autoresizesSubviews = YES; self.presentBackdropView = YES; self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.toolBarStyle = UIBarStyleDefault; } return self; } @@ -64,7 +65,7 @@ - (NSArray *)additionalToolbarItems { - (UIToolbar *)toolbar { if (!_toolbar) { _toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, BSMODALPICKER_TOOLBAR_HEIGHT)]; - _toolbar.barStyle = UIBarStyleBlackTranslucent; + _toolbar.barStyle = _toolBarStyle; UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(onCancel:)]; From 44ab66237723468adced156908e34186d7454950 Mon Sep 17 00:00:00 2001 From: Paulo Mendes Date: Thu, 31 Oct 2013 14:55:00 -0200 Subject: [PATCH 2/3] Make the property toolbar style public for design porpose --- BSModalPickerView/BSModalPickerBase.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BSModalPickerView/BSModalPickerBase.m b/BSModalPickerView/BSModalPickerBase.m index 5fcf0dd..16430eb 100644 --- a/BSModalPickerView/BSModalPickerBase.m +++ b/BSModalPickerView/BSModalPickerBase.m @@ -27,7 +27,7 @@ - (id)init { self.autoresizesSubviews = YES; self.presentBackdropView = YES; self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - self.toolBarStyle = UIBarStyleDefault; + self.toolBarStyle = UIBarStyleBlackTranslucent; } return self; } From f5f600efa4368c2f0296a1295935c0c31b80d7fb Mon Sep 17 00:00:00 2001 From: Paulo Mendes Date: Thu, 31 Oct 2013 14:55:00 -0200 Subject: [PATCH 3/3] Make the property toolbar style public for design porpose --- BSModalPickerView/BSModalPickerBase.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BSModalPickerView/BSModalPickerBase.m b/BSModalPickerView/BSModalPickerBase.m index 5fcf0dd..16430eb 100644 --- a/BSModalPickerView/BSModalPickerBase.m +++ b/BSModalPickerView/BSModalPickerBase.m @@ -27,7 +27,7 @@ - (id)init { self.autoresizesSubviews = YES; self.presentBackdropView = YES; self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - self.toolBarStyle = UIBarStyleDefault; + self.toolBarStyle = UIBarStyleBlackTranslucent; } return self; }