Can we write the data models in the viewcontroller.swift file itself? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Can we write the data models in the viewcontroller.swift file itself?

3rd Aug 2016, 12:31 PM
Konduri Anusha
Konduri Anusha - avatar
1 Antwort
0
yes, you can. Just define same as your defining in your model class. class ModelName{ var idx = "" } But this class will not access out side of your view controller.
23rd Aug 2016, 5:22 PM
Pratik Patel
Pratik Patel - avatar