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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -