YFPopView 3.0.1

YFPopView 3.0.1

piuSora 维护。



YFPopView 3.0.1

  • ZYF

YFPopView

iOS、macOS 弹窗控件封装

用途

弹窗控件动画、逻辑封装,调用者只需实现弹窗控件的展示 view,无需关心动画、显示、隐藏的逻辑

功能

  • 支持四边弹出、淡入淡出、缩放动画
  • 支持autolayout、frame布局
  • 支持macOS、iOS
  • 支持OC、Swift
  • 可用于弹窗、toast、loadingHUD等需求,

img

安装

Pod

将 `pod 'YFPopView'` 添加到 podfile 中并执行 pod install

手动操作

将下载的 Demo 中 `YFPopView` 文件夹拖到项目中

使用方法

  • 在需要使用的地方import "YFPopView.h"

  • 编码

//obj-c
    // create your custom view
    //...
    CustomView *customView = [[CustomView alloc] initWithFrame:frame];
    YFPopView *popView = [[YFPopView alloc] initWithAnimationView:customView];
    [popView showPopViewOn:keyWindow];
//swift
    // create your custom view
    //...
    let customView = CustomView.init(frame: frame)
    let popView = YFPopView.init(animationView: yourView)
    popView.show(on: UIApplication.shared.keyWindow)

详细使用方法请参考示例