나는이 아래로 비등 디렉토리가 있습니다. 이제 각 이미지를로드하고 싶습니다 .png중복 된 파일 이름을 가진 디렉토리 구조를 프로젝트에 추가하는 방법은 무엇입니까?</p> <pre><code>/ - character0 -- attribute0 -- image.png - character1 -- attribute0 -- image.png </code></pre> <p>내가 두 문자를 정의하기 위해, 엑스 코드에 떨어졌다 :
CIImage * cheetah = [CIImage imageWithContentsOfURL:[[NSBundle mainBundle]
URLForResource:@"image" withExtension:@".png"]];
치타 란 무엇입니까? character0
은 어떻게받을 수 있습니까?
http://stackoverflow.com/questions/7343759/count-of-images-in-my-nsbundle-mainbundle-bundlepath –
@Nag_iphone는 API의 변화가 있었다. 코드는 더 이상 컴파일되지 않지만 아이디어를 얻습니다. – alecail
괜찮지 만 .... 대답이 나에게 알려주는 경우 –