[๐Ÿ“ iOS TIL] #19 ... 1st Team Project - Coffee Ordering App #3

TaeUkยท2024๋…„ 4์›” 4์ผ
0

๐ŸŽ iOS TIL

๋ชฉ๋ก ๋ณด๊ธฐ
18/18
post-thumbnail

์‹œ๋„ํ•ด ๋ณธ ๊ฒƒ๋“ค!

์šฐ์„  ๊ฐ„๋‹จํ•œ UI ๊ตฌ์„ฑ ํ›„, UISegmentedControl๊ณผ UIStackView๋ฅผ ํ™œ์šฉํ•˜์—ฌ ๋ฉ”๋‰ด๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•ด๋ณด์•˜๋‹ค!

๊ทธ๋ฆฌ๊ณ  ์–ดํ”Œ ํ•˜๋‹จ์— UITableView๋ฅผ ํฌํ•จ์‹œ์ผœ, ์ฃผ๋ฌธํ•œ ๋ชฉ๋ก์„ ์ถœ๋ ฅ์‹œ์ผฐ๋‹ค!

์ด๋•Œ, ์•„๋ž˜์˜ DataSet์ด๋ผ๋Š” ๋ฐฐ์—ด์— ๊ฐ๊ฐ์˜ ๋งค๋‰ด์— ๋”ฐ๋ฅธ ์š”์†Œ๋“ค์„ ์ €์žฅํ•ด์ฃผ๊ณ  ์„ธ๊ทธ๋จผํŠธ์˜ ๊ฐ’์ด ๋ฐ”๋€”๋•Œ ๋งˆ๋‹ค ์ถœ๋ ฅํ•˜๋Š” ๋ฐฐ์—ด์„ ์ดˆ๊ธฐํ™” ํ•ด์ฃผ๋Š” ๋ฐฉ์‹์œผ๋กœ ์ œ์ž‘ํ•˜์˜€๋‹ค.

  let coffeeDataSet = [
        Item(name: "์•„๋ฉ”๋ฆฌ์นด๋…ธ", image: "coffee1.jpg", price: 2500),
        Item(name: "์นดํŽ˜๋ผ๋–ผ", image: "coffee2.jpg", price: 4000),
        Item(name: "์—์Šคํ”„๋ ˆ์†Œ", image: "coffee3.jpg", price: 2000)
    ]
    let teaDataSet = [
        Item(name: "์ผ€๋ชจ๋งˆ์ผํ‹ฐ", image: "tea1.jpg", price: 4000),
        Item(name: "์•„์ด์Šคํ‹ฐ", image: "tea2.jpg", price: 3500),
        Item(name: "๋ ˆ๋ชฌํ‹ฐ", image: "tea3.jpg", price: 4000),
        Item(name: "๊ทธ๋ฆฐํ‹ฐ", image: "tea4.jpg", price: 3500)
    ]
    let cakeDataSet = [
        Item(name: "๋ธ”๋ฃจ๋ฒ ๋ฆฌ์น˜์ฆˆ์ผ€์ต", image: "cake1.jpg", price: 6000),
        Item(name: "๋ฐ”์Šคํฌ ์น˜์ฆˆ์ผ€์ต", image: "cake2.jpg", price: 5500),
        Item(name: "๋‹น๊ทผ ์ผ€์ต", image: "cake3.jpg", price: 6500)
    ]
    var currentDataSet: [Item] = []

์ „์ฒด ์ฝ”๋“œ๋Š” ๋‚˜์ค‘์— Github์—์„œ ์ •๋ฆฌํ•ด๋ณผ ๊ณ„ํš์ด๋‹ค!

0๊ฐœ์˜ ๋Œ“๊ธ€