customCell.m - (void)awakeFromNib { self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 50, 200)]; [self.label setText:@"This is a label"]; [self.myView addSubview:self.label]; NSLog(@"%f", self.label.frame.size.height); // Results: 200.0000 } mainViewController.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. customCell *cellVC = [[cutsomCell alloc] init]; NSLog(@"%f, %f", cellVC.label.frame.size.height); // Results: 0.0000 }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)