<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKTileMapNode/init(tileSet:columns:rows:tileSize:fillWith:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTileMapNode(im)initWithTileSet:columns:rows:tileSize:fillWithTileGroup:"
  },
  "title" : "init(tileSet:columns:rows:tileSize:fillWith:)"
}
-->

# init(tileSet:columns:rows:tileSize:fillWith:)

Creates and initializes a tile map node using the provided tile set with a specified number of columns and rows.

```
init(tileSet: SKTileSet, columns: Int, rows: Int, tileSize: CGSize, fillWith tileGroup: SKTileGroup)
```

## Parameters

`tileSet`

The tile set that is used to render the tiles.

`columns`

The number of columns in the map.

`rows`

The number of rows in the map.

`tileSize`

The size of each tile in points.

`tileGroup`

The tile group to fill the tile map with.

## Return Value

A new tile map node.

## Discussion

For a grid set type, the overall size, in points, of the node will be `numberOfColumns` * `tileSize.width` wide and `numberOfRows` * `tileSize.height` high. This initializer fills each tile with a texture defined by the descriptors in the final `SKTileGroup` argument.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)