Objective c UITableView在搜索时丢失高度

Objective c UITableView在搜索时丢失高度,objective-c,uitableview,Objective C,Uitableview,我这里有点麻烦。我有一个UISearchBar,可以为我搜索UITableView中包含的一些内容。太好了 加载视图时,我将表格视图行的高度设置为110。美好的当我的视图出现时,它带有110像素。高度。很好 但当我单击UISearchBar时,我的行丢失了设置的高度 我不知道会是什么 任何帮助,谢谢 - (void)viewDidLoad { [super viewDidLoad]; theTableView.rowHeight = 110; theTableView.backgrou

我这里有点麻烦。我有一个UISearchBar,可以为我搜索UITableView中包含的一些内容。太好了

加载视图时,我将表格视图行的高度设置为110。美好的当我的视图出现时,它带有110像素。高度。很好

但当我单击UISearchBar时,我的行丢失了设置的高度

我不知道会是什么

任何帮助,谢谢

- (void)viewDidLoad {
    [super viewDidLoad];

theTableView.rowHeight = 110;
theTableView.backgroundColor = [UIColor clearColor];


}
搜索代码:

    - (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar {
        [searchBar setShowsCancelButton:YES animated:YES];
        self.theTableView.allowsSelection = NO;
        self.theTableView.scrollEnabled = NO;
    }

    - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
        searchBar.text=@"";

        [searchBar setShowsCancelButton:NO animated:YES];
        [searchBar resignFirstResponder];
        self.theTableView.allowsSelection = YES;
        self.theTableView.scrollEnabled = YES;
    }
    - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {

        // All the actions goes here, like parsing xml.

        [self.tableData removeAllObjects];
        [theTableView reloadData];
    }

谢谢

你还在寻找答案吗?回答曼纽尔,把你的答案作为答案而不是评论。我差点错过了你的答案。你还在寻找答案吗?回答曼纽尔,把你的答案作为答案而不是评论。我差点没听到你的答案。