Category

SwiftUI

8 stories
J
Joynal Abedin

Custom Toast in SwiftUI

The toast component is an non-disruptive message that appears at the bottom of the interface to provide quick, at-a glance feedback on the outcome of an action Based on UX experience, Toast should only be used for confi...

5
J
Joynal Abedin

Implement ChatGPT in SwiftUI

Chat GPT // // ContentView.swift // ChatGPTDemo // // Created by Joynal Abedin on 13/2/23. // import SwiftUI import OpenAISwift struct ContentView: View { @ObservedObject var viewModel = ViewModel() @...

4
J
Joynal Abedin

Custom TabBar SwiftUI

let’s start with the Tabbar. For each tab bar item, we need a title, image, and selected image. So we need to create a struct name TabItemData. struct TabItemData { let image: String let selectedImage: String ...

4
J
Joynal Abedin

Onboarding in SwiftUI

First of all create a new struct Model Named \"Card\": import SwiftUI import Foundation struct Card: Identifiable { var id = UUID() // var image: String var title : String var description : Strin...

4
J
Joynal Abedin

Stacks and Frames in SwiftUI

1. Container Child Limit Container View are limited to 10 direct descendant views. If a stack contains more than 10 View then Xcode automatically throw an error: Extra arguments at positions #11, #12 in call Ex: ...

4
Stacks and Frames in SwiftUI
J
Joynal Abedin

Custom Modifier SwiftUI

SwiftUI also allows you to create your own custom modifiers. This can be particularly useful if you have a standard set of modifiers that are frequently applied to views. Suppose that the following modifiers are a common...

4
Custom Modifier SwiftUI
J
Joynal Abedin

Error Handling

Declaring Error Types: As an example, consider a method that is required to transfer file to a remote server. Such a method might fail to transfer the file for a variety of reasons such as there being no network connect...

5