What is UIKit?

Why Interviewers Ask This

Foundational questions like this help interviewers calibrate the rest of the interview. A confident, accurate answer signals that you have solid Swift & iOS basics — a prerequisite for any developer role.

Answer

UIKit is Apple's foundational UI framework for building iOS and tvOS applications. It provides the core infrastructure for all UI-based apps — the event loop, view hierarchy, user interaction handling, and all built-in UI components. Core concepts: (1) UIApplication: the singleton that manages the app's life cycle and dispatches events; (2) AppDelegate / SceneDelegate: responds to app and scene lifecycle events (launch, background, foreground, termination); (3) UIViewController: manages a view and its lifecycle — the primary building block of an iOS app's UI; (4) UIView: the base class for all visual elements. Views define layout and drawing. Everything visible is a UIView (or subclass); (5) UIWindow: the top-level container that hosts the view hierarchy. Common UIKit components: UILabel, UIButton, UITextField, UITextView, UIImageView, UITableView, UICollectionView, UIScrollView, UIStackView, UINavigationController, UITabBarController, UIAlertController. View hierarchy: UIWindow → UIView → subviews → sub-subviews. Rendering goes from root to leaves. Auto Layout: constraint-based layout system. Constraints define relationships between views: view.topAnchor.constraint(equalTo: parent.topAnchor, constant: 16).isActive = true. Storyboard vs Programmatic UI: Storyboard — visual editor in Xcode, IBOutlets/IBActions; Programmatic — create views entirely in code (more control, better for teams). Many modern apps use programmatic UI or SwiftUI.

Common Mistake

Don't just define the term — demonstrate that you understand when to use it and when not to. Showing awareness of trade-offs is what separates average from strong Swift & iOS candidates.