ios - UIView viewwithtag method in swift -
i'm trying learn swift. programmatically add labels. want change properties later.
the viewwithtag method returns uiview, how access uilabel this?
cheers
you need use typecast. code it:
if let thelabel = self.view.viewwithtag(123) as? uilabel { thelabel.text = "some text" }
Comments
Post a Comment