Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels(Multiline) and a lot fixes #44

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ The border width for item views. Default 2.
@property (nonatomic, weak) id <RNFrostedSidebarDelegate> delegate;
```

The label font and color. Default to 14pt white system font. The keys are ```RNFrostedLabelFont``` and ```RNFrostedLabelColor```.
```objc
- (void)setLabelOptions:(NSDictionary*)options;
```


An optional delegate to respond to selection of item views. Optional delegate methods, provided by [George Villasboas](https://github.com/ghvillasboas), include:

```objc
Expand Down
13 changes: 13 additions & 0 deletions RNFrostedSidebar.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

#import <UIKit/UIKit.h>

FOUNDATION_EXPORT NSString *const RNFrostedLabelFont;
FOUNDATION_EXPORT NSString *const RNFrostedLabelColor;

@class RNFrostedSidebar;

@protocol RNFrostedSidebarDelegate <NSObject>
Expand All @@ -20,13 +23,20 @@
- (void)sidebar:(RNFrostedSidebar *)sidebar willDismissFromScreenAnimated:(BOOL)animatedYesOrNo;
- (void)sidebar:(RNFrostedSidebar *)sidebar didDismissFromScreenAnimated:(BOOL)animatedYesOrNo;
- (void)sidebar:(RNFrostedSidebar *)sidebar didTapItemAtIndex:(NSUInteger)index;
- (BOOL)sidebar:(RNFrostedSidebar *)sidebar shouldTapItemAtIndex:(NSUInteger)index;
- (void)sidebar:(RNFrostedSidebar *)sidebar didEnable:(BOOL)itemEnabled itemAtIndex:(NSUInteger)index;
@end

@interface RNFrostedSidebar : UIViewController

+ (instancetype)visibleSidebar;

// Just the actual views
@property (nonatomic, readonly) NSArray *views;

// Backwards compatibility
@property (nonatomic, strong) NSMutableArray *itemViews;

// The width of the sidebar
// Default 150
@property (nonatomic, assign) CGFloat width;
Expand Down Expand Up @@ -66,6 +76,7 @@
// An optional delegate to respond to interaction events
@property (nonatomic, weak) id <RNFrostedSidebarDelegate> delegate;

- (instancetype)initWithImages:(NSArray *)images selectedIndices:(NSIndexSet *)selectedIndices borderColors:(NSArray *)colors labelStrings:(NSArray*)labels;
- (instancetype)initWithImages:(NSArray *)images selectedIndices:(NSIndexSet *)selectedIndices borderColors:(NSArray *)colors;
- (instancetype)initWithImages:(NSArray *)images selectedIndices:(NSIndexSet *)selectedIndices;
- (instancetype)initWithImages:(NSArray *)images;
Expand All @@ -78,4 +89,6 @@
- (void)dismissAnimated:(BOOL)animated;
- (void)dismissAnimated:(BOOL)animated completion:(void (^)(BOOL finished))completion;

- (void)setLabelOptions:(NSDictionary*)options;

@end
Loading