session-ios/Signal/src/views/JSQMessagesCollectionViewCell+OWS.m
Michael Kirk d3c2f44aeb Exclude extra data detectors.
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
2016-11-14 08:58:22 -05:00

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