In some of Apple's apps like Photos in iOS 11 if you hold down on a tab bar icon while your phone is in landscape and you have the larger accessibility size Dynamic Text turned on a large preview of the tab you are holding appearing. How do I support this in my app? Is it a new API or do I have to build it myself?
Asked
Active
Viewed 1,112 times
1

Steve Moser
- 7,647
- 5
- 55
- 94
2 Answers
4
You can use PDF image assets and get large tab bar preview behavior for free.
Check the "Preserve Vector Data" button in the attributes inspector for the PDF image asset.

Brandon Nott
- 536
- 2
- 15
2
The new property is:
// Higher-resolution version of the standard image. Default is nil. Used for rendering assistive UI (e.g. for users with visual impairments who need large text). If not provided, the system may attempt to generate an image based on the standard image (for instance, by rasterizing matching PDF representations at a higher resolution).
@property(nullable, nonatomic, strong) UIImage *largeContentSizeImage API_AVAILABLE(ios(11.0));
Which is on UIBarItem (which UITabBarItem inherits from). I've left the comment in from the header file as it's relevant.
It's also possible to set this under the 'accessibility' property in Interface Builder.

InsertWittyName
- 3,930
- 1
- 22
- 27