mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-11 08:50:24 +00:00
Fix attribute value setting in testLinkInTextUsesForegroundColor in ASTextKitTests
This commit is contained in:
parent
e22c50101a
commit
8c963bd13c
@ -148,7 +148,7 @@ static BOOL checkAttributes(const ASTextKitAttributes &attributes, const CGSize
|
|||||||
// so we have to choose a style and color and match it in the text kit version
|
// so we have to choose a style and color and match it in the text kit version
|
||||||
// for this test
|
// for this test
|
||||||
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle),
|
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle),
|
||||||
NSUnderlineColorAttributeName: [UIColor redColor],
|
NSUnderlineColorAttributeName: [UIColor blueColor],
|
||||||
};
|
};
|
||||||
NSDictionary *textAttributes = @{NSFontAttributeName : [UIFont systemFontOfSize:12],
|
NSDictionary *textAttributes = @{NSFontAttributeName : [UIFont systemFontOfSize:12],
|
||||||
};
|
};
|
||||||
@ -165,7 +165,7 @@ static BOOL checkAttributes(const ASTextKitAttributes &attributes, const CGSize
|
|||||||
|
|
||||||
for (NSString *attributeName in linkTextAttributes.keyEnumerator) {
|
for (NSString *attributeName in linkTextAttributes.keyEnumerator) {
|
||||||
[attrStr addAttribute:attributeName
|
[attrStr addAttribute:attributeName
|
||||||
value:linkTextAttributes[NSUnderlineStyleAttributeName]
|
value:linkTextAttributes[attributeName]
|
||||||
range:selectedRange];
|
range:selectedRange];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user