Why you need to set up two copies of the same image resource for the bundle and app in Xcode

Source: Internet
Author: User

Panda Pig • Patty original or translated works. Welcome reprint, Reprint please indicate the source.
If you feel that the writing is not good please more advice, if you feel good please support a lot of praise. Thank you! Hopy;)

We know that in the bundle of app settings sometimes use the image resources, and in the app we tend to use the same image resources, but we tend to use the image resources copied into 2, respectively, in the bundle and the app folder, then this is why?

Why can't we just use the same image resource?

The answer is simple, because apps on iOS can't read files from the other app's sandbox, and the bundle isn't part of our app sandbox, it's part of the app sandbox. So if we want to use these resources in our own apps, We also have to copy them into our app's own folder.

That ' s why! ;)

Why you need to set up two copies of the same image resource for the bundle and app in Xcode

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.