2018-09-01から1ヶ月間の記事一覧
作りたいもの MainViewControllerとDetailsViewControllerがある。 最初はMainViewControllerが表示されてる状態。MainViewControllerからDetailsViewControllerをモーダルで下からslide inして出して、MainViewControllerの上に表示させる。DetailsViewCont…
Intrinsic content sizeとは Auto Layout 機能の一部 UIViewのintrinsicContentSizeプロパティ constraintが設定されてない場合、intrinsicContentSizeが代わりレイアウトの計算に使われる UILabel, UIButtonみたいに、Viewのいろんな中身を適切に表示するた…
はじめに presentingViewControllerとpresentedViewController、毎回どれがどれってわからなくなるので、今回徹底的に調査しようと。 とりあえず~それぞれの定義 presentingViewController The view controller that presented this view controller. Discus…
こういうViewを作りたく 高さ30の長方形 左下はサイズ24の角丸 Try CACornerMask (Failed) iOS11から使えるようになったCACornerMaskを使ってみる。 let view = UIView(frame: CGRect(x: 0, y: 0, width: 60, height: 30)) view.backgroundColor = .cyan vie…