Skip to content

Instantly share code, notes, and snippets.

View trilliwon's full-sized avatar
🎯
Focusing

WonJo trilliwon

🎯
Focusing
View GitHub Profile

Discover the techniques used to create the fluid gestural interface of iPhone X. Learn how to design with gestures and motion that feel intuitive and natural, making your app a delight to use.

What makes an interface feel fluid?

  • You know it when you feel it
  • A tool that feels like an extension of your mind
  • An extension of the natural world

How to take a screenshot and record a Video in iOS Simulator in Terminal

  1. Open iOS Simulator
  2. Open Terminal.app
  3. Run below script to take a screenshot
xcrun simctl io booted screenshot 1r.png

Why is ARC?

  • Real-time 으로 메모리 관리를 한다.
  • background process 가 없기 때문에 더 efficient 하다. mobile 에 최적이다.

But

Metal Programming Guide

The Metal framework supports GPU-accelerated advanced 3D graphics rendering and data-parallel computation workloads. Metal provides a modern and streamlined API for fine-grained, low-level control of the organization, processing and submission of graphic and computation commands, as well as the management of the associated data and resources for these commands. A primary goal of Metal is to minimize the CPU overhead incurred by executing GPU workloads.


상속보다는 추상화를!

So what is OOP?

  • OOP stands for “Object Oriented Programming”. 일명 객체지향프로그래밍 (오오피)
  • 프로그램을 여러개의 “객체”로 나누고 그 객체들의 상호작용으로 서술하는 방식.
  • Objects 의 개념을 바탕으로한 프로그래밍 패러다임 이다.
  • Objects 는 fields 와 methods 를 포함한다.
  • 상호작용하는 객체들의 집합

Declare UITextField and setup fields. Set decorated NSAttributedString for UITextField.attributedPlaceholder to set custom color or font etc.

drawing

let textField: UITextField = {

UI with Code Example Using SnapKit

resetButton.snp.makeConstraints {
	$0.centerY.equalTo(playButton.snp.centerY)
	$0.right.equalTo(playButton.snp.left).offset(-10)
	$0.height.width.equalTo(50)
}
{
"brand": "Porsche",
"model": "Cayman",
"grade": "GTS 4.0",
"thumbnails": [
"https://files.porsche.com/filestore/image/multimedia/none/modelseries-718-models-360-exterior-cayman-mobile-001/normal/313cb93d-7ccf-11eb-80d3-005056bbdc38;sJ;twebp/porsche-normal.webp",
"https://files.porsche.com/filestore/image/multimedia/none/modelseries-718-models-360-exterior-cayman-mobile-002/normal/313cb93d-7ccf-11eb-80d3-005056bbdc38;sJ;twebp/porsche-normal.webp",
"https://files.porsche.com/filestore/image/multimedia/none/modelseries-718-models-360-exterior-cayman-mobile-003/normal/313cb93d-7ccf-11eb-80d3-005056bbdc38;sJ;twebp/porsche-normal.webp",
"https://files.porsche.com/filestore/image/multimedia/none/modelseries-718-models-360-exterior-cayman-mobile-004/normal/313cb93d-7ccf-11eb-80d3-005056bbdc38;sJ;twebp/porsche-normal.webp",
"https://files.porsche.com/filestore/image/multimedia/none/modelseries-718-models-360-exterior-cayman-mobile-005/normal/313cb93d-7ccf-11eb-80d3-005056bbdc38;sJ;twebp/p
{
"brand": "BMW",
"model": "3",
"grade": "M340i",
"thumbnails": [
"https://cache.bmwusa.com/cosy.arox?pov=walkaround&brand=WBBM&vehicle=223Q&client=byoc&paint=P0300&fabric=FKHSW&sa=S01PD%2CS02NH%2CS02TB%2CS0302%2CS0322%2CS03DZ%2CS0403%2CS0430%2CS0431%2CS0459%2CS0465%2CS0481%2CS0493%2CS04KK%2CS04UR%2CS0534%2CS0544%2CS05A4%2CS05AC%2CS05AV%2CS0676%2CS06AC%2CS06AK%2CS06C4%2CS06CP%2CS06U3%2CS0704%2CS0710%2CS0715%2CS0754%2CS0760%2CS0775&angle=0&quality=100&sharp=99&resp=png&cut=1&bkgnd=transparent&width=2000",
"https://cache.bmwusa.com/cosy.arox?pov=walkaround&brand=WBBM&vehicle=223Q&client=byoc&paint=P0300&fabric=FKHSW&sa=S01PD%2CS02NH%2CS02TB%2CS0302%2CS0322%2CS03DZ%2CS0403%2CS0430%2CS0431%2CS0459%2CS0465%2CS0481%2CS0493%2CS04KK%2CS04UR%2CS0534%2CS0544%2CS05A4%2CS05AC%2CS05AV%2CS0676%2CS06AC%2CS06AK%2CS06C4%2CS06CP%2CS06U3%2CS0704%2CS0710%2CS0715%2CS0754%2CS0760%2CS0775&angle=10&quality=100&sharp=99&resp=png&cut=1&bkgnd=transparent&width=2000",
"https://cache.bmwusa.com/cosy.arox?pov=walkaroun
#if DEBUG
import SwiftUI
struct <# UIView #>UIViewRepresentable: UIViewRepresentable {
typealias UIViewType = <# UIView #>
func makeUIView(context: Context) -> <# UIView #> {
<# UIView #>()
}