which iPhone...

Randy Hengst iowahengst at mac.com
Mon Nov 10 09:33:16 EST 2014


Hi John,

I haven't messed with iPhone 6 yet, but here's what I've done to determine screen size for my opening card/image to show. I'm only using the landscape options for display

 switch (word 1 of the machine)
      case "iPod"
      case "iPhone"
         if item 3 the screenRect = 568 or item 3 of the screenRect = 1136 then
            show image "CFS_Splash_iPod4_Retina_BLUE.png" on card "CoverCard"
         end if
         if item 3 the screenRect = 480 or item 3 of the screenRect = 960 then
            show image "CFS_Splash_iPod_Retina_BLUE.png" on card "CoverCard"
         end if
         break
      case "iPad"
         show image "CFS_Splash_iPad_Retina_Land_BLUE.png" on card "CoverCard"
         break
      default
         show image "CFS_Splash_iPad_Retina_Land_BLUE.png" on card "CoverCard"
         break
   end switch

be well,
randy
-----
On Nov 10, 2014, at 3:18 AM, John Dixon <dixonja at hotmail.co.uk> wrote:

> In the case of testing in the 'iPhone Simulator' ... How do you determine which iPhone the stack is supposed to be running on ? Up until now I have used something like this :-
> 
> on openStack
>   if environment() = "mobile" then
>      whichiPhone
> end openStack
> 
> command whichiPhone
>   if item 4 of the working screenrect = 568 then
>      — do stuff here for a iPhone 5
>   end if
> 
>   if item 4 of the working screenrect = 480 then
>      — do stuff here for an iPhone 4
>   end if    
> end whichiPhone
> 
> but the 'screenrect' function does not return the correct response for the iPhone 6 or the iPhone 6 Plus as the function just treats it as if it were an iPhone 5...
> 
> thanks...
> 		 	   		  
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list