简体   繁体   中英

image not displaying on device or in simulator (Xcode)

I am creating a basic app in Xcode the graphics were designed in photoshop and exported as .png files

The first image worked fine but the second image (very similar to first does not show up)

Would appreciate any help with this

I recently had this same problem, I solve it turning off Auto-Layout and positioning the imageview by the code self.imageview.frame = CGRectMake(x,y,with,height); , aslo add the image by the code to prevent any issue self.imageview.image = [UIImage imagenamed:@"image.png"]; and ready!

Hope it helps!

Ok i solved it myself.

For anybody wondering I just added the .png file manually to the copy bundle resources in build phases

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM