[UIImage imageNamed: @ & quot; tab_back & quot;] solves the problem of not displaying images,

Source: Internet
Author: User

[UIImage imageNamed: @ "tab_back"] solves the problem of not displaying images,

[UIImage imageNamed: @”tab_back1_images does not show images, while the image tab_back.png exists in the project.

I. Reasons

This is probably because folder references instead of virtual groups are selected when you add images to the project. For example:

2. What do the two methods mean?

1. Create groups: add the selected file to the group of the project. If you select a folder, the folder is considered a group. The added group and file paths do not necessarily correspond one to one. They are a virtual management directory. The generated folder is yellow.
2. Create folder references: Create a folder index and add all files in the folder to the project. The project directory and file path corresponding to the folder he added correspond one to one. If you want to delete a file, you can directly delete the file under the file directory, and then refresh the directory to delete the file. The generated folder is blue.

Iii. Resources and compilation

After "Create groups" is selected, these image resources will be compiled into the app, for example:

Copy Bundle Resources refers to the resource files that will be included in the. app of the generated product.

The added image resources can be referenced in the app!

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.