ios Anchor 和 Passthrough 在 popover segues 中的用途是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18614949/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are Anchor and Passthrough used for in popover segues?
提问by Prabhu Natarajan
In Xcode, a Popover segue has two connection fields named Anchor and Passthrough. What are they used for?
在 Xcode 中,Popover Segue 有两个连接字段,分别名为 Anchor 和 Passthrough。它们是做什么用的?
回答by Joseph Landry
These are properties of the UIPopoverController
, not the segue. Thats why if you look at the documentation for the UIStoryboardPopoverSegue
, you won't find these two properties.
这些是 的属性,而UIPopoverController
不是转场的属性。这就是为什么如果您查看 的文档UIStoryboardPopoverSegue
,您将找不到这两个属性。
The anchor is telling the UIPopoverController
where to point its arrow.
锚点告诉UIPopoverController
指向它的箭头的位置。
The passthrough is an array of views that the user can interact with while the UIPopoverController
is displayed.
直通是一组视图,用户可以在UIPopoverController
显示时与之交互。
The documentation is here: https://developer.apple.com/documentation/uikit/uipopovercontroller
文档在这里:https: //developer.apple.com/documentation/uikit/uipopovercontroller
and the section going over the passthrough views is here: https://developer.apple.com/documentation/uikit/uipopovercontroller/1624654-passthroughviews
传递视图的部分在这里:https: //developer.apple.com/documentation/uikit/uipopovercontroller/1624654-passthroughviews
回答by 16cups
UIPopoverController seems to have been deprecated recently. However, I still see Anchor and Passthrough fields in the storyboard segue inspector.
UIPopoverController 最近似乎已被弃用。但是,我仍然在故事板转场检查器中看到 Anchor 和 Passthrough 字段。