Dec 21, 2021 swiftui

SwiftUI or StoryBoard what to choose

Today most of the iOS developer are confused on picking SwiftUI or storyboard. Most of the developer are familiar with Interface builder which is known as storyboard which usually uses the XIB . We hope to give the comparision between…

Nov 26, 2021 iOS

What is View Controller ? What is its lifecycle?

What is View Controller Life cycle in swift? Ans: View Controller Life cycle swift : View Controllers (VC) are the Controller part of the MVC(Model View Controller) triangle. They are responsible for controlling the view. Every time you want to…

Sep 20, 2021 interview

What is Core Data with Swift Interview Question

 What is Core Data in Swift ? Core Data Stack Core data with swift uses SqLite as  local DataBase Storage in iOS. it is the frameWork used to save, modify and track the data within our application. Core data allows…

Aug 28, 2021 interview

iOS push notification interview questions and Answers

Apple Push Notifications Interview Questions and Answers Here are the apple push notification interview questions for fresher and experience candidate.voip push notifications ios What is NSNotification?   An Object Which Contains information broadcast to registered observers that bridges to the notification.…

Aug 28, 2021 interview

iOS interview Questions swift and Answer : Part 3

 Technical swift interview Question and Answer for iOS developer: Part 3 iOS interview Questions swift and Answer for experience and fresher candidate iOS interview questions swift for experience student for preparation of job interview 1 .What is ARC (Automatic Reference…

Apr 16, 2024 iOS

How can I pop to the Root view using SwiftUI?

There are two main ways to pop to the root view in SwiftUI, depending on the version of SwiftUI you're using: For SwiftUI versions before iOS 16: Using environment(\.rootPresentationMode): In the child view where you want to trigger the pop,…

Apr 16, 2024 iOS

How to detect live changes on TextField in SwiftUI?

In SwiftUI, you can detect live changes on a TextField using the .onChange modifier. Depending on the version of SwiftUI you’re using, there are different approaches: SwiftUI 2.0 (iOS 14, macOS 11, etc.): In SwiftUI 2.0, you can directly use the .onChange modifier to detect any change…

Apr 15, 2024 iOS

SwiftUI app life cycle iOS14 where to put AppDelegate code?

In SwiftUI apps targeting iOS 14 and later, you typically won't have an AppDelegate file by default because SwiftUI apps rely on the @main attribute applied to your app's main entry point, usually a struct that conforms to the App…

Apr 14, 2024 iOS

SwiftUI HStack with wrap and dynamic height

In SwiftUI, achieving a horizontally stacked layout with wrapping behavior (similar to UIStackView with UIStackViewDistribution.fillEqually and UIStackViewAxis.horizontal in UIKit) along with dynamic height can be a bit tricky because SwiftUI's built-in layout system doesn't directly support wrapping behavior. However, you…

Apr 14, 2024 iOS

Call UIKit function from SwiftUI

To call a UIKit function from SwiftUI, you'll typically use a UIViewRepresentable wrapper to create a SwiftUI view that wraps the UIKit component. Within this wrapper, you can call UIKit functions and handle any necessary interactions between SwiftUI and UIKit.…

Apr 13, 2024 iOS

What enables SwiftUI’s DSL?

SwiftUI's Domain-Specific Language (DSL) is enabled by several key language features and design decisions: Swift Language: SwiftUI is built using the Swift programming language, which provides powerful features such as closures, generics, function builders, property wrappers, and protocol extensions. These…

Apr 12, 2024 iOS

How do I create a multiline TextField in SwiftUI?

In SwiftUI, the TextField view doesn't inherently support multiline text input. However, you can achieve multiline text input behavior by using the TextEditor view instead, which is designed for multiline text input. Here's how you can create a multiline text…

Apr 11, 2024 iOS

Move TextField up when the keyboard has appeared in SwiftUI

Certainly! When working with SwiftUI, ensuring that the keyboard doesn’t obscure your text fields is essential for a smooth user experience. Let’s address this issue. To move the TextField up when the keyboard appears, you can follow these steps: Use a ScrollView: Wrap…