EGOTextView icon indicating copy to clipboard operation
EGOTextView copied to clipboard

Crashes once i try setting an nsattributestring

Open pakmee opened this issue 13 years ago • 3 comments

I tried setting an nsatttributed string and it crashes straightaway...

pakmee avatar Sep 07 '12 13:09 pakmee

is this project still be maintained by anyone?

BobCromwell avatar Sep 11 '12 14:09 BobCromwell

Have you fixed this bug? It crashes on iOS5 but ok with iOS6.

voicecho avatar Nov 12 '12 09:11 voicecho

It crashed when i m using UIFont to set the attribute, as I change to the following code, it works fine.

    UIFont *font = [UIFont systemFontOfSize:14];
    CTFontRef ctFont = CTFontCreateWithName((CFStringRef) font.fontName, font.pointSize, NULL);
    NSDictionary *atrFont = [NSDictionary dictionaryWithObject:(id)ctFont forKey:(NSString *)kCTFontAttributeName];
    [self.egoTextView setAttributedString:[[NSAttributedString alloc] initWithString:@"test" attributes:atrFont]];

voicecho avatar Nov 13 '12 03:11 voicecho