我正在尝试调整默认 IASKAppSettingsViewController 的行为,以便它可以为自定义视图(类型 = IASKCustomViewSpecifier)提供自定义子视图控制器(如 type = PSChildPaneSpecifier)。
我试图继承 IASKAppSettingsViewController 而不向代码添加任何新功能。
但是,当我加载自己的子类时,设置视图完全是空的——即使对于一个裸子类也是如此。当我切换回默认的 IASKAppSettingsViewController 时,一切都会按预期再次运行。
我已经尝试在我的子类中的各个位置设置断点,并且一切似乎都运行良好 - 除了没有显示任何内容。
我尝试在文档中寻找线索,但似乎找不到任何解释原因的东西。InAppSettingsKit 的文档甚至声明它是为子类化而设计的。
我在这里想念什么?任何线索都值得赞赏 - 甚至更好的是一个小的分步指南,用于傻瓜。
更新了代码:
设置翻转视图。它适用于标准 IASKAppSettingsViewController,但因我的空派生 MyCustomSettingsViewController 而失败
- (IBAction)showInfo:(id)sender
{
// Setup navigation controller for settings view
MyCustomSettingsViewController *settings = [[MyCustomSettingsViewController alloc] init];
//IASKAppSettingsViewController *settings = [[IASKAppSettingsViewController alloc] init];
settings.delegate = self;
settings.showDoneButton = YES;
UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:settings];
navigation.navigationBar.barStyle = UIBarStyleBlack;
[settings release];
// Display the settings
navigation.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:navigation animated:YES];
[navigation release];
}