Re: iOS screen physical size (or px density)
In the ideal world, you would scale your content to work on an arbitrarily sized UIView and not worry about actual screen dimensions/density. From my experience, this pays off most in the long run, especially when new devices come out. This involves designing your app so it doesn't use fixed size bitmap images and working toward a design with vector drawing art, or using stretching versions of image artwork. See here for example: -[UIImage resizableImageWithCapInsets:] There was a really great session from a recent WWDC that covered appearance customization. It's the best way to learn how to design your app to use custom artwork correctly and should be required viewing for iOS developers. Unfortunately, I can't discuss this on a public forum due to Apple restrictions on confidential information but registered Apple developers can email me for more info. Again, your time is best spent following best practices before trying to use specifics of an output screen. That said, here are some pointers to getting the actual size of the displays that your device is being output: -[UIScreen currentMode] https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScreen_Class/Reference/UIScreen.html#//apple_ref/occ/instp/UIScreen/currentMode -[UIScreenMode size] -[UIScreenMode pixelAspectRatio] https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScreenMode_class/Reference/Reference.html#//apple_ref/occ/instp/UIScreenMode/ Good luck! Doug Hill On Mon, November 25, 2013 4:40 am, Roland King wrote: Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Roland is 100% correct here. You can't reliably predict what the device identifiers will be and filing bugs is the best way to register your needs. The fact that you could guess device identifiers has more to do with the fact that there have only been 2 released generations of the iPad mini and less to do with any patterns you may think you have seen. -- David Duncan @ My iPhone On Nov 26, 2013, at 8:45 AM, Roland King r...@rols.org wrote: Rubbish. And any reading of the Apple Dev Forums will find many messages from Apple engineers telling you NOT to do that, NOT to guess, NOT to make assumptions based on what you think identifiers are or are going to be and to stick to the API points there are. They also ask people file bug reports with use cases about why one might need the physical device screen size, which I have done. On 26 Nov, 2013, at 9:41 pm, Maxthon Chan xcvi...@me.com wrote: There is no reason for Apple to provide such an clearly redundant API point. Developers can somehow predict the new devices’ identifiers and the sizes are largely correctly guessed so a quick table look-up will work very well. On Nov 26, 2013, at 21:38, Igor Elland igor.ell...@me.com wrote: If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com This email sent to david.dun...@apple.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Maybe you can refer to [UIScreen mainScreen].scale and [UIScreen mainScreen].bounds The scale tells you the pixels per point. The bounds provides you the whole screen size in point. To get the real size per pixel: scale * bounds Cheers Jack.S Mu 2013/11/25 Roland King r...@rols.org Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/jackyseraph%40gmail.com This email sent to jackyser...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
no that just gives you the total number of pixels on the screen, I know that, that's not a problem. That is not the screen physical size (ie X cm x Y cm) and you can't figure out if you want something to be a given physical size, which I did, how many points it should be. In order to know the physical screen size you would need an API point which either returns it directly, or returns the pixel density in px/cm. Anyway I went with the suggestion of an earlier poster and scaled up so it was nearly as big as I wanted on the mini, and bigger than I really wanted on the iPad, both using the same pointsize for the elements. And that's not a bad compromise (in fact on the larger iPad the bigger test cards are very clear and you don't really notice they are .. a bit huge). Problem solved, one interface for either of the two sizes of iPad, and the iPhone was never a problem. I still would like that API point, I shall file a bug which will be duped. On 26 Nov, 2013, at 4:18 pm, Jacky.Seraph Mu jackyser...@gmail.com wrote: Maybe you can refer to [UIScreen mainScreen].scale and [UIScreen mainScreen].bounds The scale tells you the pixels per point. The bounds provides you the whole screen size in point. To get the real size per pixel: scale * bounds Cheers Jack.S Mu 2013/11/25 Roland King r...@rols.org Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/jackyseraph%40gmail.com This email sent to jackyser...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Well you just need to detect the device and the numbers are constant: Screen information: iPhone 2G/3G/3GS, iPod touch 1G/2G/3G: 320x480px, 163dpi iPad mini 1G: 1024x768px, 163dpi iPhone 4/4S, iPod touch 4G: 640x960px, 326dpi iPhone 5/5C/5S, iPod touch 5G: 640x1136px, 326dpi iPad mini 2G: 2048x1536px, 326dpi iPad 1G/2: 1024x768px, 132dpi iPad 3G/4G/Air: 2048x1536px, 264dpi Device model identifier (readable from uname(2)): iPhone1,1 = iPhone 2G iPhone1,2 = iPhone 3G iPhone2,1 = iPhone 3GS iPhone3,* = iPhone 4 iPhone4,1 = iPhone 4S iPhone5,{1..3} = iPhone 5 iPhone5,{4..6} = iPhone 5C iPhone6,* = iPhone 5S iPod1,1 = iPod touch 1G iPod2,1 = iPod touch 2G iPod3,1 = iPod touch 3G iPod4,1 = iPod touch 4G iPod5,1 = iPod touch 5G iPad1,1 = iPad 1G iPad2,{1..4} = iPad 2 iPad2,{5..7} = iPad mini 1G iPad3,{1..3} = iPad 3G iPad3,{4..6} = iPad 4G iPad4,{1..3} = iPad Air iPad4,{4..6} = iPad mini 2G On Nov 26, 2013, at 16:57, Roland King r...@rols.org wrote: no that just gives you the total number of pixels on the screen, I know that, that's not a problem. That is not the screen physical size (ie X cm x Y cm) and you can't figure out if you want something to be a given physical size, which I did, how many points it should be. In order to know the physical screen size you would need an API point which either returns it directly, or returns the pixel density in px/cm. Anyway I went with the suggestion of an earlier poster and scaled up so it was nearly as big as I wanted on the mini, and bigger than I really wanted on the iPad, both using the same pointsize for the elements. And that's not a bad compromise (in fact on the larger iPad the bigger test cards are very clear and you don't really notice they are .. a bit huge). Problem solved, one interface for either of the two sizes of iPad, and the iPhone was never a problem. I still would like that API point, I shall file a bug which will be duped. On 26 Nov, 2013, at 4:18 pm, Jacky.Seraph Mu jackyser...@gmail.com wrote: Maybe you can refer to [UIScreen mainScreen].scale and [UIScreen mainScreen].bounds The scale tells you the pixels per point. The bounds provides you the whole screen size in point. To get the real size per pixel: scale * bounds Cheers Jack.S Mu 2013/11/25 Roland King r...@rols.org Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/jackyseraph%40gmail.com This email sent to jackyser...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com This email sent to xcvi...@me.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
No I clearly said in my very first message I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? If there isn't a proper API point for it, then I'm not doing it. On 26 Nov, 2013, at 9:20 pm, Maxthon Chan xcvi...@me.com wrote: Well you just need to detect the device and the numbers are constant: Screen information: iPhone 2G/3G/3GS, iPod touch 1G/2G/3G: 320x480px, 163dpi iPad mini 1G: 1024x768px, 163dpi iPhone 4/4S, iPod touch 4G: 640x960px, 326dpi iPhone 5/5C/5S, iPod touch 5G: 640x1136px, 326dpi iPad mini 2G: 2048x1536px, 326dpi iPad 1G/2: 1024x768px, 132dpi iPad 3G/4G/Air: 2048x1536px, 264dpi Device model identifier (readable from uname(2)): iPhone1,1 = iPhone 2G iPhone1,2 = iPhone 3G iPhone2,1 = iPhone 3GS iPhone3,* = iPhone 4 iPhone4,1 = iPhone 4S iPhone5,{1..3} = iPhone 5 iPhone5,{4..6} = iPhone 5C iPhone6,* = iPhone 5S iPod1,1 = iPod touch 1G iPod2,1 = iPod touch 2G iPod3,1 = iPod touch 3G iPod4,1 = iPod touch 4G iPod5,1 = iPod touch 5G iPad1,1 = iPad 1G iPad2,{1..4} = iPad 2 iPad2,{5..7} = iPad mini 1G iPad3,{1..3} = iPad 3G iPad3,{4..6} = iPad 4G iPad4,{1..3} = iPad Air iPad4,{4..6} = iPad mini 2G On Nov 26, 2013, at 16:57, Roland King r...@rols.org wrote: no that just gives you the total number of pixels on the screen, I know that, that's not a problem. That is not the screen physical size (ie X cm x Y cm) and you can't figure out if you want something to be a given physical size, which I did, how many points it should be. In order to know the physical screen size you would need an API point which either returns it directly, or returns the pixel density in px/cm. Anyway I went with the suggestion of an earlier poster and scaled up so it was nearly as big as I wanted on the mini, and bigger than I really wanted on the iPad, both using the same pointsize for the elements. And that's not a bad compromise (in fact on the larger iPad the bigger test cards are very clear and you don't really notice they are .. a bit huge). Problem solved, one interface for either of the two sizes of iPad, and the iPhone was never a problem. I still would like that API point, I shall file a bug which will be duped. On 26 Nov, 2013, at 4:18 pm, Jacky.Seraph Mu jackyser...@gmail.com wrote: Maybe you can refer to [UIScreen mainScreen].scale and [UIScreen mainScreen].bounds The scale tells you the pixels per point. The bounds provides you the whole screen size in point. To get the real size per pixel: scale * bounds Cheers Jack.S Mu 2013/11/25 Roland King r...@rols.org Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/jackyseraph%40gmail.com This email sent to jackyser...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com This email sent to xcvi...@me.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
There is not any known public API for that. You can use the device type reading as a default and offer user an calibration option. On Nov 26, 2013, at 21:34, Roland King r...@rols.org wrote: No I clearly said in my very first message I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? If there isn't a proper API point for it, then I'm not doing it. On 26 Nov, 2013, at 9:20 pm, Maxthon Chan xcvi...@me.com wrote: Well you just need to detect the device and the numbers are constant: Screen information: iPhone 2G/3G/3GS, iPod touch 1G/2G/3G: 320x480px, 163dpi iPad mini 1G: 1024x768px, 163dpi iPhone 4/4S, iPod touch 4G: 640x960px, 326dpi iPhone 5/5C/5S, iPod touch 5G: 640x1136px, 326dpi iPad mini 2G: 2048x1536px, 326dpi iPad 1G/2: 1024x768px, 132dpi iPad 3G/4G/Air: 2048x1536px, 264dpi Device model identifier (readable from uname(2)): iPhone1,1 = iPhone 2G iPhone1,2 = iPhone 3G iPhone2,1 = iPhone 3GS iPhone3,* = iPhone 4 iPhone4,1 = iPhone 4S iPhone5,{1..3} = iPhone 5 iPhone5,{4..6} = iPhone 5C iPhone6,* = iPhone 5S iPod1,1 = iPod touch 1G iPod2,1 = iPod touch 2G iPod3,1 = iPod touch 3G iPod4,1 = iPod touch 4G iPod5,1 = iPod touch 5G iPad1,1 = iPad 1G iPad2,{1..4} = iPad 2 iPad2,{5..7} = iPad mini 1G iPad3,{1..3} = iPad 3G iPad3,{4..6} = iPad 4G iPad4,{1..3} = iPad Air iPad4,{4..6} = iPad mini 2G On Nov 26, 2013, at 16:57, Roland King r...@rols.org wrote: no that just gives you the total number of pixels on the screen, I know that, that's not a problem. That is not the screen physical size (ie X cm x Y cm) and you can't figure out if you want something to be a given physical size, which I did, how many points it should be. In order to know the physical screen size you would need an API point which either returns it directly, or returns the pixel density in px/cm. Anyway I went with the suggestion of an earlier poster and scaled up so it was nearly as big as I wanted on the mini, and bigger than I really wanted on the iPad, both using the same pointsize for the elements. And that's not a bad compromise (in fact on the larger iPad the bigger test cards are very clear and you don't really notice they are .. a bit huge). Problem solved, one interface for either of the two sizes of iPad, and the iPhone was never a problem. I still would like that API point, I shall file a bug which will be duped. On 26 Nov, 2013, at 4:18 pm, Jacky.Seraph Mu jackyser...@gmail.com wrote: Maybe you can refer to [UIScreen mainScreen].scale and [UIScreen mainScreen].bounds The scale tells you the pixels per point. The bounds provides you the whole screen size in point. To get the real size per pixel: scale * bounds Cheers Jack.S Mu 2013/11/25 Roland King r...@rols.org Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/jackyseraph%40gmail.com This email sent to jackyser...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com This email sent to xcvi...@me.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription:
Re: iOS screen physical size (or px density)
If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
There is no reason for Apple to provide such an clearly redundant API point. Developers can somehow predict the new devices’ identifiers and the sizes are largely correctly guessed so a quick table look-up will work very well. On Nov 26, 2013, at 21:38, Igor Elland igor.ell...@me.com wrote: If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Rubbish. And any reading of the Apple Dev Forums will find many messages from Apple engineers telling you NOT to do that, NOT to guess, NOT to make assumptions based on what you think identifiers are or are going to be and to stick to the API points there are. They also ask people file bug reports with use cases about why one might need the physical device screen size, which I have done. On 26 Nov, 2013, at 9:41 pm, Maxthon Chan xcvi...@me.com wrote: There is no reason for Apple to provide such an clearly redundant API point. Developers can somehow predict the new devices’ identifiers and the sizes are largely correctly guessed so a quick table look-up will work very well. On Nov 26, 2013, at 21:38, Igor Elland igor.ell...@me.com wrote: If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Then why the hell in the five years of public iOS API, Apple always decided against a public API point for that? To me, I think an API like that suggests possible fragmentation just like what plagued the system you-know-what and Apple clearly does not want that come into happening. Also, reading identifiers for released devices can be quite accurate. On Nov 26, 2013, at 21:45, Roland King r...@rols.org wrote: Rubbish. And any reading of the Apple Dev Forums will find many messages from Apple engineers telling you NOT to do that, NOT to guess, NOT to make assumptions based on what you think identifiers are or are going to be and to stick to the API points there are. They also ask people file bug reports with use cases about why one might need the physical device screen size, which I have done. On 26 Nov, 2013, at 9:41 pm, Maxthon Chan xcvi...@me.com wrote: There is no reason for Apple to provide such an clearly redundant API point. Developers can somehow predict the new devices’ identifiers and the sizes are largely correctly guessed so a quick table look-up will work very well. On Nov 26, 2013, at 21:38, Igor Elland igor.ell...@me.com wrote: If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Can we have a moderator here closing this thread? It clearly devolved into ramblings against policy. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Then why the hell in the five years of public iOS API, Apple always decided against a public API point for that? Probably because there’s no way to accurately know the physical screen size of a device attached via AirPlay or HDMI cable. The API would break in such cases. (And the same argument applies to adding more / less content on iPad mini screen because of its physical dimensions. It’s a bad UX choice IMHO) :: marcelo.alves ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Probably because there’s no way to accurately know the physical screen size of a device attached via AirPlay or HDMI cable. The API would break in such cases. (And the same argument applies to adding more / less content on iPad mini screen because of its physical dimensions. It’s a bad UX choice IMHO) :: marcelo.alves Precisely. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
So I think here is the equation: If you need precise device size, you have to rely on device model, for both built-in and external screens. To make that mapping possible, you need some method of reading the device model and search a database. Reading model number is easy for main device screen and HDMI screen (using uname(2) and I2C respectively) but AirPlay can be trickier. Building such an database is impossible for screens over Airplay or HDMI, let alone display settings on the device may also affect the results. Hence, if your only concern is the main display, read uname(2) and use a small database of Apple devices. On Nov 26, 2013, at 22:36, Igor Elland igor.ell...@me.com wrote: Probably because there’s no way to accurately know the physical screen size of a device attached via AirPlay or HDMI cable. The API would break in such cases. (And the same argument applies to adding more / less content on iPad mini screen because of its physical dimensions. It’s a bad UX choice IMHO) :: marcelo.alves Precisely. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com This email sent to xcvi...@me.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
I would say because the mini is currently 1 year old. Before that we had iPhone and iPad and they had their own per-type resources in storyboard or nib or xib. The switch to a slightly larger iPhone screen was in most cases very elegantly sorted out with autolayout, a technology Apple conveniently introduced at the time, and it works very well. Basically you designed your nib for a device and the size of the controls, in physical terms, didn't change much. Then came the mini. I think there was a reasonable belief that the iPad original size vs iPad mini size wouldn't be an issue. You have the same number of points (and now pixels) on the screen, controls are a little smaller physically but it normally works just scaled, it certainly has for the other projects I have which are deployed on mini. That was a pretty good base case assumption. I finally got to a project where the physical on-screen size of an element makes some difference. So I filed the bug report with the use-case and I hope that there will one-day be an API point for this so views which really care about size can be .. that size (someone surely has wanted to make an iPad ruler, there's a great use-case). Until then, re-designing that one screen for the mini and letting it scale up for the normal iPad worked very well, so perhaps Apple were right in the first place, one iPad size does fit all, just not the size I started with. I stick to public APIs, file bug reports when I think it's lacking and attempt to follow the advice of Apple engineers even when it seems there's a cheap and easy way around them, that normally leads to the most maintainable, sustainable, code. On 26 Nov, 2013, at 10:16 pm, Maxthon Chan xcvi...@me.com wrote: Then why the hell in the five years of public iOS API, Apple always decided against a public API point for that? To me, I think an API like that suggests possible fragmentation just like what plagued the system you-know-what and Apple clearly does not want that come into happening. Also, reading identifiers for released devices can be quite accurate. On Nov 26, 2013, at 21:45, Roland King r...@rols.org wrote: Rubbish. And any reading of the Apple Dev Forums will find many messages from Apple engineers telling you NOT to do that, NOT to guess, NOT to make assumptions based on what you think identifiers are or are going to be and to stick to the API points there are. They also ask people file bug reports with use cases about why one might need the physical device screen size, which I have done. On 26 Nov, 2013, at 9:41 pm, Maxthon Chan xcvi...@me.com wrote: There is no reason for Apple to provide such an clearly redundant API point. Developers can somehow predict the new devices’ identifiers and the sizes are largely correctly guessed so a quick table look-up will work very well. On Nov 26, 2013, at 21:38, Igor Elland igor.ell...@me.com wrote: If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
If you read the data sheet I sent, you will find out that iPad mini have the same pixel density as iPhones, iPad mini 1G = iPhone 2G and iPad mini 2G = iPhone 4. So the situation would be that on iPad mini the developers may want to use iPhone-sized UI with an iPad-sized layout. On Nov 26, 2013, at 22:51, Roland King r...@rols.org wrote: I would say because the mini is currently 1 year old. Before that we had iPhone and iPad and they had their own per-type resources in storyboard or nib or xib. The switch to a slightly larger iPhone screen was in most cases very elegantly sorted out with autolayout, a technology Apple conveniently introduced at the time, and it works very well. Basically you designed your nib for a device and the size of the controls, in physical terms, didn't change much. Then came the mini. I think there was a reasonable belief that the iPad original size vs iPad mini size wouldn't be an issue. You have the same number of points (and now pixels) on the screen, controls are a little smaller physically but it normally works just scaled, it certainly has for the other projects I have which are deployed on mini. That was a pretty good base case assumption. I finally got to a project where the physical on-screen size of an element makes some difference. So I filed the bug report with the use-case and I hope that there will one-day be an API point for this so views which really care about size can be .. that size (someone surely has wanted to make an iPad ruler, there's a great use-case). Until then, re-designing that one screen for the mini and letting it scale up for the normal iPad worked very well, so perhaps Apple were right in the first place, one iPad size does fit all, just not the size I started with. I stick to public APIs, file bug reports when I think it's lacking and attempt to follow the advice of Apple engineers even when it seems there's a cheap and easy way around them, that normally leads to the most maintainable, sustainable, code. On 26 Nov, 2013, at 10:16 pm, Maxthon Chan xcvi...@me.com wrote: Then why the hell in the five years of public iOS API, Apple always decided against a public API point for that? To me, I think an API like that suggests possible fragmentation just like what plagued the system you-know-what and Apple clearly does not want that come into happening. Also, reading identifiers for released devices can be quite accurate. On Nov 26, 2013, at 21:45, Roland King r...@rols.org wrote: Rubbish. And any reading of the Apple Dev Forums will find many messages from Apple engineers telling you NOT to do that, NOT to guess, NOT to make assumptions based on what you think identifiers are or are going to be and to stick to the API points there are. They also ask people file bug reports with use cases about why one might need the physical device screen size, which I have done. On 26 Nov, 2013, at 9:41 pm, Maxthon Chan xcvi...@me.com wrote: There is no reason for Apple to provide such an clearly redundant API point. Developers can somehow predict the new devices’ identifiers and the sizes are largely correctly guessed so a quick table look-up will work very well. On Nov 26, 2013, at 21:38, Igor Elland igor.ell...@me.com wrote: If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
On 26 Nov 2013, at 15:51, Roland King r...@rols.org wrote: Until then, re-designing that one screen for the mini and letting it scale up for the normal iPad worked very well, so perhaps Apple were right in the first place, one iPad size does fit all, just not the size I started with. I think following the HIG specifications for size really helps here, when there’s nothing smaller than the smallest suggested sizes, they do translate fairly well. But if you have really busy UIs with smaller controls than the HIG recommends, than designing “for the Mini first” should help prevent and elucidate such cases. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Your data sheet is pointless if there is no way, using public, future-proof, Apple-provided API, to reliably figure out where in that datasheet you are. If I wanted to hack my way around the Apple ecosystem I wouldn't have asked the question, I'm perfectly capable of tabulating current devices, their screen resolutions, current sizes and device IDS, guessing what might happen in the future and putting lots of ifs in my layout. But that wasn't my question and it isn't how I work, I didn't ask for a hack, I asked if there was yet an Apple-supported API to deduce this information programatically, directly, and there still isn't. So I did the next best thing and gave up the idea of having fixed-world-sized views between ipad and ipad mini and found one screen size which works ok for either; then filed the bug report. On 26 Nov, 2013, at 10:54 pm, Maxthon Chan xcvi...@me.com wrote: If you read the data sheet I sent, you will find out that iPad mini have the same pixel density as iPhones, iPad mini 1G = iPhone 2G and iPad mini 2G = iPhone 4. So the situation would be that on iPad mini the developers may want to use iPhone-sized UI with an iPad-sized layout. On Nov 26, 2013, at 22:51, Roland King r...@rols.org wrote: I would say because the mini is currently 1 year old. Before that we had iPhone and iPad and they had their own per-type resources in storyboard or nib or xib. The switch to a slightly larger iPhone screen was in most cases very elegantly sorted out with autolayout, a technology Apple conveniently introduced at the time, and it works very well. Basically you designed your nib for a device and the size of the controls, in physical terms, didn't change much. Then came the mini. I think there was a reasonable belief that the iPad original size vs iPad mini size wouldn't be an issue. You have the same number of points (and now pixels) on the screen, controls are a little smaller physically but it normally works just scaled, it certainly has for the other projects I have which are deployed on mini. That was a pretty good base case assumption. I finally got to a project where the physical on-screen size of an element makes some difference. So I filed the bug report with the use-case and I hope that there will one-day be an API point for this so views which really care about size can be .. that size (someone surely has wanted to make an iPad ruler, there's a great use-case). Until then, re-designing that one screen for the mini and letting it scale up for the normal iPad worked very well, so perhaps Apple were right in the first place, one iPad size does fit all, just not the size I started with. I stick to public APIs, file bug reports when I think it's lacking and attempt to follow the advice of Apple engineers even when it seems there's a cheap and easy way around them, that normally leads to the most maintainable, sustainable, code. On 26 Nov, 2013, at 10:16 pm, Maxthon Chan xcvi...@me.com wrote: Then why the hell in the five years of public iOS API, Apple always decided against a public API point for that? To me, I think an API like that suggests possible fragmentation just like what plagued the system you-know-what and Apple clearly does not want that come into happening. Also, reading identifiers for released devices can be quite accurate. On Nov 26, 2013, at 21:45, Roland King r...@rols.org wrote: Rubbish. And any reading of the Apple Dev Forums will find many messages from Apple engineers telling you NOT to do that, NOT to guess, NOT to make assumptions based on what you think identifiers are or are going to be and to stick to the API points there are. They also ask people file bug reports with use cases about why one might need the physical device screen size, which I have done. On 26 Nov, 2013, at 9:41 pm, Maxthon Chan xcvi...@me.com wrote: There is no reason for Apple to provide such an clearly redundant API point. Developers can somehow predict the new devices’ identifiers and the sizes are largely correctly guessed so a quick table look-up will work very well. On Nov 26, 2013, at 21:38, Igor Elland igor.ell...@me.com wrote: If there isn't a proper API point for it, then I'm not doing it. I’m quite sure there’s no public API to get the physical screen size or otherwise differentiate between the regular size screen iPad and the mini. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
Design for mini I agree with. I never had a mini before last weekend and didn't realise what looked great on a full-size didn't work scaled down but what looked great on a mini still looked ok scaled up. I'm going to be just as conscious of mini vs normal as I have been iPhone vs iPad paradigm from now on. On 26 Nov, 2013, at 10:54 pm, Igor Elland igor.ell...@me.com wrote: On 26 Nov 2013, at 15:51, Roland King r...@rols.org wrote: Until then, re-designing that one screen for the mini and letting it scale up for the normal iPad worked very well, so perhaps Apple were right in the first place, one iPad size does fit all, just not the size I started with. I think following the HIG specifications for size really helps here, when there’s nothing smaller than the smallest suggested sizes, they do translate fairly well. But if you have really busy UIs with smaller controls than the HIG recommends, than designing “for the Mini first” should help prevent and elucidate such cases. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
I’d like to say just get rid of the old iPad-sized control design and embrace iPhone-sized controls with iPad-styled layout - they will look good on both iPad mini and iPhone since they have the same pixel (point) density and when regular iPads are used, despite being sub-optimal, the UX will not be shabby as well. On Nov 26, 2013, at 23:13, Roland King r...@rols.org wrote: Design for mini I agree with. I never had a mini before last weekend and didn't realise what looked great on a full-size didn't work scaled down but what looked great on a mini still looked ok scaled up. I'm going to be just as conscious of mini vs normal as I have been iPhone vs iPad paradigm from now on. On 26 Nov, 2013, at 10:54 pm, Igor Elland igor.ell...@me.com wrote: On 26 Nov 2013, at 15:51, Roland King r...@rols.org wrote: Until then, re-designing that one screen for the mini and letting it scale up for the normal iPad worked very well, so perhaps Apple were right in the first place, one iPad size does fit all, just not the size I started with. I think following the HIG specifications for size really helps here, when there’s nothing smaller than the smallest suggested sizes, they do translate fairly well. But if you have really busy UIs with smaller controls than the HIG recommends, than designing “for the Mini first” should help prevent and elucidate such cases. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
This distinction between iPad-sized controls and iPhone-sized controls is confusing. On either platform, the guideline has always been to prefer 44 pt by 44 pt touch targets. The iPad having a lower pixel density than the iPhone (when comparing screens of the same scale) is balanced by users holding it further from their face. If you find that your iPad UI is too small on the iPad mini, then it was likely too small to begin with on the iPad. Jeff Kelley slauncha...@gmail.com | @SlaunchaMan https://twitter.com/SlaunchaMan | jeffkelley.org On Tue, Nov 26, 2013 at 12:00 PM, Maxthon Chan xcvi...@me.com wrote: I’d like to say just get rid of the old iPad-sized control design and embrace iPhone-sized controls with iPad-styled layout - they will look good on both iPad mini and iPhone since they have the same pixel (point) density and when regular iPads are used, despite being sub-optimal, the UX will not be shabby as well. On Nov 26, 2013, at 23:13, Roland King r...@rols.org wrote: Design for mini I agree with. I never had a mini before last weekend and didn't realise what looked great on a full-size didn't work scaled down but what looked great on a mini still looked ok scaled up. I'm going to be just as conscious of mini vs normal as I have been iPhone vs iPad paradigm from now on. On 26 Nov, 2013, at 10:54 pm, Igor Elland igor.ell...@me.com wrote: On 26 Nov 2013, at 15:51, Roland King r...@rols.org wrote: Until then, re-designing that one screen for the mini and letting it scale up for the normal iPad worked very well, so perhaps Apple were right in the first place, one iPad size does fit all, just not the size I started with. I think following the HIG specifications for size really helps here, when there’s nothing smaller than the smallest suggested sizes, they do translate fairly well. But if you have really busy UIs with smaller controls than the HIG recommends, than designing “for the Mini first” should help prevent and elucidate such cases. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/slaunchaman%40gmail.com This email sent to slauncha...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
iOS screen physical size (or px density)
Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: iOS screen physical size (or px density)
I haven't seen anything that directly returns this information. Given that, it might be better to take the approach of choosing the number of cards that look good on an iPad mini and not worrying so much that there are too few on a full-sized iPad. On Nov 25, 2013, at 4:40 AM, Roland King r...@rols.org wrote: Is there yet a supported way of finding out the actual screen size (or equivalently pixel density) on an iOS screen? I have an app, uses autolayout, works fine on iPhone (one storyboard), iPad (another storyboard) and mostly looks fine between iPad and iPad mini. One screen however has a number of test 'cards' on it. On the phone one card == one screen looks great. On a full-sized iPad, about 6 to a page is clear, on a mini however 6 is not ideal and 4, or 3, looks much better and is much clearer to test. That's one of the fairly rare cases where one size doesn't fit all and knowing the actual screen dimensions would make a better user experience. I know there was lots of chat about this when the mini came out, there wasn't anything then and I don't want to do one of the version or device name hacks. Is there yet an API point for this? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com