detroit-labs / irlsize Goto Github PK
View Code? Open in Web Editor NEWA library for determining the actual physical size of pixels on an iOS device.
License: MIT License
A library for determining the actual physical size of pixels on an iOS device.
License: MIT License
Hi @SlaunchaMan ๐๐ผ!
I'm currently developing an application for medical purpose. I have some screens on which I have to display elements in millimeters regardless the device.
First thanks for your library it really helped me ๐
But I didn't anticipate that your library is based on constant that you have to update every time a new apple device is released.
What I understand is that for doing the conversion from millimeters to points, we need the physical size of the device.
I can't guaranteed to my client that our application will work with future apple devices.
Our release process is very long. For each release, we have to follow a process that can take several days/weeks...
So creating a new release for every new iPhone is a process that we would like to avoid.
I see that providing the real physical size of a device is not provided in iOS SDK. This is why you have to maintain a list of constant.
Is there a way to do the conversion from millimeters to points without maintaining constants for each device ?
Or are we condemned to deal with this limitation ?
Thanks for your answers and help ๐
Is it possible to apply this framework to a UIImage? I want to resize an image to 152 mm x 203 mm for printing on paper?
Would it be possible to add the content of SDVersion to your library as the dependency to that pod is useless unless it's maintained.
It has not been updated for the latest iPhones.
I've a measure in inch and I want convert it to a frame size; how do I do it ? it's not obvious from the documentation; there is no UnitLength that can be associated to the current device "point" size
let desiredWidth = Measurement(value: 10, unit: UnitLength.inches)
let desiredHeight = Measurement(value: 10, unit: UnitLength.inches)
let size = CGSize(width: ??, height: ??)
thanks in advance
Hi!
Thanks for the great work!
I have a q: Is there a certain reason you upped the deployment target to 10.0? I used the lib previously (I think 0.4.3) and it was compatible with 8.0. Most apps need at least compatibility with 9.0 nowadays..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.