-
(void)viewDidLoad {
self.buttonSubView=(EventbuttonsView *)[[NSBundle mainBundle] loadNibNamed:@"ActionHeadView" owner:nil options:nil][1];
[self.buttonSubView setY:self.view.frame.size.height-130];
[self.buttonSubView setWidth:self.view.frame.size.width];
self.buttonSubView.backgroundColor=[UIColor redColor];
[self.view addSubview:self.buttonSubView];
[self.buttonSubView layoutIfNeeded];
}
buttonSubView is a customview, It's subviews use autolayout , when i call [self.buttonSubView layoutIfNeeded], but subviews donot update frame? why? in xib i use update frame, it is ok.but run in iPhone,cannot work?
Aucun commentaire:
Enregistrer un commentaire