🦇 Swift Programs
105 Essential Programs from Beginner to Advanced
Your Progress
Filter by Category
Filter by Level
Hello World
#1Print Hello World
Add Numbers
#2Add two variables
String Interpolation
#3Print variables inside string
Even or Odd
#4Check even or odd
Largest of Two
#5Find largest number
Factorial
#6Find factorial of an integer
Fibonacci
#7Print Fibonacci series
Reverse String
#8Reverse a string
Palindrome String
#9Check palindrome
Sum of Array
#10Find sum of array elements
Count Vowels
#11Count vowels in a string
Leap Year
#12Check if leap year
Switch Case
#13Using switch for grades
Random Number
#14Generate random Int
Dictionary Basics
#15Key value pairs
Optionals
#16Safely unwrap optional
Function Basics
#17Simple function
Set Basics
#18Unique items
Struct Basics
#19Value types
For Each
#20Iterate array
Map Array
#21Transform array
Filter Array
#22Filter elements
Reduce Array
#23Aggregate elements
Class Basics
#24Reference types
Inheritance
#25Subclassing
Protocol
#26Define requirements
Extensions
#27Extend existing types
Enums
#28Value types with cases
Enum with Associated Value
#29Enums holding data
Guard Statement
#30Early exit
Defer Statement
#31Execute at scope exit
Tuples
#32Group values
Mutating Structs
#33Modify struct properties
Computed Properties
#34Getter/setter
Property Observers
#35willSet/didSet
Typecasting
#36as, as?, as!
Nil Coalescing
#37Default value for optional
Closures
#38Functions as variables
Compact Map
#39Discard nil values
Lazy Variables
#40Initialize on first use
Generics
#41Template types
Error Handling
#42do/try/catch
Custom Operators
#43Define new operators
Subscripts
#44Custom indexing
Access Control
#45private/public
FlatMap
#46Flatten nested arrays
Any vs AnyObject
#47Type erasure
Set Intersection
#48Common items
Binary Search
#49O(log n) search
Bubble Sort
#50O(n^2) sort
Property Wrappers
#51@propertyWrapper
Opaque Types
#52some Protocol
Associated Types
#53Protocols with generic types
Actors
#54Concurrency safe types
Async/Await
#55Modern concurrency
Task Groups
#56Concurrent child tasks
Global Actors
#57@MainActor
Dynamic Member Lookup
#58@dynamicMemberLookup
Dynamic Callable
#59@dynamicCallable
KeyPaths
#60Reference properties
Result Type
#61Result<Success, Failure>
Custom Sequences
#62Sequence Protocol
Codable
#63JSON encode/decode
Custom Coding Keys
#64Map JSON keys
Deinitializers
#65deinit
ARC Weak
#66Prevent reference cycles
ARC Unowned
#67Unowned references
Capture Lists
#68[weak self]
Method Swizzling
#69Runtime manipulation
Macros
#70Swift Macros (Swift 5.9+)
Variadic Parameters
#71Variable length args
Inout Parameters
#72Pass by reference
AnyCancellable
#73Combine framework
CurrentValueSubject
#74Combine reactive
PassthroughSubject
#75Combine streams
SwiftUI State
#76@State
SwiftUI Binding
#77@Binding
ObservableObject
#78Reactive objects
StateObject
#79@StateObject
EnvironmentObject
#80Global state
AppStorage
#81UserDefaults binding
ViewModifier
#82Custom UI Modifiers
GeometryReader
#83Responsive sizes
PreferenceKeys
#84Pass data up hierarchy
MatchedGeometryEffect
#85Hero animations
CoreData Entity
#86NSPersistentContainer
CoreData Fetch
#87NSFetchRequest
FileManager
#88Read/Write Disk
URLSession
#89Network calls
JSONSerialization
#90Legacy JSON
DispatchQueue
#91GCD concurrency
DispatchGroup
#92Wait for multiple tasks
Semaphore
#93Limit concurrent execution
Timer
#94Schedule tasks
NotificationCenter
#95Pub/Sub
NSCache
#96In-memory caching
Dependency Injection
#97Design patterns
Singleton
#98Design patterns
Factory Pattern
#99Design patterns
Observer Pattern
#100Design patterns
MVVM Architecture
#101Model View ViewModel
Clean Architecture
#102Domain logic isolation
Graph DFS
#103Depth First Search
Graph BFS
#104Breadth First Search
Dijkstra
#105Shortest Path
