탭바에 4 개 이상의 옵션이있는 앱을 설계하고 있습니다. 원하는 모든보기가 푸시되고있을 때 탭바를 숨기고보기가 다시 표시 될 때 다시 표시하는 것입니다. 나는 hidesbottomwhenpushed 시도로 꺼내하지만 당신이 보여주고 싶은 경우이 기능보기가 푸시 될 때 iphone + 탭바 숨기기
[self hideTabBar:self. tabbarcontroller];
를 호출 할 때
탭바에 4 개 이상의 옵션이있는 앱을 설계하고 있습니다. 원하는 모든보기가 푸시되고있을 때 탭바를 숨기고보기가 다시 표시 될 때 다시 표시하는 것입니다. 나는 hidesbottomwhenpushed 시도로 꺼내하지만 당신이 보여주고 싶은 경우이 기능보기가 푸시 될 때 iphone + 탭바 숨기기
[self hideTabBar:self. tabbarcontroller];
를 호출 할 때
사용이 기능
- (void) hideTabBar:(UITabBarController *) tabbarcontroller
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
for(UIView *view in tabbarcontroller.view.subviews)
{
if([view isKindOfClass:[UITabBar class]])
{
[view setFrame:CGRectMake(view.frame.origin.x, 480, view.frame.size.width, view.frame.size.height)];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 480)];
}
}
[UIView commitAnimations];
}
도움이 제발, 작동하지 않았다 tabbarcontroller이 함수를 사용하십시오.
- (void) showTabBar:(UITabBarController *) tabbarcontroller {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
for(UIView *view in tabbarcontroller.view.subviews)
{
NSLog(@"%@", view);
if([view isKindOfClass:[UITabBar class]])
{
[view setFrame:CGRectMake(view.frame.origin.x, 431, view.frame.size.width, view.frame.size.height)];
}
else
{
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 431)];
}
}
[UIView commitAnimations];
}
할 수 있습니까? 그 코드를 어떻게 보여줄 수 있습니까? – Ilanchezhian
사실 내가 한 것은 tabbarcontrollers 옵션을 "xbed를 통해 밀어 넣을 때 숨김"옵션을 선택했다는 것입니다. 누락 된 부분이 있습니다. – Shantanu