将IASKAppSettingsView连接到选项卡项 [英] Connect IASKAppSettingsView to tabbar item

查看:109
本文介绍了将IASKAppSettingsView连接到选项卡项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于正在使用的iPhone应用程序,我想使用InAppSettingsKit来处理应用程序中的所有设置: http ://www.inappsettingskit.com/示例应用程序可以正常运行,但是我不确定如何在自己的应用程序中使用它.似乎没有文档.

For a iPhone app I'm working on I want to use InAppSettingsKit to handle all the settings from within the app: http://www.inappsettingskit.com/ The sample app runs without problems but I'm not sure how to use it in my own app. There seems to be not documentation.

我有一个名为设置的标签栏项,应显示InAppSettingsKit.将选项卡项的NIB名称设置为"IASKAppSettingsView"时,只会出现错误.我看了示例代码,但是我找不到它们是如何连接视图的,因为它们的NIB名称为空.即使我在该字段中放入了一些无意义的代码,它仍然显示了IASKAppSettingsView,而没有任何错误.

I have a tabbar item called settings that should display the InAppSettingsKit. When I set the NIB name of the tabbar item to "IASKAppSettingsView" I only get errors. I've looked at the sample code but I can't find out how they connected the view, as their NIB name is empty. Even if I put some meaningless code in that field it still shows the IASKAppSettingsView without errors at all.

是否有人知道如何将此选项卡项连接到IASKAppSettingsView,或者可能因为我找不到它们而向我指出一些文档或教程.谢谢!

Does anyone know how to connect this tabbar item to the IASKAppSettingsView or could point me at some documentation or tutorials as I wasn't able to find them. Thanks!

推荐答案

我通过扩展IASKAppSettingsViewController来解决了这个问题,

I solved it by extending IASKAppSettingsViewController like so:

@interface YourSettingsVC : IASKAppSettingsViewController
    // some header stuff
@end

该类必须重写 viewDidLoad:以手动实例化具有分组样式的self.tableView.否则,它将默认为UITableViewStylePlain.

This class must override viewDidLoad: to manually instantiate self.tableView with grouped style. Otherwise it will default to UITableViewStylePlain.

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStyleGrouped];
}

通过这种方式,我可以轻松地将其作为自定义视图控制器添加为位于MainWindow.xib中的UITabBarController中的选项卡之一.无需其他代码!

This way I can easily add it as a custom view controller as one of the tabs in my UITabBarController located in my MainWindow.xib. No additional code necessary!

这篇关于将IASKAppSettingsView连接到选项卡项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆