开发者

How do I add one UIImageView into multiple superviews without allocating multiple subviews(UIImageViews)

开发者 https://www.devze.com 2022-12-16 15:52 出处:网络
I want to be able to add one allocation of a UIImageView to multiple UIViews. How would 开发者_如何转开发I do this without allocating multiple UIImageViews?You can\'t have a view appear in more than o

I want to be able to add one allocation of a UIImageView to multiple UIViews. How would 开发者_如何转开发I do this without allocating multiple UIImageViews?


You can't have a view appear in more than one place. If you try then it will just get moved. Note, though, that UIImages are cached and should be handled efficiently when referred to by multiple UIImageViews, so I wouldn't worry too much about multiple views.

If these multiple views are not displayed at the same time, you could just keep moving the UIImageView around in viewDidAppear.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号