Blog

Page 155 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for SwiftUI text-alignment

SwiftUI text-alignment

Published on September 2, 2023

📝 **Tech Blog: Exploring Text Alignment in SwiftUI** Are you feeling lost in the world of SwiftUI text alignment? Don't worry, you're not alone! Text alignment is an essential aspect of any user interface, and understanding how it works in SwiftUI can ma

Cover Image for Detect current device with UI_USER_INTERFACE_IDIOM() in Swift

Detect current device with UI_USER_INTERFACE_IDIOM() in Swift

Published on September 2, 2023

# 📱🖥️ How to Detect the Current Device in Swift Are you developing an iOS app and need to detect whether it's running on an iPhone or an iPad? 🤔 Look no further! In this blog post, we'll explore the equivalent of `UI_USER_INTERFACE_IDIOM()` in Swift an

Cover Image for Getting a "This application is modifying the autolayout engine from a background thread" error?
macos

Getting a "This application is modifying the autolayout engine from a background thread" error?

Published on September 2, 2023

📝 **Title:** Unveiling the Mystery Behind the "This application is modifying the autolayout engine from a background thread" Error 📃 **Introduction:** 😱 Have you ever encountered the notorious "This application is modifying the autolayout engine from a

Cover Image for Checking if an object is a given type in Swift

Checking if an object is a given type in Swift

Published on September 2, 2023

# Checking if an object is a given type in Swift: A Handy Guide 📝 So, you have an array that contains `AnyObject` and you'd like to identify all the elements that are of a particular type, such as an array instance. The good news is that Swift provides a

Cover Image for How to hide a navigation bar from first ViewController in Swift?

How to hide a navigation bar from first ViewController in Swift?

Published on September 2, 2023

📝 **How to Hide a Navigation Bar from First ViewController in Swift?** Are you struggling with hiding the navigation bar from the first ViewController or a particular ViewController in Swift? 🤔 Don't worry, I've got you covered! In this blog post, I'll

Cover Image for How can I import Swift code to Objective-C?
import

How can I import Swift code to Objective-C?

Published on September 2, 2023

# 📝 How to Import Swift Code to Objective-C 🤔 So, you've created a fancy Swift library and now you're trying to import it into your Objective-C project? It's like trying to fit a square peg into a round hole, but fear not! I'm here to guide you through

Cover Image for Difference between == and ===

Difference between == and ===

Published on September 2, 2023

# Equality Operators in Swift: == vs === 💁‍♂️💁‍♀️ Are you confused about the difference between the double equals (`==`) and triple equals (`===`) operators in Swift? 🤔 Don't worry, you're not alone! Many developers struggle to understand these seeming

Cover Image for How do I shuffle an array in Swift?
arraysshuffle

How do I shuffle an array in Swift?

Published on September 2, 2023

# How to Shuffle an Array in Swift: A Simple Guide 🎲 Do you want to add some randomness and excitement to your Swift programming? Imagine having a deck of playing cards and being able to shuffle them effortlessly. In this blog post, we’ll explore how to

Cover Image for How to get the current time as datetime
datetime

How to get the current time as datetime

Published on September 2, 2023

# How to Get the Current Time as Datetime in Swift 🕰️ Are you a beginner in app development and struggling to get the current hour in Swift? Don't worry, we've got you covered! In this guide, we'll walk you through the process of obtaining the current ti

Blog | Matheus Mello