Orientación automática de imágenes en IOS

Have any one idea about this issue please share.. When I make universal app at that time if i have two image one for ipad and another for iphone like "Demo~iphone.png" and "Demo~ipad.png" In this if i just use "Demo" as image name then xcode manage it and make adjustment by default for ipad and iphone. So would this functionality can be use for landscape and portrait mode?I see this type of functionality in default lunch image like its name become "Default-Portrait~ipad.png" and "Default-Landscape~ipad" and xcode manage it, so is it possible by some way for other images in project?

preguntado el 31 de julio de 12 a las 12:07

see my answer for this post stackoverflow.com/questions/11733279/… it may helpful :) -

yes it is good but i am searching idea as like we use for default launch image.We can see in it that its name mention like "Default-Portrait~ipad.png" and "Default-Landscape~ipad" and xcode manage it from it's side. -

1 Respuestas

There is no default way the system would handle orientation by filename. You could implement some helper method to decide which files ought to be chosen for a given orientation, while your files correspond to a naming scheme you have defined.

[HelperClass imageNameWithTemplate:@"someImage-%@.png" forOrientation:orientation]

The helper method imageNameWithTemplate:forOrientation: then would decide which file to load and return.
You would implement this method for whenever the orientation has been changed.

Respondido el 03 de diciembre de 13 a las 10:12

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.