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

TIL_20180409 ~ 20180413

|

2018.04.09

  • ์žํŒ๊ธฐ์•ฑ step8 PR..
  • ํŒŒ์ด๊ทธ๋ž˜ํ”„ ๊ณ„์‚ฐํ• ๋•Œ ๋ผ๋””์•ˆ๊ณต์‹์— ๋ผ๋””์•ˆ๊ฐ’์ด ์•„๋‹Œ ๊ฐ๋„๊ฐ’์„ ๋„ฃ์–ด์„œ ์‹œํ–‰์ฐฉ์˜ค๊ฐ€ ์žˆ์—ˆ์ง€๋งŒ ํŒŒ์ด(๋ถ€์ฑ„๊ผด)๋ชจ์–‘์˜ ๊ทธ๋ž˜ํ”„ ๊ทธ๋ฆฌ๊ธฐ ์„ฑ๊ณต
  • pipe operator๊ฐ•์˜: custom operator ์„ค์ •, ํด๋กœ์ €์™€ pipe operator๋ฅผ ๊ฒฐํ•ฉํ•ด์„œ ๊ฐ€๋…์„ฑ์ด ์ข‹์€ ํ•จ์ˆ˜ํ˜•ํ”„๋กœ๊ทธ๋ž˜๋ฐ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.
  • mapValue
  • reduce
    let arr = [1,2,3,4,5,6,7,8,9,10]
    arr.count
    let runningSum = arr
      .reduce(into: []) { $0.append(($0.last ?? 0) + $1) }
    // [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
    runningSum.count
    
  • ์›์˜ ์ž์ทจ์— ์žˆ๋Š” ์ ์˜ ์œ„์น˜ ๊ตฌํ•˜๊ธฐ - ํŒŒ์ด๊ทธ๋ž˜ํ”„ ๊ทธ๋ฆด ๋•Œ ํ•„์š”ํ–ˆ์Œ

2018.04.10 ~ 11

  • ์žํŒ๊ธฐ ํ”ผ๋“œ๋ฐฑ ์ฒ˜๋ฆฌ
    • ํ”ผ๋“œ๋ฐฑ ์ฒ˜๋ฆฌ ์™„๋ฃŒ & step8 ๋จธ์ง€!
  • ์žํŒ๊ธฐ ๋งˆ์ง€๋ง‰๋‹จ๊ณ„ step9์‹œ์ž‘
  • ํŒŒ์ด๊ทธ๋ž˜ํ”„๋ฅผ ๋“œ๋ž˜๊ทธํ•ด์„œ ํฌ๊ธฐ๋ฅผ ๋‹ฌ๋ฆฌํ•˜๊ณ  ์ƒˆ๋กœ ๊ทธ๋ฆผ
    • ์ œ์Šค์ณ, ํ„ฐ์น˜์ด๋ฒคํŠธ ์ ์šฉ
  • ๊ทธ๋ž˜ํ”„๋ฅผ ๊ทธ๋ฆฌ๋Š” color๋ฅผ ํ…Œ๋งˆ๋ณ„๋กœ enum์œผ๋กœ ์„ ์–ธํ•ด์„œ ๋งค๋ฒˆ ๋žœ๋ค์œผ๋กœ ์„ ํƒ ๊ฐ€๋Šฅํ•˜๋„๋ก ์„ค์ •
    • enum๋‚ด์— ์†์„ฑ๊ณผ ํ•จ์ˆ˜ ์„ ์–ธํ•ด์„œ ์‚ฌ์šฉํ•ด๋ด„

2018.04.12

  • ์นด๋“œ๊ฒŒ์ž„ ์‹œ์ž‘ step1
  • ์žํŒ๊ธฐ ๋งˆ์ง€๋ง‰๋‹จ๊ณ„ ์ด์Šˆ ์ •๋ฆฌํ•˜๊ธฐ https://github.com/jinios/swift-vendingmachineapp/issues/5
  • ์นด๋“œ๊ฒŒ์ž„ step1 ๋จธ์ง€

2018.04.13

  • ์นด๋“œ๊ฒŒ์ž„ step2 ์™„์„ฑ ๋ฐ PR๋ณด๋ƒ„
  • addSubView, removeFromSuperView()
  • UIResponder - motionEnded
  • ์ปค์Šคํ…€ ๋ทฐ ํด๋ž˜์Šค ๋งŒ๋“ค๊ณ  ์†์„ฑ ์ง€์ •ํ•˜๊ธฐ: ์ด๋ ‡๊ฒŒํ•˜๋ฉด ํ•ด๋‹น ํด๋ž˜์Šคํƒ€์ž…์˜ ๋ทฐ๋Š” ํ•ด๋‹น ์†์„ฑ์„ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ ์šฉ๋ฐ›๊ฒŒ(?)๋จ
  • ์ฝ”๋“œ๋กœ ์ถ”๊ฐ€ํ•œ view์— ์†์„ฑ์„ ์ ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” init(frame:)์— ์†์„ฑ์„ ์ง€์ •ํ•ด์ค˜์•ผํ•œ๋‹ค. (๊ด€๋ จํฌ์ŠคํŒ…!) ```swift override init(frame: CGRect) { // by code super.init(frame: frame) self.layer.cornerRadius = 5.0 self.clipsToBounds = true }

convenience init() { self.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0)) } ```

Comments