huggingface /
agents-course
This repository contains the Hugging Face Agents Course.
95/100 healthLoading repository data…
shobhakartiwari / repository
This repository contains a collection of SwiftUI interview questions that cover various essential concepts for iOS developers. These questions range from basic to advanced topics, making it an ideal resource for preparing for iOS interviews that focus on SwiftUI.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository contains a collection of SwiftUI interview questions that cover various essential concepts for iOS developers. These questions range from basic to advanced topics, making it an ideal resource for preparing for iOS interviews that focus on SwiftUI.
Link to donwload file : SwiftUI-Interview-questions.pdf
How does SwiftUI differ from UIKit in terms of UI design and structure? SwiftUI is declarative, focusing on "what" the UI should look like rather than "how" to build it step-by-step, as in UIKit's imperative approach. SwiftUI is designed to manage state changes, updating views automatically when data changes.
Can you explain the pros and cons of SwiftUI compared to UIKit?
What is a declarative UI, and how does SwiftUI implement this concept?
Declarative UI focuses on declaring the UI's end state based on data, with SwiftUI managing updates automatically. SwiftUI uses @State and other property wrappers to handle UI changes.
How does declarative UI differ from imperative UI, and why is it useful in SwiftUI? Declarative UI allows describing the UI's appearance, while imperative UI defines step-by-step instructions to reach a UI state. This reduces boilerplate and enhances readability.
What are @ViewBuilder and @MainActor in SwiftUI?
@ViewBuilder allows building multiple views in a single closure. @MainActor ensures code is run on the main thread, especially useful for UI updates.
Explain the purpose of the View protocol and how it works in SwiftUI.
The View protocol is the base for all views in SwiftUI, representing a piece of the UI. Views are value types, and SwiftUI relies on diffing to update only changed views.
What is @State, @Binding, and @ObservedObject in SwiftUI?
@State: Local state for simple values.@Binding: Passes a state reference to child views.@ObservedObject: Manages complex state in external objects.How do these property wrappers enable state management in SwiftUI? They allow for reactive updates in the UI by tracking data changes, with SwiftUI automatically re-rendering views when state changes.
What is @EnvironmentObject, and when would you use it?
@EnvironmentObject is for global state, passing shared data across multiple views. It’s useful for app-wide shared objects.
What is the difference between stateful and stateless views in SwiftUI?
Stateful views store and manage data (e.g., with @State), while stateless views rely on data passed from parent views.
How does SwiftUI handle view updates with @State and @ObservedObject?
SwiftUI automatically re-renders views when @State or @ObservedObject properties change.
What triggers view updates in SwiftUI?
Changes in @State, @Binding, or @ObservedObject properties trigger updates.
How does the @State property trigger view refreshes?
SwiftUI re-renders any view containing a modified @State property.
What are side effects in SwiftUI, and how can they be managed?
Side effects are actions triggered by state changes, managed through onAppear, onDisappear, and @EnvironmentObject.
Explain the use of onAppear and onDisappear modifiers.
onAppear and onDisappear are called when views enter or leave the screen, handling tasks like data loading or cleanup.
@Published and @StateObjectWhat is the difference between @StateObject and @ObservedObject?
@StateObject is used for an object’s initial declaration, while @ObservedObject is for passing existing instances.
When would you use @Published in SwiftUI?
@Published marks properties for observation in ObservableObject, triggering view updates on changes.
How can you handle asynchronous tasks in SwiftUI?
Using Task, async/await, or Combine publishers, like onAppear for launching async work.
How do you integrate Combine publishers or async/await in SwiftUI?
onReceive allows listening to publishers; Task launches async code directly.
How can SwiftUI observe and respond to Combine publishers?
By subscribing with onReceive or binding publishers to @State properties.
Explain how SwiftUI can work with ObservableObject for state management.
ObservableObject classes manage state across views using @ObservedObject and @EnvironmentObject.
@State or @ObservableObject for SwiftUI reactivity.What is @DerivedState, and how does it improve performance?
@DerivedState is inferred state, computed from other state properties to reduce memory use.
How does SwiftUI optimize views with @State and @ObservedObject?
SwiftUI re-renders only the views affected by changes in observed properties.
@State, @Binding, and @EnvironmentExplain the role of @Binding in SwiftUI.
@Binding enables shared state across views without ownership.
What is the purpose of @Environment in SwiftUI?
@Environment provides read-only values like device settings, accessible to views.
Describe the lifecycle of a SwiftUI view.
Views initialize, appear (onAppear), update with state changes, and disappear (onDisappear).
How does SwiftUI handle view updates and state changes? SwiftUI’s diffing algorithm applies updates based on state changes.
What are some best practices to optimize performance in SwiftUI?
Use @ViewBuilder, minimize view complexity, and avoid unnecessary bindings.
How does @ViewBuilder contribute to performance?
@ViewBuilder enables multiple views in closures, reducing redundant operations.
Can you use UIKit views within SwiftUI? How?
Yes, using UIViewRepresentable to wrap UIKit views.
How do you integrate SwiftUI and UIKit in the same application?
Embed SwiftUI views in UIKit with UIHostingController or UIKit views in SwiftUI with UIViewRepresentable.
@Binding to pass it down.How do @Environment and @EnvironmentObject work in SwiftUI?
They provide global state across views, with @EnvironmentObject for observable objects.
How does SwiftUI handle global state across multiple views?
By using @EnvironmentObject, accessible to all views sharing the object.
accessibilityLabel to make content accessible to screen readers.How do you handle user input and gestures in SwiftUI?
SwiftUI offers gestures like .onTapGesture for touch interactions.
Explain how SwiftUI manages taps, drags, and other gestures. Gesture modifiers allow handling and chaining complex gestures on views.
How do you handle navigation in SwiftUI?
Use NavigationView with NavigationLink for stack-based navigation.
How do you programmatically navigate between views in SwiftUI?
Bind NavigationLink to a boolean or selection to control navigation programmatically.
How does SwiftUI handle orientation changes?
Use GeometryReader or @Environment to adapt layouts.
What is @Environment and @EnvironmentObject’s role in managing orientation?
@Environment
Feel free to contribute by adding more questions or submitting PRs for answers to these questions!
This repository is licensed under the MIT License.
You can check my contributions over:
This README provides a comprehensive list of SwiftUI topics often discussed in interviews.
Selected from shared topics, language and repository description—not editorial ratings.
huggingface /
This repository contains the Hugging Face Agents Course.
95/100 healthfarhanashrafdev /
This repository contains a 90-day cybersecurity study plan, along with resources and materials for learning various cybersecurity concepts and technologies. The plan is organized into daily tasks, covering topics such as Network+, Security+, Linux, Python, Traffic Analysis, Git, ELK, AWS, Azure, and Hacking. The repository also includes a `LEARN.md
94/100 healthgoogle-deepmind /
This repository contains implementations and illustrative code to accompany DeepMind publications
87/100 healthAliaksandrSiarohin /
This repository contains the source code for the paper First Order Motion Model for Image Animation
92/100 healthNVIDIA /
NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.
93/100 healthRudrabha /
This repository contains the codes of "A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild", published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs
79/100 health