NILauncherView 背景颜色

发布于 2025-01-08 20:28:02 字数 617 浏览 1 评论 0原文

我正在尝试设置 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 清除颜色];

但两者都不起作用。

将 UIImageView 作为子视图添加到 viewController 并使启动器视图变得清晰也没有。

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

编辑

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

I'm trying to set the background image of a NILauncherViewController included with iOS NimbubKit (update of the three20 kit).

I've tried
self.launcherView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];

And self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];
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.

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

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

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

发布评论

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

评论(1

孤独陪着我 2025-01-15 20:28:02

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

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

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

view.backgroundColor = ...

It looks like the view property for the NILauncherViewController is not a NILauncherView. To access the NILauncherView instance just do something like:

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

And you can then set the background color with:

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