# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1617485125 0 # Node ID d88928a854369d2af8d52bd66a6b93aa6c038007 # Parent 384d076ed52a144d74020e9ac4b1e4ab6280f487 iOS: Fix DWMLE, have to created it like this to have valid textStorage. diff -r 384d076ed52a -r d88928a85436 ios/dw.m --- a/ios/dw.m Sat Apr 03 19:14:29 2021 +0000 +++ b/ios/dw.m Sat Apr 03 21:25:25 2021 +0000 @@ -4423,6 +4423,10 @@ { CGRect frame = CGRectMake(0, 0, 100, 50); NSTextContainer *tc = [[NSTextContainer alloc] initWithSize:frame.size]; + NSLayoutManager *lm = [[NSLayoutManager alloc] init]; + NSTextStorage *ts = [[NSTextStorage alloc] init]; + [lm addTextContainer:tc]; + [ts addLayoutManager:lm]; DWMLE *mle = [[[DWMLE alloc] initWithFrame:frame textContainer:tc] retain]; CGSize size = [mle intrinsicContentSize];