这个“弹出窗口”怎么样?视图已创建?
请看下图。
这个“弹出”视图是如何创建的?假设我想用字体完全模仿那个视图,我该怎么做?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
请看下图。
这个“弹出”视图是如何创建的?假设我想用字体完全模仿那个视图,我该怎么做?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
金字塔形状与单击以显示弹出窗口的按钮无关。它将是弹出视图的子视图,要么是 UIImageView,要么可能绘制在 UIView 上,尽管 UIImageView 是更简单的解决方案。您绝对可以对弹出视图进行编码,以将该箭头指向屏幕上的任何点或任何方向。我要做的是通过名为
initFromPoint:
的 init 方法实例化弹出窗口,然后传递用于启动弹出窗口的按钮的中心值。然后在弹出窗口的 viewDidLoad 方法中根据该点适当地放置该点。The pyramid shape is not associated with the button that was clicked to present the popup. It would be a subview of the popup view, either a UIImageView or possibly drawn on a UIView, although a UIImageView would be the easier solution. You could definitely code the popup view to point that arrow at any point on the screen or in any direction. What I would do is instantiate the popup by means of an init method called
initFromPoint:
, then pass the center value of the button used to launch the popup. Then within theviewDidLoad
method of the popup place the point appropriately based on the point.没有为此公开的 SDK 组件,但是可以使用视图层次结构轻松实现:
只需用动画显示和隐藏视图。另外,创建委托回调以告知委托弹出窗口中发生事件的时间。
ETC。
There is not a SDK exposed component for this, but this could very easily be made using a hierarchy of views:
Just show and hide the view with an animation. Also, create delegate callbacks to tell the delegate when events occur in the popover.
etc.