当前位置:网站首页>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 :
边栏推荐
- Preliminary understanding of C program design
- Getting started with postman -- environment variables and global variables
- 大神们,我想发两个广播流1 从mysql加载基础数据,广播出去2 从kafka加载基础数据的变更
- Collections SQL communes
- Implementation principle of inheritance, encapsulation and polymorphism
- Correlation
- Teach you how to install aidlux (1 installation)
- TiDB 之 TiCDC6.0 初体验
- 十大券商开户注册安全靠谱吗?有没有风险的?
- Is it OK for fresh students to change careers to do software testing? The senior answered with his own experience
猜你喜欢
Implementation principle of inheritance, encapsulation and polymorphism

MySQL——索引

Notes on MySQL related knowledge points (startup, index)

MySQL - idea connects to MySQL

Mysql - - Index

gslb(global server load balance)技术的一点理解
![[secretly kill little partner pytorch20 days] - [day3] - [example of text data modeling process]](/img/55/309c9d52e503405b289bcfc4912be9.jpg)
[secretly kill little partner pytorch20 days] - [day3] - [example of text data modeling process]

Dahua series books

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

Common SQL sets
随机推荐
Leetcode problem solving - 235 Nearest common ancestor of binary search tree
Oil monkey plug-in
Decompile and modify the non source exe or DLL with dnspy
Imitation Netease cloud music applet
Leetcode problem solving - 230 The k-th smallest element in the binary search tree
Pengcheng cup Web_ WP
Intimacy communication -- [repair relationship] - use communication to heal injuries
2022 safety officer-b certificate examination summary and safety officer-b certificate simulation test questions
Investment analysis and prospect trend prediction report of China's boron nitride industry Ⓨ 2022 ~ 2028
Rest参考
2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers
股票炒股开户注册安全靠谱吗?有没有风险的?
油猴插件
十大券商开户注册安全靠谱吗?有没有风险的?
MySQL——索引
MySQL -- standardize database design
China's coal industry investment strategic planning future production and marketing demand forecast report Ⓘ 2022 ~ 2028
MySQL - database backup
Common SQL sets
Yyds dry inventory Chapter 4 of getting started with MySQL: data types that can be stored in the data table