簡體   English   中英

在ios中設置launchscreen.xib的背景圖像

[英]Set background image for launchscreen.xib in ios

我需要在iOS應用程序的啟動屏幕中設置背景顏色或背景圖像。 我想知道是否有類似的代碼:

self.view.backgroundcolor=[UIColor redColor];

謝謝

如果要為啟動屏幕設置背景圖像,則有兩種方式:

  1. 使用image.axassets並在其中添加新的LaunchImage集。
  2. 您可以在LaunchScreen.xib添加UIImageView並將圖像設置為它。

如果要為啟動圖像設置背景顏色,而不是在LaunchScreen.xib添加UIView並設置它的backgroundColor屬性。

兩種方式都很簡單,但我更喜歡使用image.axassets LunchImage設置。

注意:如果使用image.axassets LaunchImage,請不要忘記使用應用程序遷移此集。

暫無
暫無

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

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