featured story 2 hours to master RxSwift - Part 1 a simple introudction on rxswift, including what is rxswift, how to use it and a quick example (with swift code) on demo that. 14 Mar 2023 · 8 min read Read post
Swift Sort custom objects by property in Swift Many of us have met the situation that we have an array/list of custom objects, and we want them can be sorted in a specific order. For example, we Needone 18 Feb 2023 · 1 min read
Android RunBlocking in Kotlin Coroutine In previous post, we have gone through most of the key concepts and methods in Coroutine: Kotlin Coroutines Table Content 1, Introduction to Coroutine in Kotlin 2, Non-blocking in Kotlin Needone 16 Feb 2023 · 2 min read
Swift Format currency in Swift Recently I have done quite an amount of work on formatting currency in Swift project, here are some tricks on how to format number in Swift: Format currency with auto Needone 14 Feb 2023 · 1 min read
Android Lazy in Kotlin In the Kotlin programming language, the term "lazy" typically refers to a type of property or variable that is only initialized when it is first accessed, rather than when the Needone 11 Feb 2023 · 3 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
Swift Data Racing in Swift A data race in Swift occurs when two or more threads access the same memory location simultaneously and at least one of them is writing to it, without proper synchronization. Needone 4 Feb 2023 · 2 min read
Android Encode URL in Kotlin In Kotlin, you can use the URLEncoder class to encode a URL string so that it can be safely transmitted over the internet. The URLEncoder class is part of the Needone 2 Feb 2023 · 1 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
Other HTTP Encoding HTTP encoding, also known as percent-encoding or URL encoding, is a way of encoding special characters in URLs and other HTTP data, such as headers and body content. HTTP encoding Needone 30 Jan 2023 · 1 min read
Swift Get location coordinates using CLLocationManager in Swift To get the location (latitude and longitude) of a device in Swift, you can use the Core Location framework, which is an official library from Apple. Only 2 steps are Needone 28 Jan 2023 · 2 min read
Swift Encode URL in Swift It is quite common to see that we can correctly set up the HTTP header, token, body and POST/GET methods in our iOS code, but we still can't get Needone 26 Jan 2023 · 2 min read