2012-06-26 5 views
0

나는 문제가 있으며 여기 누군가가 나를 도울 수 있기를 바랍니다! 미리 감사드립니다.빈 테이블 뷰를 숨기려면 어떻게해야합니까?

저는 세그 (segue)에 연결된 "Scope"버튼 (스크린 샷을보십시오!)이 있으며 세그는 tableview로갑니다. 내가 원하는 무엇

enter image description here

내가 테이블에 뭔가를 표시해야합니다 또는 내가 alertview을 던져하는 경우는 내가 결정한있는 tableview 컨트롤러입니다. 내가 무슨 짓을

했다 :

if ([_countryScopes count] == 0) { 

    [self.view removeFromSuperview]; 
    //no scope for this country 
    NSMutableString *message = [[NSMutableString alloc]initWithString:@"No scope information."]; 
    UIAlertView *av = [[UIAlertView alloc] initWithTitle:countryName message:message delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil]; 
    //av.tag = MAIN_ALERT; 
    [av show]; 


} 

그러나 어떻게 든 빈 테이블이 여전히 보이고있다.

아시다시피 이걸 어떻게 없앨 수 있습니까?

고맙습니다.

[av performSelector:@selector(show) withObject:nil afterDelay:0.1]; 
+1

당신이 범위 버튼을 누르면 실행 귀하의 방법을 게시 할 수 없습니다 :

감사합니다, – alex

+0

안녕 Alex, "범위"버튼을 누르면 prepareForSegue가 호출됩니다. - (void) prepareForSegue : (UIStoryboardSegue *) segue 보낸 사람 : (id) 보낸 사람 {if ([[segue 식별자] isEqualToString : @ "showScope"]) { //self.scopeTableViewController = segue.destinationViewController; //self.scopeTableViewController.passedFromMasterItem = _passedFromMasterItem; //[self.scopeTableViewController prepareViewController]; } } – Yashu

답변

0

Yashu

그냥 내가이 트릭을 할 것입니다 희망을 0.1 초 후에 경고보기를 표시? 당신은 뭔가를 보여 주거나 경고를 표시하기 위해 날씨를 확인할 수 있습니다.
+0

아니요, 작동하지 않습니다. 나는 여전히 빈 테이블을 본다. – Yashu

관련 문제