uikit

UIKit Auto Layout programmatically

Auto Layout creates flexible UIs that adapt to different screen sizes and orientations. I define constraints programmatically using NSLayoutConstraint or anchors. The anchor API is more readable—view.topAnchor.constraint(equalTo: parent.topAnchor). Se

UIKit UITableView with diffable data source

Diffable data sources modernize UITableView and UICollectionView, automatically calculating and animating changes. Instead of manually calling insert/delete methods, I create snapshots with current state and apply them. The framework diffs snapshots a

UIKit delegates and protocols

Delegates enable objects to communicate events and customize behavior. The delegate pattern uses protocols to define a contract—I create a protocol with optional and required methods, and the delegating object holds a weak reference to avoid retain cy