IOS container control close

I have a container on my view, i show it with mycontainer.visible=true, however from a button within in, i cannot close/hide it

I have tried

view1.mycontainer.visible=false - it will not let me address the container
from the button I have tried parent.parent.visible=false does not work
from the button i have tried self.close, also does not work

How do you close a container?

From the button have you tried

self.visible  = false


me.parent.visible  = false