| 12345678910111213141516171819202122232425262728293031323334 |
- //
- // TabControl.h
- // model
- //
- // Created by Drew on 2018/11/1.
- // Copyright © 2018年 Mine. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- NS_ASSUME_NONNULL_BEGIN
- IB_DESIGNABLE
- @protocol TabControlDelegate <NSObject>
- - (void) tabChange:(NSInteger) index;
- @end
- typedef NS_ENUM(NSInteger, TabControlState) {
- TabControlStateNormal,
- TabControlStateActive
- };
- @interface TabControl : UIView
- @property (nonatomic, assign) NSInteger index;
- @property (nonatomic, retain) id<TabControlDelegate> delegate;
- @property (nonatomic, strong) IBInspectable UIColor* backgroungColor;
- @property (nonatomic, strong) IBInspectable UIColor* indicatorColor;
- @property (nonatomic, strong) IBInspectable UIColor* normalColor;
- @property (nonatomic, strong) IBInspectable UIColor* activeColor;
- @property (nonatomic, strong) IBInspectable NSString* tab1;
- @property (nonatomic, strong) IBInspectable NSString* tab2;
- - (void)setColor:(UIColor*) color forState:(TabControlState) state;
- @end
- NS_ASSUME_NONNULL_END
|