Swift Code Examples

 

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 

AVPlayer, AVPlayerItem, and AVPlayerLayer. Play Music. 


CoreLocation and MapKit

Touch ID Verification

Regular Expressions

Local and Remote Notifications

Determine Current iOS Device Model Name