This commit is contained in:
liyuhua
2023-11-24 14:50:14 +08:00
parent f9321a6586
commit a19adac48e
3 changed files with 28 additions and 28 deletions

View File

@@ -5718,16 +5718,16 @@
23CEFC0A2AFB8FC100576D89 /* Util */ = { 23CEFC0A2AFB8FC100576D89 /* Util */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
23CEFC0B2AFB8FC100576D89 /* BSXWDateUtil.h */,
23CEFC0C2AFB8FC100576D89 /* BSNSStringUtil.m */,
23CEFC0D2AFB8FC100576D89 /* BSUIDemoUtil.m */,
23CEFC0E2AFB8FC100576D89 /* BSNSDictionary.h */,
23CEFC0F2AFB8FC100576D89 /* BS_UIColor.m */,
23CEFC102AFB8FC100576D89 /* BSXWDateUtil.m */,
23CEFC112AFB8FC100576D89 /* BSUIDemoUtil.h */,
23CEFC122AFB8FC100576D89 /* BSNSStringUtil.h */,
23CEFC132AFB8FC100576D89 /* BSNSDictionary.m */,
23CEFC142AFB8FC100576D89 /* BS_UIColor.h */, 23CEFC142AFB8FC100576D89 /* BS_UIColor.h */,
23CEFC0F2AFB8FC100576D89 /* BS_UIColor.m */,
23CEFC0E2AFB8FC100576D89 /* BSNSDictionary.h */,
23CEFC132AFB8FC100576D89 /* BSNSDictionary.m */,
23CEFC122AFB8FC100576D89 /* BSNSStringUtil.h */,
23CEFC0C2AFB8FC100576D89 /* BSNSStringUtil.m */,
23CEFC112AFB8FC100576D89 /* BSUIDemoUtil.h */,
23CEFC0D2AFB8FC100576D89 /* BSUIDemoUtil.m */,
23CEFC0B2AFB8FC100576D89 /* BSXWDateUtil.h */,
23CEFC102AFB8FC100576D89 /* BSXWDateUtil.m */,
); );
path = Util; path = Util;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -5743,8 +5743,8 @@
23CEFC162AFB8FC100576D89 /* fmdb */ = { 23CEFC162AFB8FC100576D89 /* fmdb */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
23CEFC172AFB8FC100576D89 /* BSSDLayoutUtil.m */,
23CEFC182AFB8FC100576D89 /* BSSDLayoutUtil.h */, 23CEFC182AFB8FC100576D89 /* BSSDLayoutUtil.h */,
23CEFC172AFB8FC100576D89 /* BSSDLayoutUtil.m */,
); );
path = fmdb; path = fmdb;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -5752,11 +5752,11 @@
23CEFC192AFB8FC100576D89 /* system */ = { 23CEFC192AFB8FC100576D89 /* system */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
23CEFC1A2AFB8FC100576D89 /* SystemUtil.h */,
23CEFC1B2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.h */,
23CEFC1C2AFB8FC100576D89 /* BS_Define.h */, 23CEFC1C2AFB8FC100576D89 /* BS_Define.h */,
23CEFC1D2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.m */, 23CEFC1A2AFB8FC100576D89 /* SystemUtil.h */,
23CEFC1E2AFB8FC100576D89 /* SystemUtil.m */, 23CEFC1E2AFB8FC100576D89 /* SystemUtil.m */,
23CEFC1B2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.h */,
23CEFC1D2AFB8FC100576D89 /* UILabel+YBAttributeTextTapAction.m */,
); );
path = system; path = system;
sourceTree = "<group>"; sourceTree = "<group>";

View File

@@ -31,7 +31,7 @@
</Testables> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Debug" buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"

View File

@@ -18,24 +18,24 @@
#pragma mark - AssociatedObjects #pragma mark - AssociatedObjects
- (NSMutableArray *)attributeStrings - (NSMutableArray *)siefnsufwhf
{ {
return objc_getAssociatedObject(self, _cmd); return objc_getAssociatedObject(self, _cmd);
} }
- (void)setAttributeStrings:(NSMutableArray *)attributeStrings - (void)setSiefnsufwhf:(NSMutableArray *)siefnsufwhf
{ {
objc_setAssociatedObject(self, @selector(attributeStrings), attributeStrings, OBJC_ASSOCIATION_RETAIN_NONATOMIC); objc_setAssociatedObject(self, @selector(siefnsufwhf), siefnsufwhf, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
} }
- (NSMutableDictionary *)effectDic - (NSMutableDictionary *)siefidshfiwhi
{ {
return objc_getAssociatedObject(self, _cmd); return objc_getAssociatedObject(self, _cmd);
} }
- (void)setEffectDic:(NSMutableDictionary *)effectDic - (void)setSiefidshfiwhi:(NSMutableDictionary *)siefidshfiwhi
{ {
objc_setAssociatedObject(self, @selector(effectDic), effectDic, OBJC_ASSOCIATION_RETAIN_NONATOMIC); objc_setAssociatedObject(self, @selector(siefidshfiwhi), siefidshfiwhi, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
} }
- (BOOL)isTapAction - (BOOL)isTapAction
@@ -253,11 +253,11 @@
index = index - 1; index = index - 1;
} }
NSInteger link_count = self.attributeStrings.count; NSInteger link_count = self.siefnsufwhf.count;
for (int j = 0; j < link_count; j++) { for (int j = 0; j < link_count; j++) {
YBAttributeModel *model = self.attributeStrings[j]; YBAttributeModel *model = self.siefnsufwhf[j];
NSRange link_range = model.range; NSRange link_range = model.range;
if (NSLocationInRange(index, link_range)) { if (NSLocationInRange(index, link_range)) {
@@ -318,9 +318,9 @@
if (self.isTapEffect) { if (self.isTapEffect) {
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithAttributedString:self.attributedText]; NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithAttributedString:self.attributedText];
NSMutableAttributedString *subAtt = [[NSMutableAttributedString alloc] initWithAttributedString:[[self.effectDic allValues] firstObject]]; NSMutableAttributedString *subAtt = [[NSMutableAttributedString alloc] initWithAttributedString:[[self.siefidshfiwhi allValues] firstObject]];
NSRange range = NSRangeFromString([[self.effectDic allKeys] firstObject]); NSRange range = NSRangeFromString([[self.siefidshfiwhi allKeys] firstObject]);
if (status) { if (status) {
[subAtt addAttribute:NSBackgroundColorAttributeName value:[UIColor lightGrayColor] range:NSMakeRange(0, subAtt.string.length)]; [subAtt addAttribute:NSBackgroundColorAttributeName value:[UIColor lightGrayColor] range:NSMakeRange(0, subAtt.string.length)];
@@ -336,11 +336,11 @@
- (void)yb_saveEffectDicWithRange:(NSRange)range - (void)yb_saveEffectDicWithRange:(NSRange)range
{ {
self.effectDic = [NSMutableDictionary dictionary]; self.siefidshfiwhi = [NSMutableDictionary dictionary];
NSAttributedString *subAttribute = [self.attributedText attributedSubstringFromRange:range]; NSAttributedString *subAttribute = [self.attributedText attributedSubstringFromRange:range];
[self.effectDic setObject:subAttribute forKey:NSStringFromRange(range)]; [self.siefidshfiwhi setObject:subAttribute forKey:NSStringFromRange(range)];
} }
#pragma mark - getRange #pragma mark - getRange
@@ -357,7 +357,7 @@
__block NSString *totalStr = self.attributedText.string; __block NSString *totalStr = self.attributedText.string;
self.attributeStrings = [NSMutableArray array]; self.siefnsufwhf = [NSMutableArray array];
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
@@ -375,7 +375,7 @@
model.str = obj; model.str = obj;
[weakSelf.attributeStrings addObject:model]; [weakSelf.siefnsufwhf addObject:model];
} }