UIPOPOVER for Iphone?还是假的? [英] UIPOPOVER for Iphone? or is it fake?

查看:88
本文介绍了UIPOPOVER for Iphone?还是假的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以看看这个吗? : http://www.woowoomac.com/storage /awesome-note-iphone-note-todo-app-menus.jpg?__SQUARESPACE_CACHEVERSION=1268581762429

Can anyone take a look a this ? : http://www.woowoomac.com/storage/awesome-note-iphone-note-todo-app-menus.jpg?__SQUARESPACE_CACHEVERSION=1268581762429

我们知道iphone 4.0不支持UIPopovers - 任何想法他们是如何设法创造这样的流行音乐?

As we know iphone 4.0 does not support UIPopovers - any idea how did they manage to create a pop over like that ?

推荐答案

我自己创建了一个类,其界面与UIPopoverController完全相同,但是针对iPhone进行了推广。它还允许您自定义弹出窗口的背景和箭头。
棘手的部分是为箭头图像计算正确的矩形并正确调整背景图像的大小,但除此之外它只是标准的UIView内容(添加子视图等)。

I created a class myself with the exact same interface as the UIPopoverController, but generalized for the iPhone. It allows you to customize the background and arrow for the popover as well. The tricky part is calculating the correct rectangle for the arrow image and resizing the background image properly, but other than that it's just standard UIView stuff (adding subviews, etc).

您可以在此处找到包含核心popover类的示例项目: https://github.com/werner77/ WEPopover

You can find a sample project including the core popover classes here: https://github.com/werner77/WEPopover

这篇关于UIPOPOVER for Iphone?还是假的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆