Swift Generic type vs. Any in Swift Generic type In Swift, a generic type is a placeholder for a specific type that is specified when the generic type is used. A generic type allows you to write Needone 7 Mar 2023 · 2 min read
Swift UIKit vs. SwiftUI - A general discussion UIKit and SwiftUI are two different frameworks for building user interfaces on Apple platforms. UIKit UIKit is the older of the two frameworks, and has been around since the early Needone 28 Feb 2023 · 2 min read
iOS Get the current week in Swift To get the current week in Swift 5, you can use the Calendar and DateComponents classes to calculate the week number for the current date. Here's an example of how Needone 9 Feb 2023 · 1 min read
iOS SceneDelegate In iOS, the SceneDelegate is a class that is responsible for managing the scenes in your app. A scene is a discrete unit of your app's user interface, such as Needone 7 Feb 2023 · 2 min read
SwiftUI @AppStorage vs. @UserDefault in SwiftUI Both the @AppStorage and @UserDefault property wrappers in SwiftUI allow you to store and retrieve data using UserDefaults. However, there are a few key differences between the two: @AppStorage In Needone 31 Jan 2023 · 2 min read
iOS Popup alert in Swift As mentioned in the other article: Popup Custom View in UIKit: popup mainly can be: * popup an alert using UIAlertController * popup action sheet using UIAlertController. For more details, check this: Needone 12 Jan 2023 · 2 min read
Swift Preview in SwiftUI Once you have finished the SwiftUI code, it is always a good idea to preview it before implement any function code. Luckily, such feature is natively supported by SwiftUI - Needone 19 Dec 2020 · 1 min read