UIView viewwithtag method in swift [closed]
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . 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 回答1: You need to use a typecast. This code will do it: if let theLabel = self.view