is there a simple way to split a NSAttributedString so i get only the last 50 or so lines?
No. You will have to request the string
and determine the range you are interested in, then create a new NSAttributedString
representation derived from the source using an API such as - [NSAttributedString attributedSubstringFromRange:]
:
- (NSAttributedString *)lastFiftyLinesOfAttributedString:(NSAttributedString *)pInput
{
NSString * string = pInput.string;
NSRange rangeOfInterest = ...determine the last 50 lines in "string"...;
return [pInput attributedSubstringFromRange:rangeOfInterest];
}