InAppSettingsKit 多值不显示选项

发布于 2024-12-09 18:53:53 字数 1252 浏览 0 评论 0原文

我刚刚成功创建了我的 settings.bundle 并设置了一系列不同的设置。但是,当我运行应用程序并通过 InAppSettingsKit 查看设置时,不会显示多值选项。我看到标题并且可以选择它,然后当它应该显示选项时,它只显示 n 个空单元格(勾号除外)。

奇怪的是,如果我进入苹果设置应用程序并检查多值设置,它们都会按预期显示。有人知道发生了什么事吗?

这是我在 .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];
}

下面是我的设置包的一部分的屏幕截图(显示有问题的多值选项):

在此处输入图像描述

这是一个屏幕截图,显示了当我单击样式时应用程序内设置部分中显示的内容:

在此处输入图像描述

I have just managed to create my settings.bundle and set up a selection of different settings. However when I run my app and view the settings via InAppSettingsKit, the multi value options aren't displayed. I see the title and I can select it, then when it should display the options it just shows n empty cells (except for the tick).

The odd thing is that if I go into the Apple Settings app and check out the multi value settings they all show up as expected. Does anyone have any idea whats going on?

This is the code I'm using in my .h file:

#import <UIKit/UIKit.h>
#import "IASKAppSettingsViewController.h"

@interface myViewController : UIViewController <IASKSettingsDelegate, UITextViewDelegate>
{
    IASKAppSettingsViewController *appSettingsViewController;
}

And in the .m file I have the following:

- (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];
}

Below is a screenshot of a portion of my settings bundle (showing on of the problematic multi-value options):

enter image description here

And here is a screenshot showing what is displayed in the in app settings section when I click on Style:

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

葬花如无物 2024-12-16 18:53:53

我通过重置 iPhone 模拟器成功解决了这个问题。由于某种原因,似乎在一些新旧 plist 设置之间感到困惑。

I managed to resolve this issue by resetting the iPhone simulator. It seems it was getting confused between some old and new plist settings for some reason.

梦一生花开无言 2024-12-16 18:53:53

抱歉,它不允许我投票。我还通过退出模拟器并再次运行应用程序解决了类似的问题(还尝试删除应用程序?)。

sorry it won't allow me to vote up. I also fixed a similar problem by quitting the simulator and running the app again (also try to delete the app?).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文