Posts by Samim

Author Biographical Info: Not available

Round a double value to x number of decimal places in Swift

By Samim

In this tutorial, we will see how to round a double value to x number of decimal places in Swift. Suppose we have a number like 1.34127538359353. Sometimes, we might want to make i.... Read More

How to render raw markdown content in SwiftUI

By Samim

In this article, we will learn how to render raw markdown content in Text view in SwiftUI. Sometimes, we want the Text view to display the text as we have specified. Suppose I have.... Read More

Create an Array containing 1 to n numbers in JavaScript

By Samim

In this tutorial, we will see how to create an array containing 1 to n numbers in JavaScript. Arrays are really important in JavaScript, they let us store and work with a bunch of .... Read More

How to make two views the same width in SwiftUI

By Samim

In this tutorial, we will see how to make two views the same width in SwiftUI. Suppose we are creating two buttons, as we know the button size normally depends on the label of the .... Read More

Adjust SwiftUI view’s background color for dark mode

By Samim

In this tutorial, we’ll explore how to dynamically change the background color of a view based on the system’s dark mode setting. Dark mode is a popular feature for exp.... Read More

Add a badge to TabView items in SwiftUI

By Samim

In this tutorial, we will see how to add badges to TabView items in SwiftUI. We can add a number or text as a badge to the TabView items using the badge() modifier. This is particu.... Read More

Show badge on List Row in SwiftUI

By Samim

In this tutorial, we will see how to show a badge on a list row in SwiftUI. A badge is like a little tag or number that we can see on icons or next to items in apps. For example, i.... Read More

How to add Text shadows in SwiftUI

By Samim

In this tutorial, we will see how to add Text shadows in SwiftUI. We can simply add a shadow effect to a text by using the shadow() modifier. It takes parameters such as color, rad.... Read More

Related Posts