2019 Monthly I Learned - kirseia/study GitHub Wiki

๊พธ์ค€ํ•  ์ˆ˜ ์žˆ์„๊ฒƒ์ธ๊ฐ€...
  • Today I Learned (TIL)์€ ๋ฌด๋ฆฌ์ผ๊ฒƒ ๊ฐ™์•„์„œ ์›”๋ณ„๋กœ -_-);
2019.12
AVMutableCompositionTrack.insertTimeRange ๋Š” emptyTimeRange๋ฅผ ๋ฐ€์–ด๋‚ด๊ณ  'insert' ๋œ๋‹ค.
emtpyTimeRange๊ฐ€ 0~50์ดˆ๊ฐ€ ์žˆ์„ ๋•Œ
insertTimeRange ๋ฅผ 10~20์ดˆ ๊ตฌ๊ฐ„์— ํ•˜๋ฉด... ์ „์ฒด timeRange๋Š” 0~10(empty), 10~20(insert๋œ..), 20~60(empty)๊ฐ€ ๋˜๋ฒ„๋ฆผ
์‹œ์ž‘ ์‹œ๊ฐ„ ์ˆœ์„œ๋Œ€๋กœ insert ํ•˜์ง€ ์•Š์œผ๋ฉด emtpyTimeRange๊ฐ€ ๋ฐ€๋ ค๋‚˜๋Š” ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค...
  • ViewController ๊ฐ€ ์ตœ์ดˆ๋กœ ๋ณด์—ฌ์งˆ ๋•Œ ์ฒ˜๋ฆฌ
  • collectionView.reloadItems ์• ๋‹ˆ๋ฉ”์ด์…˜ ์—†์ด ํ•˜๊ธฐ
UIView.performWithoutAnimation {
    self.collectionView.reloadItemsAtIndexPaths(indexPaths)
}
  • collectionView.scrollToItem ์• ๋‹ˆ๋ฉ”์ด์…˜ ๊ธธ์ด ์กฐ์ •
UIView.animate(withDuration: 5, animations: { [weak self] in
    self?.collectionView.scrollToItem(at: IndexPath(item: 10, section: 10), at: .middle, animated: false) // false ๊ฐ€ ํ•ต์‹ฌ
})
2019.11
2019.10
2019. 9
let array1 = [1, 2, 3]
let array2 = [4, 5, 6]

let flattenArray = [array1, array2].flatMap({ (element: [Int]) -> [Int] in
    return element
})
2019. 8
2019. 7
2019. 6
2019. 5
2019. 4
2019. 3
2019. 2
2019.1
PresentedViewController - ์ž์‹ ์ด ํ˜ธ์ถœํ•œ VC
PresentingViewController - ์ž์‹ ์„ ํ˜ธ์ถœํ•œ VC
Inbox