Add a picture to your iOS simulator

Source: Internet
Author: User

Problem

Toss:

About the File Selection dialog box in Ios/iphone for users to select files such as pictures

The process, encountered a problem, hope that the program provides users to choose their own desired picture as a bird picture.

However, the current development environment is an iOS emulator, so it involves how to make the image available in the iOS emulator for the user to choose from.

"Resolution Process"

1. Later learned that the iOS simulator is not a picture by default, so try to add images to the iOS emulator (Photos, album).

2. Then refer to the following: Adding images to IPhone Simulator, but finally cannot find similar to:

~/Library/Application Support/iPhone Simulator/

The location:

3. Then refer to its tips and drag the image from Safari to iOS simulator, so try it:

But it turned out to be a pit-daddy:

That is, IOS simulator just calls inside safari to open the corresponding page instead of storing the dragged picture.

4. Then try the recommendation, drag the picture from your local safari to your current Mac, and then drag the picture from your Mac to the photos in the iOS simulator:

Instead of saving the picture, you find that you are using Safari to open the picture:

5. Later know is the above to see the wrong hint, so go to follow the hint, the corresponding picture mouse point live long press 1, 2 seconds,

The corresponding dialog box will pop up and ask if you want to save the image:

This way, you can save the image to the iOS emulator.

Finally, several pictures were saved in the photos:

In this way, the subsequent encoding to access the image, only the picture can be displayed.

Summary

My current environment is:

Mac 10.7 + Xcode 4.4.1 + IOS Simulator 5.1

If you want to add an image to iOS simulator, I can't find a corresponding

~/library/application support/The following iphone simulator or iOS simulator.

And only through the following methods:

"Add pictures locally from Mac to iOS simulator"

1. Drag the picture from Mac native to iOS simulator:

2. IOS Simulator will automatically open safari to open the corresponding image, and then you use the mouse to the corresponding picture long press 1, 2 seconds, you can save the Picture dialog box:

Click Save Image to save the image to the photos in iOS simulator.

3. Then of course, open the photos in Iossimulator:

4. Open iOS Simulator, which is albums

Note: All of the 6 images can be seen here because I have already added 5.

5. Click Enter to see the sixth image you just saved:

This allows you to add images (from Mac Local) to iOS simulator.

Add a picture to your iOS simulator

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.