Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

UIKit Cheat Sheet

UIKit Cheat Sheet

Back to Mobile Development
Updated 2026-03-17
Next Topic: Xcode Cheat Sheet

UIKit is Apple's foundational framework for building user interfaces in iOS, iPadOS, tvOS, and watchOS applications. It provides the window and view architecture needed to display content on screen, the infrastructure to handle user interactions through touch and gestures, and the tools to manage your app's data and content flow. Understanding UIKit is essential even in the SwiftUI era, as many production apps combine both frameworks, and UIKit's view controller lifecycle, Auto Layout system, and collection views remain the standard for complex interfaces.

What This Cheat Sheet Covers

This topic spans 30 focused tables and 247 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: View Hierarchy and Core View ClassesTable 2: UIViewController LifecycleTable 3: Auto Layout - Constraint CreationTable 4: Auto Layout - Properties and GuidesTable 5: UITableView BasicsTable 6: UITableViewCell ConfigurationTable 7: UICollectionView LayoutsTable 8: UINavigationControllerTable 9: View Controller Presentation and Modal StylesTable 10: UITabBarControllerTable 11: Gesture Recognizers - Basic GesturesTable 12: Gesture Recognizer PropertiesTable 13: UIView Animation - Basic MethodsTable 14: Animation Properties and OptionsTable 15: UIViewPropertyAnimatorTable 16: View Controller TransitionsTable 17: Common UI ControlsTable 18: Text Input ControlsTable 19: UIScrollViewTable 20: CALayer BasicsTable 21: Drawing and ShapesTable 22: Layout Update MethodsTable 23: Size Classes and Trait CollectionsTable 24: UIAppearance and StylingTable 25: Responder Chain and Event HandlingTable 26: View Controller ContainmentTable 27: Alert Controllers and Action SheetsTable 28: Additional View ControllersTable 29: Additional UI ComponentsTable 30: UIWindow and Scenes

Table 1: View Hierarchy and Core View Classes

ClassExampleDescription
UIView
let view = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
view.backgroundColor = .red
• The fundamental building block for all visual elements
• manages rectangular area on screen, handles drawing and touch events
addSubview
parentView.addSubview(childView)
• Adds a view as a subview to another view's hierarchy
• the child appears on top of the parent
removeFromSuperview
childView.removeFromSuperview()
• Removes a view from its parent's subview hierarchy
• automatically releases strong references
subviews
let children = parentView.subviews
• Array of all direct child views in the order they were added
• read-only property
superview
if let parent = view.superview { }
• Reference to the immediate parent view
• nil if the view has no parent
bringSubviewToFront
parentView.bringSubviewToFront(childView)
Moves a subview to the top of the view hierarchy so it draws on top of siblings
sendSubviewToBack
parentView.sendSubviewToBack(backgroundView)
Moves a subview behind all other sibling views in the draw order
insertSubview at index
parentView.insertSubview(newView, at: 1)
Inserts a subview at a specific position in the subviews array, controlling z-order

More in Mobile Development

  • SwiftUI Cheat Sheet
  • Xcode Cheat Sheet
  • .NET MAUI Cross-Platform Framework Cheat Sheet
  • Cross-Platform Mobile UI Component Libraries Cheat Sheet
  • Jetpack Compose Cheat Sheet
  • Mobile App Navigation Patterns Cheat Sheet_v1_references
View all 40 topics in Mobile Development