I need to edit an attribute of a core data entity fetched in a previous view. So I put var entityName: FetchedResults.Elementin the second view to get access to the entity. But when I do this it doesn't actually get the entity it gets a copy of the entity so when changes are made to it it doesn't actually change. Basically is there a way to pass a reference to an attribute of an object to a struct so that when you set that reference to a value the entity changes?
Any help would be greatly appreciated. All the best!