which iPhone...

John Dixon dixonja at hotmail.co.uk
Mon Nov 10 04:18:10 EST 2014


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...
 		 	   		  


More information about the use-livecode mailing list