//
//  UILabel+LYTouchAction.h
//  MobilePortal
//
//  Created by caiyang on 2020/4/10.
//  Copyright © 2020 yin chen. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/*
 特殊字符串model
 */
@interface LYAttributeModel : NSObject

//带点击事件的字符串
@property(nonatomic, copy)NSString *string;
//带点击事件字符串的range
@property(nonatomic, assign)NSRange range;

@end

@interface UILabel (LYTouchAction)
//点击效果，默认是打开
@property(nonatomic)BOOL enabledTapEffect;

//特殊字符串字体颜色
@property(nonatomic, strong)UIColor *attributeColor;

//特殊字符串下划线
@property(nonatomic)BOOL underLine;

//特殊字符串删除线
@property(nonatomic)BOOL throughLine;

/**
 *  给文本添加点击事件Block回调
 *
 *  @param strings  需要添加的字符串数组
 *  @param tapClick 点击事件回调
 */
-(void)addAttributeTapActionWithStrings:(NSArray <NSString *> *)strings
                             tapClicked:(void (^) (NSString *string , NSRange range , NSInteger index))tapClick;

@end

NS_ASSUME_NONNULL_END
