Sorry if it is not a standard question, but now your solutions can help me out. In my app, I have two classes: ClassA and ClassB. ClassB
I'd recommend you write a setter method for your query. Once Class B is instantiated you can call the method any time to update the data set and the table view.
You'll need to adjust the parameters to handle whatever form of representation you'll be using for your query.
ClassB.h
@interface ClassB : UITableViewController {
}
@property (nonatomic, copy) NSString *query;
ClassB.m
// method declared in ClassB
@implementation
@synthesize query;
// other methods here ...
- (void)setQuery:(NSString *)newQuery
{
// query is an instance variable declared in your .h
[newQuery retain];
[query release];
query = newQuery;
// perform your new data fetch with the supplied query
[self.tableView reload];
}
@end
ClassA.m
- (void)viewDidLoad
{
[super viewDidLoad];
classB = [[ClassB alloc] initWithNibName:@"ClassB" bundle:nil];
[classB setQuery:@"your query string here"];
}