当前位置:网站首页>IPhone development swift foundation 09 assets
IPhone development swift foundation 09 assets
2022-07-03 21:58:00 【Happy party】
Assets Set color set on
Using color sets can make the style of applications consistent .
Choose a color 
Then use in the code :
Because the color set is iOS11 New features that have just emerged , Therefore, you need to judge the system version when using .
if #available(iOS 11.0, *){
self.view.backgroundColor = UIColor(named: "ForegroundColor")
}
Running results :
Assets Set vector picture on
Development in the past , Because you need to adapt to different sizes of screens , Therefore, image resources often need to prepare three sizes @1x、@2x、@3x. But after introducing vector pictures , There is no need to prepare drawings of three sizes .
stay Assets Click “+” Button , Select import “Import…” Options , Then select the vector image to be imported . Here is a red envelope vector graph , The file format is as follows svg At the end of the .

Remember to check the picture attribute “Preserve Vector Data” Options .
Verification code :
if #available(iOS 11.0, *){
self.view.backgroundColor = UIColor(named: "ForegroundColor")
let imageView = UIImageView(image: UIImage(named: "hongbao"))
imageView.frame = CGRect(x: 0, y: 0, width: 480, height: 560)
view.addSubview(imageView)
}
Running results :
边栏推荐
- Miscellaneous things that don't miss the right business
- The 14th five year plan and investment feasibility study report of China's industry university research cooperation Ⓧ 2022 ~ 2028
- JS demo calculate how many days are left in this year
- China HDI market production and marketing demand and investment forecast analysis report Ⓢ 2022 ~ 2028
- Market layout planning and latest dynamic analysis report of China's smart public security industry Ⓕ 2022 ~ 2028
- Après 90 ans, j'ai démissionné pour démarrer une entreprise et j'ai dit que j'allais détruire la base de données Cloud.
- Global and Chinese market of AC induction motors 2022-2028: Research Report on technology, participants, trends, market size and share
- 十大券商开户注册安全靠谱吗?有没有风险的?
- Intimacy communication -- [repair relationship] - use communication to heal injuries
- Farmersworld farmers world, no faith, how to talk about success?
猜你喜欢

Persistence of Nacos

Getting started with postman -- built-in dynamic parameters, custom parameters and assertions

Advanced technology management - how to examine candidates in the interview and increase the entry probability

Day 9 HomeWrok-ClassHierarchyAnalysis

Blue Bridge Cup Guoxin Changtian single chip microcomputer -- led lamp module (V)

Nacos common configuration

Yiwen teaches you how to choose your own NFT trading market

Décompiler et modifier un exe ou une DLL non source en utilisant dnspy

MySQL——索引

Getting started with postman -- environment variables and global variables
随机推荐
Selenium has three waiting methods (forced waiting, implicit waiting, and display waiting)
Are the top ten securities companies safe to open accounts and register? Is there any risk?
treevalue——Master Nested Data Like Tensor
[secretly kill little partner pytorch20 days] - [day3] - [example of text data modeling process]
MySQL——idea连接MySQL
Under the double reduction policy, research travel may become a big winner
2022 safety officer-a certificate registration examination and summary of safety officer-a certificate examination
Notes on MySQL related knowledge points (startup, index)
内存分析器 (MAT)
Day 9 HomeWrok-ClassHierarchyAnalysis
Minio deployment
JS Demo calcule combien de jours il reste de l'année
Redis concludes that the second pipeline publishes / subscribes to bloom filter redis as a database and caches RDB AOF redis configuration files
Leetcode problem solving - 235 Nearest common ancestor of binary search tree
Why use pycharm to run the use case successfully but cannot exit?
4. Data splitting of Flink real-time project
On my first day at work, this API timeout optimization put me down!
No matter how hot the metauniverse is, it cannot be separated from data
[SRS] build a specified version of SRS
十大券商开户注册安全靠谱吗?有没有风险的?