1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // MenuSegmentView.h
- // DDTG
- //
- // Created by 翟玉磊 on 16/5/11.
- // Copyright © 2016年 翟玉磊. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- typedef void(^ButtonOnClickBlock)(NSInteger tag, NSString *title);
- typedef void(^SelectIndexBlock)(NSInteger tag);
- @interface MenuSegmentView : UIView
- @property (nonatomic, strong) NSArray *titles;
- @property (nonatomic, strong) UIColor *titleDefaultColor;
- @property (nonatomic, strong) UIColor *titleSelectColor;
- @property (nonatomic, strong) UIFont *titleFont;
- @property (nonatomic, assign) CGFloat duration;
- /// 默认2
- @property (nonatomic, readwrite, assign) CGFloat selectedLineHeight;
- /// 是否显示底部分割线 默认显示YES
- @property (nonatomic, readwrite) BOOL isShowBottomLine;
- - (instancetype)initWithFrame:(CGRect)frame titles:(NSArray *)array;
- /**
- * 点击按钮的回调
- *
- * @param block 点击按钮的Block
- */
- - (void)setButtonOnClickBlock:(ButtonOnClickBlock)block;
- - (void)setSelectIndexBlock:(SelectIndexBlock)block;
- - (void)setSelectedItemIndex:(int)page;
- - (void)updateTitlesWithData:(NSArray *)array;
- /**
- 显示或者隐藏指定索引的红点
-
- @param index 索引
- @param status YES显示 NO隐藏
- */
- - (void)updateBadgeWithIndex:(NSInteger)index status:(BOOL)status;
- @end
|