【发布时间】:2011-12-05 08:46:36
【问题描述】:
我刚刚创建了我的 settings.bundle 并设置了一系列不同的设置。但是,当我运行我的应用程序并通过 InAppSettingsKit 查看设置时,不会显示多值选项。我看到标题,我可以选择它,然后当它应该显示选项时,它只显示 n 个空单元格(勾号除外)。
奇怪的是,如果我进入 Apple 设置应用程序并查看多值设置,它们都会按预期显示。有人知道发生了什么吗?
这是我在 .h 文件中使用的代码:
#import <UIKit/UIKit.h>
#import "IASKAppSettingsViewController.h"
@interface myViewController : UIViewController <IASKSettingsDelegate, UITextViewDelegate>
{
IASKAppSettingsViewController *appSettingsViewController;
}
在 .m 文件中我有以下内容:
- (IBAction)optionsButtonSelected:(id)sender
{
appSettingsViewController = [[[IASKAppSettingsViewController alloc] initWithNibName:@"IASKAppSettingsView" bundle:nil] autorelease];
appSettingsViewController.delegate = self;
appSettingsViewController.showDoneButton = YES;
UINavigationController *aNavController = [[[UINavigationController alloc] initWithRootViewController:appSettingsViewController] autorelease];
[self presentModalViewController:aNavController animated:YES];
}
下面是我的设置包的一部分的屏幕截图(显示有问题的多值选项):
这是一个屏幕截图,显示了当我点击样式时应用内设置部分中显示的内容:
【问题讨论】:
-
你能发布(一个最小的测试用例)你的设置包的内容吗?
-
@OrtwinGentz 我添加了几个屏幕截图以提供更多信息。
-
您有本地化文件吗?我注意到您在 plist 中写了“显示样式”,但在屏幕上显示了“样式”。
-
我没有创建本地化文件,我唯一拥有的是一个名为“en.lproj”的文件夹,它是在 settings.bundle 中生成的。我在 plist 中到处查看以找出为什么它会出现 Style 而不是 Display Style,但我找不到任何可能的参考。老实说,这让我很困惑。
-
将您的 plist 放入 IASK 示例应用程序时是否仍然出现问题?如果是,请将其发布以供下载,以便我检查。
标签: iphone settings multivalue inappsettingskit