1

我正在尝试设置包含在 iOS NimbubKit 中的 NILauncherViewController 的背景图像(更新了 three20 套件)。

我试过
self.launcherView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];

而self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]]; self.launcherView.backgroundColor = [UIColor clearColor];

但两者都不起作用。

也不会将 UIImageView 作为子视图添加到 viewController 并使启动器视图清晰。

是的,图像具有正确的名称。

编辑

如果有人需要知道如何解决这个问题,我只需制作一个 UIViewController 并添加一个 NILauncherView 作为子视图,然后从 NILaunterViewController 复制委托/数据源方法

4

1 回答 1

0

看起来NILauncherViewController 的视图属性不是NILauncherView。要访问 NILauncherView 实例,只需执行以下操作:

NILauncherView *view = [controller.view.subviews objectAtIndex:0];

然后您可以使用以下命令设置背景颜色:

view.backgroundColor = ...
于 2012-05-24T07:27:35.827 回答