2.2.0 • Published 4 years ago
ios-dimensions v2.2.0
ios-dimensions
📏 ️A collection of dimensions from iOS.
🔗 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-dimensionsnpm
npm install ios-dimensionsUsage
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.