1
Layout without header background相殺テキスト
Layout with header background so you can see its centered
イムはデザインを中心に表示されますが、それは高いに置かれているようので、細胞内でトップのスペースを、それが見えます。どのようにすべての画面サイズで表示させることができますか?私はポイントでオフセットを使うと心配しました。大きなスクリーンではオフセットが小さ過ぎ、小さなスクリーンでは大きなオフセットになりますか?
現在、私はこのようにそれにそれを実行します。
func adjustLayoutToFrame(){
let screenSize = UIScreen.main.bounds
let screenHeight = screenSize.height
let cellHeight = screenHeight/9
let headerHeight = cellHeight*2
weekHeaderLabel.frame.size.height = headerHeight
print("header height set to:", headerHeight)
cellHeightForDevice = cellHeight
//weekHeaderLabel.backgroundColor = .blue
}
これを行うと本当に何が起こりますか?なぜ、edgeInset値を改ざんするよりも良いのですか? –