简体   繁体   中英

ios - what is the correct way to add images to the bundle?

I am trying to add these images:

1) Images for the UITabBar
2) The application icon
3) The launch icon

and I just want to make sure I get it right. I googled for "adding images to ios bundle" but I seem to be getting some outdated results. I am on xCode 4.3.3 and I am just wondering what are the right steps to add the images to the bundle. Is there a way to organize them on the file system, or its kind of a flat structure where I just add them?

Thanks!

You add the image to the project. Then you choose the right hand Xcode pane, and click top left to get the file view, with the new image selected in the left pane. Scroll down, you see something like "Target Membership". Make sure the checkbox is selected for the image. Now it will be included in your bundle. you can get at it now with "[UIImage imageNamed:@"Foo.png"]" etc.

EDIT: 在此输入图像描述

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