2012-04-29 7 views
3

음, 각 탭마다 navigationController가있는 탭 기반 앱이 있습니다. 각 navigationController의 루트에 있고 뷰를 밀 때 애니메이션이 완벽하게 실행되지만 푸시 뷰에있을 때 navigationController가 애니메이션되지만 뷰는 팝업되지 않습니다.UINavigationController가 원하는대로 애니메이션되지 않습니다.

[self.navigationController popViewControllerAnimated:YES]; 

을하고 밀어 :

[self.navigationController pushViewController:activityController animated:YES]; 

어떤 제안이 내가 그것을 팝업 사용 무엇인가?

편집 :

루트 컨트롤러에 tableView가 있습니다. 내가 행을 선택 때마다 나는이 코드를 실행

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    ActivityViewController *activityController = [[ActivityViewController alloc] initWithNibName:@"ActivityViewController" bundle:nil]; 

    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; 
    [backButton setBackgroundImage:[UIImage imageNamed:@"BackButonItem"] forState:UIControlStateNormal]; 
    [backButton setBackgroundImage:[UIImage imageNamed:@"BackButonItem_Pressed"] forState:UIControlStateHighlighted]; 
    [backButton addTarget:self action:@selector(popBack) forControlEvents:UIControlEventTouchUpInside]; 
    [backButton setFrame:CGRectMake(15, 10, 55, 30)]; 
    UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton]; 

    activityController.navigationItem.leftBarButtonItem = backButtonItem; 
    activityController.navigationItem.hidesBackButton = YES; 

    [self.navigationController pushViewController:activityController animated:YES]; 
} 

이 내 popBack 방법입니다 :

- (void) popBack 
{ 
    [self.navigationController popViewControllerAnimated:YES]; 
} 
+0

더 많은 코드가 필요하다고 생각합니다. 당신의 시야는 어떻게 설정하고 있습니까? – Morrowless

+0

@Plenilune 거기에 몇 가지 코드가 있습니다.) – sergiocg90

+0

시도해보십시오 [self.navigationController popToViewController : yourController Animated : YES]; – Charan

답변

0

당신은

[self.navigationController popToViewController:self animated:YES]; 

문제를 해결 한 것으로 보인다와 함께 시도해 봤어 많은 사람들.

+0

아니요, 이전에도이 옵션을 사용해 봤는데 아무 것도 바뀌지 않았습니다. – sergiocg90

관련 문제