質問

私の申しない場合はフィルタリングは私のテーブルの時にをタップ細胞は、そのフレームの高さは増加するため表示 UIProgressView ることを示してダウンロードす。

しかし、フィルターの取得結果のコントローラデータ UISearchDisplayController, の細胞にはこのフィルタ表示しない動作を実装する予定です。

その代わりに、細胞なサイズの変更なる進展を見せないトリガーのダウンロード、その後がクラッシュします。

どんなゲイン制御、表示する時のフィルタリング結果 UISearchDisplayController?

編集

こちらは自 -tableView:didSelectRowAtIndexPath: 方法。奥高尾にひっそりと建つ料亭。長が議で動作していない時を示すことが知られています。

と思いを適合させる必要があることかできるよう、仕事も表示/取得結果のコントローラの検索結果のコントローラーロールです。

- (void) tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tv deselectRowAtIndexPath:indexPath animated:YES];

    if ([self.searchBar isFirstResponder])
        [self.searchBar resignFirstResponder];

    MyObject *_myObject = (MyObject *)[self.fetchedResultsController objectAtIndexPath:indexPath];

    if (self.isSimulatingFileHierarchy) 
    {   
        if ([_myObject isFolder]) 
        {
            ObjectsViewController *_objectsViewController = [[ObjectsViewController alloc] initWithNibName:@"ObjectsViewController" bundle:nil];
            _objectsViewController.managedObjectContext = self.managedObjectContext;
            _objectsViewController.nodeID = self.nodeID;
            _objectsViewController.nodeName = self.nodeName;
            _objectsViewController.parentObjectKey = [_myObject cleanedKey];

            if (self.parentObjectKey)
                _objectsViewController.title = [[_myObject cleanedKey] stringByTrimmingPrefix:[self.parentObjectKey stringByAppendingString:@"/"]];
            else 
                _objectsViewController.title = [_myObject cleanedKey];

            [self.navigationController pushViewController:_objectsViewController animated:YES];
            UIBarButtonItem *_backButton = [[UIBarButtonItem alloc] initWithTitle:self.title style:UIBarButtonItemStyleDone target:nil action:nil];
            self.navigationItem.backBarButtonItem = _backButton;
            [_backButton release];
            [_objectsViewController release];
        }
        else {
            //
            // If we don't have data cached for this object, we add a request for the object's bytes to the objectRequestQueue
            // 
            // 1. We add a progress indicator to the object's cell (we have an indexPath)
            // 2. We store the data to the Documents folder
            //
            // Once we have the data, we push a ViewerViewController subclass that is specific to the object content type 
            //

            if ((!_myObject.isDownloading) && ([_myObject.localPath length] == 0)) 
            {
                if ([AwsObject objectContentSupportedForType:[_myObject.contentType intValue]]) 
                {
                    //
                    // Start request and redraw row with UIProgressView
                    //
                    [self triggerObjectRequestAdditionForObject:_myObject atIndexPath:indexPath];
                }
                else {
                    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"ObjectsViewObjectRequestUnsupportedTypeAlertViewTitle", @"") message:NSLocalizedString(@"ObjectsViewObjectRequestUnsupportedTypeAlertViewMessage", @"") delegate:self cancelButtonTitle:nil otherButtonTitles:NSLocalizedString(@"ObjectsViewObjectRequestUnsupportedTypeAlertViewContinue", @""), nil];
                    [alert show];
                    [alert release];
                }
            }
            else if ((_myObject.isDownloading) && ([_myObject.localPath length] == 0)) 
            {
                //
                // Cancel request and redraw row without progress view
                //
                [self triggerObjectRequestRemovalForObject:_myObject atIndexPath:indexPath];
            }
            else if ((!_myObject.isDownloading) && ([_myObject.localPath length] != 0)) 
            {
                //
                // Launch viewer for supported MIME type
                //
                switch ([_myObject.contentType intValue]) {
                    case kObjectContentTypeApplicationMsword: {
                        [self pushWebViewerViewController:_myObject withTextEncoding:@"UTF-8"];
                        break;
                    }
                    // handle other MIME types here...
                }
            }
            else {
                if ([_myObject isFolder]) { }
                else {
                    if ((!_myObject.isDownloading) && ([_myObject.localPath length] == 0))
                        [self triggerObjectRequestAdditionForObject:_myObject atIndexPath:indexPath];
                    else if ((_myObject.isDownloading) && ([_myObject.localPath length] == 0))
                        [self triggerObjectRequestRemovalForObject:_myObject atIndexPath:indexPath];
                    else if ((!_myObject.isDownloading) && ([_myObject.localPath length] != 0)) {
                        switch ([_myObject.contentType intValue]) {
                            case kObjectContentTypeApplicationMsword: {
                                [self pushWebViewerViewController:_myObject withTextEncoding:@"UTF-8"];
                                break;
                            }
                            // handle other MIME types here...
                        }
                    }
                }
            }
        }
    }
}
役に立ちましたか?

解決

このテーブルビュー委譲方法を検出できて作業する場合にUISearchDisplayControllerのtableビューで、次のチェック:

if (tableView == self.searchDisplayController.searchResultsTableView) {
  // behavior specific to search display controller table view
}
else {
  // behavior specific to the original, unfiltered table view
}

他のヒント

通常、ご確認の場合の表示が渡される tableView:didSelectRowAtIndexPath: 以検索表示コントローラの"searchResultsTableView"プログラムの代替行動のためる場合があります。

そのようなお課題が複雑化してきております。きのコード tableView:didSelectRowAtIndexPath:?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top