//比如创建一个UIImageView到view上
UIImageView *imageView = [[UIImageView allc] init];
imageView.tag = 10001; //需要设置一个tag   
[self.view addSubView:imageView];

//在别处使用的时候可以通过tag得到imageView对象
UIImageView *imageView = (UIImageView *)[self viewWithTag:10001];

  

相关文章:

  • 2022-12-23
  • 2021-06-09
  • 2021-08-13
  • 2021-07-03
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-01
  • 2022-12-23
  • 2022-02-04
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
相关资源
相似解决方案