UINavigationBar 및 UIStatusBar를 숨김으로써 View (보기 컨트롤러보기의 맨 위에있는 UIBubbleTable 인스턴스) 전체 화면을 전체 화면으로 만들려고합니다.UINavigationBar 및 UIStatusBar를 숨긴 다음 맨 위의 검은 색 공간
NSLog(@"view frame before:%@", NSStringFromCGRect(self.view.frame));
NSLog(@"view bounds before:%@", NSStringFromCGRect(self.view.bounds));
NSLog(@"bubble table frame before:%@", NSStringFromCGRect(self.bubbleTable.frame));
NSLog(@"bubble table bounds before:%@", NSStringFromCGRect(self.bubbleTable.bounds));
[self.view hideKeyboard];
[[UIApplication sharedApplication] setStatusBarHidden:YES];
self.navigationController.navigationBar.hidden = YES;
self.containerView.hidden = YES;
[self.view setFrame:[[UIScreen mainScreen] bounds]];
[self.bubbleTable setFrame:self.view.bounds];
NSLog(@"view frame after:%@", NSStringFromCGRect(self.view.frame));
NSLog(@"view bounds after:%@", NSStringFromCGRect(self.view.bounds));
NSLog(@"bubble table frame after:%@", NSStringFromCGRect(self.bubbleTable.frame));
NSLog(@"bubble table bounds after:%@", NSStringFromCGRect(self.bubbleTable.bounds));
NSLog :
2013-07-06 22:05:18.068 KIM[5085:c07] view frame before:{{0, 0}, {320, 504}}
2013-07-06 22:05:18.068 KIM[5085:c07] view bounds before:{{0, 0}, {320, 504}}
2013-07-06 22:05:18.069 KIM[5085:c07] bubble table frame before:{{0, 0}, {320, 248}}
2013-07-06 22:05:18.069 KIM[5085:c07] bubble table bounds before:{{0, 934}, {320, 248}}
2013-07-06 22:05:18.072 KIM[5085:c07] view frame after:{{0, 0}, {320, 568}}
2013-07-06 22:05:18.072 KIM[5085:c07] view bounds after:{{0, 0}, {320, 568}}
2013-07-06 22:05:18.072 KIM[5085:c07] bubble table frame after:{{0, 0}, {320, 568}}
2013-07-06 22:05:18.072 KIM[5085:c07] bubble table bounds after:{{0, 614}, {320, 568}}
이 시뮬레이터에 보이는 방법 : 이런 이유는, 모든 프레임과 범위가 될 것으로 보인다
그러나 어떤 이유로 검은 공간은 상단에 남아 오른쪽 (0,0)? 무엇을해야합니까?
xcode 및 시뮬레이터를 다시 시작하려고 했습니까? 장치에서도 마찬가지입니다. 난 깨끗한 프로젝트에서 코드를 시도하고 완벽하게 검은 선을 작동합니다. – Yan
아마도 제품 -> 청소를 할 것입니다 – Yan