テーブルビューを含むViewControllerがあります(下のスクリーンショットを参照)。このテーブルビューには常に正確に3行があり、クリックするとこれらの行が展開されて詳細情報が表示されます。テーブルビューの高さが常にこれらの3行だけを表示し、それ以上表示されないようにするにはどうすればよいですか?スクリーンショットでわかるように、コンテンツのない空の行が表示されています。
展開された行には、UILabels以外のビューが含まれる場合があることに注意してください。
IBでの表示は次のとおりです。