This package has been deprecated

Author message:

This project has been renamed to Dimmmensions. Install using dimmmensions instead.

ios-dimensions
TypeScript icon, indicating that this package has built-in type declarations

2.2.0 • Public • Published

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.

Package Sidebar

Install

npm i ios-dimensions

Weekly Downloads

9

Version

2.2.0

License

MIT

Unpacked Size

123 kB

Total Files

34

Last publish

Collaborators

  • marcbouchenoire