표준 테이블 응용 프로그램을 지금 작성했습니다. Window는 UINavigationController를 rootViewController로 가지고 있으며, UINavigationController는 rootViewController와 함께 커스텀 UITableController로 초기화되었다.iOS의 기본 테이블 프로그램 - 응용 프로그램 대리인의 데이터를 다시로드하도록 내 테이블에 어떻게 알릴 수 있습니까?
내 응용 프로그램 테이블 데이터가 시간이 지남에 따라 변경됩니다. 보류 상태에서 애플리케이션을 열면 내 데이터가 오래되었습니다. applicationWillEnterForeground에서 데이터를 업데이트하려면 어떻게해야합니까? 나는 어색한 무엇인가 시도했다.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
HabitsTable* vc = [[HabitsTable alloc] init];
[vc initCoreData];
UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:vc];
self.window.rootViewController = nav;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
[[[[self window] rootViewController] navigationController] rootViewController]
}
그러나 놀랄만한 일은하지 않는다. 내 UITableController 얻을 방법을 잘 모르겠어요?
남자, 즉 도움이되었다 : – techgnosis