Skip to content

A set of blog posts about Swift Coding

Notifications You must be signed in to change notification settings

claytog/SwiftCoding

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Coding

A collection of blog posts about Swift coding

I hope this set of articles is of use to you!

Photo by Drew Hays on Unsplash
Photo by Mad Rabbit Tattoo on Unsplash

For the best free guide for Swift coding use CS193p, a wholly online course focussing on SwiftUI.

Articles

Quick Guides

The UITableView Example
The Programmatic UITableView Example
init
Create a UICollectionView programmatically
Create a UITableViewCell programmatically

Beginner

Using a XIB File with a UIView Subclass
The Only UIStackView Guide You Will Ever Need
Imperative vs. Declarative Swift Programming
Default Arguments
Write Programmatic Constraints for Swift Projects
Ranges in Swift
Property Observers in Swift
Zip and Zip2Sequence in Swift
Overcoming Default Arguments in a Protocol
Make it snow!
Swift Lint installation
Storyboard Constraints
Simply Optionals
Functions
Overriding
Properties
TableViewTwoOneViewController
Index Out of Range Exception: The Swifty solution
For Loop
Remove elements from an array during enumeration
Enums
let or var in Swift, and why it absolutely matters
The Remainder Operator
Divide and Conquer Algorithms Using Swift
The Inspector Bar in Xcode
Create UISteppers in Swift (Tutorial)
All Your Outlets Should Be Private
Use SwiftUI Previews in UIKit
My Computer Can't Count
Connect Storyboard Objects to Code
Use Swift Package Manager to Add Dependencies
Which Way is Up? Normalized Coordinates in Swift
Swift Helper Functions

Easy

SEE Retain Cycles in Xcode
New Features for iOS 14: SwiftUI
|Hello, World" SwiftUI
Text Scroll with SwiftUI
|Create a Horizontally Scrolling UICollectionView with Dynamic Cell Sizes
Debug using Breakpoints in Xcode
Use lldb to Dynamically Change Code in Xcode
The Singleton
viewDidLoad() Vs. loadView()
Core Data with SwiftUI
The UINavigationController and UINavigationBar in Swift
Use Charles to Rewrite Responses Developing iOS Apps
Stack Overflow's Most Downvoted Swift Question
Using Swift's CustomStringConvertible
Segues in Swift
Visual Memory Debugger
Swift initializers
Initialising a view controller from a test using Swift
Using IBDesignable and IBInspectable in Swift
Detect iOS Shake Gestures: Swift
Create a CustomUITableViewCell in a UITableView
Handle Button Presses in CustomUITableViewCells Without Tags
Stride in Swift
Listing enum cases using CaseIterable in Swift
NSAttributedString vs NSMutableAttributedString
Overriding the default font in Swift
Common errors when using custom fonts in your iOS App
Learning UITesting using Xcode
Gradients in Swift
Using Git with Xcode
A Swift YogaKit Guide to Flexbox
A Localize Swift Tutorial
Memory leaks using the Xcode memory graph debugger
MVC in Swift
UIScrollView with Auto Layout implemented in Interface builder
Access control in Swift
FibonacciSeriesInDepth
CleanUITableViewControllers
WOOT! Supercharge Result Type using Swift's get()
What is intrinsicContentSize Anyway?
Containing Child View Controllers for iOS Apps
Lazy Loading images
Sorting Dictionaries
Fix Those Annoying Separator Lines in Swift
Coping with a long parameter list in Swift
Why Do We Call Super When Making iPhone Apps?
Why Use LayoutSubviews Anyway?
Subclass or Extend classes in Swift
Copy-On-Write
Can You Write Pure Functions in Swift?
Decode JSON Like A PRO
View Tags
Create a Custom UIAlertView in Swift
Multiple Initializers
A Basic UISearchViewController (Swift Tutorial)
Stop SPAMMING your API from a UISearchController
Views shouldn't know about threads
The UIPickerView Guide (Swift Tutorial)
SwiftUI Property Wrappers
A Mixed Economy: Xib and Storyboards
A Gradient Layer Below a UITableView
I've finally mastered Case Let

Normal

Semaphores
Throw inside a closure
A Networking Manager with Alamofire
Use OperationQueue to Chain API Calls in Swift
Did Apple Kill UITableView? - UICollectionView Lists
Property Wrappers
Compositational Layouts
MVVM-C
MVC
VIPER
Theoretical VIPER
MVVM
MVVM RxSwift
The MVI Architecture Pattern in Swift
Using Redux and Swift
Loading Animation
The Only CAGradientLayer Guide You Will Ever Need
Combine and URLSession in UIKit
Parallel Programming with Operation and OperationQueue in Swift
Dark Mode iOS
iOS11 Compatibility
KeyPaths
Swift Package
ThreadSafeArray
ServiceLocator Pattern
StatePreservation
Cache URLResponses in Swift
MVVM Dependency Injection using Storyboards
Recreate the SwiftUI Sandwiches WWDC demo
Use SwiftUI in a Playground
Write a Network Layer in Swift
Encode Behaviors into Reusable View Controllers
Embed a UICollectionView Inside a UITableView
A UIGestureRecognizer tutorial
Decode JSON in Swift: A Full Micro-Project
Dependency Injection using Storyboards
Using Data Transfer Objects (DTO) in Swift Code
Do enum Types Conform to Hashable in Swift?
Two-phase Initialization in Swift
Annotation
Namespacing
Extensions
A Practice OAuth Token with Postman and Swift
Mocking Network Calls in Swift
hitTest(_:with:) vs point(inside:with)
Generics in Swift
How to Test Asynchronous Functions Using Expectation in Swift
downloadTask(with:completionHandler:) vs. dataTask(with:completionHandler:)
Test Driven Development (TDD) in Swift
Debug with the DEBUG preprocessor macro in Xcode
A SwiftMonkey Tutorial
If you’re using a base class in Swift, you’re doing it wrong
MVVM with RXSwift
Learning Dependency Injection using Swift
Injecting Services into Swift Apps for testing
MVVM: A Tutorial and Practical Example in Swift
Can you use Swift to replace a UIPageView with a UICollectionView?
A NSNotificationCenter implementation in Swift
An animated UIPageControl — from scratch in Swift
Your own subscript in Swift
The hidden workings of UITableView
Using NSNotificationCenter in Swift
Create your own backend while developing a Favourites Section
Handle TimeStamps
DispatchGroups to group API calls in Swift
THIS is how to store money and currency using Swift
Create a CurrencyField in SwiftUI (MINUS UIKit)
Using Type-Safe Identifiers in Swift
Create Instagram's Pinch to Zoom using Swift
Create a SwiftUI Tip Calculator
Create an Image Carousel Using Swift
iTerm
The MVP Architecture for iOS
Pass The Swift Code Review: Dictionary Edition
Play Video in a UICollectionView
Using SwiftUI Views with UIKit
The MVP iOS Architecture with Coordinators
Reuse a UITableViewCell as a UIView
Implement a Service-Oriented Architecture in Swift 5
SwiftUI Authentication
Implement Optional Protocol Methods in Swift
Idempotence
Pass Parameters in Tap Gestures
A Screaming Architecture for iOS Projects
Public Getters and Private Setters in Swift
Bézier Path and Curves Using Core Graphics

Challenging

TypeErasure
TwoWayBinding
Track My Movement: A RxSwift Project
Secure iOS Apps Through App Pinning
Create Flexible Components in Swift
Animate Swift's button labels
)

Core Data
The Core Data Stack: Persistent Store Types
Learning the Basics of Core Data
Core Data: Using Codable
NSPredicate with Core Data
Core Data Basics: Testing

Tips

What Is The Difference Between @escaping and @nonescaping Closures in Swift
Throw or Rethrow that Error?
How Implicit Return Types Removed that Annoying Swift Inconsistency
Code snippets
Playgrounds
Parse JSON without knowing the type
Get a Comma Separated List From An Array
That little Swift Bug: Protocol Customization Points
Shorthand Parameters in Swift

Theory

Kruskal's Algorithm
WWDC Notes: Keynote
WWDC Notes: Platforms
Semantic Versioning
SOLID principles
Writing FIRST Swift Tests
Union Find
Favor composition over inheritance — in Swift
Tries
LinkedLists
KVO vs NotificationCenter

Design Patterns

The Mediator Design Pattern
The Single Responsibility Principle
The Factory Pattern
The Façade Design Pattern in Swift
The Adaptor Design Pattern

LeetCode

Leetcode Weekly Contest 194 Swift solutions
Leetcode Weekly Contest 195 Swift solutions
Leetcode Weekly Contest 197 Swift solutions
Leetcode Weekly Contest 216 Swift solutions
Leetcode Weekly Contest 217 Swift solutions
PrefixSum
Using an Array as a built in index for LeetCode problems
Swift: Using BFS for LeetCode problems
Swift: Using Depth-First Search for LeetCode Problems
Swift: DP (draft)
Swift: Playgrounds are Worthwhile for LeetCode
Two Sum / Three Sum (draft)
Avoid Playgrounds, for Swift LeetCode challenges

Get in touch

I'm usually around on Twitter

Feel free to sign up to my newsletter

About

A set of blog posts about Swift Coding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 98.6%
  • Makefile 0.9%
  • Ruby 0.5%
  • Objective-C 0.0%
  • Java 0.0%
  • Shell 0.0%