Skip to content

Commit

Permalink
添加初始化方法
Browse files Browse the repository at this point in the history
  • Loading branch information
TalkingJourney committed Jan 14, 2018
1 parent 45c8fa5 commit e3cbfe8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SCIndexView/SCIndexViewConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ typedef NS_ENUM(NSUInteger, SCIndexViewStyle) {
@property (nonatomic, assign) CGFloat indexItemRightMargin; // 索引元素距离右边屏幕距离
@property (nonatomic, assign) CGFloat indexItemsSpace; // 索引元素之间间隔距离

+ (instancetype)configuration;

+ (instancetype)configurationWithIndexViewStyle:(SCIndexViewStyle)indexViewStyle;

+ (instancetype)configurationWithIndexViewStyle:(SCIndexViewStyle)indexViewStyle
indicatorBackgroundColor:(UIColor *)indicatorBackgroundColor
indicatorTextColor:(UIColor *)indicatorTextColor
Expand Down
5 changes: 5 additions & 0 deletions SCIndexView/SCIndexViewConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ @implementation SCIndexViewConfiguration

@synthesize indexViewStyle = _indexViewStyle;

+ (instancetype)configuration
{
return [self configurationWithIndexViewStyle:SCIndexViewStyleDefault];
}

+ (instancetype)configurationWithIndexViewStyle:(SCIndexViewStyle)indexViewStyle
{
UIColor *indicatorBackgroundColor, *indicatorTextColor;
Expand Down

0 comments on commit e3cbfe8

Please sign in to comment.