당신은 PresentModalView의 parentView을 위임해야하며 PresentModalView의 viewWillDisappear에 방법을 Referesh는 호출해야합니다.
그렇지 않으면 알림을 푸시하고 parentView에서 관찰 할 수 있습니다.
- (void) refreshMyParentViewController{
NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
[center postNotificationName:@"RefreshNeeded" object:self userInfo:refreshData];
}
// In ParentViewController - AddObserver를 사용하여 데이터를 검색합니다. // 호출 할 메서드.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(delegateMethod:)
name:@"RefreshNeeded" object:nil];
- (void)delegateMethod:(NSNotification *)notification {
NSLog(@"%@", notification.userInfo);
NSLog(@"%@", [notification.userInfo objectForKey:@"RefreshObject"]);
}
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(delegateMethod:)
name:@"RefreshNeeded" object:nil];
- (void)delegateMethod:(NSNotification *)notification {
NSLog(@"%@", notification.userInfo);
NSLog(@"%@", [notification.userInfo objectForKey:@"RefreshObject"]);
}
왜 부모보기를 다시로드 하시겠습니까? –
"UIModalPresentationFormSheet"보기에서 일부 데이터를 편집합니다. 부모보기에서 변경 사항을 표시하려고합니다. – Suppry
당신은 (KVO, NSNotificationCenter, 대의원, 참조를 통과하고 많은 방법으로) 변경을 알리기 위해 다른 사람이 필요합니다. –