๊ณต๋ถ€ ์—ฐ์Šต์žฅ :-)

TIL_20180611 ~ 20180616

|

2018.06.11

  • Remote notification / Local notification
    • Local
    • ์•Œ๋žŒ - ํŠน์ • ์‹œ๊ฐ„์— noti, ์œ„์น˜ - ํŠน์ • ์œ„์น˜์—์„œ noti
    • Remote
    • token์„ ๊ฐ€์ง€๊ณ  Push server์—์„œ ์ •๋ณด๋ฅผ ๋ฐ›์•„์˜ค๋Š”๋ฐ, app์˜ ์‹คํ–‰์œ ๋ฌด์™€ ๊ด€๋ จ์ด ์—†๋‹ค.
    • ios๋Š”(๋‹จ๋ง๊ธฐ) ํ‘ธ์‹œ์„œ๋ฒ„์—์„œ ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜ค๊ธฐ์œ„ํ•ด์„œ(request๋ฅผ ํ•˜๊ธฐ์œ„ํ•ด) ์„œ๋ฒ„์— session์„ ๋ณด๋ƒ„
    • ํ‘ธ์‹œ์„œ๋ฒ„์—์„œ๋Š” ๋‹จ๋ง๊ธฐ์—์„œ token๊ฐ’์œผ๋กœ ํŒ๋‹จํ•˜์—ฌ ํ‘ธ์‹œ๋ฅผ ๋ณด๋ƒ„

2018.06.12

  • @escaping, completion handler, ๋น„๋™๊ธฐ, main thread
    • ํ•จ์ˆ˜์˜ ํŒŒ๋ผ๋ฏธํ„ฐ์— escaping์„ ์ค„๋•Œ๋Š” ํ•จ์ˆ˜ ๋‚ด๋ถ€์˜ ํด๋กœ์ €์—์„œ ๋น„๋™๊ธฐ ์ฒ˜๋ฆฌ์‹œ ๊ทธ ํด๋กœ์ € ์•ˆ์˜ ๋กœ์ง์ด ๋๋‚˜๊ณ  escaping์œผ๋กœ ์ค€ ๋กœ์ง์„ ์ฒ˜๋ฆฌํ•˜๋ผ๋Š” ๋œป์ด๋‹ค. (์ˆœ์„œ๊ฐ€ ๊ทธ๋ ‡๊ฒŒ ์ •์˜๋จ)
    • ์ด ๋•Œ๋Š” ํ•ด๋‹นํ•˜๋Š” ํด๋กœ์ € ๋‚ด์˜ scope์— escaping ํ•จ์ˆ˜๊ฐ€ ์œ„์น˜ํ•ด์•ผํ•จ(์ด๋•Œ๋Š” ๋ณดํ†ต ํด๋กœ์ € ๋‚ด๋ถ€์˜ ๊ฐ€์žฅ ๋งˆ์ง€๋ง‰ ์ค„์ด ๋˜๊ฒ ์ง€?)
    • Escaping Closure๋ฅผ ํ™œ์šฉํ•˜๋ฉด ํ†ตํ•ด์„œ ํ•จ์ˆ˜ ์‚ฌ์ด์— ์‹คํ–‰ ์ˆœ์„œ๋ฅผ ์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

2018.06.13

  • ์ง€๋ฐฉ์„ ๊ฑฐ ํˆฌํ‘œํ•˜๊ณ 
  • ๊ฐ„๋งŒ์— ๋ฐ€๋ ธ๋˜ ๋ธ”๋กœ๊ทธ ํฌ์ŠคํŒ… ์—…๋กœ๋“œ!

2018.06.14

  • ์ฃผ์†Œ๋ก ์•ฑ ๋งˆ์ง€๋ง‰ ๋‹จ๊ณ„ ์„ค๊ณ„
    • ์ฃผ์†Œ๋ก ๊ฐ์ฒด์˜ ์ด๋ฆ„๋Œ€๋กœ ์ •๋ ฌํ•˜๋Š” ๊ธฐ๋Šฅ ๊ตฌํ˜„ํ•˜๊ธฐ
    • ํ•œ๊ธ€ ์œ ๋‹ˆ์ฝ”๋“œ๋Œ€๋กœ ์ •๋ ฌ
    • [์ดˆ์„ฑ:[์—ฐ๋ฝ์ฒ˜]] ํ˜•ํƒœ์˜ ์ฝœ๋ ‰์…˜ ๋งŒ๋“ค๊ธฐ
    • ํ•œ๊ธ€์ดˆ์„ฑ(ใ„ฑ~ใ…Ž), ์˜์–ด ์ดˆ์„ฑ(A~Z)์ด ๋ชจ๋‘ ๋“ค์–ด์žˆ๋Š” ๋ฐฐ์—ด ๋งŒ๋“ค์–ด์„œ ๋”•์…”๋„ˆ๋ฆฌ์˜ ํ‚ค๊ฐ’์œผ๋กœ ํ™œ์šฉ

2018.06.15

  • ์ฃผ์†Œ๋ก ์•ฑ ๋งˆ์ง€๋ง‰ ๋‹จ๊ณ„ ์ด์Šˆ ํ•ด๊ฒฐ
    • [AddressData]๋ฅผ ์ด๋ฆ„ ์ดˆ์„ฑ์ด ๊ฐ™์€ ๊ฒƒ ๋ผ๋ฆฌ ๋ชจ์•„์„œ ๋”•์…”๋„ˆ๋ฆฌ[์ดˆ์„ฑ:[์—ฐ๋ฝ์ฒ˜]]๋กœ ๋งŒ๋“ค๊ธฐ
    • reduceํ™œ์šฉ: reduce๋ฅผ์จ์„œ ํ•  ์ˆ˜ ์žˆ์ง€ ์•Š์„๊นŒ ํ•ด์„œ reduce ์‚ฌ์šฉ๋ฒ• ๊ณต๋ถ€โ€ฆ ์•„์ง๋„ ์–ด๋ ต๋‹ค ใ… ใ… 
    • reduce์— ์กฐ๊ฑด ๋„ฃ์–ด์„œ ํ•„ํ„ฐ๋ง ํ•˜๋Š” ๋ฒ•!

2018.06.16

  • UILabel์— bold์Šคํƒ€์ผ์œผ ํฐํŠธ๋ฅผ ์ ์šฉํ•˜๊ณ ์‹ถ์–ด์„œ ์ฐพ์•„๋ณด๋‹ค๊ฐ€ preferredFont(forTextStyle:)์•Œ๊ฒŒ๋จ.
    • ์‚ฌ์ด์ฆˆ๋ฅผ ๊ฐœ๋ฐœ์ž๊ฐ€ ์ƒ์ˆ˜๋กœ ์ง€์ •ํ•˜๋Š”๊ฒŒ ์•„๋‹ˆ๋ผ ์‚ฌ์šฉ์ž๊ฐ€ ์ง€์ •ํ•œ ํฐํŠธ์Šคํƒ€์ผ์— ๋งž์ถฐ์„œ ์ ์šฉ๋จ.
    • Returns an instance of the system font for the specified text style and scaled appropriately for the userโ€™s selected content size category.
    • UIFont.TextStyle ์˜ต์…˜์œผ๋กœ ๋ญ”๊ฐ€๊ฐ€ ์ ์šฉ๋œ๋‹ค.
    • label.font = UIFont.preferredFont(forTextStyle: .headline) ์ด๋Ÿฐ์‹์œผ๋กœ ์จ๋ณด๋ฉด๋ ๋“ฏ
    • ์ฐธ๊ณ 1, ์ฐธ๊ณ 2

Comments