ios-dimensionsdeprecated

A collection of dimensions from iOS devices.

Usage no npm install needed!

<script type="module">
  import iosDimensions from 'https://cdn.skypack.dev/ios-dimensions';
</script>

README

ios-dimensions

📏 ️A collection of dimensions from iOS.

build npm gzipped license

đź”— Explore and preview dimensions in the playground.

Installation

Skypack

<script type="module">
  import { dimensions } from "https://cdn.skypack.dev/ios-dimensions"
</script>

Yarn

yarn add ios-dimensions

npm

npm install ios-dimensions

Usage

dimensions

Import dimensions.

import { dimensions } from "ios-dimensions"

// dimensions: [Dimension, Dimension, Dimension...]

getDimensions

Import getDimensions.

import { getDimensions } from "ios-dimensions"

Given no arguments, getDimensions will also return all dimensions.

const dimensions = getDimensions()

// dimensions: [Dimension, Dimension, Dimension...]

Given a specific width and height, getDimensions will return dimensions that match the specified screen size, either in portrait or landscape.

const dimensions = getDimensions(320, 568)

// dimensions: [Dimension]

Automation

Dimensions are extracted from iOS with the generate command—using Xcode and Simulator.

Related

🔣 ios-symbols: A collection of every symbol from SF Symbols.