I have a class in which I define a CollectionView which I use as a custom TabBar. It has three cells in it, each representing another tab. When I select a tab (which is thus a cell of the CollectionView), I want to update the text of a label inside my view.

In tabs.swift (where all the magic happens to set up the custom tabbar), I added the following function:

```
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {

    let uvController = UserViewController()
    uvController.longLabel.text = "Test"

}

```

In UserViewController, I call it like this:

```
let ProfileTabs: profileTabs = {

    let tabs = profileTabs()
    return tabs

}()

```

It shows all the tabs I want, but when I select it, the label doesn't update. However, when I perform a print action, it does return the value of the label:

```
print(uvController.longLabel.text)

```

This returns the value I defined when I set up the label, so I can in fact access the label, but it doesn't update as I want it to do. Any insight on why this is not happening?