Skip to content

Instantly share code, notes, and snippets.

View trilliwon's full-sized avatar
๐ŸŽฏ
Focusing

WonJo trilliwon

๐ŸŽฏ
Focusing
View GitHub Profile

๋ฆฌํŒฉํ„ฐ๋ง

๋ฆฌํŒฉํ„ฐ๋ง์ด๋ž€ ๊ฒ‰์œผ๋กœ ๋“œ๋Ÿฌ๋‚˜๋Š” ์ฝ”๋“œ์˜ ๊ธฐ๋Šฅ(๊ฒ‰๋ณด๊ธฐ ๋™์ž‘)์€ ๋ฐ”๊พธ์ง€ ์•Š์œผ๋ฉด์„œ ๋‚ด๋ถ€ ๊ตฌ์กฐ๋ฅผ ๊ฐœ์„ ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ์†Œํ”„ํŠธ์›จ์–ด ์‹œ์Šคํ…œ์„ ์ˆ˜์ •ํ•˜๋Š” ๊ณผ์ •์ด๋‹ค. ๋ฒ„๊ทธ๊ฐ€ ์ƒ๊ธธ ๊ฐ€๋Šฅ์„ฑ์„ ์ตœ์†Œ๋กœ ์ค„์ด๋ฉด์„œ ์ฝ”๋“œ๋ฅผ ์ •๋ฆฌํ•˜๋Š” ์ •์ œ๋œ ๋ฐฉ๋ฒ•์ด๋‹ค. ์š”์ปจ๋Œ€, ๋ฆฌํŒฉํ„ฐ๋งํ•œ๋‹ค๋Š” ๊ฒƒ์€ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ๋‚œ ๋’ค์— ์„ค๊ณ„๋ฅผ ๊ฐœ์„ ํ•˜๋Š” ์ผ์ด๋‹ค.

  • duc typing: js ๋Š” ๊ตฌ์กฐ๋ฅผ ๊ธฐ์ค€์œผ๋กœ ํƒ€์ž…์„ ๊ตฌ๋ถ„ํ•œ๋‹ค. "๋งŒ์•ฝ ์–ด๋–ค ์ƒˆ๊ฐ€ ์˜ค๋ฆฌ(duck)์ฒ˜๋Ÿผ ๊ฑท๊ณ , ํ—ค์—„์น˜๊ณ , ๊ฝฅ๊ฝฅ๊ฑฐ๋ฆฐ๋‹ค๋ฉด ๋‚˜๋Š” ๊ทธ ์ƒˆ๋ฅผ ์˜ค๋ฆฌ๋ผ๊ณ  ๋ถ€๋ฅผ ๊ฒƒ์ด๋‹ค."

Core Spotlight๋ฅผ ์ด์šฉํ•ด ์•ฑ ์ ‘๊ทผ์„ฑ์„ ํ–ฅ์ƒ์‹œํ‚ค๊ธฐ ์œ„ํ•œ ์ „๋žต

Core Spotlight๋Š” OS ๋ ˆ๋ฒจ์—์„œ ์•ฑ ์ปจํ…์ธ ๋ฅผ ๊ฒ€์ƒ‰ํ•˜๊ณ  ์ธํ„ฐ๋ ‰์…˜ ํ•  ์ˆ˜ ์žˆ๋Š” ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. Core Spotlight์— ์ธ๋ฑ์‹ฑ ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ 3๊ฐ€์ง€๊ฐ€ ์กด์žฌ ํ•ฉ๋‹ˆ๋‹ค.

  • SiriKit
    • ์œ ์ €๊ฐ€ ์ถ”๊ฐ€ํ•œ Siri Shortcuts ์„ ๊ฒ€์ƒ‰ํ•˜๊ฑฐ๋‚˜ Siri์— ์˜ํ•ด ์ ์ ˆํ•œ ํƒ€์ด๋ฐ์— ์œ ์ €์—๊ฒŒ ์ œ์•ˆ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • CoreSpotlight
    • ์•ฑ์˜ ์ปจํ…์ธ ๋ฅผ Spotlight DB์— ์ธ๋ฑ์‹ฑ ํ•˜๊ณ  ๊ฒ€์ƒ‰๊ฒฐ๊ณผ์—์„œ ์ปจํ…์ธ ๋กœ ๋žœ๋”ฉํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.
  • NSUserActivity

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