- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to make a background 25% transparent on iOS
Apple provides backgroundColor which is an instance property, Changes to this property can be animated. The default value is nil, which results in a transparent background color.
To make background 25% transparent we should set the view to the UIColor with alpha 0.25
view.backgroundColor = UIColor(white: 1, alpha: 0.25)
You can write the following code in your ViewController’s viewDidLoad method.
Your code should look like below.
override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor(white: 1, alpha: 0.25) }
- Related Articles
- How to make a background 25% transparent on Android?
- How to make a background 20% transparent on Android
- How to change background color of TableView items on iOS?
- How to create a semi-transparent background in Canva?
- How to get device make and model on iOS?
- How to make a Tkinter canvas rectangle transparent?
- How to make an HTTP request on iOS App using Swift?
- How to make Matplotlib scatterplots transparent as a group?
- How do you animate the change of background color of a view on iOS?
- How to make axes transparent in Matplotlib?
- How to create an image with a transparent background text using CSS?
- How to set background color of a View in iOS App?
- How to run a timer in background within your iOS app
- How to create transparent Status Bar and Navigation Bar in iOS?
- Creating a transparent background in a Tkinter window

Advertisements