Home > DeveloperSection > Forums > List the tag of Subviews which are visible in a UIview
Felix Pickles
Felix Pickles

Total Post:24

Posted on    August-04-2015 12:38 AM

 iPhone iPhone  Ios  Objective C 

 1 Reply(s)
 398  View(s)
Rate this:

I have UIView, Initially i will have 4 subview, in runtime. my code will hide to 2 view, so i need the tag values of remaining two view which are visible, is it possible.

Please help me.

Tarun Kumar

Total Post:210

Posted on    August-04-2015 7:00 AM

Yes, its possible here is your problem’s solution:

for (UIView *subview in self.view.subviews) {

    if ([subview isKindOfClass:[UIView class]]) {

        if (!subview.isHidden) {

            NSLog(@"%i", subview.tag);




Don't want to miss updates? Please click the below button!

Follow MindStick