mrgrieves
mrgrieves

Reputation: 579

Filename suffix iPad images to Asset Catalog

Xcode Asset Catalogs have a very convenient feature in which dragging files named like this:

image.png
[email protected]
[email protected]

will create a single image set named image with each image placed in the right slot.

Is there a suffix which works for iPad images? I'm looking for an efficient way to add ipad images to an asset catalog in the same image set as their iPhone brethren.

~ipad and ~iphone after the base name only seems to work on XIB files.

Upvotes: 2

Views: 1754

Answers (1)

Craig
Craig

Reputation: 9330

Yes, since iOS4 you can use ~ipad and ~iphone in the following format:

<basename><device>.<filename_extension>

From the documentation:

The string represents the original name of the resource file. It also represents the name you use when accessing the file from your code. Similarly, the string is the standard filename extension used to identify the type of the file. The string is a case-sensitive string that can be one of the following values:

  • ~ipad - The resource should be loaded on iPad devices only.

  • ~iphone - The resource should be loaded on iPhone or iPod touch devices only.

Upvotes: 1

Related Questions