This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIView *newView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 35)]; | |
newView.backgroundColor=[UIColor redColor]; | |
UITextView *mytext = [[UITextView alloc] initWithFrame:CGRectMake(5.0, 0.0, 100.0, 28.0)]; | |
mytext.backgroundColor = [UIColor clearColor]; | |
mytext.textColor = [UIColor blackColor]; | |
mytext.editable = NO; | |
mytext.font = [UIFont systemFontOfSize:15]; | |
mytext.text = @"Mytext"; | |
mytext.scrollEnabled=NO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)listSubviewsOfView:(UIView *)view { | |
// Get the subviews of the view | |
NSArray *subviews = [view subviews]; | |
// Return if there are no subviews | |
if ([subviews count] == 0) return; // COUNT CHECK LINE | |
for (UIView *subview in subviews) { | |
// Do what you want to do with the subview | |
NSLog(@"%@", subview); |