![](/img/trans.png)
[英]How to set linear gradient to background of LaunchScreen.xib in iOS
[英]Set background image for launchscreen.xib in ios
我需要在iOS應用程序的啟動屏幕中設置背景顏色或背景圖像。 我想知道是否有類似的代碼:
self.view.backgroundcolor=[UIColor redColor];
謝謝
如果要為啟動屏幕設置背景圖像,則有兩種方式:
image.axassets
並在其中添加新的LaunchImage集。 LaunchScreen.xib
添加UIImageView
並將圖像設置為它。 如果要為啟動圖像設置背景顏色,而不是在LaunchScreen.xib
添加UIView
並設置它的backgroundColor
屬性。
兩種方式都很簡單,但我更喜歡使用image.axassets LunchImage設置。
注意:如果使用image.axassets
LaunchImage,請不要忘記使用應用程序遷移此集。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.