简体   繁体   English

NILauncherView背景色

[英]NILauncherView Background Colour

I'm trying to set the background image of a NILauncherViewController included with iOS NimbubKit (update of the three20 kit). 我正在尝试设置iOS NimbubKit附带的NILauncherViewController的背景图像(Three20套件的更新)。

I've tried 我试过了
self.launcherView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]]; self.launcherView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@“ Background.png”]];

And self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]]; 并且self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@“ Background.png”]]; self.launcherView.backgroundColor = [UIColor clearColor]; self.launcherView.backgroundColor = [UIColor clearColor];

But neither work. 但是都没有用。

Nor does adding a UIImageView as a subview to the viewController and making the launcher view clear. 也没有将UIImageView作为子视图添加到viewController并使启动器视图清晰可见。

Yes the images has the correct name. 是的,图像名称正确。

Edit 编辑

If anybody needs to know how to fix this I simply made a UIViewController and added a NILauncherView as a subview and then copied the delegate/datasource methods from the NILauncerViewController 如果有人需要解决该问题,我只需制作一个UIViewController并添加NILauncherView作为子视图,然后从NILauncerViewController复制委托/数据源方法

It looks like the view property for the NILauncherViewController is not a NILauncherView. 看起来NILauncherViewController的view属性不是NILauncherView。 To access the NILauncherView instance just do something like: 要访问NILauncherView实例,只需执行以下操作:

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

And you can then set the background color with: 然后,您可以使用以下方法设置背景色:

view.backgroundColor = ...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM