Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

4330 bites

Page 135

Difference between .xcodeproj and .xcworkspace, and when to use a workspace
iOS & Swift2 min read

Difference between .xcodeproj and .xcworkspace, and when to use a workspace

Tests your mental model of Xcode build containers. A project defines one buildable unit; a workspace groups multiple projects so they build together and share derived data. Use it for package managers or modular codebases.

What LLDB command prints a UIView description versus an Int?
iOS & Swift2 min read

What LLDB command prints a UIView description versus an Int?

Tests LLDB formatting at breakpoints. Great answers: po invokes description or debugDescription on objects, while p evaluates and prints raw primitive values with type info. Red flag: mixing them up or recommending console print instead of LLDB.

What is an Xcode Scheme? How do you configure a custom one?
iOS & Swift2 min read

What is an Xcode Scheme? How do you configure a custom one?

This tests Xcode build orchestration. A scheme is a blueprint for build, test, run, profile, analyze actions; a strong answer covers duplicating it, setting launch arguments, and staging configs. A red flag is confusing schemes with build configurations.

Explain symbolic breakpoints and debug Auto Layout with one
iOS & Swift2 min read

Explain symbolic breakpoints and debug Auto Layout with one

Tests debugging closed-source frameworks without source lines. A strong answer says a symbolic breakpoint stops on UIViewAlertForUnsatisfiableConstraints, then checks the backtrace or log to find the bad view.

Which Instrument diagnoses scroll stuttering and dropped frames?
iOS & Swift2 min read

Which Instrument diagnoses scroll stuttering and dropped frames?

Tests whether you connect UI jank to Instruments data. A strong answer names the Core Animation or Time Profiler instrument, cites frame duration and hitch ratio, and correlates spikes with main-thread work.

How does Debug Memory Graph find leaks and retain cycles?
iOS & Swift2 min read

How does Debug Memory Graph find leaks and retain cycles?

This tests knowledge of Xcode's heap visualization versus allocation sampling. A strong answer notes the graph shows objects, draws retain cycles as loops, and contrasts with Leaks time-based sampling. Red flag: expecting leak flags without inspection.

What build settings improve Time Profiler symbols in Release builds?
iOS & Swift2 min read

What build settings improve Time Profiler symbols in Release builds?

This tests debug symbol control in Xcode Release builds. Set DEBUG_INFORMATION_FORMAT to DWARF with dSYM, avoid stripping, citing larger size and slower links. Red flag: suggesting you disable optimizations, invalidating the performance profile.

How would you use Energy Log to investigate battery drain?
iOS & Swift2 min read

How would you use Energy Log to investigate battery drain?

Tests correlating Instruments energy metrics to app behavior. Strong answers profile with Energy Log, map CPU/Location/Network spikes to user flows or background work, and validate fixes with before/after logs. Red flag: blaming the OS without evidence.

When should you use frame-based layout versus Auto Layout?
iOS & Swift2 min read

When should you use frame-based layout versus Auto Layout?

Frames suit static or high-frequency UI like particle systems; Auto Layout handles rotation, Dynamic Type, localization, and split screen.

What is @State in SwiftUI and how does it affect the view?
iOS & Swift2 min read

What is @State in SwiftUI and how does it affect the view?

Tests declarative data flow ownership. A strong answer defines @State as private value-type storage owned by the view that triggers a body re-evaluation on mutation. Red flag: confusing it with external data sources like @ObservedObject or @Binding.

UIViewController lifecycle states: network vs geometry updates
iOS & Swift2 min read

UIViewController lifecycle states: network vs geometry updates

Tests UIViewController lifecycle states and separation of data vs layout. Strong answers list loadView to viewDidDisappear, start network in viewDidLoad or viewWillAppear, and geometry in viewDidLayoutSubviews. Red flag: network calls inside layout methods.

How do UITableView and UICollectionView reuse cells?
iOS & Swift2 min read

How do UITableView and UICollectionView reuse cells?

This tests your understanding of UIKit's flyweight pattern and scroll performance. A strong answer covers the reuse pool, dequeueReusableCell mapping identifiers to new index paths, and registration.

Compare UIKit Auto Layout and SwiftUI layout systems
iOS & Swift2 min read

Compare UIKit Auto Layout and SwiftUI layout systems

Tests imperative versus declarative layout paradigms. Contrast UIKit's constraint solver with SwiftUI's two-pass sizing and composition via stacks and modifiers instead of anchors. Red flag: claiming SwiftUI uses Auto Layout under the hood.

Differences between @State, @Binding, @ObservedObject, and @EnvironmentObject
iOS & Swift2 min read

Differences between @State, @Binding, @ObservedObject, and @EnvironmentObject

Tests SwiftUI state ownership and propagation. @State owns local value types; @Binding borrows for two-way edits; @ObservedObject accepts an external ObservableObject; @EnvironmentObject reads one from the environment.

Integrate SwiftUI into UIKit and wrap UIKit for SwiftUI
iOS & Swift2 min read

Integrate SwiftUI into UIKit and wrap UIKit for SwiftUI

Tests bridging architecture between UIKit and SwiftUI using UIHostingController and UIViewRepresentable. A strong answer names hosting controllers for SwiftUI in UIKit, representable protocols for UIKit in SwiftUI, and lifecycle hooks.

iOS & Swift1 min read

How does Auto Layout resolve constraints?

Auto Layout solves a system of prioritized linear equations; intrinsicContentSize is a view's natural size; hugging resists growing, compression resistance resists shrinking.

iOS & Swift1 min read

How do you build a custom SwiftUI Layout?

Conform to Layout, implement sizeThatFits to report the container size for a proposal, and placeSubviews to position each subview using its measured size.

iOS & Swift1 min read

Describe the iOS app lifecycle and SceneDelegate methods

Not running, inactive, active, background, suspended; SceneDelegate handles sceneDidBecomeActive, sceneWillResignActive, sceneDidEnterBackground, sceneWillEnterForeground.

iOS & Swift1 min read

Explain UIKit MVC and the Massive View Controller problem

Model holds data, View displays it, Controller mediates between them; the view controller accretes networking, parsing, and logic into a Massive View Controller.

How do AppDelegate and SceneDelegate responsibilities differ?
iOS & Swift2 min read

How do AppDelegate and SceneDelegate responsibilities differ?

AppDelegate owns process events (launch, push); SceneDelegate owns per-window lifecycle and UI.