Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#7 assignment 3 #8

Merged
merged 11 commits into from
Oct 31, 2021
Merged

Feature/#7 assignment 3 #8

merged 11 commits into from
Oct 31, 2021

Conversation

yangsubinn
Copy link
Member

@yangsubinn yangsubinn commented Oct 28, 2021

๐Ÿ“Œ ๊ด€๋ จ ์ด์Šˆ

closed #7

๐Ÿ“Œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ ๋ฐ ์ด์œ 

3์ฃผ์ฐจ ๊ณผ์ œ ์™„๋ฃŒํ–ˆ์Šด๋‹ค

  • ์ƒ๋‹จ UIView
  • ์ฑ„๋„ CollectionView
  • ์ปจํ…์ธ  TableView
  • ์นดํ…Œ๊ณ ๋ฆฌ CollectionView (๋„์ „๊ณผ์ œ)

๐Ÿ“Œ PR Point

์Šคํ† ๋ฆฌ๋ณด๋“œ์— ์˜ค๋ธŒ์ ํŠธ๋ฅผ ์˜ฌ๋ ค์„œ IBOutlet ์—ฐ๊ฒฐ๋งŒ ํ•ด์ฃผ๊ณ , ์˜คํ† ๋ ˆ์ด์•„์›ƒ์€ Snapkit์„ ํ™œ์šฉํ•ด์„œ ์ฝ”๋“œ๋กœ ์žก์•˜์Šต๋‹ˆ๋‹ค..
๋ทฐ๋Š” ์ „์ฒด์ ์œผ๋กœ collectionView 2๊ฐœ์™€ tableView 1๊ฐœ๋กœ ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค

  • ์ฑ„๋„(channelCollectionView) : CollectionView + PrototypeCell(HomeChannelCVC)
  • ์นดํ…Œ๊ณ ๋ฆฌ(categoryCollectionView) : CollectionView + CodeBase๋กœ cell ๊ตฌ์„ฑ(CategoryCVC)
  • ์ปจํ…์ธ (contentTableView): TableView + xib(ContentTVC)

์ €ํฌ ์• ๊ธฐ ๊ท€์—ฝ์ฃ ... ๋ด์ฃผ์„ธ์—ฌ ์ž๋ž‘ํ•˜๋Š”๊ฑฐ์—์š”...
  • ์—์…‹ ์ถ”๊ฐ€ํ•ด์„œ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค!

๐Ÿ“Œ ์ฐธ๊ณ  ์‚ฌํ•ญ

์Šคํ† ๋ฆฌ๋ณด๋“œ์™€ ์ฝ”๋“œ๋ฅผ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๋ ค ํ•˜๋‹ˆ๊นŒ ์•ฝ๊ฐ„ ์—ฌ๊ธฐ์ €๊ธฐ ์ •์‹ ์ด ์—†๋„ค์š” ํšจ....๐Ÿคฏ
๋ญ”๊ฐ€ ui ์„ค์ •ํ•˜๋Š” ์ฝ”๋“œ๊ฐ€ ๋น ์ง„ ๊ฒƒ ๊ฐ™์€๋ฐ..? ์‹ถ์œผ๋ฉด ์•„๋งˆ ์Šคํ† ๋ฆฌ๋ณด๋“œ์—์„œ ์„ค์ •ํ–ˆ์„ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค..
์ง„์งœ ์ •์‹ ์—†์ด ํ•ด์„œ ์ œ๊ฐ€ ์–ด๋””์„œ ๋ญ˜ ํ–ˆ๋Š”์ง€.... ์กฐ๊ธˆ ํ˜ผ๋ž€์Šค๋Ÿฝ๊ธฐ๋„ ํ•˜๋”๋ผ๊ตฌ์—ฌ.....
๋ญ˜ ํ•œ๊ฑด์ง€ ์ดํ•ด๊ฐ€ ์•ˆ๋˜๊ฑฐ๋‚˜ ๋” ํšจ์œจ์ ์œผ๋กœ ํ•  ์ˆ˜ ์žˆ๋Š” ๋ถ€๋ถ„์ด ์žˆ๋‹ค๋ฉด ์ฝ”๋ฉ˜ํŠธ... ๋ถ€ํƒ๋“œ๋ฆผ๋‹ค๐Ÿ˜Š
๋ฒŒ์จ ์ด๋ฏธ 3์ฐจ ๊ณผ์ œ์ง€๋งŒ... ๋‹ค์Œ ๊ณผ์ œ๋ถ€ํ„ฐ๋Š” ์ข€ ๋” ์—ด์‹ฌํžˆ ํ•ด๋ณด๊ฒ ์Šด๋‹ค....

@Suyeon9911
Copy link
Member

์ง€๋‚˜๊ฐ€๋˜.. ์™€๋น„์ธ๋ฐ์š”.. ์ˆ˜๋นˆ๋‹˜ ์•„๊ฐ€๐Ÿถ .. ๋„ˆ๋ฌด ๊ท€์—ฌ์›Œ์š”...๐Ÿ˜–

Copy link

@hwangJi-dev hwangJi-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆ˜๋นˆ๋‹˜,, ์˜ค๋Š˜๋„ ๋งŽ์ด ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค,, ์ตœ๊ณ ์ตœ๊ณ ์ตœ๊ณ ์˜ค์˜ค์˜ค์˜ค์˜ค์˜ค!!!!!!!


}

/// ์ฝ”๋“œ๋ฒ ์ด์Šค๋กœ cell์„ ์ƒ์„ฑํ• ๋•Œ ํ•„์š”ํ•œ ์ดˆ๊ธฐํ™” ํ•จ์ˆ˜ (์ธํ„ฐํŽ˜์ด์Šค ๋นŒ๋”์—์„œ๋Š” ์ž๋™์œผ๋กœ ์ดˆ๊ธฐํ™”ํ•˜๊ธฐ ๋•Œ๋ฌธ์— init ํ•„์š” X)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๋Ÿฐ ์นœ์ ˆํ•œ ์ฃผ์„ ๋„ˆ๋ฌด ์ข‹์•„์š”๐Ÿ’œ๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋†“์น  ์ˆ˜ ์žˆ๋Š” ๋ถ€๋ถ„์ด์—ˆ๋Š”๋ฐ, ๋‹ค์‹œํ•œ๋ฒˆ ์ƒ๊ธฐ์‹œํ‚ค๊ณ  ๊ฐ‘๋‹ˆ๋‹ค!!๐Ÿ‘ ์˜ ์นœ์ ˆ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค... ์ฃผ์„๋•์— cell์„ ์ฝ”๋“œ๋กœ ์ž‘์„ฑํ• ๋•Œ ์ดˆ๊ธฐํ™”๊ฐ€ ํ•„์š”ํ•˜๋‹ค๋Š”๊ฒƒ์„ ์•Œ๊ณ  ๊ฐ‘๋‹ˆ๋‹ค.. ์ˆ˜๋นˆ ์Šจ๋ฐฐ ์งฑ

func setupLayout() {
self.addSubview(categoryLabel)

categoryLabel.snp.makeConstraints { make in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋‹ค์Œ์—๋Š” then์„ ๊ฐ™์ด ์‚ฌ์šฉํ•ด๋ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”!! ใ…Žใ…Ž make in ์„ ์“ฐ์ง€ ์•Š๊ณ  $0. ์œผ๋กœ ๋ชจ๋“  ํ”„๋กœํผํ‹ฐ์— ์ ‘๊ทผ ๊ฐ€๋Šฅํ•ด์„œ snapkit๊ณผ ํ•จ๊ป˜ ์ผ์„ ๋•Œ ์—„์ฒญ ํšจ์œจ์ ์ด๋”๋ผ๊ตฌ์š”!! ใ…Žใ…Ž

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ทธ๋™์•ˆ ์ชผ๊ธˆ ๋ฌด์„œ์›Œ์„œ ๋ชป์“ฐ๊ณ  ์žˆ์—ˆ๋Š”๋ฐ ์ด์   ์ •๋ง๋ฃจ then ์„ ๋ฐฐ๋ฆ ์„ ๋งˆ์ฃผํ•  ๋•Œ๊ฐ€ ๋๋‚˜๋ด์—ฌ... ์ ์šฉํ•ด๋ณด๊ฒ ์Šด๋‹ค!๐Ÿ˜Š

Comment on lines 43 to 49

channelCollectionView.delegate = self
channelCollectionView.dataSource = self
categoriesCollectionView.delegate = self
categoriesCollectionView.dataSource = self
contentTableView.delegate = self
contentTableView.dataSource = self

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋Œ€๋ฆฌ์ž ์œ„์ž„ ์ฝ”๋“œ๋ฅผ ํ•จ์ˆ˜ํ™”ํ•ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”~~

Copy link
Member Author

@yangsubinn yangsubinn Oct 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ข‹์•„์—ฌ! ์‚ฌ์‹ค ํ•จ์ˆ˜ํ™”๋ฅผ ํ•˜๊ณ  ์‹ถ์—ˆ๋Š”๋ฐ ํ•จ์ˆ˜ ์ด๋ฆ„์„ ์–ด๋–ค ์‹์œผ๋กœ ํ• ์ง€ ๋ชจ๋ฅด๊ฒ ๋“œ๋ผ๊ตฌ์—ฌ.. delegate๋ž‘ datasource๋กœ ๋‚˜๋ˆ ์•ผํ• ์ง€.. collectionView๋ž‘ tableView๋กœ ๋‚˜๋ˆŒ์ง€.. ๊ณ ๋ฏผ๋งŒ ํ•˜๋‹ค๊ฐ€ ๋’€๋„ค์—ฌ...
ํ˜น์‹œ ์ง€์€๋‹˜์ด๋ผ๋ฉด ํ•จ์ˆ˜ ์ด๋ฆ„ ์–ด๋–ค ์‹์œผ๋กœ ์ง€์œผ์‹ค ๊ฒƒ ๊ฐ™๋‚˜์—ฌ.......?๐Ÿง
์ง€์€๋‹˜ ์ฝ”๋“œ ์‡ฝ์ƒฅ ์™„๋ฃŒ๐Ÿ…

Comment on lines 142 to 150
/// categoriesCollectionView์— ๋“ค์–ด๊ฐˆ label์˜ ํฌ๊ธฐ๋ฅผ categoryLabel์ด๋ผ๋Š” ์ž„์˜์˜ label์„ ๋งŒ๋“ค์–ด์„œ ๊ณ„์‚ฐ ํ›„ return
func setupLabelSize(index: Int) -> CGSize {
let categoryLabel = UILabel()
categoryLabel.text = categorieList[index]
categoryLabel.sizeToFit()

return categoryLabel.bounds.size
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค ์ด์ฝ”๋“œ ์ง„์งœ ์ข‹์€ ๊ฒƒ ๊ฐ™์•„์š”! ์ €๋Š” ์ด๋ ‡๊ฒŒ returnํ•ด์„œ ์‚ฌ์šฉํ•  ์ƒ๊ฐ์€ ๋ชปํ–ˆ์—ˆ๋Š”๋ฐ..! ์ตœ๊ณฑ๋‹ˆ๋‹น!!

Comment on lines +167 to +168
let size = setupLabelSize(index: indexPath.row)
return CGSize(width: size.width + 20, height: 30)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป

Comment on lines 267 to 270
cell.contentTitleLabel.text = contentTitleList[indexPath.row]
cell.contentImageView.image = UIImage(named: "\(contentImageList[indexPath.row])")
cell.contentChannelImageView.image = UIImage(named: "wesoptProfile")
cell.contentMoreButton.setImage(UIImage(named: "moreMenuIcon"), for: .normal)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๋ ‡๊ฒŒ cell์—์„œ ์ง€์ •ํ•ด์ค˜์•ผ ํ•  ๊ฐ’๋“ค์ด ๋งŽ์„ ๋•Œ cell๋‚ด์—์„œ ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“ค๊ณ , ๊ทธ ํ•จ์ˆ˜๋ฅผ ๋ถˆ๋Ÿฌ์™€์„œ ์ฝ”๋“œ ํ•œ์ค„๋กœ ์“ฐ๋Š” ๋ฐฉ๋ฒ•๋„ ์žˆ์Šต๋‹ˆ๋‹ท!! ใ…Žใ…Ž

Copy link

@noah0316 noah0316 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ค‘๊ฐ„์ค‘๊ฐ„ ๊ฐ•์ฅ๋ณด๋ฉด์„œ ํž๋งํ•˜๋ฉฐ ๋ดค์Šต๋‹ˆ๋‹ค ์ˆ˜๋นˆ๋‹˜..์…ค๊ธฐ๊ฐ„์ธ๋ฐ ๋„ˆ๋ฌด ๊ณ ์ƒ๋งŽ์œผ์…จ์Šต๋‹ˆ๋‹ค!!
ํ•ญ์ƒ ์นœ์ ˆํ•œ ์ฃผ์„์„ ์จ์ฃผ์‹œ๋Š” ๋ฐฐ๋ ค์— ๊ฐ๋™๋ฐ›๊ณ  ๊ฐ‘๋‹ˆ๋‹ค ๐Ÿฅฒ
์„ผ์Šค๋„˜์น˜๋Š” ์ฝ”๋“œ ์ž˜๋ดค์Šต๋‹ˆ๋‹ค ใ…Žใ…Ž


}

/// ์ฝ”๋“œ๋ฒ ์ด์Šค๋กœ cell์„ ์ƒ์„ฑํ• ๋•Œ ํ•„์š”ํ•œ ์ดˆ๊ธฐํ™” ํ•จ์ˆ˜ (์ธํ„ฐํŽ˜์ด์Šค ๋นŒ๋”์—์„œ๋Š” ์ž๋™์œผ๋กœ ์ดˆ๊ธฐํ™”ํ•˜๊ธฐ ๋•Œ๋ฌธ์— init ํ•„์š” X)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋†“์น  ์ˆ˜ ์žˆ๋Š” ๋ถ€๋ถ„์ด์—ˆ๋Š”๋ฐ, ๋‹ค์‹œํ•œ๋ฒˆ ์ƒ๊ธฐ์‹œํ‚ค๊ณ  ๊ฐ‘๋‹ˆ๋‹ค!!๐Ÿ‘ ์˜ ์นœ์ ˆ...

func configUI() {
contentTitleLabel.numberOfLines = 2
contentTitleLabel.text = "4์ฐจ iOS ์„ธ๋ฏธ๋‚˜: ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์‚ฌ์šฉ๊ณผ ํ•จ๊ป˜ ์น˜ํ‚จ ๋จน๋Š” ๋ฐฉ๋ฒ•"
contentSubLabel.text = "WE SOPT ยท ์กฐํšŒ์ˆ˜ 100๋งŒํšŒ ยท 3์ฃผ์ „"
Copy link

@noah0316 noah0316 Oct 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋‚˜์ค‘์— ๊ฐ€์„œ ํ•„์š”ํ•  ๋•Œ ๋ณ€๊ฒฝํ•ด๋„ ์ข‹๊ฒ ์ง€๋งŒ ํ˜น์‹œ๋‚˜ ํ•˜์—ฌ ใ…Žใ…Ž ์กฐํšŒ์ˆ˜ \(n)ํšŒ, \(n)์ „ ํ…์ŠคํŠธ ๋นผ๊ณ  ๋‹ค ๋ณ€ํ•  ์ˆ˜ ์žˆ๋Š” ์นœ๊ตฌ๋“ค์ด๋‹ˆ ๋”ฐ๋กœ ์ง€์ •ํ•ด์ฃผ์–ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”!!๐Ÿค“

"3์ฃผ์ฐจ iOS: ๋–ก๋ณถ์ด ์‚ฌ์ฃผ์„ธ์š” ๋งค์šด๊ฑฐ๋กœ ์‚ฌ์ฃผ์„ธ์š”",
"4์ฃผ์ฐจ iOS: ์˜ค๋Š˜์€ ์—ฝ๋–ก์„ ๋จน์„๊นŒ ์‘๋–ก์„ ๋จน์„๊นŒ ์‹ ์ „์„ ๋จน์„๊นŒ?",
"5์ฃผ์ฐจ iOS: ์œกํšŒ์Šคํ„ฐ๋”” ์„œ์น˜๋ฐ” ์ •๋ฆฌํ•ด์„œ ์˜ฌ๋ ค์•ผ๋˜๋Š”๋ฐ",
"6์ฃผ์ฐจ iOS: ์ž๋ฃŒ๊ตฌ์กฐ ์‹œํ—˜ ๋งํ•˜๋Š” ๋ฒ•"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ˆ™๋ฌผ...๐Ÿฅฒ

Comment on lines 231 to 245
switch collectionView {
case channelCollectionView:
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: HomeChannelCVC.identifier, for: indexPath) as? HomeChannelCVC else {return UICollectionViewCell()}
cell.setData(channelName: channelNameList[indexPath.row], channelImage: channelImageList[indexPath.row])
return cell

case categoriesCollectionView:
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: HomeCategoryCVC.identifier, for: indexPath) as? HomeCategoryCVC else {return UICollectionViewCell()}
cell.categoryLabel.text = categorieList[indexPath.row]
return cell

default:
return UICollectionViewCell()
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค ์š”๋ ‡๊ฒŒ cell ์ƒ์„ฑ์„ ๋ถ„๊ธฐ์ฒ˜๋ฆฌ ํ•ด์ค„ ์ˆ˜๋„ ์žˆ๊ตฐ์š”!! ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค ใ…Žใ…Žโœ๏ธ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‚ฌ์‹ค if-else๋ฌธ์œผ๋กœ ์งฐ์—ˆ๋Š”๋ฐ ์ˆ˜๋นˆ์Šจ๋ฐฐ๊บผ ๋ชฐ๋ž˜ ๋ณด๊ณ  ํ˜ธ๋‹ค๋‹ฅ ๋ฐ”๊ฟ”์„œ ๋‚ด์„œ ์นญ์ฐฌ๋ฐ›์•˜๋‹ค.. ์ˆ˜๋นˆ์Šจ๋ฐฐ ๊ฐ์‚ฌํ•จ๋‹ค...

Copy link
Member

@hellozo0 hellozo0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆ˜๋นˆ์Šจ๋ฐฐ... snapkit์“ฐ๋Š”๊ฑฐ ๋„˜ ๋ฉ‹์ช„..R....
์กฐ๊ธˆ ์–ด๋ ค์šด ๊ฐœ๋…์ด๋‚˜ ๋‚ด๊ฐ€ ์–ด๋–ค ์˜๋„๋กœ ์ฝ”๋“œ์งฐ๋Š”์ง€ ์ฃผ์„์œผ๋กœ ์„ค๋ช…ํ•ด์ฃผ๋Š”๊ฑฐ ๋„˜ ์ดํ•ด๋„ ์ž˜๊ฐ€๊ณ  ํ•ด์„œ ๋‚˜๋„ ๋‹ด์— ์ ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค!!
๋„ˆ๋ฌด ์ˆ˜๊ณ ํ–ˆ์–ด์šค~~!


}

/// ์ฝ”๋“œ๋ฒ ์ด์Šค๋กœ cell์„ ์ƒ์„ฑํ• ๋•Œ ํ•„์š”ํ•œ ์ดˆ๊ธฐํ™” ํ•จ์ˆ˜ (์ธํ„ฐํŽ˜์ด์Šค ๋นŒ๋”์—์„œ๋Š” ์ž๋™์œผ๋กœ ์ดˆ๊ธฐํ™”ํ•˜๊ธฐ ๋•Œ๋ฌธ์— init ํ•„์š” X)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์˜ค... ์ฃผ์„๋•์— cell์„ ์ฝ”๋“œ๋กœ ์ž‘์„ฑํ• ๋•Œ ์ดˆ๊ธฐํ™”๊ฐ€ ํ•„์š”ํ•˜๋‹ค๋Š”๊ฒƒ์„ ์•Œ๊ณ  ๊ฐ‘๋‹ˆ๋‹ค.. ์ˆ˜๋นˆ ์Šจ๋ฐฐ ์งฑ

Comment on lines +43 to +46
layer.cornerRadius = 14
layer.borderWidth = 1
layer.borderColor = .init(gray: 125/235, alpha: 0.5)
backgroundColor = .systemGray6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ œ๊บผ์— ๋‹ฌ์•„์คฌ๋˜ ๋ถ€๋ถ„์ด ์ด๊ฑฐ๊ตฐ์š”..! ๋ณด๊ณ  ์ ์šฉํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹น!

contentImageView.contentMode = .scaleToFill
}

func setupLayout(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋ ˆ์ด์•„์›ƒ ์ฝ”๋“œ๋กœ ์งœ๋Š” ์Šจ๋ฐฐ.... ๋„˜ ๋ฉ‹์ž‡์Šต๋‹ˆ๋‹ค.... ์•„์ง์€ ๋ˆˆ์œผ๋กœ ์ตํ˜€๊ฐ€๋Š” ๋‹จ๊ณ„์ธ์ง€๋ผ ์นจ๋งŒ ํ˜๋ฆด๊ป˜์š”

Comment on lines 231 to 245
switch collectionView {
case channelCollectionView:
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: HomeChannelCVC.identifier, for: indexPath) as? HomeChannelCVC else {return UICollectionViewCell()}
cell.setData(channelName: channelNameList[indexPath.row], channelImage: channelImageList[indexPath.row])
return cell

case categoriesCollectionView:
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: HomeCategoryCVC.identifier, for: indexPath) as? HomeCategoryCVC else {return UICollectionViewCell()}
cell.categoryLabel.text = categorieList[indexPath.row]
return cell

default:
return UICollectionViewCell()
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์‚ฌ์‹ค if-else๋ฌธ์œผ๋กœ ์งฐ์—ˆ๋Š”๋ฐ ์ˆ˜๋นˆ์Šจ๋ฐฐ๊บผ ๋ชฐ๋ž˜ ๋ณด๊ณ  ํ˜ธ๋‹ค๋‹ฅ ๋ฐ”๊ฟ”์„œ ๋‚ด์„œ ์นญ์ฐฌ๋ฐ›์•˜๋‹ค.. ์ˆ˜๋นˆ์Šจ๋ฐฐ ๊ฐ์‚ฌํ•จ๋‹ค...

@yangsubinn yangsubinn merged commit ad6efb9 into main Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] iOS 3์ฐจ ๊ณผ์ œ
5 participants