0

This is how my Xcode project is structured.

This is how my Xcode project is structured.

To access the [email protected] file, I can use the following code:

UIImage *cellIcon = [UIImage imageNamed:@"bs-better"]; 

This already works. However, for readability sake, I would like it if there's a way to include the grouping path in the code, something like:

UIImage *cellIcon = [UIImage imageNamed:@"Assets/Icons/bs/bs-better"]; 

Is this possible?

1

2 Answers 2

1

Yes it is possible, for this you need to create physical directory rather then logical enter image description here

You have to add directory with "create folder references for any added folders" rather then "Create group for any added folders" so it will generate physical directory like "Example Directory" in below image, so it must be access by proper path.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0
 UIImage *img = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"bs-better" ofType:@"png"]]; 

This is the method to get files from bundle.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.