your3i’s blog

iOSエンジニア。頑張る⚉

iOS

iOSでMaterial Designを使いたくない理由

自分はアプリエンジニア。主にiOSだが、Androidもちょっとやってる。 最近担当しているプロジェクトで、UIコンポーネントライブラリーを作ろうとしている。 一週間ちょい続いたんだけど、全然簡単ではなかった。 何にしろ、エンジニアの作業だけではなくて、…

複数のscroll viewを同時にスクロール

なにそれ おしゃれなウォークスルーでよくParallax Scrollingぽいデザインを見かける。それを実現するために、複数のscroll viewを使う必要がある。本当に動くの?興味があってやってみた。 画像がないと分からないよ こんな簡単なものを作ってみた。 作り方…

iOS QuickLook like Interactive Transition for Dismissal - Part 1

iOS

What is a QuickLook like transition? QuickLook is a framework used to preview files like images, videos and many other kind of files in iOS SDK. So many iOS pre-installed apps are using this framework. The most commonly used among them mus…

QRコードスキャンぽいUIの作り方

QRコードスキャンぽいUIとは こういう感じの、dimming viewがあって、真ん中空いてて、四角にちょっとそれぽいものがあるUIである。 ちょっと難しいポイント 真ん中の空いてる正方形 角丸じゃないけど、4つのあれ 作る 画面のビューの構成 自分がこういう画…

iOS Custom Presentation & Transition (4) 〜Interactive Transition〜

iOS

はじめに いよいよラストになった!!ついつい長引いちゃった。 一応頭の方で説明した方がいいかな。 この記事の内容は以下の記事と繋いている、そして今回はPart4でラストだ。iOS Custom Presentation & Transition (1) 〜コード一行もない編〜 - your3i’s …

iOS Custom Presentation & Transition (3) 〜Custom Transition〜

iOS

はじめに iOS Custom Presentation & Transition (1) 〜コード一行もない編〜 - your3i’s blog iOS Custom Presentation & Transition (2) 〜UIPresentationControllerでカスタムモーダルを作る〜 - your3i’s blog1は作るものの紹介と大体の概念を説明し、…

iOS Custom Presentation & Transition (2) 〜UIPresentationControllerでカスタムモーダルを作る〜

iOS

UIPresentationControllerの役割 presentation controllerオブジェクトは、presented view controllerを管理する役割を持ってる。そして、presented view controller表示されてるときのスタイルを指定するなど。 ドキュメントに書いたやること Set the size …

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…

iOSDC 前夜祭 メモ

iOS

聞いたspeech 感想 ドア→同じUI同じ振る舞いするから、慣れてるユーザーなら本能的に使える? MDM全然わからない UIテストを利用してスクショとるGET Design system いい、はやくやりたい storyboardでのスタイル設定使わない、そこまで徹底的にやるのはまだ…

Swiftでの日付フォーマットのメモ

アプリでDateの扱いは2パターンある APIの日付文字列をDate型にマッピング Date型をユーザーに見せるStringに変換 この2つのタイミングで、DateFormatterが使われる。DateFormatterにはdateFormat, calendarやlocaleを設定必要があり、どんなタイミングで…

Heroを使ったmodal viewcontrollerをドラッグ閉じるの実装

この間、画像のプレビュー画面を作った。よくある、フルスクリーンのズームイン・ズームアウトできる画面。閉じるときは、一応×ボタンで閉じれる。でも、やっぱりTwitterみたいに、下スワイプして閉じれる方がかっこいいだね。 Heroとは HeroはTransitionを…