iOS Compiler directives in Swift This post is going to list some of the most frequently used compiler directives in Swift, compatible in Swift 3/4/5. Someone might call this preprocessor directives, but they Needone 9 Jan 2023 · 3 min read
Swift Present action sheet in UIKit and SwiftUI An action sheet is a component that displays a set of choices to the user in a modal format. UIKit In iOS, you can create an action sheet using a Needone 6 Jan 2023 · 1 min read
Swift What is keyword defer in Swift The defer keyword in Swift is used to execute a block of code at the end of the current scope, regardless of how the scope is exited. The defer block Needone 3 Jan 2023 · 1 min read
iOS Command pattern in Swift Many of us have heard about the Command pattern or used them in the development, which is a behavioral design pattern in which an object is used to encapsulate all Needone 31 Dec 2022 · 2 min read
Swift Have you tried XCTUnwrap before? What is XCTUnwrap and how to use it to help you effectively while you are doing the unit test? XCTUnwrap is a utility function that is used in unit tests Needone 29 Dec 2022 · 1 min read
Swift PLIST file in iOS A Property List (PLIST) file is a file format used by macOS and iOS to store serialized data. It is often used to store data such as user preferences, settings, Needone 25 Dec 2022 · 2 min read
Other What is YAML file and compared with JSON YAML (YAML Ain't Markup Language) is commonly used for configuration files, but can be used in many applications where data is being stored or transmitted. A YAML file consists of Needone 23 Dec 2022 · 1 min read
Swift Create Property Wrapper in Swift What is Property Wrapper Property wrapper are a language feature that allows you to wrap a piece of code around a property in Swift world, which can help us to Needone 20 Dec 2022 · 1 min read
Android Bottom Sheet Dialog implementation in kotlin To create a bottom sheet dialog in Kotlin, you can use the BottomSheetDialog class from the Android Support Library, which is a built-in package. Here's an example of how you Needone 18 Dec 2022 · 1 min read
iOS Workplace, Project, Scheme and Target in iOS development Many of us have seen workspace, project, target and scheme quite often while doing the iOS development, but what are they exactly and how are they related with each other? Needone 17 Dec 2022 · 2 min read
Swift Equatable and Comparable in Swift It is quite common that we are required to compare two custom objects in Swift, luckily Swift has provided some built-in protocol allows us to do this in a "swift" Needone 14 Dec 2022 · 2 min read
Swift Difference between layoutIfNeeded vs. setNeedsLayout As many of iOS developer known, layoutIfNeeded and setNeedsLayout are two methods that can be used to update the layout of a view and its subviews. But what are their Needone 13 Dec 2022 · 2 min read
Swift Constructor Injection, Property Injection vs. Method Injection Dependency Injection is a design pattern that is providing another object with its dependencies, instead of having the object created or managed themselves. There are three main types of dependency Needone 12 Dec 2022 · 2 min read
Kotlin Type safe in programming language Introduction Type safety in programming languages refers to the concept that variables and data structures are strongly typed and cannot be assigned values of different types. This means that the Needone 9 Dec 2022 · 2 min read
iOS ContentHugging vs. ContentCompressionResistance in UIStackView In Swift, it is quite common to see ContentHugging and ContentCompressionResistance either when we are using the storyboard or code to render the user interfaces in UIStackView. Those 2 properties Needone 9 Dec 2022 · 1 min read
Android Companion Object in Kotlin Kotlin provides a brand new keyword companion which not exists in other programming languages. But don't be panic, it is not something new when you have one step closer. A Needone 7 Dec 2022 · 1 min read
Other Use openssl to create public key and private key Generally speaking, currently digital encryption methods can be divided into two main categories, symmetric encryption and asymmetric encryption. For symmetric encryption, the same key is used for encryption and decryption. Needone 7 Mar 2021 · 3 min read
Swift A summary of use enum in Swift Enumeration type is a common type in many programming languages, which normally presents a set of limited status for a program, such as list all the directions for a compass: Needone 1 Mar 2021 · 2 min read