sladuf
200
sladuf
์ „์ฒด ๋ฐฉ๋ฌธ์ž
์˜ค๋Š˜
์–ด์ œ
  • ๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (83)
    • ๐Ÿ“š Programming (32)
      • Swift (13)
      • JAVA (2)
      • Python (6)
      • SQL (6)
      • Web (5)
    • ๐Ÿ“ฑ iOS (25)
      • Base (7)
      • SwiftUI (9)
      • UIKit (7)
      • ์ธ๊ฐ• & ์ฑ… (2)
    • ๐Ÿ”— Algorithm (20)
      • Python (12)
      • Swift (3)
      • Tip (5)
    • ๐Ÿ—‚ ETC (6)

๋ธ”๋กœ๊ทธ ๋ฉ”๋‰ด

  • ํ™ˆ
  • ํƒœ๊ทธ
  • ๋ฐฉ๋ช…๋ก

๊ณต์ง€์‚ฌํ•ญ

์ธ๊ธฐ ๊ธ€

ํƒœ๊ทธ

  • ์Šค์œ„ํ”„ํŠธ
  • Swift

์ตœ๊ทผ ๋Œ“๊ธ€

์ตœ๊ทผ ๊ธ€

ํ‹ฐ์Šคํ† ๋ฆฌ

๊ธ€์“ฐ๊ธฐ ์„ค์ •
hELLO ยท Designed By ์ •์ƒ์šฐ.
sladuf

200

Passing Data (์ง์ ‘์ „๋‹ฌ๋ฐฉ์‹)
๐Ÿ“ฑ iOS/UIKit

Passing Data (์ง์ ‘์ „๋‹ฌ๋ฐฉ์‹)

2022. 6. 27. 22:43

 

 

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•˜๋Š” ์—ฌ์„ฏ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์ž !

 

 

1. instance property

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ ViewController ํ”„๋กœํผํ‹ฐ์— ๊ฐ’์„ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ๋ฒ•์ด๋‹ค.

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ property๋ฅผ ์„ ์–ธํ•˜๊ณ , ๊ทธ property์˜ ๊ฐ’์„ UI์— ์ ์šฉํ•˜๋Š” ์›๋ฆฌ์ด๋‹ค.

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ ViewController

propertyDataViewController.swift

var passingData = "" //์—ฌ๊ธฐ์— ๋ฐ์ดํ„ฐ ์ „๋‹ฌ๋ฐ›์„ ์˜ˆ์ •
@IBOutlet weak var setPassingData: UILabel! //์—ฌ๊ธฐ์— ์ „๋‹ฌ๋ฐ›์€ ๋ฐ์ดํ„ฐ ์ ์šฉ

override func viewDidLoad() {
    super.viewDidLoad()
    
    setPassingData.text = passingData
    
}

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  ViewController

viewController.swift

@IBAction func sendPropertyData(_ sender: Any) {
    
    let propertyVC = propertyDataViewController(nibName: "propertyDataViewController", bundle: nil)
    
    propertyVC.passingData = "๋ฐ์ดํ„ฐ ์ „๋‹ฌ ์™„๋ฃŒ !"
    
    present(propertyVC, animated: true)
    
}

 

 

 

2. segue

์ฃผ๋กœ ์—ฌ๋Ÿฌ๊ฐœ์˜ ViewController๊ฐ€ ํ•˜๋‚˜์˜ storyboard์— ์ ์šฉ๋  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.

control + button ํ•œ ์ƒํƒœ๋กœ ๋„˜์–ด๊ฐˆ ํ™”๋ฉด์œผ๋กœ ๋“œ๋ž˜๊ทธ ํ•ด์ฃผ๋ฉด ๋œ๋‹ค. (๊ธฐ๋ณธ์ ์œผ๋กœ show ์‚ฌ์šฉ)

์ด๋ ‡๊ฒŒ segue๋ฅผ ํ†ตํ•ด ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ํ™”๋ฉด ์ „ํ™˜์„ ํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์‰ฝ๊ฒŒ ๊ตฌํ˜„ ํ•  ์ˆ˜ ์žˆ๋‹ค! ์ด์ œ ๋ฐ์ดํ„ฐ ์ „๋‹ฌ์„ ํ•ด๋ณด์ž

 

segue๋Š” ๊ตฌ๋ถ„์„ ์œ„ํ•ด์„œ indentifier๊ฐ€ ํ•„์š”ํ•˜๋‹ค. ์—ฐ๊ฒฐ๋œ ํ™”์‚ดํ‘œ์˜ identifier๋ฅผ String์œผ๋กœ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

๋™์ผํ•œ ์Šคํ† ๋ฆฌ๋ณด๋“œ์—์„œ ์—ฌ๋Ÿฌ VC๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” VC๋งˆ๋‹ค class๋ฅผ ์—ฐ๊ฒฐํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค.

 

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ ViewController

์ „๋‹ฌ๋ฐ›์„ VC๋Š” 1๋ฒˆ๊ณผ ๋น„์Šทํ•˜๋‹ค.

segueDataViewController.swift

var passingData = ""
@IBOutlet weak var dataLabel: UILabel!

override func viewDidLoad() {
    super.viewDidLoad()
    
    dataLabel.text = passingData

}

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  ViewController

viewController.swift

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if segue.identifier == "passingSegueData" {
        if let segueVC = segue.destination as? segueDataViewController{
            segueVC.passingData = "segue๋กœ ๋ฐ์ดํ„ฐ ์ „๋‹ฌ ์™„๋ฃŒ !"
        }
    }
}

์‚ฌ์šฉํ•  segue์˜ identifier๋ฅผ ์ฒดํฌํ•˜๊ณ , ์ด๋™ํ•  VC์˜ class๋กœ ํƒ€์ž…์บ์ŠคํŒ…(as?)์ด ๊ฐ€๋Šฅํ•œ์ง€ ํ™•์ธํ•ด์•ผํ•œ๋‹ค.

๊ฐ€๋Šฅํ•˜๋ฉด, ์ž„์‹œ๋ณ€์ˆ˜์— ํ• ๋‹น๋œ class์— ์žˆ๋Š” ํ”„๋กœํผํ‹ฐ์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋‹ค.

 

 

 

 

3. Instance

instance๋ฅผ ํ†ต์งธ๋กœ ๋„˜๊ฒจ๋ฐ›์•„ ์ง์ ‘ ์ ‘๊ทผํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.

์ด๋ฒˆ ์˜ˆ์‹œ๋Š” VC๋ฅผ ํ†ตํ•ด mainVC์— ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„ ์˜ฌ๊ฒƒ์ด๋‹ค.

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ ViewController

ViewController.swift

@IBOutlet weak var dataLabel: UILabel!

@IBAction func moveInstanctVC(_ sender: Any) { //ํ™”๋ฉด ์ „ํ™˜์„ ์œ„ํ•œ ์ฝ”๋“œ (์ค‘์š”X)
    let instanceVC = instanceDataViewController(nibName: "instanceDataViewController", bundle: nil)
    
    instanceVC.mainVC = self
    present(instanceVC, animated: true)
}

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  ViewController

instanceDataViewController.swift

var mainVC: ViewController?

@IBAction func sendInstanceData(_ sender: Any) {
    mainVC?.dataLabel.text = "instance ๋ฐ์ดํ„ฐ ์ „๋‹ฌ ์™„๋ฃŒ !"
    
    dismiss(animated: true) //๋ฒ„ํŠผ ํด๋ฆญ ํ›„ ํ™”๋ฉด ๋‹ซ๊ธฐ
}

์ „๋‹ฌ๋ฐ›์„ class ๊ฐ์ฒด๋ฅผ ๋ฏธ๋ฆฌ ์„ ์–ธํ•ด๋†“๊ณ  ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด ๋ฐ์ดํ„ฐ๊ฐ€ ์ „๋‹ฌ๋œ๋‹ค.

 

button ๋ˆ„๋ฅด๊ธฐ ์ „
button ๋ˆ„๋ฅธ ํ›„

 

 

4. delegate pattern

์‰ฝ๊ฒŒ ์ •์˜ํ•˜๋ฉด OOP์—์„œ ํ•˜๋‚˜์˜ ๊ฐ์ฒด๊ฐ€ ์ฒ˜๋ฆฌํ•ด์•ผ ํ•˜๋Š” ์ผ์˜ ์ผ๋ถ€๋ฅผ ๋‹ค๋ฅธ ๊ฐ์ฒด์— ๋„˜๊ธฐ๋Š” ๊ฒƒ์ด๋‹ค.

Aํ™”๋ฉด์ด ๋จผ์ € ๋ฉ”๋ชจ๋ฆฌ์— ์˜ฌ๋ผ์™€ ์žˆ๋Š” ์ƒํƒœ์—์„œ Bํ™”๋ฉด์„ ๋„์šธ๋•Œ Bํ™”๋ฉด->Aํ™”๋ฉด์œผ๋กœ ๋ฐ์ดํ„ฐ ์ „๋‹ฌ ์‹œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค!

์—ฌ๊ธฐ์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  VC๋Š” Bํ™”๋ฉด, ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์„VC๋Š” Aํ™”๋ฉด์ด ๋œ๋‹ค.

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  ViewController

์œ„์ž„์€ protocol์„ ํ†ตํ•ด์„œ ํ•œ๋‹ค. protocol์€ ์œ„์ž„ํ•  ๋‚ด์šฉ์„ ์•Œ๋ ค์ฃผ๊ณ , ์„ธ๋ถ€์ ์ธ ๋‚ด์šฉ์€ ์ฑ„ํƒํ•œ ๊ฐ์ฒด์—์„œ ์ž‘์„ฑํ•œ๋‹ค.

protocol์„ weak๋กœ ์„ ์–ธํ•˜๋ ค๋ฉด ํ•ด๋‹น protocol์ด AnyObject๋ฅผ ์ƒ์† ๋ฐ›์•„์•ผ ํ•œ๋‹ค (์ด์œ ๋Š” ๋ฐ‘์—)

 

delegateDataViewController.swift

protocol delegateDateViewControllerDelegate: AnyObject {
    func delegatePassingData(str: String)
}

delegateํ”„๋กœํผํ‹ฐ๋ฅผ weak์œผ๋กœ ์„ ์–ธํ•œ๋‹ค. ์ด์œ ๋Š” delegate๊ฐ€ retain์ด ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜๋ฅผ ๋ง‰๊ธฐ ์œ„ํ•ด์„œ์ด๋‹ค.

๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด str๋กœ ํ•ด๋‹น ๋ฌธ์ž์—ด์„ ๋„˜๊ฒจ์ค€๋‹ค.

weak var delegate: delegateDateViewControllerDelegate?

@IBAction func passingData(_ sender: Any) {
    delegate?.delegatePassingData(str: "delegate ๋ฐ์ดํ„ฐ ์ „๋‹ฌ ์™„๋ฃŒ !")
    dismiss(animated: true)
    
}

 

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ ViewController

์ „๋‹ฌ๋ฐ›์„ VC๋Š” protocol์„ ์ฑ„ํƒํ•ด์•ผํ•œ๋‹ค. class์—์„œ ์ฑ„ํƒํ•ด๋„๋˜๊ณ  extensionํ•  ์ˆ˜๋„ ์žˆ๋‹ค.

ํ•  ์ผ์„ ์œ„์ž„๋ฐ›์•„์„œ ์ฒ˜๋ฆฌ ํ•ด์ฃผ๋Š” ์ฝ”๋“œ๋ฅผ func๋‚ด์— ์ž‘์„ฑํ•œ๋‹ค.

 

ViewController.swift

extension ViewController: delegateDateViewControllerDelegate {
    func delegatePassingData(str: String) {
        dataLabel.text = str
    }
}

 

ํ™”๋ฉด์„ ์ „ํ™˜ํ•  ๋•Œ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  VC์—๊ฒŒ '๋‚ด๊ฐ€ ์œ„์ž„๋ฐ›์•˜๋‹ค!' ๋ผ๋Š” ๊ฒƒ์„ ์•Œ๋ ค์ค˜์•ผ ํ•œ๋‹ค.

delegateVC.delegate = self ์ฝ”๋“œ๊ฐ€ ๊ทธ๋Ÿฐ ์—ญํ• ์„ ํ•œ๋‹ค. delegateํ”„๋กœํผํ‹ฐ๋ฅผ ์—ฌ๊ธฐ์„œ ์ฒ˜๋ฆฌํ•œ๋‹ค๋Š” ์˜๋ฏธ๋กœ ํ•ด์„ํ•˜๋ฉด ๋ ๊ฒƒ๊ฐ™๋‹ค.

@IBAction func moveDelegateVC(_ sender: Any) {
    let delegateVC = delegateDataViewController(nibName: "delegateDataViewController", bundle: nil)
    
    delegateVC.delegate = self 
    self.present(delegateVC, animated: true)
    
}

 

์—ฌ๊ธฐ์„œ ํ•œ๊ฐ€์ง€ ์ค‘์š”ํ•œ์ ์€ ์œ„์ฝ”๋“œ์˜ self๋Š” viewController class๊ฐ€ ์•„๋‹ˆ๋ผ๋Š” ์ ์ด๋‹ค !

delegateVC์˜ delegateํ”„๋กœํผํ‹ฐ๊ฐ€ protocol์ด๋ฏ€๋กœ self๋Š” extensionํ•œ viewController์˜ ๋‚ด์šฉ๋งŒ ๋‹ด๊ณ ์žˆ๋‹ค. ๋ช…์‹ฌํ• ๊ฒƒ โ—๏ธ

 

button ๋ˆ„๋ฅด๊ธฐ ์ „
button ๋ˆ„๋ฅธ ํ›„

 

 

5. closure

์ต๋ช…ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ์‹์ด๋‹ค.

์—ฌ๊ธฐ์„œ ํŠน์ง•์€ ์„ ์–ธ๋ถ€์™€ ๊ตฌํ˜„๋ถ€๊ฐ€ ๋‹ค๋ฅธ๊ณณ์— ์œ„์น˜ํ•œ๋‹ค๋Š” ๊ฒƒ์ด๋‹ค.

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  ViewController

closure๊ฐ€ ํด๋ž˜์Šค ๋‚ด์— ํ”„๋กœํผํ‹ฐ์ด๋ฏ€๋กœ ์˜ต์…”๋„๋กœ ์ž‘์„ฑํ•ด์•ผ ํ•œ๋‹ค. passingData ๋‚ด์— closure์˜ ์„ ์–ธ๋ถ€๋ฅผ ์ž‘์„ฑํ•œ๋‹ค.

closureDataViewController.swift

var closure: ((String)->Void)?

@IBAction func passingData(_ sender: Any) {
    closure?("closure ๋ฐ์ดํ„ฐ ์ „๋‹ฌ ์™„๋ฃŒ !")
    self.dismiss(animated: true)
}

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ ViewController

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ VC์—์„œ ๊ตฌํ˜„๋ถ€๋ฅผ ์ž‘์„ฑํ•˜์—ฌ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  VC์—๊ฒŒ ๋„˜๊ฒจ์ค€๋‹ค.

viewController.swift

@IBAction func moveClosureVC(_ sender: Any) {
    let closureVC = closureDataViewController(nibName: "closureDataViewController", bundle: nil)
    
    closureVC.closure = { str in
        self.dataLabel.text = str
    }
    
    present(closureVC, animated: true)
}

 

 

button ๋ˆ„๋ฅด๊ธฐ ์ „
button ๋ˆ„๋ฅธ ํ›„

 

6. Notification

notification์€ ๋ฉ”๋ชจ๋ฆฌ์— ์˜ฌ๋ผ์™€์žˆ๋Š” ๊ฐ์ฒด ๋ชจ๋‘์—๊ฒŒ ์‹ ํ˜ธ๋ฅผ ๋ณด๋‚ด๊ณ , ๊ฐ™์€ ์‹ ํ˜ธ Name์„ ๊ฐ€์ง„ ๊ฐ์ฒด๊ฐ€ ์กด์žฌํ•˜๋ฉด ๋ฐ์ดํ„ฐ๋ฅผ ์ˆ˜์‹ ํ•ฉ๋‹ˆ๋‹ค.

๊ทธ๋ž˜์„œ Name์ด ๋งค์šฐ ์ค‘์š”ํ•ฉ๋‹ˆ๋‹ค !!

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•  ViewController

NotificationCenter์€ ์‹ฑ๊ธ€ํ†ค์ด๊ธฐ ๋•Œ๋ฌธ์— ์–ด๋””์—์„œ๋‚˜ ๊ฐ™์€ ๊ฐ์ฒด๋ฅผ ๋ถˆ๋Ÿฌ์˜ต๋‹ˆ๋‹ค.

post๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ ํ•˜๋Š” ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.

ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ฐจ๋ก€๋Œ€๋กœ ํ•ด์„ํ•˜๋ฉด Notification.Name์ด "SendNoti"์ธ ๊ฐ์ฒด์—๊ฒŒ userInfo ๋ฐ์ดํ„ฐ๋ฅผ ๋ณด๋ƒ…๋‹ˆ๋‹ค.

 

notificationDataViewController.swift

@IBAction func passingData(_ sender: Any) {
    
    let noti = Notification.Name("sendNoti")
    NotificationCenter.default.post(name: noti, object: nil, userInfo: ["str" : "notification ๋ฐ์ดํ„ฐ ์ „๋‹ฌ ์™„๋ฃŒ !"])
    self.dismiss(animated: true)
}

 

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์„ ViewController

addObserver๋ฅผ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›๋Š”๋‹ค.

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•˜๋Š” Notification.Name์ด ์ผ์น˜ํ•ด์•ผํ•œ๋‹ค.

ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ฐจ๋ก€๋Œ€๋กœ ํ•ด์„ํ•˜๋ฉด self๋Š” Observer๋ฅผ ์ถ”๊ฐ€ํ•  ๊ฐ์ฒด์ž…๋‹ˆ๋‹ค. ์ผ๋ฐ˜์ ์œผ๋กœ self๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

selector๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„์„œ ์‹คํ–‰ํ•  ํ•จ์ˆ˜๋ฅผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. name์€ ๋™์ผํ•œ ์ด๋ฆ„์„ ๊ฐ€์ง„ ์‹ ํ˜ธ๊ฐ€ ์žˆ์œผ๋ฉด ๊ฐ์ง€ํ•ฉ๋‹ˆ๋‹ค.

 

selector์—์„œ ์‚ฌ์šฉํ•  ํ•จ์ˆ˜๋Š” @objc๋กœ ์„ ์–ธํ•ด์•ผ ํ•œ๋‹ค.

@objc๋Š” objective-c์—์„œ ์‚ฌ์šฉํ•œ๋‹ค๋Š” ์˜๋ฏธ๋กœ, NotificationCenter: NSObject ์ด๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์šฉํ•œ๋‹ค.

viewController.swift

// ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›๋Š” ๋ถ€๋ถ„
override func viewDidLoad() {
    super.viewDidLoad()
    
    let noti = Notification.Name("sendNoti")
    
    NotificationCenter.default.addObserver(self, selector: #selector(showNotiData), name: noti, object: nil)
}


// ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„์„œ ์ ์šฉ์‹œํ‚ค๋Š” ๋ถ€๋ถ„
@objc func showNotiData(notification : Notification){
    if let str = notification.userInfo?["str"] as? String{
        self.dataLabel.text = str
    }
}

// ํ™”๋ฉด ์ „ํ™˜ ๋ถ€๋ถ„ (notification๊ณผ ์ƒ๊ด€์—†๋Š” ๋ถ€๋ถ„์ž„)
@IBAction func moveNotificationVC(_ sender: Any) {
    let notiVC = notificationDataViewController(nibName: "notificationDataViewController", bundle: nil)
    
    present(notiVC, animated: true)
}

 

button ๋ˆ„๋ฅด๊ธฐ ์ „
button ๋ˆ„๋ฅธ ํ›„

 

 

๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋‹ค์–‘ํ•˜๊ณ , ์‰ฌ์šด ๋ฐฉ๋ฒ• ์–ด๋ ค์šด ๋ฐฉ๋ฒ•์ด ์กด์žฌํ•˜์ง€๋งŒ ์–ด๋А ํ•˜๋‚˜๋งŒ ๊ณจ๋ผ์„œ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์€ ๋ฐ”๋žŒ์ง ํ•˜์ง€ ์•Š๋‹ค.

์ƒํ™ฉ์— ๋งž๋Š” ์ ์ ˆํ•œ ์ „๋‹ฌ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜์ž ๐Ÿ™ƒ

 

 

์ฝ”๋“œ ์ „์ฒด๋ณด๊ธฐ

https://github.com/sladuf/UIKit_practice/tree/main/passingData

 

 

 

์ €์ž‘์žํ‘œ์‹œ (์ƒˆ์ฐฝ์—ด๋ฆผ)

'๐Ÿ“ฑ iOS > UIKit' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[UIKit] TableView Multiple Cell, multi type json data parsing  (0) 2023.06.27
[UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (3/3)  (0) 2023.04.03
[UIKit] toast message ๋งŒ๋“ค๊ธฐ  (0) 2023.02.16
[UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (2/3)  (0) 2023.01.08
[UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (1/3)  (0) 2023.01.08
    '๐Ÿ“ฑ iOS/UIKit' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
    • [UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (3/3)
    • [UIKit] toast message ๋งŒ๋“ค๊ธฐ
    • [UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (2/3)
    • [UIKit] CustomDatePicker ๋งŒ๋“ค๊ธฐ (1/3)
    sladuf
    sladuf

    ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”