DXPopover

A Popover mimic Facebook app popover using UIKit.

使用UIKit框架写了一个类似于Facebook的pop效果的动画。

The concept of this popover is very simple: add your contentView in a popover, then show the popover in the container view.

这个popver的使用非常简单:将你的view添加到popover中,然后在这个view中显示这个popover

Screenshot

Usage

The API and demo is fairly straight forward. You can read details in the demo.

这个API的使用在demo里面已经非常直白了,你可以直接在demo里面去看。

Showing the popover

  1. make a your contentView, set its frame or bounds. 创建一个你的view,设置它的frame值与bounds值
  2. new a DXPopover. 初始化一个DXPopver
  3. show it. 显示它

Simple - 简单的使用示例

eg:

UIImageView *imageV= [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
imageV.image = [UIImage imageNamed:@"ig20.jpg"];
DXPopover *popover = [DXPopover popover];
[popover showAtView:self.btn1 withContentView:imageV];

More conceret - 复杂一点的例子

eg:

[self.popover showAtPoint:yourPoint popoverPostion:DXPopoverPositionDown withContentView:self.tableView inView:self.tabBarController.view]; // 1.Set the show point 2.set The position if up or down staying the showPoint, 3.Your contentView 4.The containerView
__weak typeof(self)weakSelf = self;
self.popover.didDismissHandler = ^{ //The callback of popover dimissal.
[weakSelf bounceTargetView:titleView];
};

[翻译] DXPopover的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. Redis-集群 - 分片

    Redis是一个基于内存的数据库,其不仅读写速度快,每秒可以执行大约110000的写操作,81000的读取操作,而且其支持存储字符串,哈希结构,链表,集合丰富的数据类型.所以得到很多开发者的青睐.加之 ...

  2. Django与前端的交互

    在创建Django项目后,我们创建了一个App,我将这个App的名字命名为Cal,并在Cal这个文件夹下创建文件 templates. 创建templates文件夹以后,在项目settings.py文 ...

  3. PTA (Advanced Level) 1023 Have Fun with Numbers

    Have Fun with Numbers Notice that the number 123456789 is a 9-digit number consisting exactly the nu ...

  4. GitHub和git和repo的使用

    1. GitHub的使用 https://github.com/maogefff/GitHub-git-repo 2. git的使用 https://github.com/maogefff/GitHu ...

  5. C# SocketUdpServer

    public interface ISocketUdpServer { void Start(); void Stop(); int SendData(byte[] data, IPEndPoint ...

  6. Html-完整表格

    表头th 特殊的单元格:加粗.居中 它的用户是取代td的位置即可 <table border="2"> <tr> <th>姓名</th&g ...

  7. golang数组与切片

    golang中坑的慢慢踩! golang中的数组是值类型,函数调用是传入的是数组的拷贝,如果想改变数组的值,可考虑使用指针数组,即函数调用时传入数组的地址 golang中的切片是引用类型,但是在函数中 ...

  8. ASP.Net之一般处理程序

    1.静态语言和动态语言 静态语言:在服务器端,不会被执行,直接作为 字符串 发回给浏览器,由浏览器运行的语言( HTML+CSS+JS).   动态语言:在服务端,会被服务器端的某种语言的虚拟机执行的 ...

  9. mysql数据库重点(基础优化)

    ### Mysql性能优化 尽量不要写select * ,如果需要全表数据,使用select 加所有字段列名称查询代替* 尽量减少字段列的数学计算,如:where num * 2 >= 30,可 ...

  10. Python Djan 路由对应的名称

    路由关系命名 对URL路由关系进行命名,以后可以根据此名称生成自己想要的URL 1. url(r'fdsafdsaeeeee',views.index, name='hello') #给这个url后面 ...