2014-01-31 80 views
2

我有錯誤 其視圖不在窗口層次結構中!其視圖不在NSNotification中的窗口層次結構中

當我NSnotification

- (void) receiveTestNotification:(NSNotification *) notification 
{ 


    if ([[notification name] isEqualToString:@"TestNotification"]) 
     NSLog (@"Successfully received the test notification!"); 


    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; 
    mainTabViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"passID"]; 
    [vc setModalPresentationStyle:UIModalPresentationFullScreen]; 

    [self presentViewController:vc animated:YES completion:nil]; 

} 
+0

可以請你添加更多描述你的問題? –

+0

我想在發生nsnotification時顯示我的mainTabViewController –

+0

通知是否被調用? –

回答

1

,如果你想顯示內部細胞活動視圖,
也許在標題旁邊,你可以使用類似,

UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc]  initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; 
    [cell.imageView addSubview:activityView]; 
    [activityView startAnimating]; 
相關問題