How to get a certain subview from UIView by tag

前端 未结 6 1097
野趣味
野趣味 2021-02-03 21:00

I\'m a noob in Objective-C and I have one question.

I have one UILabel object that I adding to one UIView with this code:

UILabel *label = [         


        
6条回答
  •  既然无缘
    2021-02-03 21:33

    Example with UILabel:

    UILabel *label = (UILabel *)[self.view viewWithTag:1];
    

    good luck!

提交回复
热议问题