Can we write the data models in the viewcontroller.swift file itself? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answer
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