Xcode 7 - Missing Retina 4 support in image.xcassets

In xcode 7 there is no way to display image 4 of the retina. I am creating a simple picture with the addition of a background image in my xib file. I created an image. Imagecaxets from the background image added 1x (320 * 480), 2x (640 * 960), 3x (1248 * 2208) resolution images. But when I use this image installed in my xib file, it only shows the correct image for iphone 4 and iphone 4s. I changed the Aspectfit mode. After that, he began to show the fields above and below. Please help me.

Thank you in advance

+4
source share
2 answers

, xcassets json , .

json Apple

+2

json . :
1. , images.xcassets, Finder.
2. Contents.json, :

{  
      "idiom" : "iphone",
      "filename" : "iphone-5.png",
      "subtype" : "retina4",
      "scale" : "2x"
},

json :

{
 "images" : [
 {
   "idiom" : "iphone",
   "filename" : "iphone-4-normal.png",
   "scale" : "1x"
 },
 {
   "idiom" : "iphone",
   "filename" : "iphone-4-ratina.png",
   "scale" : "2x"
 },
 {
   "idiom" : "iphone",
   "filename" : "iphone-5.png",
   "subtype" : "retina4",
   "scale" : "2x"
 },
 {
   "idiom" : "iphone",
   "filename" : "iphone-6+.png",
   "scale" : "3x"
 }
 ],
 "info" : {
 "version" : 1,
 "author" : "xcode"
 }
}  

3. . Xcode 4 , .

+2

Source: https://habr.com/ru/post/1611778/


All Articles