Booking.com Interview Question

How to extract all UILabels in NSArray from given UIView.

Interview Answers

Anonymous

Apr 2, 2015

Use recursive method which returns an array

Anonymous

Jun 17, 2015

NSMutableArray *labelsubviews = [[NSMutableArray alloc]init]; for (UILabel *subView in view.subviews) { [labelsubviews addObject:subView]; }

3