Here's my scenario:
I have a list of user present in a TableView
, in each row I show some user's information like address, phone number.
I can tap on a user, I pass the user to another screen like Detail View Controller
, in here I can change the user's information. Then I can tap back and those change affect to TableView.
In the scenario above, what class
or struct
should I use.
I've tried both, class might be easier when I only need to modify user's info in the Detail View Controller
but can it lead any side effect ?
I've read some article and they says that always choose struct
by default but it make me confused
Some one can give me some advice when to use one instead of another and explain why. Thanks a lot.