seonyoung

@seonyoung

40 Points

0 Followers

5 Posts

0 Answers

Joined May 22nd, 2021

User has not added any information in their about section.

Identifying CollectionView Cell index

CollectionView Cell์˜ IndexPath func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let indexPath = indexPath.row } ์ผ๋ฐ˜์ ์œผ๋กœ collectionViewCell์˜ indexPath๋ฅผ ์•Œ๊ณ  ์‹ถ์„ ๋• viewController ์•ˆ์˜ ์œ„ ํ•จ์ˆ˜์—์„œ ์‰ฝ๊ฒŒ ์•Œ ์ˆ˜ ์žˆ๋‹ค ๊ทธ๋Ÿฌ๋‚˜ ๋งŒ์•ฝ cell์˜ IndexPath๋ฅผ v...

seonyoung

22 hours ago

Select One:

Add TapGestureRecognizer to ImageView

์ด๋ฏธ์ง€๋ทฐ์— tapGestureRecognizer ์ถ”๊ฐ€ํ•˜๊ธฐ ๋งŒ์•ฝ ์ด๋ฏธ์ง€๋ทฐ์— tapGestureRecognizer๋ฅผ ์ถ”๊ฐ€ํ–ˆ์ง€๋งŒ ์ž‘๋™์ด ๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด? userInteraction์„ ์‚ดํŽด๋ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. userInteraction enabled์˜ default ๊ฐ’์€ NO์ด๊ธฐ ๋•Œ๋ฌธ์— ์ฝ”๋“œ๋‚˜ ์Šคํ† ๋ฆฌ๋ณด๋“œ ์ƒ์—์„œ YES๋กœ ์„ค์ •ํ•ด์ค˜์•ผํ•ฉ๋‹ˆ๋‹ค. ์Šคํ† ๋ฆฌ๋ณด๋“œ์—์„œ userInteraction enabled ์„ค์ •ํ•˜๊ธฐ ์ฝ”๋“œ๋กœ userInteraction enabled...

seonyoung

1 week ago

Select One:

Architecture

์•„ํ‚คํ…์ณ๊ฐ€ ์ค‘์š”ํ•œ ์ด์œ ? : ์ˆ˜๋งŽ์€ ์ผ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๊ฑฐ๋Œ€ํ•œ class๋ฅผ ๋””๋ฒ„๊ทธํ•  ๋•Œ ๋ฒ„๊ทธ๋ฅผ ์ฐพ๊ณ  ๊ณ ์น˜๊ธฐ ํž˜๋“ค๊ธฐ ๋•Œ๋ฌธ ๋ฐ์ดํ„ฐ๊ฐ€ UIVIewController์— ๋ฐ”๋กœ ์ €์žฅ๋จ UIVIew๊ฐ€ ๊ฑฐ์˜ ์•„๋ฌด๊ฒƒ๋„ ํ•˜์ง€ ์•Š์Œ Model์ด ๋นˆ ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ Unit Test๋กœ ์•„๋ฌด๊ฒƒ๋„ ํ•˜์ง€ ๋ชปํ•จ ( Unit test : ํ”„๋กœ๊ทธ๋žจ์˜ ๊ธฐ๋ณธ ๋‹จ์œ„์ธ ๋ชจ๋“ˆ์„ ํ…Œ์ŠคํŠธํ•˜๋Š” ๊ฒƒ, ์ฝ”๋“œ ํ€„๋ฆฌํ‹ฐ ๊ฐœ์„ ) ๋“ฑ๋“ฑ์ธ ๊ฒฝ์šฐ ์•„ํ‚คํ…...

seonyoung

2 weeks ago

Select One:

Asynchronous

๋™๊ธฐ vs ๋น„๋™๊ธฐ ๋™๊ธฐ์‹(sync) : ํ”„๋กœ๊ทธ๋žจ์„ ์ˆœ์ฐจ์ ์œผ๋กœ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์œผ๋กœ ์ด์ „ ํ”„๋กœ๊ทธ๋žจ์ด ์™„๋ฃŒ๋  ๋•Œ๊นŒ์ง€ ๋‹ค์Œ ํ”„๋กœ๊ทธ๋žจ์€ ๋Œ€๊ธฐํ•ด์•ผํ•œ๋‹ค ๋น„๋™๊ธฐ์‹(aynchronous) : ํ”„๋กœ๊ทธ๋žจ์„ ๋ณ‘๋ ฌ์ ์œผ๋กœ ์‹คํ–‰, ์ด์ „ ํ”„๋กœ๊ทธ๋žจ์ด ์™„๋ฃŒ๋˜์ง€ ์•Š์•„๋„ ๋‹ค์Œ ํ”„๋กœ๊ทธ๋žจ ์‹คํ–‰ ๊ฐ€๋Šฅ IOS์—์„œ ์ง€์›ํ•˜๋Š” ๋™์‹œ์„ฑ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๋™์‹œ์„ฑ ํ”„๋กœ๊ทธ๋ž˜๋ฐ(concurrency)์ด๋ž€? ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์Šค๋ ˆ๋“œ๊ฐ€ ๋ฒˆ...

seonyoung

3 weeks ago

Select One:
Pass data with protocol

Pass data with protocol

ํ”„๋กœํ† ์ฝœ์„ ์‚ฌ์šฉํ•˜์—ฌ viewcontroller๊ฐ„ ๋ฐ์ดํ„ฐ ์ „๋‹ฌํ•˜๊ธฐ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  ๋•Œ ๋ณดํ†ต์€ segue๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๋ฐ viewcontroller๊ฐ„ segue๋กœ ์—ฐ๊ฒฐ๋˜์–ด ์žˆ์ง€ ์•Š์€ ๊ฒฝ์šฐ๋Š” ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ• ๊นŒ? 1. protocol ์ƒ์„ฑํ•˜๊ธฐ ๋ณด๋‚ผ ๋ฐ์ดํ„ฐ๊ฐ€ ์žˆ๋Š” ๋ทฐ ์ปจํŠธ๋กค๋Ÿฌ์˜ ํด๋ž˜์Šค ๋ฐ”๊นฅ์— ํ”„๋กœํ† ์ฝœ์„ ์ƒ์„ฑํ•ด ์ค€๋‹ค protocol SendDataDelegate { func sendData(data : ๋ฐ์ดํ„ฐํƒ€์ž…) }...

seonyoung

4 weeks ago

Select One:

Loading More Content