Blog

Page 134 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to resize Image with SwiftUI?

How to resize Image with SwiftUI?

Published on September 2, 2023

# How to Resize Images with SwiftUI: A Simple Guide šŸ“ø So, you have a large image in Assets.xcassets and you're wondering how to resize it to make it smaller using SwiftUI? Fear not, because we've got you covered! In this blog post, we'll address this com

Cover Image for How to return first 5 objects of Array in Swift?
arrays

How to return first 5 objects of Array in Swift?

Published on September 2, 2023

## How to Get the First 5 Objects of an Array in Swift? šŸ‘‹ Hey there, Swift enthusiasts! Are you looking for a clever way to retrieve the first 5 objects from an array in Swift? You've come to the right place! In this blog post, we'll explore some easy

Cover Image for Programmatically go back to previous ViewController in Swift

Programmatically go back to previous ViewController in Swift

Published on September 2, 2023

# šŸ”„ Going Back to Previous ViewController in Swift Are you struggling to find the correct way to programmatically go back to the previous ViewController in Swift? You're not alone! Many developers face this common issue when building iOS apps. But don't

Cover Image for How do I dispatch_sync, dispatch_async, dispatch_after, etc in Swift 3, Swift 4, and beyond?

How do I dispatch_sync, dispatch_async, dispatch_after, etc in Swift 3, Swift 4, and beyond?

Published on September 2, 2023

šŸ“ Dispatching with Ease in Swift 3, Swift 4, and Beyond! šŸš€ šŸ‘‹ Hey there, fellow Swift developers! Are you struggling with migrating your code from Swift 2.x to the mighty Swift 3 and beyond? Are you facing errors and issues with dispatching tasks using

Cover Image for Convert NSDate to NSString

Convert NSDate to NSString

Published on September 2, 2023

# **Converting NSDate to NSString: A Handy Guide** Have you ever found yourself in a situation where you have an `NSDate` object, but you only need to extract the year and represent it as an `NSString` in the format `@"yyyy"`? Don't worry, you're not alon

Cover Image for What is the difference between a weak reference and an unowned reference?
memory-management

What is the difference between a weak reference and an unowned reference?

Published on September 2, 2023

# Understanding Weak References and Unowned References in Swift In Swift, we have three types of references: strong, weak, and unowned. While strong references are the default and most commonly used, weak and unowned references play crucial roles in manag

Cover Image for Execute action when back bar button of UINavigationController is pressed

Execute action when back bar button of UINavigationController is pressed

Published on September 2, 2023

# How to Execute an Action When the Back Bar Button of a UINavigationController is Pressed in Swift šŸ”„ Have you ever needed to perform a specific action when the back button of a UINavigationController is pressed in your iOS app? Maybe you want to clear s

Cover Image for How to hide keyboard in swift on pressing return key?

How to hide keyboard in swift on pressing return key?

Published on September 2, 2023

# How to Hide Keyboard in Swift on Pressing Return Key? Are you struggling with hiding the keyboard on pressing the return key in your Swift app? Don't worry, you're not alone! Many developers face this common issue while using `UITextField`. But fear not

Cover Image for ReactiveCocoa vs RxSwift - pros and cons?

ReactiveCocoa vs RxSwift - pros and cons?

Published on September 2, 2023

# ReactiveCocoa vs RxSwift - Pros and Cons: Which one to choose? šŸ¤” Are you a Swift developer wanting to dive into reactive programming? Look no further! In this blog post, we'll compare two popular frameworks: ReactiveCocoa and RxSwift. We'll discuss the

Cover Image for Programmatically set the initial view controller using Storyboards

Programmatically set the initial view controller using Storyboards

Published on September 2, 2023

# šŸ“±šŸ’” Setting the Initial View Controller Programmatically in Storyboards So you've got a Storyboard and you want to dynamically control which view controller is displayed when your app launches. šŸš€ Don't worry, it's easier than you might think! In this