I'm trying to learn some swift. I programmatically add labels. I want to change their properties later.
the viewwithtag method returns a UIView, how to I access my UILabel from this?
cheers
I'm trying to learn some swift. I programmatically add labels. I want to change their properties later.
the viewwithtag method returns a UIView, how to I access my UILabel from this?
cheers
You need to write as
viewWithTag: returns a UIView, you need to typecast it to
UILabel
.You need to use a typecast. This code will do it: