FWPresentationController


@interface FWPresentationController : UIPresentationController

自定义展示控制器。默认显示暗色背景动画且弹出视图占满容器,可通过属性自定义

  • 是否显示暗色背景,默认YES

    Declaration

    Objective-C

    @property (nonatomic) BOOL showDimming;
  • 是否可以点击暗色背景关闭,默认YES。如果弹出视图占满容器,手势不生效(因为弹出视图挡住了暗色背景)

    Declaration

    Objective-C

    @property (nonatomic) BOOL dimmingClick;
  • 是否执行暗黑背景透明度动画,默认YES

    Declaration

    Objective-C

    @property (nonatomic) BOOL dimmingAnimated;
  • 暗色背景颜色,默认黑色,透明度0.5

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) UIColor *dimmingColor;
  • 设置点击暗色背景关闭完成回调,默认nil

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) void (^)(void) dismissCompletion;
  • 设置弹出视图的圆角位置,默认左上和右上。如果弹出视图占满容器,不生效需弹出视图自定义

    Declaration

    Objective-C

    @property (nonatomic) UIRectCorner rectCorner;
  • 设置弹出视图的圆角半径,默认0无圆角。如果弹出视图占满容器,不生效需弹出视图自定义

    Declaration

    Objective-C

    @property (nonatomic) CGFloat cornerRadius;
  • 自定义弹出视图的frame计算block,默认nil占满容器,优先级高

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) CGRect (^) (FWPresentationController *_Nonnull __strong) frameBlock;
  • 设置弹出视图的frame,默认CGRectZero占满容器,优先级中

    Declaration

    Objective-C

    @property (nonatomic) CGRect presentedFrame;
  • 设置弹出视图的居中size,默认CGSizeZero占满容器,优先级中

    Declaration

    Objective-C

    @property (nonatomic) CGSize presentedSize;
  • 设置弹出视图的顶部距离,默认0占满容器,优先级低

    Declaration

    Objective-C

    @property (nonatomic) CGFloat verticalInset;