I've got an app that has a Main Page, a Room page, and then a subroom of the room page.
To know what to show on the detail page, the detail page needs a string value from the Main page, and in the subroom it needs a Room class object from the room page.
I've been just setting these as static variables on my Room class, so when I'm needing the string or object I'd do
selectedRoomname = Room.selectedName
selectedInstance = Room.selectedInstance
It would be very possible to pass these variables around with segues or use delegegates, but is there any reason to NOT continue what I'm doing? Considering it's only two variables I'm doing this with I can't imagine there's a big impact on memory usage. Is there a limit to how far I could go with using static variables? If I'm needing to access a variable such as the user's username, profile image, etc on almost every one of my view controllers, is there any issue with making a static User class object?
tl;dr, how intense is it to use static variables and is there such a thing as abusing them?