在我的TableView中使用
UserSelect *detailViewController = [[UserSelect alloc] initWithNibName:@"UserSelect" bundle:nil];
detailViewController.title=@"Marca Teste";
[detailViewController.view setTag:1];
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
我想在详细选择ViewController(UserSelect)之后更新我的TableView怎么做?
另一个相关问题
在这段代码中,我将tag设置为1,但是当我的detailView被加载时,tag总是0,出了什么问题?
由于
EDIT1
rootViewController .h
#import <UIKit/UIKit.h>
#import "DataClass.h"
@interface TestTable : UITableViewController {
IBOutlet UITableView *MyTbl;
}
@property (nonatomic,retain) IBOutlet UITableView *MyTbl;
@end
和m
- (void)viewDidLoad {
[super viewDidLoad];
UIBarButtonItem *back=[[[UIBarButtonItem alloc] initWithTitle:@"MENU" style:UIBarButtonItemStyleBordered target:self action:@selector(LoadMenu)]autorelease];
self.navigationItem.leftBarButtonItem=back;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
-(void) LoadMenu
{
if (self!=nil) {
[self.navigationController.view removeFromSuperview];
}
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.MyTbl reloadData];
}
答案 0 :(得分:0)
在viewWillAppear
集
rootViewController
中
[self.tableView reloadData];