How to change UILabel font size in Swift? (programmatically and in Interface Builder)
Hello everyone! I just started learning Swift and am writing my first app — a simple to-do list. I have a task detail screen where the task name is displayed in a UILabel. I want the task title to be larger than normal text (e.g., 24pt) and the description to be standard (17pt).\n\nThe problem is that I can't figure out how to properly change the font size programmatically. In Interface Builder, I see the Font field in the Attributes Inspector, but when I change it there, the size only applies to that specific instance. I need the font size to be able to change dynamically based on user settings (e.g., via a slider).\n\nHere's how I'm trying to do it now:\n\n```swift\nimport UIKit\n\nclass DetailViewController: UIViewController {\n \n @IBOutlet weak var
No answers yet.
Log in to leave an answer
Blogs
Arrays of Objects in TypeScript: A Complete Guide with Examples
Working with Dates and Time in JavaScript: Advanced Level
Smart cast in Kotlin: why a variable could have changed and how to fix it in 2025
Python for Everyone: Version Differences, Terminal Check & PEP 8 Standards