iOS UI 覆盖库?
我正在寻找一种方法来获得类似于 MB Progress HUD 的叠加层,但可以显示更多内容,例如图像和一些带有关闭按钮的文本。不打算在模态视图中使用 bult,而是使用一些更光滑且体积更小的东西 - 有点像你在 iPad 上的图书应用程序中看到的漂亮的平面弹出窗口。
我一直在寻找但没有运气 - 有人见过这样的东西吗?
I am looking for a way to have a overlay that looks similar to MB Progress HUD but to show some more content, like an image and some text with a button to close. Not looking to use a bult in Modal view but something a little slicker and less bulky - kinda like a nice flat popover like you see in the Books app on the iPad.
I have been searching with no luck - anyone seen something like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这可能是您正在寻找的东西吗?
http://cocoacontrols.com/platforms/ios/controls/wepopover
WEPopover 显然是一个弹出窗口 UI 控件iPhone 尽可能模仿 iPad 上 UIPopover 的 API。
如果您想要在透明 HUD 样式方面更接近 MBProgressHUD 的东西,您可以尝试 http://cocoacontrols.com/platforms/ios/controls/tapku-alerts-with-images
Tapku Alerts 似乎是简单的视图,我相信你可以稍微修改一下并添加自己的按钮也。
Could this be what you're looking for?
http://cocoacontrols.com/platforms/ios/controls/wepopover
WEPopover is apparently a popover UI control for the iPhone that mimics the API of UIPopover on the iPad as close as possible.
If you want something that is a little closer to MBProgressHUD in terms of the transparent HUD style, you might try http://cocoacontrols.com/platforms/ios/controls/tapku-alerts-with-images
Tapku Alerts seem to be simple views that I'm sure you could hack around with a little bit and add your own buttons too.
https://github.com/KJoyner/SeaGlass 处还有另一个替代 SGPopoverController 。这与 WEPopover 类似,但在视图(或顶级窗口)内有更多模态和非模态行为选项。特别是,此类支持 passthroughViews,并且像 MBProgressHUD 一样可以完全禁用弹出窗口之外的 UI 事件。
There is another alternative SGPopoverController at https://github.com/KJoyner/SeaGlass . This is similar to WEPopover but has more options behaving modally and non-modally within a view (or top-level window). In particular, this class supports passthroughViews and like MBProgressHUD can completely disable UI events outside the popover.
如果给定的库不令人满意,您可以很容易地自行构建:一个全屏 0.0 不透明度视图来吸收触摸,前面是您的可见覆盖视图,其中包含您想要的任何控件,这很简单。如果您的动画仅限于基本的核心动画内容——位置、大小、旋转、不透明度和视图/控制属性(如颜色等)——那么显示它和删除它很容易。只有当你想要精美的动画时,它才会变得棘手。
It's easy enough to build yourself if a given library is unsatisfactory: a full-screen 0.0 opacity view to absorb touches in front of which is your visible overlay view with whatever controls you want is straightforward. If your animation is limited to the basic Core Animation stuff -- position, size, rotation, opacity, and view/control properties like color, etc. -- then displaying it and removing it is easy. Only if you want fancy animation does it get tricky.