i have a uitableviewcontroller here is the .h file code
@interface addToFavourites : UITableViewController {
}
@end
and here is the .m file code
#import "addToFavourites.h"
@implementation addToFavourites
- (id)initWithStyle:(UITableViewStyle)style {
if (self = [super initWithStyle:style]) {
}
return self;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 5;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
}
// Configure the cell
return cell;
}
@end
and in another class i am showing this view using this code
addToFavouritesobj = [[addToFavourites alloc] initWithStyle:UITableViewStylePlain]; [self.navigationController pushViewController:addToFavouritesobj animated:YES];
how do i call reload method of this uitableviewcontroller class?
there is no need of declaring tableview because this view automatically genrating a table
i am very confused how to reload the table?