jiGuangXieZuo/ProductApp/ProductApp/BaseControl/ZJScrollPageView/ZJScrollSegmentView.h

52 lines
1.7 KiB
C
Raw Normal View History

2024-09-20 18:32:04 +08:00
//
// ZJScrollSegmentView.h
// ZJScrollPageView
//
// Created by jasnig on 16/5/6.
// Copyright © 2016年 ZeroJ. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ZJSegmentStyle.h"
#import "ZJScrollPageViewDelegate.h"
@class ZJSegmentStyle;
@class ZJTitleView;
typedef void(^TitleBtnOnClickBlock)(ZJTitleView *titleView, NSInteger index);
typedef void(^ExtraBtnOnClick)(UIButton *extraBtn);
@interface ZJScrollSegmentView : UIView
// 是否现实消息数
@property (nonatomic, copy) NSString *number;
// 所有的标题
@property (strong, nonatomic) NSArray *titles;
// 所有标题的设置
@property (strong, nonatomic) ZJSegmentStyle *segmentStyle;
@property (copy, nonatomic) ExtraBtnOnClick extraBtnOnClick;
@property (weak, nonatomic) id<ZJScrollPageViewDelegate> delegate;
@property (strong, nonatomic) UIImage *backgroundImage;
2024-09-26 18:02:23 +08:00
// 滚动条
@property (strong, nonatomic) UIView *scrollLine;
2024-10-08 18:29:59 +08:00
// 滚动圆点
@property (strong, nonatomic) UIView *scrollPoint;
2024-09-26 18:02:23 +08:00
2024-09-20 18:32:04 +08:00
- (instancetype)initWithFrame:(CGRect )frame segmentStyle:(ZJSegmentStyle *)segmentStyle delegate:(id<ZJScrollPageViewDelegate>)delegate titles:(NSArray *)titles titleDidClick:(TitleBtnOnClickBlock)titleDidClick;
/** 切换下标的时候根据progress同步设置UI*/
- (void)adjustUIWithProgress:(CGFloat)progress oldIndex:(NSInteger)oldIndex currentIndex:(NSInteger)currentIndex;
/** 让选中的标题居中*/
- (void)adjustTitleOffSetToCurrentIndex:(NSInteger)currentIndex;
/** 设置选中的下标*/
- (void)setSelectedIndex:(NSInteger)index animated:(BOOL)animated;
/** 重新刷新标题的内容*/
- (void)reloadTitlesWithNewTitles:(NSArray *)titles;
///
@property (nonatomic, assign) NSInteger chouhaoxinxi;
@end