DDPopoverBackgroundView 1.0.2

DDPopoverBackgroundView 1.0.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布时间最新发布2014年12月

Damien Debin 维护。



  • Damien Debin

用途

DDPopoverBackgroundView 是一个用于自定义 UIPopoverController 弹出窗口的单文件 iOS 5.0+ ARC 类(非 ARC 兼容)。

最初由 KSCustomUIPopoverPCPopoverController 启发。

用法

使用很简单,您只需包含 DDPopoverBackgroundView 并调用 setPopoverBackgroundViewClass:

UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:content];
[popOver setPopoverBackgroundViewClass:[DDPopoverBackgroundView class]];

属性 / 方法

  • + (void)setContentInset:(CGFloat)contentInset; 调整内容内边距(~ 边框宽度)

  • + (void)setTintColor:(UIColor *)tintColor; 设置用于箭头和弹出窗口背景的着色色

  • + (void)setBackgroundImageCornerRadius:(CGFloat)cornerRadius; 设置背景图像的圆角半径

  • + (void)setShadowEnabled:(BOOL)shadowEnabled; 启用/禁用弹出窗口下的阴影

  • + (void)setArrowBase:(CGFloat)arrowBase; + (void)setArrowHeight:(CGFloat)arrowHeight; 设置箭头宽度(基线) / 高度

  • + (void)setBackgroundImage: top: right: bottom: left: 为背景和顶部/右侧/底部/左侧箭头设置自定义图像

  • + (void)rebuildArrowImages; 使用 tintColorarrowBase / arrowHeight 重建预渲染的箭头/背景图像

许可证

DDPopoverBackgroundView 在 MIT 许可证下可用。请参阅 LICENSE 文件以获取更多信息。