There HAS to be a better way : Insert Rows into a Swift Dictionary

I have a dictioary that uses a hashed compound key

 struct Key: Hashable {
        let row    : UInt16
        let column : UInt16
    }

I need to insert “rows” based on that key structure. So I need to insert a new row between the existing row #9 and row #10, this means I need to increment the row component of all existing dictionary entries where the current row is >=10 … so (10 becomes 11 , 11 becomes 12).

I’m NOT sure they can be incremented in place (ie. 10 becomes 11, then that same one becomes 12 etc)

So my current process is to build a clone of the dictionary, altering the keys for it, the moving it back to the original structure

 public final func insertRow(_ at: UInt16,_ items:[String]=[]) {
        var tempSpreadSheet = [Key    : cellRecord]()
        //
        // Move records into a temp dictionary, altering keys as required
        //
        // Step 01 : build tempSpreadSheet [key = [UInt16:UInt16]
        //
        for key in spreadSheet.keys {
            if  key.row >= at {
                let newKey = Key(row:key.row+1,column: key.column)
                tempSpreadSheet[newKey]=spreadSheet[key]
            } else {
                tempSpreadSheet[key]=spreadSheet[key]
            }
        }
        //
        // Step 02: put records back into spreadsheet
        //
        for key in tempSpreadSheet.keys {
            spreadSheet[key]=tempSpreadSheet[key]
        }
        //
        // Step 03 : add the new row
        //
        addRowAT(items,atRow:Int(at))
    }
    //

Is that the best way to accomplish this. If if were an array, it could be sorted and iterated in reverse, but this is a dictionary, and the physical order is unknown

In C# one would use a SortedDictionary and it just keeps itself in order by the key. I wonder if there isn’t something equivalent in Swift; it doesn’t look like this dictionary is guaranteed to maintain any particular order, it’s for looking values up by key, not ordering them. If it’s not part of the Swift standard libs the someone must have authored a solution by now.

Or … maybe you really need a linked list and a dictionary is the wrong paradigm.

not sure how a sorted dictionary would help matters (Swift btw doesn’t have one, but I can make an array of sorted keys).

The existing keys of records greater than the insert point still have to be altered

The reason I’m using a Dictionary is to use it as a sparse array. Only “cells” that have substance need be stored … Think a spreadsheet with lots of empty cells