CoreTextViewを使用して、html 形式のテキストをカスタム ビューにレンダリングしています。私はそれがどのように機能するかを学ぼうとしています(そして私はiOSの初心者です)ので、提供された例(デフォルトではスクロールしません)で遊んでいて、コンテンツのコンテナ長方形を描くことができました(現在、それを強調するために赤い背景で)。私の問題は、スクロール可能にする方法がわからないことです。ストーリーボードでスクロール可能なビューを作成する方法は知っていますが、プログラムですべてを実行しようとしていますが、今はうまくいきません.長方形を生成するコードは次のとおりです。
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
int widthInt = (int)roundf(screenWidth)-20;
int heightInt= (int)roundf(screenHeight)-60;
m_coreText=[[CoreTextView alloc] initWithFrame:CGRectMake(10, 50, widthInt, heightInt)];
m_coreText.autoresizingMask=UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
m_coreText.backgroundColor=[UIColor redColor];
m_coreText.contentInset=UIEdgeInsetsMake(10, 10, 10, 10);