簡體   English   中英

NILauncherView背景色

[英]NILauncherView Background Colour

我正在嘗試設置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復制委托/數據源方法

看起來NILauncherViewController的view屬性不是NILauncherView。 要訪問NILauncherView實例,只需執行以下操作:

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

然后,您可以使用以下方法設置背景色:

view.backgroundColor = ...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM