문제

나는 아주 간단한 질문에 그 대답은 그렇게 쉬운 일이 아닙니다.

나를 숨기고 싶으 UITabBar 때 나는 방향이 변경됩니다.

나는 2 가지 방법:

프레임은 방법

myAppDelegate.tabBarController.tabBar.frame = CGRectMake(<<bottomOfScreen>>);

작동 하지만 나는 빈 지역을 재생하려 tabBarController.보기입니다.프레임 et myViewController.보기입니다.프레임지만 얻지 못해 좋은 결과입니다.

탐색 컨트롤러 방법

myOtherVC.hideTabBarWhenPushed = YES;
[self.navigationController pushViewController:myOtherVC animated:NO];

작동 하지만 좋은 해결책에 대한 내 응용 프로그램

업데이트:

[appDelegate.tabBarController.view removeFromSuperview];
[self.view removeFromSuperview]; [appDelegate.window addSubview:self.view];
self.view.frame = CGRectMake(0,0,480,320);

잘 작동하지 않는 자도 더 이상(물론,난로 변경 shouldAutorotate 과를 반환한 예)


나는 어떻게 나비가 나 tabBar 고 현재 보기방의 공간?


감사

도움이 되었습니까?

해결책

당신이 사용할 수 있는 현재의 솔루션:

[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:@"UIDeviceOrientationDidChangeNotification" object:nil];

을 감지하는 회전입니다.(나는 당신이 결합합니다.변환=CGAffineTransformMakeRotation 게 회전하...?)

다른 팁

두 가지 방법으로 나는 당신이 쉽게 할 수 있을 것이다:

  1. 다시체로 tabBar 컨트롤러와 hidesBottomBarWhenPushed 설정을 예로한 viewControllers 할 숨겨져 있습니다.
  2. 다른 옵션은 것을 그냥 당신의보기에만 보기 윈도우미와 다음 tabBarController.기에 다시 창에서 전화가 다시 회전

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top