Last active
December 18, 2015 16:18
-
-
Save vendruscolo/5809976 to your computer and use it in GitHub Desktop.
How to reproduce this issue https://github.com/mattt/TTTAttributedLabel/issues/240
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "MyAttributedLabel.h" | |
- (void)someMethod { | |
self.contentLabel = [[MyAttributedLabel alloc] initWithFrame:CGRectZero]; | |
self.contentLabel.textAlignment = NSTextAlignmentRight; | |
// all of these are not required, but are pulled from my code | |
self.contentLabel.backgroundColor = [UIColor clearColor]; | |
self.contentLabel.textColor = [UIColor lightGrayColor]; | |
self.contentLabel.numberOfLines = 0; | |
self.contentLabel.lineBreakMode = UILineBreakModeWordWrap; | |
self.contentLabel.font = [UIFont systemFontOfSize:kMessageLabelFontSize]; | |
[self.contentView addSubview:_contentLabel]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import TTTAttributedLabel.h | |
@interface MyAttributedLabel : TTTAttributedLabel | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "MyAttributedLabel.h" | |
@implementation MyAttributedLabel | |
- (id)initWithFrame:(CGRect)frame | |
{ | |
self = [super initWithFrame:frame]; | |
if (self) { | |
self.dataDetectorTypes = NSTextCheckingTypeLink; | |
} | |
return self; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment