- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Can I change the size of UIActivityIndicator in Swift?
It is possible to change the size of UIActivityIndicator in swift using some tricks but it’s not recommended to change the size. To change the size of activity indicator let’s first add an indicator on an empty screen and see how it looks. For this example, I’ll also change the color to red.
Let’s see how it looks when we run it without changing the size of the indicator.
Now, we’ll create an outlet of activity indicator in our view controller and in the viewDidLoad method of this class we’ll add the code below.
We’ll use CGAffineTransform to change the scale of our indicator. When we change the scale to 2.5x this is how it looks on the iPhone.
let transfrom = CGAffineTransform.init(scaleX: 2.5, y: 2.5) activityIndicator.transform = transfrom
This is how it looks on the iPhone, which is blurred and not as perfect as the actual indicator. Hence it is not a recommended way to increase the size of the indicator.
- How can I change the font size of ticks of axes object in Matplotlib?
- How can I change the font family and font size with jQuery?
- How do I change the font size of ticks of matplotlib.pyplot.colorbar.ColorbarBase?
- How do I change the font size of the scale in Matplotlib plots?
- Can you change size of Array in Java once created?
- How do I change button size in Python Tkinter?
- How can I change the text of the Tkinter Listbox item?
- Change the size of Bootstrap input groups
- How can I change the field name in MongoDB?
- Change the size of the pagination with CSS
- How can I change the storage engine of a MySQL table?
- How can I change the default sort order of MySQL tables?
- Dynamically change TableView Cell height in Swift