다른 뷰컨트롤러에서 테이블뷰 리로드 시키기
2015.04.18@Class 2
// Add this line in viewDidLoad in same class you want the tableView to refresh
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshTableWithNotification:) name:@"RefreshTable" object:nil];
// Add this method just beneath viewDidLoad:
- (void)refreshTableWithNotification:(NSNotification *)notification {
[self.tableView reloadData];
}
@Class1
// Call this when ever you want to refresh the tableView in Class2
[[NSNotificationCenter defaultCenter] postNotificationName:@"RefreshTable" object:nil userInfo:nil];
넘기려는 데이터가 있을 경우 userInfo 구성 (NSDictionary 형태로)
userInfo = @{@"key": value};