简体   繁体   English

如何在iOS 11中支持大标签栏预览?

[英]How do I support large tab bar previews in iOS 11?

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. 在某些Apple应用中,例如iOS 11中的“照片”,如果您在手机处于横向状态时按住选项卡栏图标,并且具有较大的辅助功能,则“动态文本”会打开您所显示的选项卡的大预览。 How do I support this in my app? 如何在我的应用程序中支持此功能? Is it a new API or do I have to build it myself? 是新的API还是我必须自己构建它? 大标签栏预览

You can use PDF image assets and get large tab bar preview behavior for free. 您可以使用PDF图像资源,并免费获得大标签栏预览行为。

Check the "Preserve Vector Data" button in the attributes inspector for the PDF image asset. 在属性检查器中,检查PDF图像资产的“保留矢量数据”按钮。

https://developer.apple.com/videos/play/wwdc2017/204/ https://developer.apple.com/videos/play/wwdc2017/204/

检查保留向量数据

在此处输入图片说明

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). 它在UIBarItem(继承自UITabBarItem)上。 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. 也可以在Interface Builder中的“ accessibility”属性下进行设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我升级 Visual Studio for Xcode 11 预览版以支持 iOS 13 时,命名空间“插件”中不存在指纹错误 - Fingerprint does not exist in the namespace 'Plugin' errors when I upgrade Visual Studio for Xcode 11 Previews to support iOS 13 在iOS 7中,如何更改“更多”标签栏项目的颜色? - In iOS 7, how do i change the color of the “More” tab bar item? 如何在iOS Swift中更改默认的标签栏项? - How do I change the default tab bar item in iOS Swift? 如何知道何时按下标签栏项目(iOS) - How do I know when a tab bar item is pressed (iOS) 如何在iOS 7和iOS 6中支持不同的标签栏图标大小? - How to support different tab bar icon sizes in iOS 7 and iOS 6? 如何在IOS 11中为新的大条形图设置带有渐变颜色的UINavigationbar? - How can I set UINavigationbar with gradient color in IOS 11 for new large bar? 如何在iOS中修复标签栏控制器的标签栏? - How can I fix the tab bar of the tab bar controller in iOS? iOS 11导航栏透明,带有大标题 - iOS 11 navigation bar transparent with large titles 如何防止mergExt Banner控件覆盖IOS设备底部的选项卡栏 - How do I keep the mergExt Banner control from covering the tab bar at the bottom of an IOS device 如何在标签栏应用程序中使iOS 6 GM中的旋转正常工作? - How do I make rotation work properly in iOS 6 GM in a tab bar app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM