Code Examples

Swift Code Examples and Snippets

To receive Free Weekly Video Tutorials on Mobile App Development with Swift Programming Language, please subscribe to this blog. And yes :), bookmark and share this page with your friends because new swift code snippets are being added every day. Please subscribe, let’s stay in touch!

If you are interested in video lessons on how to write Unit tests and UI tests to test your Swift mobile app, check out this page: Unit Testing Swift Mobile App

Classes in Swift 

Functions in Swift

Swift Closures

Dictionaries in Swift 

Arrays in Swift

Strings

Storing Data, Writing, and Reading in Swift

Error Handling in Swift

Date and DateComponents

Background Threads in Swift

Buttons in Swift

Working UITextField in Swift

UITextView

UISwitch in Swift

UISlider

Working with UIView

UIStepper

UISegmentedControl

UINavigationBar

UIImageView & UIImage

UIWebView

WKWebView

UIDatePicker

UIImagePickerController

UIActivityIndicatorView

UITabBarController

UIAlertController or Dialog messages in Swift

UITableView

UICollectionView

Presenting ViewController(s)

Network Communication  

Screen size and device orientation 

AVPlayerAVPlayerItem and AVPlayerLayer. Play Music. 


CoreLocation and MapKit

Amazon AWS

Facebook SDK for iOS

Touch ID Verification

Regular Expressions

Local and Remote Notifications

Determine Current iOS Device Model Name