2022-01-31から1日間の記事一覧

Content Hugging PriorityとContent Compression Resistance Priority

Content Hugging Priority:二つのコンテンツが並んで、十分なスペースがある場合、そのpriority高いやつはもっとタイトな形式で表示する。 例:textAのContent Hugging PriorityはtextBより大きい場合: Content Compression Resistance Priority:二つのコ…

frameとbounds

frameはsuperViewに対する位置、x, yはsuperViewによって変わる。 boundsはview自身に対する位置、x, yは常に0。 だからviewAのsubView viewBを作って、viewBはviewAを完全重合したい場合、viewB.frame = viewA.boundと書く。 因みに、viewを移動したり変形…