在把我们最新的Pipe寄给一个世界观的同时,我决定在塔巴勒河内使用一个Id s SplitView主计长。 SplitViewController由Appelegate管理。
All works fine, but my problem is that my MasterView (on the left of the SplitView) includes 4 Category-Buttons to change the TableViews Data. If I click one of the buttons, the TableView needs to Refresh/ReloadData, to Display the new Content of the selected category. I created a function to do the changes and linked my buttons to it in the interface builder.
At the end of my function, I tried to refresh the Controller like this:
[self tableView ReloadData];
but the SplitView don t show the refresh. Still the old Data. I tested around a bit with NSLog, to check if my function works correctly. No problems.
接着,我试图通过SplitViewController本人来查阅这封信:
// PresetController is my TableViewController in the SplitView
UISplitViewController *split = (UISplitViewController *)self.parentViewController;
PresetController *detail = [split.viewControllers objectAtIndex:0];
[detail.tableView reloadData];
同样,没有错误,但没有复读。
我失踪了吗? 是否有办法轻松地重载SplitViewController。 我已经读过通过通知中心向代表发送通知的内容,但是仍然找不到有用的资源。
http://www.un.org。
为了理解我的结构,我以什么方式在我的“提名”中设立SplitView。 方法:
NSMutableArray *controllers = [NSMutableArray arrayWithCapacity:[self.rootController.viewControllers count]];
int tabNum = 0;
for (UIViewController *controller in self.rootController.viewControllers) {
UISplitViewController *split = [[[UISplitViewController alloc] init] autorelease];
split.tabBarItem = controller.tabBarItem;
iPadDetailView *detail = [[iPadDetailView alloc] initWithNibName:@"iPadDetailView" bundle:nil]; // a detail view will come here
UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:detail] autorelease];
split.viewControllers = [NSArray arrayWithObjects:controller, nav, nil];
[controllers addObject:split];
}
tabNum++;