DXPopoverKnockdownFork 0.1.6

DXPopoverKnockdownFork 0.1.6

测试测试
语言语言 Obj-CObjective C
许可 MIT
发布最新版本2016年10月

Robert Miller 维护。



  • 作者
  • xiekw2010

DXPopover

使用 UIKit 模仿 Facebook 应用弹窗的弹出视图。

这个弹出视图的概念非常简单:在弹出视图中添加您的 contentView,然后在容器视图中显示弹出视图。

要求

iOS ~> 6.0

安装

DXPopover 通过 CocoaPods 提供。要安装,只需将以下行添加到您的 Podfile 中

pod "DXPopover"

截图

DXPopover

用法

API 和演示非常直接。您可以在演示中查看详细信息。

显示弹出视图

  1. 制作您的 contentView,设置其 frame 或 bounds。
  2. 新建 DXPopover。
  3. 显示它。
简单

例如

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];
更具体

例如

[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 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。