测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布时间最新发布 | 2014年12月 |
由 Damien Debin 维护。
DDPopoverBackgroundView
是一个用于自定义 UIPopoverController
弹出窗口的单文件 iOS 5.0+ ARC 类(非 ARC 兼容)。
最初由 KSCustomUIPopover 和 PCPopoverController 启发。
使用很简单,您只需包含 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;
使用 tintColor
和 arrowBase
/ arrowHeight
重建预渲染的箭头/背景图像
DDPopoverBackgroundView 在 MIT 许可证下可用。请参阅 LICENSE 文件以获取更多信息。