---
title: "init(tileSet:columns:rows:tileSize:fillWith:)"
framework: spritekit
role: symbol
role_heading: Initializer
path: "spritekit/sktilemapnode/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.

## Declaration

```swift
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

Return Value A new tile map node.

## Discussion

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.

## See Also

### Creating a Tile Map

- [init(tileSet:columns:rows:tileSize:)](spritekit/sktilemapnode/init(tileset:columns:rows:tilesize:).md)
- [init(tileSet:columns:rows:tileSize:tileGroupLayout:)](spritekit/sktilemapnode/init(tileset:columns:rows:tilesize:tilegrouplayout:).md)
- [tileMapNodes(tileSet:columns:rows:tileSize:from:tileTypeNoiseMapThresholds:)](spritekit/sktilemapnode/tilemapnodes(tileset:columns:rows:tilesize:from:tiletypenoisemapthresholds:).md)
