your3i’s blog

iOSエンジニア。頑張る⚉

2018-09-01から1ヶ月間の記事一覧

iOS Custom Presentation & Transition (1) 〜コード一行もない編〜

iOS

作りたいもの MainViewControllerとDetailsViewControllerがある。 最初はMainViewControllerが表示されてる状態。MainViewControllerからDetailsViewControllerをモーダルで下からslide inして出して、MainViewControllerの上に表示させる。DetailsViewCont…

Intrinsic content sizeを使ってtableviewのdynamic heightを対応

Intrinsic content sizeとは Auto Layout 機能の一部 UIViewのintrinsicContentSizeプロパティ constraintが設定されてない場合、intrinsicContentSizeが代わりレイアウトの計算に使われる UILabel, UIButtonみたいに、Viewのいろんな中身を適切に表示するた…

presentingViewControllerとpresentedViewController

iOS

はじめに presentingViewControllerとpresentedViewController、毎回どれがどれってわからなくなるので、今回徹底的に調査しようと。 とりあえず~それぞれの定義 presentingViewController The view controller that presented this view controller. Discus…

Viewの一つの角を角丸にする

こういう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…