This commit is contained in:
2025-11-06 19:19:12 +08:00
parent a75afbe4c1
commit 6ba1339c0b
195 changed files with 13443 additions and 2729 deletions

View File

@@ -0,0 +1,60 @@
//
// JXCategoryNumberView.h
// DQGuess
//
// Created by jiaxin on 2018/4/9.
// Copyright © 2018年 jingbo. All rights reserved.
//
#import "JXCategoryTitleView.h"
#import "JXCategoryNumberCell.h"
#import "JXCategoryNumberCellModel.h"
@interface JXCategoryNumberView : JXCategoryTitleView
/**
需要与titles的count对应
*/
@property (nonatomic, strong) NSArray <NSNumber *> *counts;
/**
内部默认不会格式化数字直接转成字符串显示。比如业务需要数字超过999显示999+可以通过该block实现。
*/
@property (nonatomic, copy) NSString *(^numberStringFormatterBlock)(NSInteger number);
/**
numberLabel的font默认[UIFont systemFontOfSize:11]
*/
@property (nonatomic, strong) UIFont *numberLabelFont;
/**
数字的背景色,默认:[UIColor colorWithRed:241/255.0 green:147/255.0 blue:95/255.0 alpha:1]
*/
@property (nonatomic, strong) UIColor *numberBackgroundColor;
/**
数字的title颜色默认[UIColor whiteColor]
*/
@property (nonatomic, strong) UIColor *numberTitleColor;
/**
numberLabel的宽度补偿label真实的宽度是文字内容的宽度加上补偿的宽度默认10
*/
@property (nonatomic, assign) CGFloat numberLabelWidthIncrement;
/**
numberLabel的高度默认14
*/
@property (nonatomic, assign) CGFloat numberLabelHeight;
/**
numberLabel x,y方向的偏移 +值:水平方向向右,竖直方向向下)
*/
@property (nonatomic, assign) CGPoint numberLabelOffset;
/**
当是单一数字时是否让numberLabel变成圆。即numberLabel的宽度等于高度cornerRadius等于高度/2。当为true单一数字时会忽略numberLabelWidthIncrement属性。默认为NO
*/
@property (nonatomic, assign) BOOL shouldMakeRoundWhenSingleNumber;
@end