mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
d3c2f44aeb
Data detectors work by matching local text against a series of local matchers. No network activity is required. Some of the data detectors are really useful (e.g. a link, or being able to copy a phone number). Some aren't very useful, e.g. pop culture references, and seeing things underlined is giving people the false impression that their data is being inspected remotely. // FREEBIE
32 lines
809 B
Objective-C
32 lines
809 B
Objective-C
// Created by Michael Kirk on 11/13/16.
|
|
// Copyright © 2016 Open Whisper Systems. All rights reserved.
|
|
|
|
#import "JSQMessagesCollectionViewCell+OWS.h"
|
|
#import "UIColor+OWS.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@implementation JSQMessagesCollectionViewCell (OWS)
|
|
|
|
- (UIColor *)ows_textColor
|
|
{
|
|
return [UIColor ows_blackColor];
|
|
}
|
|
|
|
- (void)ows_didLoad
|
|
{
|
|
self.textView.textColor = self.ows_textColor;
|
|
self.textView.linkTextAttributes = @{
|
|
NSForegroundColorAttributeName : self.ows_textColor,
|
|
NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle | NSUnderlinePatternSolid)
|
|
};
|
|
|
|
self.textView.dataDetectorTypes
|
|
= (UIDataDetectorTypePhoneNumber | UIDataDetectorTypeLink | UIDataDetectorTypeAddress
|
|
| UIDataDetectorTypeCalendarEvent);
|
|
}
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|