You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the feature suggestion! I took a stab at this but ran into some issues since the text storage is already created when calling [super initWithCoder:]. I've posted my attempt below. Suggestions or pull requests welcome!
Illya
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self)
{
CYRTextStorage *textStorage = [CYRTextStorage new];
CYRLayoutManager *layoutManager = [CYRLayoutManager new];
self.lineNumberLayoutManager = layoutManager;
// Wrap text to the text view's frame
self.textContainer.widthTracksTextView = YES;
[layoutManager addTextContainer:self.textContainer];
[textStorage removeLayoutManager:textStorage.layoutManagers.firstObject];
[textStorage addLayoutManager:layoutManager];
self.syntaxTextStorage = textStorage;
self.contentMode = UIViewContentModeRedraw; // causes drawRect: to be called on frame resizing and device rotation
[self _commonSetup];
}
return self;
}
Hello,
Cool view! You should add support for storyboards by implementing initWithCoder:
Thanks,
Leo
The text was updated successfully, but these errors were encountered: