A Popover相当于Facebook应用中的Popover,使用UIKit实现。
此Popover的概念非常简单:在Popover中添加您的contentView,然后在container view中显示Popover。
iOS ~> 6.0
DXPopover可以通过CocoaPods获取。要安装,只需将以下行添加到Podfile中
pod "DXPopover"
API和示例非常简单。您可以在示例中读取详细信息。
例:
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文件。