UIViewController のビューを子ビューとして追加および削除する正しい方法は何ですか。したがって、UIViewController を初期化すると、次のようにそのビューをビュー階層に追加できます。
UIViewController *myViewControler = [[UIViewController alloc] init];
[someAnotherView addSubview:myViewController.view];
質問 1: 呼び出し後に myViewController.view を解放する必要がありaddSubview:
ますか?
ビュー階層から myViewController のビューを削除したい場合は、[myViewController.view removeFromSuperview];
質問 2: この場合、ビューが削除された後、myViewController インスタンスをどのように解放すればよいですか?