iOS Question label and/or textfield hidding by code

Yves Rossignol

Member
Licensed User
Can we make a label (and a textfield) disappear by code or subroutine ? I need to remove from a label and a textfield from a layout.

Thank for your advice

Yves
 

tufanv

Expert
Licensed User
Longtime User
Can we make a label (and a textfield) disappear by code or subroutine ? I need to remove from a label and a textfield from a layout.

Thank for your advice

Yves
You can use label.visible=false or tetxtfield.visible=false
or
you can completely remove by : label.RemoveViewFromParent
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
I see this option but I dont know why i cant use it when i hit the "." after the name of label....
if you created the label with deisgner , make sure you right click on the view in the designer click generate / dim label1 as label
then you will be able to see it .
Or if you are creating the label with code , make sure under globals you have dim label1 as label.
 
Upvote 0
Top