Author: Ravi Shankar

  • How to preview SwiftUI views in Xcode Playground.

    Previewing SwiftUi code using Xcode playgrounds can be done by using settings live view or UIHostingController. Let us see this by using the following code snippet (SwiftUI View) which displays a button that increments a counter. UIHostingController Setting Live View

  • Data Binding in SwiftUI

    In the world of SwiftUI, data binding is a core concept that facilitates the seamless flow of data between your app’s user interface and its underlying data models. This connection allows the UI to update automatically when data changes, and vice versa. For developers, mastering data binding is crucial to building responsive and state-driven applications.…

  • SwiftUI Navigation

    Navigating between different views is a fundamental aspect of building an interactive app. SwiftUI, Apple’s declarative UI framework, offers several powerful and user-friendly ways to manage navigation. In this guide, we’ll explore essential navigation patterns in SwiftUI, including the use of NavigationView, TabView, and modals. By using an example of an expense split app, we’ll…

  • Building Custom Views with SwiftUI

    SwiftUI provides a powerful and flexible framework for developing sophisticated user interfaces with less code and greater reuse. This blog post will demonstrate how to create custom views and incorporate animations in SwiftUI, using an expense split app as our example. The goal is to show you how to enhance the UI/UX of your apps…

  • Adapting Text Colour for Dark Mode in SwiftUI

    In SwiftUI, ensuring text colour adapts appropriately to dark mode is crucial for readability. If your app supports an automatic appearance mode, the text colour needs to adjust dynamically based on the system’s appearance settings. Here’s a simple way to implement this: This code snippet checks if the darkMode setting is set to .auto. If…

  • Understanding State Management in SwiftUI

    State management is a crucial aspect of building dynamic and responsive applications in SwiftUI. For beginners, understanding how to manage state effectively can significantly enhance your ability to build robust applications. Let’s explore how to use various state management techniques in SwiftUI using an example of an expense split app. We’ll cover @State, @Binding, @StateObject,…

  • Building Your First iOS App: UIKit

    Welcome to the foundational guide to building iOS apps using UIKit, Apple’s traditional framework for constructing and managing user interfaces. In this tutorial, you will learn how to create a basic iOS app using UIKit, focusing on essential components such as views, view controllers, and user interaction. By the end of this guide, you’ll understand…

  • SwiftUI: Building Your First App

    Welcome to the exciting world of app development with SwiftUI! If you’re new to SwiftUI, this guide is designed to introduce you to the fundamentals of building an iOS app using this innovative framework. By the end of this tutorial, you will have a basic understanding of SwiftUI’s core concepts, including views, modifiers, and state…