iOS Development for Beginners iOS Development for Beginners
  • iOS App Development
  • Swift for Beginners
  1. Home
  2. Swift for Beginners

Swift Dictionaries

In Swift, the main data types for storing collections of values are Array, Set, and Dictionary.

Here we will explain the basics of using Swift Dictionaries.

  • Swift Dictionary - Creating, Updating, and Adding Key-Value Pairs
    • The Basics of Swift Dictionaries
    • Accessing Values in a Dictionary
    • Updating Values in a Dictionary
    • Adding Key-Value Pairs to a Dictionary
  • Swift Dictionary - Removing Key-Value Pairs
    • Removing a Key-Value Pair with removeValue()
    • Removing All Key-Value Pairs with removeAll()
  • Swift Dictionary - Count and Key Existence
    • Getting the Number of Key-Value Pairs with count
    • Checking if a Dictionary is Empty with isEmpty
    • Checking if a Dictionary Contains a Key
  • Swift Dictionary - Loops, mapValues, and filter
    • Looping Through Keys and Values in a Dictionary
    • Looping Through Keys Only or Values Only
    • Generating a Dictionary with Transformed Values Using mapValues()
    • Generating a Dictionary with Filtered Key-Value Pairs Using filter()
  1. Home
  2. Swift for Beginners

iOS Development Environment

  • What You Need for iOS App Development
  • What is Xcode?
  • How to Use Xcode
  • Xcode - How to Show the Object Library
  • About the Apple Developer Program
  • How to Manage Environment Settings with Build Configurations & Schemes in Xcode
  • How to Install iOS Apps Wirelessly on iPhone from Xcode

iOS App Development

  • How to Add and Use Custom Fonts in Xcode
  • How to Set an iOS App Icon in Xcode

Swift for Beginners

  • First Swift Program
  • Swift Comments
  • Swift Variables
  • Swift Basic Data Types
  • Swift Strings
  • Swift Operators
  • Swift Naming Conventions
  • Swift Arrays
  • Swift Sets
  • Swift Dictionaries
  • Swift Tuples
  • Swift if Statement
  • Swift switch Statement
  • Swift for Loop
  • Swift while Loop
  • Swift Optional
  • Swift Type Checking and Casting
  • Swift Functions
  • Swift Enums
  • Swift Structs
  • Swift Classes
  • Swift defer Statement
  • Swift Property Observers
  • Swift Extensions

Swift Tips

  • How to Convert a Date to a Formatted String in Swift
  • How to Read and Write JSON in Swift
  • How to Extract Data from JSON Using a Dictionary
  • How to Parse XML with XMLParser
  • How to Convert Between UIImage and Base64 String
  • How to Check if a UITextField is Empty
  • How to Extract an Object by Property Value from an Array
  • How to Create a Comma-Separated String from an Array

Site Info

  • Privacy Policy
© 2025 iOS Development for Beginners 日本語 | English