RAGOpoR
RAGOpoR

Reputation: 8168

How to query subview of UIView with tag?

i insert 2 UIImageView with tag 1 and 100 to UIView,

how to access to UIView and check how many subview on it or select tag 1 to be the top of view ?

Upvotes: 11

Views: 18769

Answers (1)

Ole Begemann
Ole Begemann

Reputation: 135550

"check how many subview on it"

[myView.subviews count];

"or select tag 1 to be the top of view"

[myView bringSubviewToFront:[myView viewWithTag:1]];

Upvotes: 32

Related Questions