开发者

How to know when a subview becomes its coordinates in its parent view?

开发者 https://www.devze.com 2023-01-07 13:47 出处:网络
I would like to find a way for the following problem: If I add views (annotation views) to a parent view (map view) I can\'t have their positions immediately but at some point in the furute (when the

I would like to find a way for the following problem: If I add views (annotation views) to a parent view (map view) I can't have their positions immediately but at some point in the furute (when the view becomes visible, makes it layout, whatever ...). I would like to be triggered if the position of my subviews becomes available (I mean sview1.center.x, sview1.center.y开发者_开发问答). Is there a smart way?


There is one possibile way:

Use the UIView's subviews function (it returns an NSArray containig all the subviews) and enumerate through it and check all the views

0

精彩评论

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