2015년 8월 4일 화요일

[ios] addsubview를 사용해 autolayout이 작동하지 않을 때


autolayout을 적용했음에도 view의 크기가 기기에 따라 변하지 않을 때 (fullscreen을 원할 때)

FirstViewController *viewController = [[FirstViewController allocinitWithNibName:@"FirstViewController" bundle:nil];

viewController.view.frame = self.view.frame;
or 
viewController.view.frame =[UIScreen mainScreen].applicationFrame;

[self.view addSubview: viewController.view];



댓글 없음:

댓글 쓰기