I know I can use the @2x
tag to automatically load images for Retina screens. What other tags are supported?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- SwiftUI: UIImage (QRCode) does not load after call
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
There are currently three supported tags:
@2x
for Retina screens.~iPad
for iPad, has to be the last tag before the extension.~iPhone
for iPhone and iPod Touch, again, has to be the last.For the splash screen there’s also the
Default-568h@2x
version for iPhone 5. This suggests that you can use-568h
to automatically load images for iPhone 5, but that’s unfortunately not the case (rdar://12516489). You can patch theUIImage
class to add the support yourself.In the end there are five possible image variants:
Image.png
for older devices, 480✕320Image@2x.png
for Retina, 960✕640Image-568h@2x.png
for Retina, 1136✕640, only after patchingUIImage
Image~iPad.png
for older iPads, 1024✕768Image@2x~iPad.png
for Retina iPad, 2048✕1536All this is showcased in iOS Image Loader sample project on GitHub.