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

Swift Arrays

In Swift, the three main collection types for storing multiple values are Array, Set, and Dictionary.

This page focuses on the basics of working with Swift Arrays, one of the most commonly used collection types in Swift development.

  • Swift Arrays - Modify and Add Elements
    • The Basics of Swift Arrays
    • Accessing Array Elements
    • Accessing Elements with Ranges
    • Changing Values in an Array
    • Adding Elements with append()
    • Combining Arrays with append()
    • Inserting Elements with insert()
  • Swift Arrays - Removing Elements
    • Removing by Index with remove()
    • Removing a Range with removeSubrange()
    • Removing the First Element with removeFirst()
    • Removing the Last Element with removeLast()
    • Removing All Elements with removeAll()
    • Removing Elements by Value with removeAll(where:)
  • Swift Arrays - Count and Element Positions
    • Getting the Number of Elements with count
    • Checking if an Array is Empty with isEmpty
    • Finding Positions with firstIndex() and lastIndex()
    • Checking for an Element with contains()
  • Swift Arrays - Sorting Elements
    • Sorting with sort()
    • Sorting Structs and Class Objects
    • Getting a Sorted Array with sorted()
    • Reversing the Order with reverse()
  • Swift Arrays - Loops, map, and filter
    • Looping Through an Array
    • Transforming Elements with map()
    • Filtering Elements with filter()
  1. Home
  2. Swift for Beginners

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

Site Info

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