NILauncherView背景颜色

时间:2012-02-24 12:10:11

标签: three20 nimbus-ios uibackgroundcolor

我正在尝试设置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作为子视图,然后从NILauncerViewController复制委托/数据源方法

1 个答案:

答案 0 :(得分:0)

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

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

然后您可以使用以下方式设置背景颜色:

view.backgroundColor = ...